diff --git a/.circleci/config.yml b/.circleci/config.yml index 4efc24c7ba1a..10d3e1544a64 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,15 @@ commands: # a reusable command with parameters - source-v2- # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + - run: + name: Install Headless Chrome dependencies + command: | + sudo apt-get update && sudo apt-get install -yq \ + gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ + libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ + libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \ + libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \ + fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1 # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. - checkout # Prepare for artifact and test results collection equivalent to how it was done on 1.0. @@ -128,7 +137,7 @@ commands: # a reusable command with parameters jobs: node0: machine: - image: circleci/classic:latest + image: ubuntu-2004:202201-02 working_directory: ~/OpenAPITools/openapi-generator shell: /bin/bash --login environment: @@ -141,7 +150,7 @@ jobs: nodeNo: "0" node1: machine: - image: circleci/classic:latest + image: ubuntu-2004:202201-02 working_directory: ~/OpenAPITools/openapi-generator shell: /bin/bash --login environment: @@ -154,7 +163,7 @@ jobs: nodeNo: "1" node2: machine: - image: circleci/classic:latest + image: ubuntu-2004:202201-02 working_directory: ~/OpenAPITools/openapi-generator shell: /bin/bash --login environment: @@ -167,7 +176,7 @@ jobs: nodeNo: "2" node3: machine: - image: circleci/classic:latest + image: ubuntu-2004:202201-02 working_directory: ~/OpenAPITools/openapi-generator shell: /bin/bash --login environment: @@ -201,4 +210,4 @@ workflows: - node1 - node2 - node3 - - node4 \ No newline at end of file + - node4 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 234b773ab9b2..66e8c1c8379f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -16,5 +16,4 @@ These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/). -- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (5.3.0), `6.0.x` - [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request. diff --git a/.github/workflows/check-supported-versions.yaml b/.github/workflows/check-supported-versions.yaml index 5650f33b4a27..350c008e9004 100644 --- a/.github/workflows/check-supported-versions.yaml +++ b/.github/workflows/check-supported-versions.yaml @@ -18,25 +18,25 @@ jobs: - java: 17 os: ubuntu-latest # Need to update to Gradle version with v17 support in modules/openapi-generator-gradle-plugin/pom.xml - flags: -am -pl modules/openapi-generator-cli + flags: -am -pl modules/openapi-generator-cli -Dmaven.javadoc.skip=true -Dmaven.test.skip=true steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ matrix.java }} - - uses: actions/cache@v2.1.7 + - uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - uses: actions/cache@v2.1.7 + - uses: actions/cache@v3 with: path: | ~/.gradle/caches @@ -50,7 +50,7 @@ jobs: run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }} - name: Upload Maven build artifact - uses: actions/upload-artifact@v2.3.1 + uses: actions/upload-artifact@v3 if: matrix.java == '8' && matrix.os == 'ubuntu-latest' with: name: artifact @@ -79,9 +79,9 @@ jobs: # flags: --skip-docs steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download build artifact - uses: actions/download-artifact@v2.1.0 + uses: actions/download-artifact@v3 with: name: artifact - name: Run Ensures Script diff --git a/.github/workflows/gradle-test.yaml b/.github/workflows/gradle-test.yaml index c6f6f495ab17..09ad3815645c 100644 --- a/.github/workflows/gradle-test.yaml +++ b/.github/workflows/gradle-test.yaml @@ -33,21 +33,21 @@ jobs: - samples/openapi3/client/petstore/java/jersey2-java8 - samples/client/petstore/java/okhttp-gson steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 11 # Cache Gradle Dependencies - name: Setup Gradle Dependencies Cache - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} # Cache Gradle Wrapper - name: Setup Gradle Wrapper Cache - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 with: path: ~/.gradle/wrapper key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} diff --git a/.github/workflows/openapi-generator.yaml b/.github/workflows/openapi-generator.yaml index 56958aa515b1..bd062d7d037e 100644 --- a/.github/workflows/openapi-generator.yaml +++ b/.github/workflows/openapi-generator.yaml @@ -15,14 +15,14 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: 8 distribution: 'temurin' - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: cache-maven-repository with: @@ -39,7 +39,7 @@ jobs: run: mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error - run: ls -la modules/openapi-generator-cli/target - name: Upload openapi-generator-cli.jar artifact - uses: actions/upload-artifact@v2.3.1 + uses: actions/upload-artifact@v3 with: name: openapi-generator-cli.jar path: modules/openapi-generator-cli/target/openapi-generator-cli.jar @@ -51,14 +51,14 @@ jobs: needs: - build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: 8 distribution: 'temurin' - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: cache-maven-repository with: @@ -75,7 +75,7 @@ jobs: run: mvn --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error - name: Publish unit test reports if: ${{ always() }} - uses: actions/upload-artifact@v2.3.1 + uses: actions/upload-artifact@v3 with: name: surefire-test-results path: '**/surefire-reports/TEST-*.xml' @@ -86,14 +86,14 @@ jobs: needs: - build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: 8 distribution: 'temurin' - name: Download openapi-generator-cli.jar artifact - uses: actions/download-artifact@v2.1.0 + uses: actions/download-artifact@v3 with: name: openapi-generator-cli.jar path: modules/openapi-generator-cli/target @@ -125,14 +125,14 @@ jobs: - build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: 8 distribution: 'temurin' - name: Download openapi-generator-cli.jar artifact - uses: actions/download-artifact@v2.1.0 + uses: actions/download-artifact@v3 with: name: openapi-generator-cli.jar path: modules/openapi-generator-cli/target @@ -160,14 +160,14 @@ jobs: needs: - build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: 11 distribution: 'temurin' - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: cache-maven-repository with: @@ -193,14 +193,14 @@ jobs: needs: - build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: 11 distribution: 'temurin' - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: cache-maven-repository with: diff --git a/.github/workflows/samples-dart.yaml b/.github/workflows/samples-dart.yaml index 5efe3b6b686f..fd78f8a6d912 100644 --- a/.github/workflows/samples-dart.yaml +++ b/.github/workflows/samples-dart.yaml @@ -13,17 +13,17 @@ on: - 'samples/openapi3/client/petstore/dart*/**' jobs: - tests-dart-2-10: - name: Tests Dart 2.10 + tests-dart: + name: Tests Dart runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: @@ -32,40 +32,7 @@ jobs: ~/.gradle key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - name: Cache test dependencies - uses: actions/cache@v2.1.7 - env: - cache-name: pub-cache - with: - path: $PUB_CACHE - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }} - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.10.5 - - name: Run tests - uses: ./.github/actions/run-samples - with: - name: samples.dart-2.10 - - tests-dart-2-13: - name: Tests Dart 2.13 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'temurin' - java-version: 8 - - name: Cache maven dependencies - uses: actions/cache@v2.1.7 - env: - cache-name: maven-repository - with: - path: | - ~/.m2/repository - ~/.gradle - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - - name: Cache test dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: pub-cache with: @@ -77,4 +44,4 @@ jobs: - name: Run tests uses: ./.github/actions/run-samples with: - name: samples.dart-2.13 + name: samples.dart diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml index b8733b2c905a..4c618c21dfd1 100644 --- a/.github/workflows/samples-dotnet.yaml +++ b/.github/workflows/samples-dotnet.yaml @@ -22,7 +22,7 @@ jobs: - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt - samples/server/petstore/aspnetcore-6.0 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v2 with: dotnet-version: '6.0.x' diff --git a/.github/workflows/samples-groovy.yaml b/.github/workflows/samples-groovy.yaml index 06fe5cc117f7..e9c1f791aad9 100644 --- a/.github/workflows/samples-groovy.yaml +++ b/.github/workflows/samples-groovy.yaml @@ -21,13 +21,13 @@ jobs: sample: - samples/client/petstore/groovy steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml index 7907118eb48c..62bad2df6c38 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -34,17 +34,18 @@ jobs: - samples/client/petstore/java/rest-assured - samples/client/petstore/java/rest-assured-jackson - samples/client/petstore/java/microprofile-rest-client + - samples/client/petstore/java/microprofile-rest-client-3.0 - samples/client/petstore/java/apache-httpclient - samples/client/petstore/java/feign - samples/client/petstore/java/jersey1 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 11 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-java-play-framework.yaml b/.github/workflows/samples-java-play-framework.yaml index cd4f4ec9c26a..083f003073e7 100644 --- a/.github/workflows/samples-java-play-framework.yaml +++ b/.github/workflows/samples-java-play-framework.yaml @@ -29,13 +29,13 @@ jobs: - samples/server/petstore/java-play-framework-no-swagger-ui - samples/server/petstore/java-play-framework-no-wrap-calls steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 11 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-jaxrs.yaml b/.github/workflows/samples-jaxrs.yaml index 1000251d19b5..8e5e77cd8da8 100644 --- a/.github/workflows/samples-jaxrs.yaml +++ b/.github/workflows/samples-jaxrs.yaml @@ -34,20 +34,18 @@ jobs: - samples/server/petstore/jaxrs-resteasy/eap-joda - samples/server/petstore/jaxrs-resteasy/eap-java8 - samples/server/petstore/jaxrs-resteasy/joda - - samples/server/petstore/jaxrs-resteasy/default-value - samples/server/petstore/jaxrs-cxf - samples/server/petstore/jaxrs-cxf-annotated-base-path - samples/server/petstore/jaxrs-cxf-cdi - - samples/server/petstore/jaxrs-cxf-cdi-default-value - samples/server/petstore/jaxrs-cxf-non-spring-app steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-kotlin-client.yaml b/.github/workflows/samples-kotlin-client.yaml index 0c6199846320..009733cce67a 100644 --- a/.github/workflows/samples-kotlin-client.yaml +++ b/.github/workflows/samples-kotlin-client.yaml @@ -40,13 +40,13 @@ jobs: - samples/client/petstore/kotlin-uppercase-enum - samples/client/petstore/kotlin-array-simple-string steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-kotlin-server.yaml b/.github/workflows/samples-kotlin-server.yaml index bccd2212ad2f..ad5111234088 100644 --- a/.github/workflows/samples-kotlin-server.yaml +++ b/.github/workflows/samples-kotlin-server.yaml @@ -30,13 +30,13 @@ jobs: # no build.gradle file #- samples/server/petstore/kotlin-vertx-modelMutable steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-scala.yaml b/.github/workflows/samples-scala.yaml index ca908a8e8427..9b91e8ca2b29 100644 --- a/.github/workflows/samples-scala.yaml +++ b/.github/workflows/samples-scala.yaml @@ -26,13 +26,13 @@ jobs: - samples/server/petstore/scalatra - samples/server/petstore/scala-finch # cannot be tested with jdk11 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/samples-spring.yaml b/.github/workflows/samples-spring.yaml index e72746a10c5b..aa3371a9b075 100644 --- a/.github/workflows/samples-spring.yaml +++ b/.github/workflows/samples-spring.yaml @@ -39,14 +39,15 @@ jobs: - samples/openapi3/server/petstore/springboot-delegate - samples/server/petstore/spring-boot-nullable-set - samples/server/petstore/spring-boot-defaultInterface-unhandledException + - samples/openapi3/server/petstore/spring-boot-oneof steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 8 - name: Cache maven dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 env: cache-name: maven-repository with: diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 63f622d66e10..4df69baebf76 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository_owner == 'OpenAPITools' }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 11 diff --git a/.gitignore b/.gitignore index f7a209485467..51271442043b 100644 --- a/.gitignore +++ b/.gitignore @@ -263,3 +263,6 @@ samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock # Crystal samples/client/petstore/crystal/lib + +# Go +samples/openapi3/client/petstore/go/privatekey.pem diff --git a/.travis.yml b/.travis.yml index 92ac1baaeaec..9608afd462fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ cache: - $HOME/.rvm/gems/ruby-2.4.1 - $HOME/website/node_modules/ - $HOME/.cache/deno + - $HOME/.phpenv/versions/8.1.4 services: - docker @@ -88,8 +89,16 @@ before_install: #- sudo apt-get update #- sudo apt-get install dart # switch to php7 + - sudo apt-get install libonig-dev libzip-dev + - git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build + - git clone https://github.com/ngyuki/phpenv-composer.git $(phpenv root)/plugins/phpenv-composer + - if [ $(ls -A "$HOME/.phpenv/versions/8.1.4" | wc -l) -eq 0 ]; then + phpenv install 8.1.4; + fi; + - phpenv rehash - phpenv versions - - phpenv global 7.2.15 + #- phpenv global 7.2.15 + - phpenv global 8.1.4 - php -v # comment out below as installation failed in travis # Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests. @@ -97,10 +106,10 @@ before_install: # - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18). # - . ~/otp/18.2.1/activate && erl -version #- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH" - # install C++ tools - - sudo apt install -y --no-install-recommends valgrind cmake build-essential + # install C++ tools + - sudo apt install -y --no-install-recommends valgrind cmake build-essential # install Qt5 - - sudo apt install -y --no-install-recommends qt5-default + - sudo apt install -y --no-install-recommends qt5-default - cmake --version # -- skip perl test to shorten build time # perl dep diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index b6e2691121a5..01960b8f3e4f 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -25,22 +25,15 @@ if [ "$NODE_INDEX" = "1" ]; then mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error elif [ "$NODE_INDEX" = "2" ]; then - echo "Running node $NODE_INDEX to test haskell" + echo "Running node $NODE_INDEX to test Go" # install haskell #curl -sSLk https://get.haskellstack.org/ | sh #stack upgrade #stack --version - # prepare r - sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' - gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 - gpg -a --export E084DAB9 | sudo apt-key add - - sudo apt-get update - sudo apt-get -y install r-base - R --version # install curl - sudo apt-get -y build-dep libcurl4-gnutls-dev - sudo apt-get -y install libcurl4-gnutls-dev + #sudo apt-get -y build-dep libcurl4-gnutls-dev + #sudo apt-get -y install libcurl4-gnutls-dev # Install golang version 1.14 go version diff --git a/README.md b/README.md index ae726d72c219..5e4a33a5c06d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`6.0.x`): -[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.com/OpenAPITools/openapi-generator) +[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/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) [![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator) @@ -49,6 +49,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa [](https://www.apideck.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.pexa.com.au/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.numary.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) +[](https://www.onesignal.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) #### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring @@ -62,7 +63,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) | +| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) | | **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | | **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** | | **Configuration files** | [**Apache2**](https://httpd.apache.org/) | @@ -124,7 +125,7 @@ You can find our released artifacts on maven central: ${openapi-generator-version} ``` -See the different versions of the [openapi-generator](https://mvnrepository.com/artifact/org.openapitools/openapi-generator) artifact available on maven central. +See the different versions of the [openapi-generator](https://search.maven.org/artifact/org.openapitools/openapi-generator) artifact available on maven central. **Cli:** ```xml @@ -134,7 +135,7 @@ See the different versions of the [openapi-generator](https://mvnrepository.com/ ${openapi-generator-version} ``` -See the different versions of the [openapi-generator-cli](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli) artifact available on maven central. +See the different versions of the [openapi-generator-cli](https://search.maven.org/artifact/org.openapitools/openapi-generator-cli) artifact available on maven central. **Maven plugin:** ```xml @@ -144,7 +145,7 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. ${openapi-generator-version} ``` -* See the different versions of the [openapi-generator-maven-plugin](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin) artifact available on maven central. +* See the different versions of the [openapi-generator-maven-plugin](https://search.maven.org/artifact/org.openapitools/openapi-generator-maven-plugin) artifact available on maven central. * [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.md) **Gradle plugin:** @@ -155,7 +156,7 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. ${openapi-generator-version} ``` -* See the different versions of the [openapi-generator-gradle-plugin](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-gradle-plugin) artifact available on maven central. +* See the different versions of the [openapi-generator-gradle-plugin](https://search.maven.org/artifact/org.openapitools/openapi-generator-gradle-plugin) artifact available on maven central. * [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc) ### [1.3 - Download JAR](#table-of-contents) @@ -352,7 +353,7 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c ./run-in-docker.sh list # Executes 'list' command for openapi-generator-cli ./run-in-docker.sh /gen/bin/go-petstore.sh # Builds the Go client ./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \ - -g go -o /gen/out/go-petstore --package-name=petstore # generates go client, outputs locally to ./out/go-petstore + -g go -o /gen/out/go-petstore -p packageName=petstore # generates go client, outputs locally to ./out/go-petstore ``` ##### Troubleshooting @@ -576,6 +577,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Bithost GmbH](https://www.bithost.ch) - [Bosch Connected Industry](https://www.bosch-connected-industry.com) - [Boxever](https://www.boxever.com/) +- [Brevy](https://www.brevy.com) - [Bunker Holding Group](https://www.bunker-holding.com/) - [California State University, Northridge](https://www.csun.edu) - [CAM](https://www.cam-inc.co.jp/) @@ -621,6 +623,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [LVM Versicherungen](https://www.lvm.de) - [MailSlurp](https://www.mailslurp.com) - [Manticore Search](https://manticoresearch.com) +- [Mastercard](https://developers.mastercard.com) - [Médiavision](https://www.mediavision.fr/) - [Metaswitch](https://www.metaswitch.com/) - [MoonVision](https://www.moonvision.io/) @@ -629,6 +632,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Neverfail](https://www.neverfail.com/) - [NeuerEnergy](https://neuerenergy.com) - [Nokia](https://www.nokia.com/) +- [OneSignal](https://www.onesignal.com/) - [Options Clearing Corporation (OCC)](https://www.theocc.com/) - [Openet](https://www.openet.com/) - [openVALIDATION](https://openvalidation.io/) @@ -656,6 +660,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Suva](https://www.suva.ch/) - [Telstra](https://dev.telstra.com) - [The University of Aizu](https://www.u-aizu.ac.jp/en/) +- [Translucent ApS](https://www.translucent.dk) - [TravelTime platform](https://www.traveltimeplatform.com/) - [TribalScale](https://www.tribalscale.com) - [TUI InfoTec GmbH](http://www.tui-infotec.com/) @@ -813,17 +818,17 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2021-01-18 - [「アプリ開発あるある」を疑うことから始まった、API Clientコードの自動生成【デブスト2020】](https://codezine.jp/article/detail/13406?p=2) by [CodeZine編集部](https://codezine.jp/author/1) - 2021-02-05 - [REST-API-Roundtrip with SpringDoc and OpenAPI Generator](https://blog.viadee.de/en/rest-api-roundtrip) by [Benjamin Klatt](https://twitter.com/benklatt) at [viadee](https://www.viadee.de/en/) - 2021-02-17 - [REST-API-Roundtrip with SpringDoc and OpenAPI Generator](https://medium.com/nerd-for-tech/rest-api-roundtrip-with-springdoc-and-openapi-generator-30bd27ccf698) by [cloud @viadee](https://cloud-viadee.medium.com/) -- 2021-03-08 - [OpenAPI Generator 工具的躺坑尝试](https://blog.csdn.net/u013019701/article/details/114531975) by [独家雨天](https://blog.csdn.net/u013019701) at [CSDN官方博客](https://blog.csdn.net/) +- 2021-03-08 - [OpenAPI Generator 工具的躺坑尝试](https://blog.csdn.net/u013019701/article/details/114531975) by [独家雨天](https://blog.csdn.net/u013019701) at [CSDN官方博客](https://blog.csdn.net/) - 2021-03-16 - [如何基于 Swagger 使用 OpenAPI Generator 生成 JMeter 脚本?](https://cloud.tencent.com/developer/article/1802704) by [高楼Zee](https://cloud.tencent.com/developer/user/5836255) at [腾讯云专栏](https://cloud.tencent.com/developer/column) - 2021-03-24 - [openapi-generator-cli による TypeScript 型定義](https://zenn.dev/takepepe/articles/openapi-generator-cli-ts) by [Takefumi Yoshii](https://zenn.dev/takepepe) -- 2021-03-28 - [Trying out NestJS part 4: Generate Typescript clients from OpenAPI documents](https://dev.to/arnaudcortisse/trying-out-nestjs-part-4-generate-typescript-clients-from-openapi-documents-28mk) by [Arnaud Cortisse](https://dev.to/arnaudcortisse) +- 2021-03-28 - [Trying out NestJS part 4: Generate Typescript clients from OpenAPI documents](https://dev.to/arnaudcortisse/trying-out-nestjs-part-4-generate-typescript-clients-from-openapi-documents-28mk) by [Arnaud Cortisse](https://dev.to/arnaudcortisse) - 2021-03-31 - [Open API Server Implementation Using OpenAPI Generator](https://www.baeldung.com/java-openapi-generator-server) at [Baeldung](https://www.baeldung.com/) - 2021-03-31 - [使用OpenAPI Generator實現Open API Server](https://www.1ju.org/article/java-openapi-generator-server) at [億聚網](https://www.1ju.org/) - 2021-04-19 - [Introducing Twilio’s OpenAPI Specification Beta](https://www.twilio.com/blog/introducing-twilio-open-api-specification-beta) by [GARETH PAUL JONES](https://www.twilio.com/blog/author/gpj) at [Twilio Blog](https://www.twilio.com/blog) - 2021-04-22 - [Leveraging OpenApi strengths in a Micro-Service environment](https://medium.com/unibuddy-technology-blog/leveraging-openapi-strengths-in-a-micro-service-environment-3d7f9e7c26ff) by Nicolas Jellab at [Unibuddy Technology Blog](https://medium.com/unibuddy-technology-blog) - 2021-04-27 - [From zero to publishing PowerShell API clients in PowerShell Gallery within minutes](https://speakerdeck.com/wing328/from-zero-to-publishing-powershell-api-clients-in-powershell-gallery-within-minutes) by [William Cheng](https://github.com/wing328) at [PowerShell + DevOps Global Summit 2021](https://events.devopscollective.org/event/powershell-devops-global-summit-2021/) - 2021-05-31 - [FlutterでOpen Api Generator(Swagger)を使う](https://aakira.app/blog/2021/05/flutter-open-api/) by [AAkira](https://twitter.com/_a_akira) -- 2021-06-22 - [Rest API Documentation and Client Generation With OpenAPI](https://dzone.com/articles/rest-api-documentation-and-client-generation-with) by [Prasanth Gullapalli](https://dzone.com/users/1011797/prasanthnath.g@gmail.com.html) +- 2021-06-22 - [Rest API Documentation and Client Generation With OpenAPI](https://dzone.com/articles/rest-api-documentation-and-client-generation-with) by [Prasanth Gullapalli](https://dzone.com/users/1011797/prasanthnath.g@gmail.com.html) - 2021-07-16 - [銀行事業のサーバーサイド開発について / LINE 京都開発室 エンジニア採用説明会](https://www.youtube.com/watch?v=YrrKQHxLPpQ) by 野田誠人, Robert Mitchell - 2021-07-19 - [OpenAPI code generation with kotlin](https://sylhare.github.io/2021/07/19/Openapi-swagger-codegen-with-kotlin.html) by [sylhare](https://github.com/sylhare) - 2021-07-29 - [How To Rewrite a Huge Codebase](https://dzone.com/articles/how-to-rewrite-a-huge-code-base) by [Curtis Poe](https://dzone.com/users/4565446/publiusovidius.html) @@ -836,8 +841,11 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2021-11-06 - [スタートアップの開発で意識したこと](https://zenn.dev/woo_noo/articles/5cb09f8e2899ae782ad1) by [woo-noo](https://zenn.dev/woo_noo) - 2021-11-09 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/effective-software-development-using-openapi-generator) by Ajil Oomme - 2021-12-07 - [An Introduction to OpenAPI](https://betterprogramming.pub/4-use-cases-of-openapi-which-are-good-to-know-1a041f4ad71e) by [Na'aman Hirschfeld](https://naamanhirschfeld.medium.com/) -- 2021-01-02 - [Towards a secure API client generator for IoT devices](https://arxiv.org/abs/2201.00270) by Anders Aaen Springborg, Martin Kaldahl Andersen, Kaare Holland Hattel, Michele Albano - +- 2022-01-02 - [Towards a secure API client generator for IoT devices](https://arxiv.org/abs/2201.00270) by Anders Aaen Springborg, Martin Kaldahl Andersen, Kaare Holland Hattel, Michele Albano +- 2022-02-02 - [Use OpenApi generator to share your models between Flutter and your backend](https://www.youtube.com/watch?v=kPW7ccu9Yvk) by [Guillaume Bernos](https://feb2022.fluttervikings.com/speakers/guillaume_bernos) at [Flutter Vikings Conference 2022 (Hybrid)](https://feb2022.fluttervikings.com/) +- 2022-03-15 - [OpenAPI Specでハイフン区切りのEnum値をOpenAPI Generatorで出力すると、ハイフン区切りのまま出力される](https://qiita.com/yuji38kwmt/items/824d74d4889055ab37d8) by [yuji38kwmt](https://qiita.com/yuji38kwmt) +- 2022-04-01 - [OpenAPI Generatorのコード生成とSpring Frameworkのカスタムデータバインディングを共存させる](https://techblog.zozo.com/entry/coexistence-of-openapi-and-spring) in [ZOZO Tech Blog](https://techblog.zozo.com/) +- 2022-04-06 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/openapi-generator) by Ajil Oommen (Senior Flutter Developer) ## [6 - About Us](#table-of-contents) @@ -849,7 +857,6 @@ OpenAPI Generator core team members are contributors who have been making signif * [@wing328](https://github.com/wing328) (2015/07) [:heart:](https://www.patreon.com/wing328) * [@jimschubert](https://github.com/jimschubert) (2016/05) [:heart:](https://www.patreon.com/jimschubert) * [@cbornet](https://github.com/cbornet) (2016/05) -* [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview) * [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini) * [@etherealjoy](https://github.com/etherealjoy) (2019/06) * [@spacether](https://github.com/spacether) (2020/05) [:heart:][spacether sponsorship] @@ -869,13 +876,13 @@ Here is a list of template creators: * Bash: @bkryza * C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant) * C++ REST: @Danielku15 - * C++ Tiny: @AndersSpringborg @kaareHH @michelealbano @mkakbas + * C++ Tiny: @AndersSpringborg @kaareHH @michelealbano @mkakbas * C++ UE4: @Kahncode * C# (.NET 2.0): @who * C# (.NET Standard 1.3 ): @Gronsak * C# (.NET 4.5 refactored): @jimschubert [:heart:](https://www.patreon.com/jimschubert) * C# (GenericHost): @devhl-labs - * C# (HttpClient): @Blackclaws + * C# (HttpClient): @Blackclaws * Clojure: @xhh * Crystal: @wing328 * Dart: @yissachar @@ -985,10 +992,10 @@ Here is a list of template creators: * PHP Lumen: @abcsun * PHP Mezzio (with Path Handler): @Articus * PHP Slim: @jfastnacht - * PHP Slim4: @ybelenko + * PHP Slim4: [@ybelenko](https://github.com/ybelenko) * PHP Symfony: @ksm2 * Python FastAPI: @krjakbrjak - * Python AIOHTTP: @Jyhess + * Python AIOHTTP: * Ruby on Rails 5: @zlx * Rust (rust-server): @metaswitch * Scala Akka: @Bouillie @@ -1007,7 +1014,7 @@ Here is a list of template creators: * Avro: @sgadouar * GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328) * Ktorm: @Luiz-Monad - * MySQL: @ybelenko + * MySQL: [@ybelenko](https://github.com/ybelenko) * Protocol Buffer: @wing328 * WSDL @adessoDpd @@ -1074,15 +1081,15 @@ If you want to join the committee, please kindly apply by sending an email to te | ObjC | | | OCaml | @cgensoul (2019/08) | | Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | -| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) | +| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) | | PowerShell | @wing328 (2020/05) | -| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @arun-nalla (2019/11) @spacether (2019/11) [:heart:][spacether sponsorship] | +| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @arun-nalla (2019/11) @spacether (2019/11) [:heart:][spacether sponsorship] | | R | @Ramanth (2019/07) @saigiridhar21 (2019/07) | | Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) | | Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) | | Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) | | Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) | -| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) | +| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) | :heart: = Link to support the contributor directly diff --git a/appveyor.yml b/appveyor.yml index 85b45d481329..6c136913908b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -101,15 +101,8 @@ test_script: # test ps petstore - ps: | - $ErrorActionPreference = "Stop" cd samples\client\petstore\powershell\ - .\Build.ps1 - Import-Module -Name '.\src\PSPetstore' - $Result = Invoke-Pester -PassThru - if ($Result.FailedCount -gt 0) { - $host.SetShouldExit($Result.FailedCount) - exit $Result.FailedCount - } + .\CIRunTest.ps1 cache: - C:\maven\ - C:\gradle\ diff --git a/bin/configs/cpp-qt-client.yaml b/bin/configs/cpp-qt-client.yaml index 14f4a2745003..26f46eae4aeb 100644 --- a/bin/configs/cpp-qt-client.yaml +++ b/bin/configs/cpp-qt-client.yaml @@ -1,6 +1,6 @@ generatorName: cpp-qt-client outputDir: samples/client/petstore/cpp-qt -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client additionalProperties: cppNamespace: test_namespace diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml index 7479eebeccf2..d234b5399f2f 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml @@ -1,8 +1,9 @@ # for csharp-netcore generichost generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml library: generichost +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml index ac25b781088d..1b07cd23c2cf 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml @@ -1,8 +1,9 @@ # for csharp-netcore generichost generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0 -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml library: generichost +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netstandard2.0.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netstandard2.0.yaml index 664a5d377e3a..597c9753d4f7 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netstandard2.0.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netstandard2.0.yaml @@ -1,8 +1,9 @@ # for csharp-netcore generichost generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0 -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml library: generichost +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-httpclient.yaml b/bin/configs/csharp-netcore-OpenAPIClient-httpclient.yaml index a716aec52674..1139faf069c7 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-httpclient.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-httpclient.yaml @@ -1,7 +1,7 @@ # for .net standard httpclient generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore library: httpclient additionalProperties: diff --git a/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml b/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml index 21c06de0fc7c..35e90e8db71e 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml @@ -1,7 +1,7 @@ # for .net standard generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-net47 -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml index d9320b7b96ae..9036f89e0271 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml @@ -1,7 +1,7 @@ # for .net standard generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0 -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/csharp-netcore-OpenAPIClient.yaml b/bin/configs/csharp-netcore-OpenAPIClient.yaml index df881d60713a..16bf7675519d 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient.yaml @@ -1,7 +1,7 @@ # for .net standard generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/csharp-netcore-OpenAPIClientCore.yaml b/bin/configs/csharp-netcore-OpenAPIClientCore.yaml index 81c2ed9b0f1c..bcdecbc653bf 100644 --- a/bin/configs/csharp-netcore-OpenAPIClientCore.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClientCore.yaml @@ -1,6 +1,6 @@ generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClientCore -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml b/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml index 7c7364771bec..cc75d89db862 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml @@ -1,7 +1,7 @@ # for .net standard generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization -inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{fa96c953-af24-457d-8a01-f2fd2a7547a9}' @@ -9,4 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 - conditionalSerialization: true \ No newline at end of file + conditionalSerialization: true diff --git a/bin/configs/other/csharp-netcore-functions.yaml b/bin/configs/csharp-netcore-functions.yaml similarity index 100% rename from bin/configs/other/csharp-netcore-functions.yaml rename to bin/configs/csharp-netcore-functions.yaml diff --git a/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml index edcc346a19fe..0f8885e6a73c 100644 --- a/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml +++ b/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml @@ -8,3 +8,4 @@ typeMappings: EnumClass: "ModelEnumClass" additionalProperties: hideGenerationTimestamp: "true" + enumUnknownDefaultCase: "true" diff --git a/bin/configs/dart-dio-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-petstore-client-lib-fake.yaml deleted file mode 100644 index eca85edfd88e..000000000000 --- a/bin/configs/dart-dio-petstore-client-lib-fake.yaml +++ /dev/null @@ -1,10 +0,0 @@ -generatorName: dart-dio -outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/dart-dio -typeMappings: - Client: "ModelClient" - File: "ModelFile" - EnumClass: "ModelEnumClass" -additionalProperties: - hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-dio-petstore-client-lib.yaml b/bin/configs/dart-dio-petstore-client-lib.yaml deleted file mode 100644 index 8db24ccb0cec..000000000000 --- a/bin/configs/dart-dio-petstore-client-lib.yaml +++ /dev/null @@ -1,6 +0,0 @@ -generatorName: dart-dio -outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml -templateDir: modules/openapi-generator/src/main/resources/dart-dio -additionalProperties: - hideGenerationTimestamp: "true" diff --git a/bin/configs/go-petstore.yaml b/bin/configs/go-petstore.yaml index 6d78e55f1c98..3ce286ca806b 100644 --- a/bin/configs/go-petstore.yaml +++ b/bin/configs/go-petstore.yaml @@ -1,6 +1,6 @@ generatorName: go outputDir: samples/openapi3/client/petstore/go/go-petstore -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/go additionalProperties: enumClassPrefix: "true" diff --git a/bin/configs/java-jersey3.yaml b/bin/configs/java-jersey3.yaml new file mode 100644 index 000000000000..50ea3258eca4 --- /dev/null +++ b/bin/configs/java-jersey3.yaml @@ -0,0 +1,13 @@ +generatorName: java +outputDir: samples/client/petstore/java/jersey3 +library: jersey3 +inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-jersey3 + hideGenerationTimestamp: true + serverPort: "8082" + dateLibrary: java8 + useOneOfDiscriminatorLookup: true + disallowAdditionalPropertiesIfNotPresent: false + gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all" diff --git a/bin/configs/java-microprofile-rest-client-3.0.yaml b/bin/configs/java-microprofile-rest-client-3.0.yaml new file mode 100644 index 000000000000..e0a2c0a3178d --- /dev/null +++ b/bin/configs/java-microprofile-rest-client-3.0.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/microprofile-rest-client-3.0 +library: microprofile +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: microprofile-rest-client-3 + configKey: petstore + microprofileRestClientVersion: "3.0" diff --git a/bin/configs/java-okhttp-gson.yaml b/bin/configs/java-okhttp-gson.yaml index 38b017cb325a..e138af15401c 100644 --- a/bin/configs/java-okhttp-gson.yaml +++ b/bin/configs/java-okhttp-gson.yaml @@ -7,3 +7,4 @@ additionalProperties: artifactId: petstore-okhttp-gson hideGenerationTimestamp: "true" useOneOfDiscriminatorLookup: "true" + disallowAdditionalPropertiesIfNotPresent: false diff --git a/bin/configs/javascript-es6.yaml b/bin/configs/javascript-es6.yaml index 08a49e7935b0..d561ad52c6cb 100644 --- a/bin/configs/javascript-es6.yaml +++ b/bin/configs/javascript-es6.yaml @@ -1,6 +1,6 @@ generatorName: javascript outputDir: samples/client/petstore/javascript-es6 -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Javascript/es6 additionalProperties: appName: PetstoreClient diff --git a/bin/configs/javascript-promise-es6.yaml b/bin/configs/javascript-promise-es6.yaml index c21b9c1376f3..6947fd704403 100644 --- a/bin/configs/javascript-promise-es6.yaml +++ b/bin/configs/javascript-promise-es6.yaml @@ -1,6 +1,6 @@ generatorName: javascript outputDir: samples/client/petstore/javascript-promise-es6 -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Javascript/es6 additionalProperties: usePromises: "true" diff --git a/bin/configs/jaxrs-cxf-cdi-default-values.yaml b/bin/configs/jaxrs-cxf-cdi-default-values.yaml deleted file mode 100644 index 75e2ad978ec8..000000000000 --- a/bin/configs/jaxrs-cxf-cdi-default-values.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: jaxrs-cxf-cdi -outputDir: samples/server/petstore/jaxrs-cxf-cdi-default-value -inputSpec: modules/openapi-generator/src/test/resources/3_0/issue_8535.yaml -templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -additionalProperties: - hideGenerationTimestamp: "true" - artifactId: jaxrs-cxf-cdi-default-value diff --git a/bin/configs/jaxrs-cxf-cdi.yaml b/bin/configs/jaxrs-cxf-cdi.yaml index 59b8fc8c3363..63299c1d4e99 100644 --- a/bin/configs/jaxrs-cxf-cdi.yaml +++ b/bin/configs/jaxrs-cxf-cdi.yaml @@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi additionalProperties: hideGenerationTimestamp: "true" + implicitHeadersRegex: api_key diff --git a/bin/configs/jaxrs-cxf.yaml b/bin/configs/jaxrs-cxf.yaml index 81988d2576d0..76c2b2108fc7 100644 --- a/bin/configs/jaxrs-cxf.yaml +++ b/bin/configs/jaxrs-cxf.yaml @@ -5,3 +5,4 @@ templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf additionalProperties: hideGenerationTimestamp: "true" serverPort: "8082" + implicitHeadersRegex: (api_key|enum_header_string) diff --git a/bin/configs/jaxrs-resteasy-default-values.yaml b/bin/configs/jaxrs-resteasy-default-values.yaml deleted file mode 100644 index 42ec0bff4240..000000000000 --- a/bin/configs/jaxrs-resteasy-default-values.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: jaxrs-resteasy -outputDir: samples/server/petstore/jaxrs-resteasy/default-value -inputSpec: modules/openapi-generator/src/test/resources/3_0/issue_8535.yaml -templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -additionalProperties: - hideGenerationTimestamp: "true" - artifactId: jaxrs-resteasy-default-value diff --git a/bin/configs/jaxrs-resteasy-default.yaml b/bin/configs/jaxrs-resteasy-default.yaml index 3fd9e38fb2b7..e05f414253fc 100644 --- a/bin/configs/jaxrs-resteasy-default.yaml +++ b/bin/configs/jaxrs-resteasy-default.yaml @@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy additionalProperties: hideGenerationTimestamp: "true" + implicitHeadersRegex: api_key diff --git a/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml b/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml index 3315b6e1a022..5191921e8e6d 100644 --- a/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml +++ b/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml @@ -6,3 +6,4 @@ additionalProperties: artifactId: jaxrs-resteasy-eap-java8-server hideGenerationTimestamp: "true" dateLibrary: java8 + implicitHeadersRegex: api_key diff --git a/bin/configs/jaxrs-spec-interface.yaml b/bin/configs/jaxrs-spec-interface.yaml index ee3280437082..57a5034b273d 100644 --- a/bin/configs/jaxrs-spec-interface.yaml +++ b/bin/configs/jaxrs-spec-interface.yaml @@ -7,3 +7,4 @@ additionalProperties: interfaceOnly: "true" serializableModel: "true" hideGenerationTimestamp: "true" + implicitHeadersRegex: (api_key|enum_header_string) diff --git a/bin/configs/jaxrs-spec.yaml b/bin/configs/jaxrs-spec.yaml index 9e98a9ae5c8a..dbbb86bb4208 100644 --- a/bin/configs/jaxrs-spec.yaml +++ b/bin/configs/jaxrs-spec.yaml @@ -6,3 +6,5 @@ additionalProperties: artifactId: jaxrs-spec-petstore-server serializableModel: "true" hideGenerationTimestamp: "true" + implicitHeadersRegex: (api_key|enum_header_string) + generateBuilders: "true" diff --git a/bin/configs/powershell.yaml b/bin/configs/powershell.yaml index c31d09aa13c3..9a408c2ad176 100644 --- a/bin/configs/powershell.yaml +++ b/bin/configs/powershell.yaml @@ -1,6 +1,6 @@ generatorName: powershell outputDir: samples/client/petstore/powershell -inputSpec: modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/powershell additionalProperties: packageGuid: a27b908d-2a20-467f-bc32-af6f3a654ac5 diff --git a/bin/configs/python.yaml b/bin/configs/python.yaml index 37d0948cc682..f66aab269938 100644 --- a/bin/configs/python.yaml +++ b/bin/configs/python.yaml @@ -5,3 +5,4 @@ templateDir: modules/openapi-generator/src/main/resources/python additionalProperties: packageName: petstore_api recursionLimit: "1234" + initRequiredVars: false diff --git a/bin/configs/spring-boot-implicitHeaders.yaml b/bin/configs/spring-boot-implicitHeaders.yaml index 5457e89b8315..d870353a0ff2 100644 --- a/bin/configs/spring-boot-implicitHeaders.yaml +++ b/bin/configs/spring-boot-implicitHeaders.yaml @@ -6,4 +6,4 @@ additionalProperties: artifactId: springboot-implicitHeaders documentationProvider: springfox hideGenerationTimestamp: "true" - implicitHeaders: true + implicitHeadersRegex: .* diff --git a/bin/configs/spring-boot-oneof.yaml b/bin/configs/spring-boot-oneof.yaml new file mode 100644 index 000000000000..a986fc8fabe3 --- /dev/null +++ b/bin/configs/spring-boot-oneof.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/spring-boot-oneof +inputSpec: modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + documentationProvider: springdoc + artifactId: springboot-oneof + snapshotVersion: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/typescript-consolidated-browser.yaml b/bin/configs/typescript-consolidated-browser.yaml new file mode 100644 index 000000000000..8ea49d065b2b --- /dev/null +++ b/bin/configs/typescript-consolidated-browser.yaml @@ -0,0 +1,10 @@ +generatorName: typescript +outputDir: samples/openapi3/client/petstore/typescript/builds/browser +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript +additionalProperties: + framework: fetch-api + npmName: ts-petstore-client + projectName: ts-petstore-client + moduleName: petstore + supportsES6: true diff --git a/bin/configs/typescript-with-unique-items.yaml b/bin/configs/typescript-consolidated-with-unique-items.yaml similarity index 100% rename from bin/configs/typescript-with-unique-items.yaml rename to bin/configs/typescript-consolidated-with-unique-items.yaml diff --git a/bin/configs/typescript-fetch-sagas-and-records.yaml b/bin/configs/typescript-fetch-sagas-and-records.yaml index 1f8a48d4ea24..7852f487742b 100644 --- a/bin/configs/typescript-fetch-sagas-and-records.yaml +++ b/bin/configs/typescript-fetch-sagas-and-records.yaml @@ -8,7 +8,6 @@ additionalProperties: npmRepository: https://skimdb.npmjs.com/registry useSingleRequestParameter: false supportsES6: true - typescriptThreePlus: true sagasAndRecords: true detectPassthroughModelsWithSuffixAndField: 'Response.data' inferUniqueIdFromNameSuffix: true diff --git a/bin/configs/typescript-fetch-typescript-three-plus.yaml b/bin/configs/typescript-fetch-typescript-three-plus.yaml deleted file mode 100644 index f6f3c5ac7bcf..000000000000 --- a/bin/configs/typescript-fetch-typescript-three-plus.yaml +++ /dev/null @@ -1,10 +0,0 @@ -generatorName: typescript-fetch -outputDir: samples/client/petstore/typescript-fetch/builds/typescript-three-plus -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml -templateDir: modules/openapi-generator/src/main/resources/typescript-fetch -additionalProperties: - npmVersion: 1.0.0 - npmName: '@openapitools/typescript-fetch-petstore' - npmRepository: https://skimdb.npmjs.com/registry - typescriptThreePlus: true - snapshot: false diff --git a/bin/configs/typescript-fetch-with-string-enums.yaml b/bin/configs/typescript-fetch-with-string-enums.yaml new file mode 100644 index 000000000000..5b88cbda1a0b --- /dev/null +++ b/bin/configs/typescript-fetch-with-string-enums.yaml @@ -0,0 +1,6 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/with-string-enums +inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-fetch/enum.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-fetch +additionalProperties: + stringEnums: true diff --git a/bin/utils/release_checkout.rb b/bin/utils/release_checkout.rb index 97ef6b3877fc..83e0fd832a09 100755 --- a/bin/utils/release_checkout.rb +++ b/bin/utils/release_checkout.rb @@ -9,7 +9,7 @@ def check_sbt_openapi_generator print "Checking sbt-openapi-generator... " - url = "https://raw.githubusercontent.com/upstart-commerce/sbt-openapi-generator/master/build.sbt" + url = "https://raw.githubusercontent.com/OpenAPITools/sbt-openapi-generator/master/build.sbt" open(url) do |f| content = f.read if !content.nil? && content.include?($version) diff --git a/docs/building.md b/docs/building.md index 7806cc42c915..9e91349812cb 100644 --- a/docs/building.md +++ b/docs/building.md @@ -45,7 +45,7 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c ./run-in-docker.sh list # Executes 'list' command for openapi-generator-cli ./run-in-docker.sh /gen/bin/generate-samples.sh /gen/bin/configs/go-petstore.yaml # Builds the Go client ./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \ - -g go -o /gen/out/go-petstore --packageName=petstore # generates go client, outputs locally to ./out/go-petstore + -g go -o /gen/out/go-petstore -p packageName=petstore # generates go client, outputs locally to ./out/go-petstore ``` ### Docker in Vagrant diff --git a/docs/core-team.md b/docs/core-team.md index e782b2d03f52..caa2f319bd09 100644 --- a/docs/core-team.md +++ b/docs/core-team.md @@ -7,6 +7,5 @@ title: Core Team Members * [@jimschubert](https://github.com/jimschubert) (2016/05) * [@cbornet](https://github.com/cbornet) (2016/05) * [@jaz-ah](https://github.com/jaz-ah) (2016/05) -* [@ackintosh](https://github.com/ackintosh) (2018/02) * [@JFCote](https://github.com/JFCote) (2018/03) -* [@jmini](https://github.com/jmini) (2018/04) \ No newline at end of file +* [@jmini](https://github.com/jmini) (2018/04) diff --git a/docs/generators.md b/docs/generators.md index c1f09094dbc8..fdbd0f149426 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -22,7 +22,6 @@ The following generators are available: * [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2.md) * [csharp-netcore](generators/csharp-netcore.md) * [dart](generators/dart.md) -* [dart-dio](generators/dart-dio.md) * [dart-dio-next (experimental)](generators/dart-dio-next.md) * [eiffel](generators/eiffel.md) * [elixir](generators/elixir.md) @@ -81,7 +80,7 @@ The following generators are available: * [cpp-pistache-server](generators/cpp-pistache-server.md) * [cpp-qt-qhttpengine-server](generators/cpp-qt-qhttpengine-server.md) * [cpp-restbed-server](generators/cpp-restbed-server.md) -* [csharp-netcore-functions (beta)](generators/csharp-netcore-functions.md) +* [csharp-netcore-functions](generators/csharp-netcore-functions.md) * [erlang-server](generators/erlang-server.md) * [fsharp-functions (beta)](generators/fsharp-functions.md) * [fsharp-giraffe-server (beta)](generators/fsharp-giraffe-server.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index bf3952b2817c..4a7ba7d2829a 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -163,7 +163,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -223,6 +227,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 91378a454358..fa9bb2624892 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -163,7 +163,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -223,6 +227,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/android.md b/docs/generators/android.md index 650b819bea61..2a5cfe46fe3f 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -176,7 +176,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -236,6 +240,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 8cc8e289328f..40f0a5f3780b 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -78,7 +78,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✗|OAS2,OAS3 |Password|✗|OAS2,OAS3 |File|✗|OAS2 +|Uuid|✗| |Array|✗|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✗|OAS2,OAS3 |Maps|✗|ToolingExtension |CollectionFormat|✗|OAS2 |CollectionFormatMulti|✗|OAS2 @@ -138,6 +142,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✗|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/apex.md b/docs/generators/apex.md index f92f9e57177a..b1f506ef03af 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -216,7 +216,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -276,6 +280,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 712f00d17b46..6b33e7592226 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -94,7 +94,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -154,6 +158,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✗|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 685aee8fd94d..f8a95fbb5971 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -238,7 +238,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -298,6 +302,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 8ea48f628820..4b6691d01e9c 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -95,7 +95,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -155,6 +159,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 8a4f10696e34..50bffabc718d 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -108,7 +108,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -168,6 +172,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/c.md b/docs/generators/c.md index 3bab335a5f65..fa2154d22eb8 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -204,7 +204,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -264,6 +268,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 542a27c2998b..88f2778755df 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -84,7 +84,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -144,6 +148,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index e561cac7c5a2..708e09aebf46 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -173,7 +173,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -233,6 +237,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md index a03ff5bc48b1..3e8027011ea3 100644 --- a/docs/generators/cpp-qt-client.md +++ b/docs/generators/cpp-qt-client.md @@ -180,7 +180,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -240,6 +244,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-qt-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md index 5de00c766389..419bf965dfa0 100644 --- a/docs/generators/cpp-qt-qhttpengine-server.md +++ b/docs/generators/cpp-qt-qhttpengine-server.md @@ -179,7 +179,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -239,6 +243,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index c499ba8e28dd..f376b503cc7e 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -175,7 +175,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -235,6 +239,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 5cad57183bc6..9be6f58930d7 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -180,7 +180,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -240,6 +244,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md index ca65611bf81f..e292cffecc99 100644 --- a/docs/generators/cpp-tiny.md +++ b/docs/generators/cpp-tiny.md @@ -173,7 +173,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✗|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -233,6 +237,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index 9b5f89bb2c71..1759a8e06936 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -177,7 +177,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -237,6 +241,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index f619e7eaf7b5..7c514088e22c 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -183,7 +183,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -243,6 +247,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md index 45aaac6e9e56..6d4341efa073 100644 --- a/docs/generators/crystal.md +++ b/docs/generators/crystal.md @@ -157,7 +157,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -217,6 +221,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 274150134c9d..5e4c904382c5 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -203,7 +203,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -263,6 +267,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md index 5030dee051a9..a5b638c5127b 100644 --- a/docs/generators/csharp-netcore-functions.md +++ b/docs/generators/csharp-netcore-functions.md @@ -7,46 +7,45 @@ title: Documentation for the csharp-netcore-functions Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | csharp-netcore-functions | pass this to the generate command after -g | -| generator stability | BETA | | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | C# | | | generator default templating engine | mustache | | -| helpTxt | Generates a csharp server. | | +| helpTxt | Creates Azure function templates on top of the models/converters created by the C# codegens. This function is contained in a partial class. Default Get/Create/Patch/Post etc. methods are created with an underscore prefix. The assumption is that when the function is implemented, the partial class will be completed with another partial class. The implementing code should be located in a method of the same name, only without the underscore prefix. If no such method is found then the function will throw a Not Implemented exception. This setup allows the endpoints to be specified in the schema at build time, and separated from the implementing function. | | ## CONFIG OPTIONS These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| -|conditionalSerialization|Serialize only those properties which are initialized by user, accepted values are true or false, default value is false.| |false| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|library|HTTP library template (sub-template) to use|
**httpclient**
HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. May subject to breaking changes without further notice.)
**restsharp**
RestSharp (https://github.com/restsharp/RestSharp)
|restsharp| -|licenseId|The identifier of the license| |null| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| +|azureFunctionsVersion|Azure functions version: v4, v3|
**v4**
Azure Functions v4
**v3**
Azure Functions v3
|v4| +|buildTarget|Target to build an application or library|
**program**
Generate code for a standalone server
**library**
Generate code for a server abstract class library
|program| +|classModifier|Class Modifier for function classes: Empty string or abstract.| || +|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| +|enumValueSuffix|Suffix that will be appended to all enum values.| |Enum| +|generateBody|Generates method body.| |true| +|licenseName|The name of the license| |NoLicense| +|licenseUrl|The URL of the license| |http://localhost| +|modelClassModifier|Model Class Modifier can be nothing or partial| |partial| +|netCoreVersion|.NET Core version: 6.0, 5.0, 3.1, 3.0|
**3.0**
.NET Core 3.0
**3.1**
.NET Core 3.1
**5.0**
.NET Core 5.0
**6.0**
.NET Core 6.0
|3.1| +|newtonsoftVersion|Version for Newtonsoft.Json for .NET Core 3.0+| |3.0.0| |nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.1 or newer.| |false| -|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| -|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| -|optionalProjectFile|Generate {PackageName}.csproj.| |true| +|operationIsAsync|Set methods to async or sync (default).| |false| +|operationModifier|Operation Modifier can be virtual or abstract|
**virtual**
Keep method virtual
**abstract**
Make method abstract
|virtual| +|operationResultTask|Set methods result to Task<>.| |false| +|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|packageDescription|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |A library generated from a OpenAPI doc| |packageGuid|The GUID that will be associated with the C# project| |null| |packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageTags|Tags to identify the package| |null| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| |packageVersion|C# package version.| |1.0.0| -|releaseNote|Release note, default to 'Minor update'.| |Minor update| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src| -|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp2.0**
.NET Core 2.0 compatible
**netcoreapp2.1**
.NET Core 2.1 compatible
**netcoreapp3.0**
.NET Core 3.0 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net5.0**
.NET 5.0 compatible
|netstandard2.0| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false| -|validatable|Generates self-validatable models.| |true| +|useNewtonsoft|Uses the Newtonsoft JSON library.| |true| ## IMPORT MAPPING @@ -109,6 +108,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • Version
  • abstract
  • as
  • +
  • async
  • +
  • await
  • base
  • bool
  • break
  • @@ -126,6 +127,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • delegate
  • do
  • double
  • +
  • dynamic
  • else
  • enum
  • event
  • @@ -195,10 +197,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • unsafe
  • ushort
  • using
  • +
  • var
  • virtual
  • void
  • volatile
  • while
  • +
  • yield
  • ## FEATURE SET @@ -207,9 +211,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl ### Client Modification Feature | Name | Supported | Defined By | | ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension +|BasePath|✗|ToolingExtension |Authorizations|✗|ToolingExtension -|UserAgent|✓|ToolingExtension +|UserAgent|✗|ToolingExtension |MockServer|✗|ToolingExtension ### Data Type Feature @@ -229,7 +233,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -289,6 +297,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | @@ -296,8 +308,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 |OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 |OAuth2_Password|✗|OAS2,OAS3 |OAuth2_ClientCredentials|✗|OAS2,OAS3 |OAuth2_AuthorizationCode|✗|OAS2,OAS3 diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index d39a59b2ba38..1e88fb7ac4d4 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -229,7 +229,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -289,6 +293,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 4caf9db56c8c..59b874beb44e 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -223,7 +223,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -283,6 +287,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 1f74c2420beb..c7be7280e65a 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -86,7 +86,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -146,6 +150,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index d247192fd97c..ed14907168e8 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -25,18 +25,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
    **false**
    No changes to the enum's are made, this is the default option.
    **true**
    With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
    |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| +|pubAuthor|Author name in generated pubspec| |Author| +|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage| +|pubDescription|Description in generated pubspec| |OpenAPI API client| +|pubHomepage|Homepage in generated pubspec| |homepage| +|pubLibrary|Library name in generated code| |openapi.api| +|pubName|Name in generated pubspec| |openapi| +|pubVersion|Version in generated pubspec| |1.0.0| |serializationLibrary|Specify serialization library|
    **built_value**
    [DEFAULT] built_value
    |built_value| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|Source folder for generated code| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|source folder for generated code| |src| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |false| ## IMPORT MAPPING @@ -162,7 +162,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✗|OAS2,OAS3 |Password|✗|OAS2,OAS3 |File|✗|OAS2 +|Uuid|✗| |Array|✗|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✗|OAS2,OAS3 |Maps|✗|ToolingExtension |CollectionFormat|✗|OAS2 |CollectionFormatMulti|✗|OAS2 @@ -222,6 +226,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✗|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md deleted file mode 100644 index b94bed6bcc73..000000000000 --- a/docs/generators/dart-dio.md +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: Documentation for the dart-dio Generator ---- - -## METADATA - -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | dart-dio | pass this to the generate command after -g | -| generator stability | STABLE | | -| generator type | CLIENT | | -| generator language | Dart | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Dart Dio client library. | | - -## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|dateLibrary|Option. Date library to use|
    **core**
    Dart core library (DateTime)
    **timemachine**
    Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
    |core| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
    **false**
    No changes to the enum's are made, this is the default option.
    **true**
    With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
    |false| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| -|nullableFields|Make all fields nullable in the JSON payload| |null| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|Source folder for generated code| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - - - -## RESERVED WORDS - - - -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✓|ToolingExtension -|UserAgent|✓|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✗|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✓|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md deleted file mode 100644 index 0f6aed48cbe3..000000000000 --- a/docs/generators/dart-jaguar.md +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: Documentation for the dart-jaguar Generator ---- - -## METADATA - -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | dart-jaguar | pass this to the generate command after -g | -| generator stability | DEPRECATED | | -| generator type | CLIENT | | -| generator language | Dart | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Dart Jaguar client library. | | - -## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
    **false**
    No changes to the enum's are made, this is the default option.
    **true**
    With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
    |false| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|serialization|Choose serialization format JSON or PROTO is supported| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|Source folder for generated code| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - - - -## RESERVED WORDS - - - -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✗|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✓|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 5c8c4ffac8b8..cbc19071638a 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -24,18 +24,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
    **false**
    No changes to the enum's are made, this is the default option.
    **true**
    With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
    |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| +|pubAuthor|Author name in generated pubspec| |Author| +|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage| +|pubDescription|Description in generated pubspec| |OpenAPI API client| +|pubHomepage|Homepage in generated pubspec| |homepage| +|pubLibrary|Library name in generated code| |openapi.api| +|pubName|Name in generated pubspec| |openapi| +|pubVersion|Version in generated pubspec| |1.0.0| |serializationLibrary|Specify serialization library|
    **native_serialization**
    Use native serializer, backwards compatible
    |native_serialization| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|Source folder for generated code| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|source folder for generated code| |src| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |false| ## IMPORT MAPPING @@ -161,7 +161,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -221,6 +225,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✗|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index e9d3b13c8d06..cdb4ef80cd76 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -82,7 +82,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✓| |Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -142,6 +146,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✓|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 +|not|✓|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index ff72e722de98..fd52054a67a2 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -153,7 +153,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -213,6 +217,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 6bd748e76aee..a217d05ec06c 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -100,7 +100,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -160,6 +164,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 78b5e8ef63e2..44bbf6e04d30 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -91,7 +91,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -151,6 +155,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index f1708efec379..929bc648c6bc 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -98,7 +98,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -158,6 +162,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index ead391057ce0..1e649ba1b3ee 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -98,7 +98,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -158,6 +162,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 944c2be8cedf..9950933d4c51 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -98,7 +98,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -158,6 +162,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index dbb88f99e33f..b2961189bedd 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -232,7 +232,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -292,6 +296,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index 8c98bc32942c..76ae8165b165 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -231,7 +231,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -291,6 +295,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/go-echo-server.md b/docs/generators/go-echo-server.md index 7e638bc7c673..f616068c117a 100644 --- a/docs/generators/go-echo-server.md +++ b/docs/generators/go-echo-server.md @@ -135,7 +135,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -195,6 +199,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 035d0bfeda3a..9ec1b8543fe1 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -137,7 +137,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -197,6 +201,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index d57d712e1540..bfa3a8385ee3 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -22,6 +22,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumClassPrefix|Prefix enum with class name| |false| |featureCORS|Enable Cross-Origin Resource Sharing middleware| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|onlyInterfaces|Exclude default service creators from output; only generate interfaces| |false| +|outputAsLibrary|Exclude main.go, go.mod, and Dockerfile from output| |false| |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| |router|Specify the router which should be used.|
    **mux**
    mux
    **chi**
    chi
    |mux| @@ -140,7 +142,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -200,6 +206,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/go.md b/docs/generators/go.md index 782f6f05abda..f99ca5e9fbf2 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -143,7 +143,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -203,6 +207,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index a1ab7ae06e9e..b4bcc2910dc5 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -89,7 +89,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -149,6 +153,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index 84837ae7c6f5..f66e9921ae3e 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -89,7 +89,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -149,6 +153,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 36dc7ffbd0b0..76ec86abae02 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -40,6 +40,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -61,6 +63,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -216,7 +232,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -276,6 +296,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index 50fe695fa919..08e1738d3d63 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -143,7 +143,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -203,6 +207,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/haskell-yesod.md b/docs/generators/haskell-yesod.md index fcb8ce3d49c3..895400527920 100644 --- a/docs/generators/haskell-yesod.md +++ b/docs/generators/haskell-yesod.md @@ -117,7 +117,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -177,6 +181,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 4ac8e5c7fbf1..1b1e3e68c133 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -120,7 +120,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -180,6 +184,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/html.md b/docs/generators/html.md index fe176f2cc732..ee3d6caa564d 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -86,7 +86,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✓| |Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -146,6 +150,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✓|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 +|not|✓|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 92f3425056f5..d83c97311d50 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -90,7 +90,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✓| |Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -150,6 +154,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✓|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 +|not|✓|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 9a6499fe85b3..9e919ce2be8f 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| @@ -95,6 +96,21 @@ These options may be applied as additional-properties (cli) or configOptions (pl |virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null +|x-spring-paginated|Add org.springframework.data.domain.Pageable to controller method. Can be used to handle page & size query parameters|OPERATION|false + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -246,7 +262,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -306,6 +326,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 688726472414..52008c192a2c 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.controllers| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -63,6 +65,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -214,7 +230,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -274,6 +294,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index e63a9c91ac9e..93cd69d91005 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -30,6 +30,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |booleanGetterPrefix|Set booleanGetterPrefix| |get| |build|Specify for which build tool to generate files|
    **gradle**
    Gradle configuration is generated for the project
    **all**
    Both Gradle and Maven configurations are generated
    **maven**
    Maven configuration is generated for the project
    |all| |configureAuth|Configure all the authorization methods as specified in the file| |false| +|dateFormat|Specify the format pattern of date as a string| |null| +|dateLibrary|Option. Date library to use|
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| +|datetimeFormat|Specify the format pattern of date-time as a string| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| @@ -43,6 +46,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -67,8 +72,23 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|Client service name| |null| |useBeanValidation|Use BeanValidation API annotations| |true| +|useOptional|Use Optional container for optional parameters| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -230,7 +250,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -290,6 +314,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 9f1cc7d305dd..08a13ffb624a 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -29,6 +29,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |booleanGetterPrefix|Set booleanGetterPrefix| |get| |build|Specify for which build tool to generate files|
    **gradle**
    Gradle configuration is generated for the project
    **all**
    Both Gradle and Maven configurations are generated
    **maven**
    Maven configuration is generated for the project
    |all| |controllerPackage|The package in which controllers will be generated| |org.openapitools.api| +|dateFormat|Specify the format pattern of date as a string| |null| +|dateLibrary|Option. Date library to use|
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| +|datetimeFormat|Specify the format pattern of date-time as a string| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| @@ -44,6 +47,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -69,8 +74,23 @@ These options may be applied as additional-properties (cli) or configOptions (pl |title|Client service name| |null| |useAuth|Whether to import authorization and to annotate controller methods accordingly| |true| |useBeanValidation|Use BeanValidation API annotations| |true| +|useOptional|Use Optional container for optional parameters| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -233,7 +253,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -293,6 +317,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 99b40dd1fecb..b11022c86330 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -43,6 +43,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |library|library template (sub-template)|
    **jersey1**
    Jersey core 1.x
    **jersey2**
    Jersey core 2.x
    |jersey2| @@ -62,13 +64,27 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -220,7 +236,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -280,6 +300,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 3696276e582d..32e83edba4c1 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |com.prokarma| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -70,6 +72,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |zipkinUri|Zipkin URI| |null| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -221,7 +237,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -281,6 +301,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index a422fe172288..3f2318a8622e 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -46,6 +46,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -73,6 +75,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -224,7 +240,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -284,6 +304,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index faed7e30e21b..5b579a5aa705 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.handler| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -63,6 +65,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -214,7 +230,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -274,6 +294,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 41353d46c66a..2d00e598ba09 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -63,6 +65,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -214,7 +230,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -274,6 +294,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 095100d66ea7..987772f131a3 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -66,6 +68,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -217,7 +233,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -277,6 +297,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/java.md b/docs/generators/java.md index 69403810d019..65645070598b 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -48,12 +48,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.client| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| -|library|library template (sub-template) to use|
    **jersey1**
    HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libraries instead.
    **jersey2**
    HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
    **feign**
    HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.
    **okhttp-gson**
    [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
    **retrofit2**
    HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
    **resttemplate**
    HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
    **webclient**
    HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
    **resteasy**
    HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
    **vertx**
    HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
    **google-api-client**
    HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
    **rest-assured**
    HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
    **native**
    HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
    **microprofile**
    HTTP client: Microprofile client 1.x. JSON processing: JSON-B
    **apache-httpclient**
    HTTP client: Apache httpclient 4.x
    |okhttp-gson| +|library|library template (sub-template) to use|
    **jersey1**
    HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
    **jersey2**
    HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
    **jersey3**
    HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
    **feign**
    HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.
    **okhttp-gson**
    [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
    **retrofit2**
    HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
    **resttemplate**
    HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
    **webclient**
    HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
    **resteasy**
    HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
    **vertx**
    HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
    **google-api-client**
    HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
    **rest-assured**
    HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
    **native**
    HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
    **microprofile**
    HTTP client: Microprofile client 1.x. JSON processing: JSON-B
    **apache-httpclient**
    HTTP client: Apache httpclient 4.x
    |okhttp-gson| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null| +|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null| |modelPackage|package for generated models| |org.openapitools.client.model| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false| @@ -76,7 +79,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk. Available on resttemplate, webclient, libraries| |false| |useBeanValidation|Use BeanValidation API annotations| |false| |useGzipFeature|Send gzip-encoded requests| |false| -|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, native, okhttp-gson support this option.| |false| +|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false| |usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| |useRuntimeException|Use RuntimeException instead of Exception| |false| @@ -84,6 +87,21 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null +|x-webclient-blocking|Specifies if method for specific operation should be blocking or non-blocking(ex: return `Mono/Flux` or `return T/List/Set` & execute `.block()` inside generated method)|OPERATION|false + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -235,7 +253,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -295,6 +317,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index e91486057e11..59150ad9e834 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -181,7 +181,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -241,6 +245,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 2f78d0e865ed..f85f22cb96d6 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -130,7 +130,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -190,6 +194,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 48e249aa7f61..5dc6a58c6d96 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -184,7 +184,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -244,6 +248,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index aa5f7aaaca60..5c1c2b4724ef 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -40,7 +40,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src| -|useES6|use JavaScript ES6 (ECMAScript 6). Default is ES6. (This option has been deprecated and will be removed in the 5.x release as ES5 is no longer supported)| |true| |useInheritance|use JavaScript prototype chains & delegation for inheritance| |true| |usePromises|use Promises as return values from the client API, instead of superagent callbacks| |false| @@ -185,7 +184,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -245,6 +248,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 7f3d9c0b3633..8c6eb15e7c8a 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| @@ -76,6 +78,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -227,7 +243,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -287,6 +307,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 287517ca3e44..5e8f593a1fa8 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -67,6 +69,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useLoggingFeatureForTests|Use Logging Feature for tests| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -218,7 +234,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -278,6 +298,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 021ae03417d9..b68220e90636 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -49,6 +49,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -68,7 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |supportMultipleSpringServices|Support generation of Spring services from multiple specifications| |false| |testDataControlFile|JSON file to control test data generation| |null| |testDataFile|JSON file to contain generated test data| |null| @@ -90,6 +92,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useWadlFeature|Use WADL Feature| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -241,7 +257,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -301,6 +321,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 31a69554770b..6e77fb11f91c 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -48,6 +48,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -66,7 +68,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useAnnotatedBasePath|Use @Path annotations for basePath| |false| @@ -85,6 +87,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useWadlFeature|Use WADL Feature| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -236,7 +252,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -296,6 +316,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 31d340f076c8..0797cda96187 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -43,6 +43,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |library|library template (sub-template)|
    **jersey1**
    Jersey core 1.x
    **jersey2**
    Jersey core 2.x
    |jersey2| @@ -62,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| @@ -70,6 +72,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -221,7 +237,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -281,6 +301,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 698ffd9b4096..b0e66a64f862 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -62,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| @@ -70,6 +72,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -221,7 +237,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -281,6 +301,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 13852ca4caf2..ec6f9b3ae875 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| |licenseName|The name of the license| |Unlicense| @@ -62,13 +64,27 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -220,7 +236,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -280,6 +300,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index f89dfc45c8c4..90038fb4ecd2 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implFolder|folder for generated implementation code| |src/main/java| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| @@ -67,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
    **true**
    Use a SnapShot Version
    **false**
    Use a Release Version
    |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/main/java| +|sourceFolder|source folder for generated code| |src/gen/java| |supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| @@ -76,6 +78,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -227,7 +243,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -287,6 +307,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 83b447c97321..90ee80172aba 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -79,7 +79,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -139,6 +143,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/k6.md b/docs/generators/k6.md index 8cbeda61021b..f9de52fa699a 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -77,7 +77,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -137,6 +141,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 09983e9b2f83..8daa145ec43c 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -196,7 +196,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -256,6 +260,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index bff2a15e6733..100115ca3cc1 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -203,7 +203,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -263,6 +267,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 82e4dde5d623..6080b3c98bbf 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -184,7 +184,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -244,6 +248,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 532c3273222e..fe146e34dd30 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -38,7 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| |sourceFolder|source folder for generated code| |src/main/kotlin| -|supportAndroidApiLevel25AndBelow|[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in oder to support Android API level 25 and bellow. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284| |false| +|supportAndroidApiLevel25AndBelow|[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in order to support Android API level 25 and bellow. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284| |false| |useCoroutines|Whether to use the Coroutines adapter with the retrofit2 library.| |false| |useRxJava|Whether to use the RxJava adapter with the retrofit2 library. IMPORTANT: this option has been deprecated. Please use `useRxJava3` instead.| |false| |useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: this option has been deprecated. Please use `useRxJava3` instead.| |false| @@ -196,7 +196,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -256,6 +260,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index a72e9887a988..b4b5b1b61624 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -287,7 +287,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -347,6 +351,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/lua.md b/docs/generators/lua.md index cf2ece49ed11..2b2d3656a9d7 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -106,7 +106,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -166,6 +170,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index c930ef6fd68b..75f0538b6bfd 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -94,7 +94,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -154,6 +158,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 656452b91a69..65cf6dfe8513 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -359,7 +359,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -419,6 +423,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 2cf0c86e25a6..5612b294c21e 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -161,7 +161,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -221,6 +225,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index ec3e45fa4eeb..18df0f288539 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -112,7 +112,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -172,6 +176,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/objc.md b/docs/generators/objc.md index b76a06f29a36..80aac2e5a07b 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -148,7 +148,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -208,6 +212,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index fec524c3f16e..196059ffba1d 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -144,7 +144,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -204,6 +208,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 854f487d3434..bb9d06115fc3 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -77,7 +77,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✓| |Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -137,6 +141,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✓|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 +|not|✓|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 75573383de47..ed0420aa2bb2 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -77,7 +77,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✓| |Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -137,6 +141,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✓|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 +|not|✓|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 9fd91025c364..34b9e1354a2e 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -123,7 +123,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -183,6 +187,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index ad004234dcc8..752e5027cd7b 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -172,7 +172,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -232,6 +236,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index bdce19bad5e3..122c3f56cc0e 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -173,7 +173,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -233,6 +237,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index ad7f5afc0612..f8b02f001ceb 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -173,7 +173,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -233,6 +237,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md index 18854d244ef2..f94d54b3b3e2 100644 --- a/docs/generators/php-mezzio-ph.md +++ b/docs/generators/php-mezzio-ph.md @@ -172,7 +172,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -232,6 +236,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 4163fda38ef2..508fe455b359 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -173,7 +173,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -233,6 +237,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index 0c56d968d14d..a995e883495b 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -174,7 +174,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -234,6 +238,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index e602a0570af1..608dee49383c 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -177,7 +177,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -237,6 +241,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/php.md b/docs/generators/php.md index f7a74f48c6ae..7d71c4ce0099 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -174,7 +174,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -234,6 +238,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index 033b995b72bd..847f0d654638 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -76,7 +76,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -136,6 +140,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index f35ad8599ac6..3745f0d9cf54 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -174,7 +174,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -234,6 +238,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index eb8d398cba93..b61298ede4bf 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -89,7 +89,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -149,6 +153,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 0fea01b13bd5..d2ba3f9ec025 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -150,7 +150,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -210,6 +214,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 2445094ea2f6..9e10d91343f9 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -150,7 +150,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -210,6 +214,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 956038d2ac01..25ac019fa939 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -12,7 +12,7 @@ title: Documentation for the python-experimental Generator | generator language | Python | | | generator language version | >=3.9 | | | generator default templating engine | handlebars | | -| helpTxt | Generates a Python client library

    Features in this generator:
    - type hints on endpoints and model creation
    - model parameter names use the spec defined keys and cases
    - robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
    - endpoint parameter names use the spec defined keys and cases
    - inline schemas are supported at any location including composition
    - multiple content types supported in request body and response bodies
    - run time type checking
    - Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
    - quicker load time for python modules (a single endpoint can be imported and used without loading others)
    - all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
    - composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
    - schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
    - Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | +| helpTxt | Generates a Python client library

    Features in this generator:
    - type hints on endpoints and model creation
    - model parameter names use the spec defined keys and cases
    - robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only
    - endpoint parameter names use the spec defined keys and cases
    - inline schemas are supported at any location including composition
    - multiple content types supported in request body and response bodies
    - run time type checking
    - Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
    - Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema
    - quicker load time for python modules (a single endpoint can be imported and used without loading others)
    - all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
    - composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
    - schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
    - Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | ## CONFIG OPTIONS These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. @@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| +|library|library template (sub-template) to use: urllib3| |urllib3| |packageName|python package name (convention: snake_case).| |openapi_client| |packageUrl|python package URL.| |null| |packageVersion|python package version.| |1.0.0| @@ -151,7 +151,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✓| |Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -211,6 +215,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✓|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 +|not|✓|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md index 163a85e50410..ee2e97acd8bd 100644 --- a/docs/generators/python-fastapi.md +++ b/docs/generators/python-fastapi.md @@ -142,7 +142,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -202,6 +206,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 8cf4ec6e7a9d..2c82d539007d 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -150,7 +150,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -210,6 +214,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index 08c0c42c0024..0af42bd30b97 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -139,7 +139,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -199,6 +203,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/python.md b/docs/generators/python.md index 1910f46d5445..34875d8c863a 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. NOTE: this option breaks composition and will be removed in 6.0.0
    |false| |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|initRequiredVars|If set to true then the required variables are included as positional arguments in __init__ and _from_openapi_data methods. Note: this can break some composition use cases. To learn more read PR #8802.| |false| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| |packageName|python package name (convention: snake_case).| |openapi_client| |packageUrl|python package URL.| |null| @@ -142,7 +143,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -202,6 +207,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/r.md b/docs/generators/r.md index d034e8620787..15512fa01b59 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -99,7 +99,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -159,6 +163,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index ecb8a858a81a..30bbbf12d8bf 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -121,7 +121,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -181,6 +185,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index a9655ea8e536..aa0d40b85c4d 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -120,7 +120,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -180,6 +184,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index f0188be575fa..703f7ef7e062 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -154,7 +154,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -214,6 +218,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 52f2b52909d1..ece538a608c4 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -140,7 +140,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -200,6 +204,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 8d6cc44b8b98..04601e32f85e 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -149,7 +149,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -209,6 +213,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index 3cbb4c8fb1db..322c4ed1e2fe 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -158,7 +158,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -218,6 +222,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index b6ba593dcc45..e840955e1d5f 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -153,7 +153,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -213,6 +217,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 5ace1e1652f8..79adfd1a5d09 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -165,7 +165,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -225,6 +229,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index e3be5dfa0b50..54c7969f0110 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -163,7 +163,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -223,6 +227,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 35d8e770dbec..5d9e403e85e1 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -163,7 +163,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -223,6 +227,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index 0014d87fedb0..c2ab2adcf168 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -163,7 +163,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -223,6 +227,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 58562232a924..e0f60f0531cb 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -162,7 +162,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -222,6 +226,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 377862d9ca7a..089a70ac9895 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -159,7 +159,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -219,6 +223,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 2a8b10482dc8..25d057cf1c61 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -155,7 +155,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -215,6 +219,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 6916c86fe9f9..a986e4bb8f6d 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -163,7 +163,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -223,6 +227,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/spring.md b/docs/generators/spring.md index f63fea0e35c2..1bf1f24edb73 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -51,6 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
    **true**
    The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
    **false**
    The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
    |true| @@ -88,6 +89,21 @@ These options may be applied as additional-properties (cli) or configOptions (pl |virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +## SUPPORTED VENDOR EXTENSIONS + +| Extension name | Description | Applicable for | Default value | +| -------------- | ----------- | -------------- | ------------- | +|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL| +|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array +|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value +|x-tags|Specify multiple swagger tags for operation|OPERATION|null +|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null +|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null +|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null +|x-field-extra-annotation|List of custom annotations to be added to property|FIELD|null +|x-spring-paginated|Add org.springframework.data.domain.Pageable to controller method. Can be used to handle page & size query parameters|OPERATION|false + + ## IMPORT MAPPING | Type/Alias | Imports | @@ -239,7 +255,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -299,6 +319,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 5f79e7ae5c31..be06da4bf09d 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -260,7 +260,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -320,6 +324,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index da3b85271d92..f41324a02edf 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -190,7 +190,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -250,6 +254,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 1acd1fca0316..8d93a174bcc7 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -174,7 +174,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -234,6 +238,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index a205ff3f7999..0850810c4d27 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -180,7 +180,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -240,6 +244,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index b0a8a58c143a..4901df93ed8d 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -37,8 +37,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|stringEnums|Generate string enums instead of objects for enum values.| |false| |supportsES6|Generate code that conforms to ES6.| |false| -|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |true| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withoutRuntimeChecks|Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.| |false| @@ -207,7 +207,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -267,6 +271,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index a6df7b684148..bf1c2f146df3 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -181,7 +181,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -241,6 +245,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index f9614b9384f0..3e0310ccfbe4 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -176,7 +176,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -236,6 +240,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md index 0e00ef4f247d..99d70502c6cb 100644 --- a/docs/generators/typescript-nestjs.md +++ b/docs/generators/typescript-nestjs.md @@ -185,7 +185,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -245,6 +249,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 54dcee733075..28945f81c484 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -179,7 +179,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -239,6 +243,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index f219e8a3e5e6..67a6fffcb532 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -200,7 +200,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -260,6 +264,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 93aca0c5f812..24d906d8f23c 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -193,7 +193,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -253,6 +257,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md index 9d0e683f41a3..be714cbd0969 100644 --- a/docs/generators/typescript.md +++ b/docs/generators/typescript.md @@ -176,7 +176,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -236,6 +240,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index e54072e73355..bee9159a9478 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -80,7 +80,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |DateTime|✓|OAS2,OAS3 |Password|✓|OAS2,OAS3 |File|✓|OAS2 +|Uuid|✗| |Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 |CollectionFormatMulti|✓|OAS2 @@ -140,6 +144,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✓|OAS2,OAS3 |Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 ### Security Feature | Name | Supported | Defined By | diff --git a/docs/installation.md b/docs/installation.md index 35d8d1052214..f01f9b193481 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -54,6 +54,29 @@ Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.github openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/ ``` +## Scoop + +> **Platform(s)**: Windows + +**Install** via [scoop](https://scoop.sh/): + +``` +scoop install openapi-generator-cli +``` + +If you don't have java installed, you can also install it via [scoop java bucket](https://github.com/ScoopInstaller/Java/): + +``` +scoop bucket add java +scoop install openjdk +``` + +Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml) doc: + +``` +openapi-generator-cli generate -i petstore.yaml -g ruby +``` + ## Docker > **Platform(s)**: Linux, macOS, Windows diff --git a/docs/integration.md b/docs/integration.md index e4cc9fa35f63..e96b62321cfa 100644 --- a/docs/integration.md +++ b/docs/integration.md @@ -21,7 +21,7 @@ See the [openapi-generator-maven-plugin README](https://github.com/OpenAPITools/ ### sbt Integration -Please refer to https://github.com/upstart-commerce/sbt-openapi-generator +Please refer to https://github.com/OpenAPITools/sbt-openapi-generator ### Bazel Integration 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 3bfd97c90a41..29247f4256d4 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 @@ -24,6 +24,7 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConfigLoader; import org.openapitools.codegen.GeneratorNotFoundException; +import org.openapitools.codegen.VendorExtension; import org.openapitools.codegen.meta.FeatureSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,7 +37,7 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4; +import static org.apache.commons.text.StringEscapeUtils.escapeHtml4; import static org.apache.commons.lang3.StringUtils.isEmpty; @SuppressWarnings({"unused","java:S106", "java:S1192"}) @@ -89,6 +90,10 @@ public class ConfigHelp extends OpenApiGeneratorCommand { "--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).") private Boolean markdownHeader; + @Option(name = { + "--supported-vendor-extensions"}, title = "supported vendor extensions", description = "List supported vendor extensions") + private Boolean supportedVendorExtensions; + @Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --feature-set)") private Boolean fullDetails; @@ -108,6 +113,7 @@ public void execute() { importMappings = Boolean.TRUE; featureSets = Boolean.TRUE; metadata = Boolean.TRUE; + supportedVendorExtensions = Boolean.TRUE; } try { @@ -198,6 +204,27 @@ private void generateMdConfigOptions(StringBuilder sb, CodegenConfig config) { }); } + private void generateMdSupportedVendorExtensions(StringBuilder sb, CodegenConfig config) { + List supportedVendorExtensions = config.getSupportedVendorExtensions(); + if (supportedVendorExtensions.isEmpty()) { + return; + } + + sb + .append(newline).append("## SUPPORTED VENDOR EXTENSIONS").append(newline).append(newline) + .append("| Extension name | Description | Applicable for | Default value |").append(newline) + .append("| -------------- | ----------- | -------------- | ------------- |").append(newline); + + supportedVendorExtensions.forEach( + extension -> sb.append("|").append(extension.getName()) + .append("|").append(extension.getDescription()) + .append("|").append(extension.getLevels().stream().map(Objects::toString).collect(Collectors.joining(", "))) + .append("|").append(extension.getDefaultValue()) + .append(newline) + ); + sb.append(newline); + } + private void generateMdImportMappings(StringBuilder sb, CodegenConfig config) { sb.append(newline).append("## IMPORT MAPPING").append(newline).append(newline); @@ -332,6 +359,10 @@ private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { generateMdConfigOptionsHeader(sb, config); generateMdConfigOptions(sb, config); + if (Boolean.TRUE.equals(supportedVendorExtensions)) { + generateMdSupportedVendorExtensions(sb, config); + } + if (Boolean.TRUE.equals(importMappings)) { generateMdImportMappings(sb, config); } diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java index d0517d94415c..726aaf300d6d 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java @@ -24,7 +24,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.parser.core.models.ParseOptions; import io.swagger.v3.parser.core.models.SwaggerParseResult; -import org.apache.commons.lang3.text.WordUtils; +import org.apache.commons.text.WordUtils; import org.openapitools.codegen.validation.ValidationResult; import org.openapitools.codegen.validations.oas.OpenApiEvaluator; import org.openapitools.codegen.validations.oas.RuleConfiguration; diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java index 7a86144c686d..d684a6ce6dfb 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java @@ -122,7 +122,6 @@ public enum DataTypeFeature { @OAS2 @OAS3 Password, - /** * Supports file inputs (e.g. multipart support). * @@ -139,12 +138,35 @@ public enum DataTypeFeature { @OAS2 File, + /** + * String uuid data + */ + Uuid, + /** * Supports arrays of data */ @OAS2 @OAS3 Array, + /** + * A JSON "null" value added in openapi v3.1.0 + */ + @OAS3 + Null, + + /** + * When no type is defined, any data type is accepted + */ + @OAS2 @OAS3 + AnyType, + + /** + * An unordered set of properties mapping a string to an instance + */ + @OAS2 @OAS3 + Object, + /** * Supports map of data */ @@ -236,5 +258,5 @@ public enum DataTypeFeature { * Supports a map of arrays (enums) */ @ToolingExtension - MapOfCollectionOfEnum + MapOfCollectionOfEnum, } diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java index e8a2a65198aa..6f453d12e658 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java @@ -66,5 +66,33 @@ public enum SchemaSupportFeature { *

    This suggests support of OneOf in OpenAPI Specification with a discriminator.

    */ @OAS3 - Union + Union, + + /** + * The json schema Composition allOf keyword + * If a composed schema uses the allOf keyword, then payloads must be valid against all the given allOf schemas + */ + @OAS2 @OAS3 + allOf, + + /** + * The json schema Composition anyOf keyword + * If a composed schema uses the anyOf keyword, then payloads must be valid against any of the given anyOf schemas + */ + @OAS3 + anyOf, + + /** + * The json schema Composition oneOf keyword + * If a composed schema uses the oneOf keyword, then payloads must be valid against one of the given oneOf schemas + */ + @OAS3 + oneOf, + + /** + * The json schema Composition not keyword + * If a composed schema uses the not keyword, then payloads must not be valid against the given not schema + */ + @OAS3 + not } diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 51f6e08e15f9..d904f4150817 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -204,6 +204,11 @@ apply plugin: 'org.openapi.generator' |None |Suffix that will be appended to all model names. +|apiNameSuffix +|String +|None +|Suffix that will be appended to all api names. + |instantiationTypes |Map(String,String) |None diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 57f49db2d3b5..11844e04cfc2 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1,3 +1,3 @@ # RELEASE_VERSION -openApiGeneratorVersion=5.4.0 +openApiGeneratorVersion=6.0.0-SNAPSHOT # /RELEASE_VERSION diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt index be865049c770..21436595abd1 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt @@ -106,6 +106,7 @@ class OpenApiGeneratorPlugin : Plugin { modelPackage.set(generate.modelPackage) modelNamePrefix.set(generate.modelNamePrefix) modelNameSuffix.set(generate.modelNameSuffix) + apiNameSuffix.set(generate.apiNameSuffix) instantiationTypes.set(generate.instantiationTypes) typeMappings.set(generate.typeMappings) additionalProperties.set(generate.additionalProperties) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt index 46aa9540cfa3..69002705d11c 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt @@ -106,6 +106,11 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { */ val modelNameSuffix = project.objects.property() + /** + * Suffix that will be appended to all api names. Default is the empty string. + */ + val apiNameSuffix = project.objects.property() + /** * Sets instantiation type mappings. */ @@ -326,6 +331,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { releaseNote.set("Minor update") modelNamePrefix.set("") modelNameSuffix.set("") + apiNameSuffix.set("") generateModelTests.set(true) generateModelDocumentation.set(true) generateApiTests.set(true) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index d7a0c989de2a..cd693b17136b 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -168,6 +168,13 @@ open class GenerateTask : DefaultTask() { @Input val modelNameSuffix = project.objects.property() + /** + * Suffix that will be appended to all api names. Default is the empty string. + */ + @Optional + @Input + val apiNameSuffix = project.objects.property() + /** * Sets instantiation type mappings. */ @@ -573,6 +580,10 @@ open class GenerateTask : DefaultTask() { configurator.setModelNameSuffix(value) } + apiNameSuffix.ifNotEmpty { value -> + configurator.setApiNameSuffix(value) + } + invokerPackage.ifNotEmpty { value -> configurator.setInvokerPackage(value) } diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt index f8871e12fae8..14c8f358f1bb 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt @@ -68,6 +68,55 @@ class GenerateTaskDslTest : TestBase() { "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}") } + @Test + fun `should apply prefix & suffix config parameters`() { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml") + ) + withProject(""" + plugins { + id 'org.openapi.generator' + } + openApiGenerate { + generatorName = "java" + inputSpec = file("spec.yaml").absolutePath + outputDir = file("build/java").absolutePath + apiPackage = "org.openapitools.example.api" + invokerPackage = "org.openapitools.example.invoker" + modelPackage = "org.openapitools.example.model" + modelNamePrefix = "ModelPref" + modelNameSuffix = "Suff" + apiNameSuffix = "ApiClassSuffix" + configOptions = [ + dateLibrary: "java8" + ] + } + """.trimIndent(), projectFiles) + + // Act + val result = GradleRunner.create() + .withProjectDir(temp) + .withArguments("openApiGenerate") + .withPluginClasspath() + .build() + + // Assert + assertTrue(result.output.contains("Successfully generated code to"), "User friendly generate notice is missing.") + + listOf( + "build/java/src/main/java/org/openapitools/example/model/ModelPrefPetSuff.java", + "build/java/src/main/java/org/openapitools/example/model/ModelPrefErrorSuff.java", + "build/java/src/main/java/org/openapitools/example/api/PetsApiClassSuffix.java" + ).map { + val f = File(temp, it) + assertTrue(f.exists() && f.isFile, "An expected file was not generated when invoking the generation. - " + f) + } + + assertEquals(TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}") + } + @Test fun `openApiGenerate should used up-to-date instead of regenerate`() { // Arrange diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 3102d196ffa3..a9b551e834e1 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -67,6 +67,7 @@ mvn clean compile | `library` | `openapi.generator.maven.plugin.library` | library template (sub-template) | `modelNamePrefix` | `openapi.generator.maven.plugin.modelNamePrefix` | Sets the prefix for model classes and enums | `modelNameSuffix` | `openapi.generator.maven.plugin.modelNameSuffix` | Sets the suffix for model classes and enums +| `apiNameSuffix` | `openapi.generator.maven.plugin.apiNameSuffix` | Sets the suffix for api classes | `ignoreFileOverride` | `openapi.generator.maven.plugin.ignoreFileOverride` | specifies the full path to a `.openapi-generator-ignore` used for pattern based overrides of generated outputs | `httpUserAgent` | `openapi.generator.maven.plugin.httpUserAgent` | Sets custom User-Agent header value | `removeOperationIdPrefix` | `openapi.generator.maven.plugin.removeOperationIdPrefix` | remove operationId prefix (e.g. user_getName => getName) diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 2666eb1072ec..60c86e99de91 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -27,28 +27,28 @@ org.apache.maven maven-core - 3.3.1 + 3.8.5 org.apache.maven maven-artifact - 3.2.5 + 3.8.5 provided org.apache.maven maven-compat - 3.5.0 + 3.8.5 org.apache.maven maven-plugin-api - 3.3.1 + 3.8.5 org.apache.maven.plugin-tools maven-plugin-annotations - 3.4 + 3.6.4 org.openapitools @@ -86,7 +86,7 @@ org.apache.maven.plugins maven-plugin-plugin - 3.6.0 + 3.6.4 true diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index bc32b412f628..2435aab27f33 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -220,6 +220,12 @@ public class CodeGenMojo extends AbstractMojo { @Parameter(name = "modelNameSuffix", property = "openapi.generator.maven.plugin.modelNameSuffix") private String modelNameSuffix; + /** + * Sets the suffix for api classes + */ + @Parameter(name = "apiNameSuffix", property = "openapi.generator.maven.plugin.apiNameSuffix") + private String apiNameSuffix; + /** * Sets an optional ignoreFileOverride path */ @@ -596,6 +602,10 @@ public void execute() throws MojoExecutionException { configurator.setModelNameSuffix(modelNameSuffix); } + if (isNotEmpty(apiNameSuffix)) { + configurator.setApiNameSuffix(apiNameSuffix); + } + if (null != templateDirectory) { configurator.setTemplateDir(templateDirectory.getAbsolutePath()); } diff --git a/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java b/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java index dd2083d017e3..4dea86da7dc1 100644 --- a/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java +++ b/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java @@ -46,6 +46,7 @@ public void testCommonConfiguration() throws Exception { mojo.execute(); assertEquals("java", getVariableValueFromObject(mojo, "generatorName")); assertEquals("jersey2", getVariableValueFromObject(mojo, "library")); + assertEquals("Suffix", getVariableValueFromObject(mojo, "apiNameSuffix")); assertEquals("remote.org.openapitools.client.api", getVariableValueFromObject(mojo, "apiPackage")); assertEquals("remote.org.openapitools.client.model", getVariableValueFromObject(mojo, "modelPackage")); assertEquals("remote.org.openapitools.client", getVariableValueFromObject(mojo, "invokerPackage")); diff --git a/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml b/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml index 95ab2451e5d8..277b183629df 100644 --- a/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml +++ b/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml @@ -34,6 +34,7 @@ joda + Suffix jersey2 ${basedir}/target/generated-sources/common-maven/remote-openapi remote.org.openapitools.client.api diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java index e2a37de1a5c5..3169c5e87398 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java @@ -28,15 +28,23 @@ import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; import java.util.Properties; +import java.util.Set; +import java.util.HashSet; @Configuration @EnableSwagger2 public class OpenAPIDocumentationConfig { + private final Logger LOGGER = LoggerFactory.getLogger(OpenAPIDocumentationConfig.class); ApiInfo apiInfo() { final Properties properties = new Properties(); @@ -63,7 +71,7 @@ ApiInfo apiInfo() { @Bean public Docket customImplementation(){ - return new Docket(DocumentationType.SWAGGER_2) + Docket docket = new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("org.openapitools.codegen.online.api")) .build() @@ -74,6 +82,29 @@ public Docket customImplementation(){ .ignoredParameterTypes(Resource.class) .ignoredParameterTypes(InputStream.class) .apiInfo(apiInfo()); + + String hostString = System.getenv("GENERATOR_HOST"); + if (!StringUtils.isBlank(hostString)) { + try { + URI hostURI = new URI(hostString); + String scheme = hostURI.getScheme(); + if (scheme != null) { + Set protocols = new HashSet(); + protocols.add(scheme); + docket.protocols(protocols); + } + String authority = hostURI.getAuthority(); + if (authority != null) { + // In OpenAPI `host` refers to host _and_ port, a.k.a. the URI authority + docket.host(authority); + } + docket.pathMapping(hostURI.getPath()); + } catch(URISyntaxException e) { + LOGGER.warn("Could not parse configured GENERATOR_HOST '" + hostString + "': " + e.getMessage()); + } + } + + return docket; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenComposedSchemas.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenComposedSchemas.java index f801853dafc8..e53ecf8a4cd7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenComposedSchemas.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenComposedSchemas.java @@ -22,11 +22,13 @@ public class CodegenComposedSchemas { private List allOf; private List oneOf; private List anyOf; + private CodegenProperty not = null; - public CodegenComposedSchemas(List allOf, List oneOf, List anyOf) { + public CodegenComposedSchemas(List allOf, List oneOf, List anyOf, CodegenProperty not) { this.allOf = allOf; this.oneOf = oneOf; this.anyOf = anyOf; + this.not = not; } public List getAllOf() { @@ -41,11 +43,16 @@ public List getAnyOf() { return anyOf; } + public CodegenProperty getNot() { + return not; + } + public String toString() { final StringBuilder sb = new StringBuilder("CodegenComposedSchemas{"); sb.append("oneOf=").append(oneOf); sb.append(", anyOf=").append(anyOf); sb.append(", allOf=").append(allOf); + sb.append(", not=").append(not); sb.append('}'); return sb.toString(); } @@ -56,11 +63,12 @@ public boolean equals(Object o) { CodegenComposedSchemas that = (CodegenComposedSchemas) o; return Objects.equals(oneOf, that.oneOf) && Objects.equals(anyOf, that.anyOf) && - Objects.equals(allOf, that.allOf); + Objects.equals(allOf, that.allOf) && + Objects.equals(not, that.not); } @Override public int hashCode() { - return Objects.hash(oneOf, anyOf, allOf); + return Objects.hash(oneOf, anyOf, allOf, not); } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 952d3a841f27..2c8dcdb681fa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -27,6 +27,9 @@ import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.util.List; @@ -184,15 +187,15 @@ public interface CodegenConfig { void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map> operations); - Map updateAllModels(Map objs); + Map updateAllModels(Map objs); void postProcess(); - Map postProcessAllModels(Map objs); + Map postProcessAllModels(Map objs); - Map postProcessModels(Map objs); + ModelsMap postProcessModels(ModelsMap objs); - Map postProcessOperationsWithModels(Map objs, List allModels); + OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels); Map postProcessSupportingFileData(Map objs); @@ -305,13 +308,15 @@ public interface CodegenConfig { Schema unaliasSchema(Schema schema, Map usedImportMappings); - public String defaultTemplatingEngine(); + String defaultTemplatingEngine(); - public GeneratorLanguage generatorLanguage(); + GeneratorLanguage generatorLanguage(); /* the version of the language that the generator implements For python 3.9.0, generatorLanguageVersion would be "3.9.0" */ - public String generatorLanguageVersion(); + String generatorLanguageVersion(); + + List getSupportedVendorExtensions(); } 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 d0906a4caf09..2c0fe6b1b26f 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 @@ -396,4 +396,6 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, public static final String USE_ONEOF_DISCRIMINATOR_LOOKUP = "useOneOfDiscriminatorLookup"; public static final String USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC = "Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped."; + public static final String INIT_REQUIRED_VARS = "initRequiredVars"; + public static final String INIT_REQUIRED_VARS_DESC = "If set to true then the required variables are included as positional arguments in __init__ and _from_openapi_data methods. Note: this can break some composition use cases. To learn more read PR #8802."; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 25f53be09fb8..9033a21b4d03 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -161,6 +161,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { private boolean hasRequiredVars; private boolean hasDiscriminatorWithNonEmptyMapping; private boolean isAnyType; + private boolean isUuid; public String getAdditionalPropertiesType() { return additionalPropertiesType; @@ -851,6 +852,10 @@ public void setIsAnyType(boolean isAnyType) { this.isAnyType = isAnyType; } + public boolean getIsUuid() { return isUuid; } + + public void setIsUuid(boolean isUuid) { this.isUuid = isUuid; } + @Override public void setComposedSchemas(CodegenComposedSchemas composedSchemas) { this.composedSchemas = composedSchemas; @@ -907,6 +912,7 @@ public boolean equals(Object o) { isDecimal == that.isDecimal && hasMultipleTypes == that.getHasMultipleTypes() && hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() && + isUuid == that.getIsUuid() && getIsAnyType() == that.getIsAnyType() && getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() && getUniqueItems() == that.getUniqueItems() && @@ -983,23 +989,23 @@ hasChildren, isMap, isDeprecated, hasOnlyReadOnly, getExternalDocumentation(), g getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(), getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(), getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping, - isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal); + isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal, isUuid); } @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenModel{"); - sb.append("parent='").append(parent).append('\''); + sb.append("name='").append(name).append('\''); + sb.append(", parent='").append(parent).append('\''); sb.append(", parentSchema='").append(parentSchema).append('\''); sb.append(", interfaces=").append(interfaces); + sb.append(", interfaceModels=").append(interfaceModels!=null?interfaceModels.size():"[]"); sb.append(", allParents=").append(allParents); sb.append(", parentModel=").append(parentModel); - sb.append(", interfaceModels=").append(interfaceModels); - sb.append(", children=").append(children); + sb.append(", children=").append(children!=null?children.size():"[]"); sb.append(", anyOf=").append(anyOf); sb.append(", oneOf=").append(oneOf); sb.append(", allOf=").append(allOf); - sb.append(", name='").append(name).append('\''); sb.append(", classname='").append(classname).append('\''); sb.append(", title='").append(title).append('\''); sb.append(", description='").append(description).append('\''); @@ -1078,6 +1084,7 @@ public String toString() { sb.append(", composedSchemas=").append(composedSchemas); sb.append(", hasMultipleTypes=").append(hasMultipleTypes); sb.append(", isDecimal=").append(isDecimal); + sb.append(", isUUID=").append(isUuid); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 75e08a6f7c47..ca384edfac47 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -42,6 +42,7 @@ public class CodegenOperation { public List pathParams = new ArrayList(); public List queryParams = new ArrayList(); public List headerParams = new ArrayList(); + public List implicitHeadersParams = new ArrayList(); public List formParams = new ArrayList(); public List cookieParams = new ArrayList(); public List requiredParams = new ArrayList(); @@ -67,11 +68,11 @@ public class CodegenOperation { * @return true if parameter exists, false otherwise */ private static boolean nonEmpty(List params) { - return params != null && params.size() > 0; + return params != null && !params.isEmpty(); } private static boolean nonEmpty(Map params) { - return params != null && params.size() > 0; + return params != null && !params.isEmpty(); } /** @@ -188,7 +189,7 @@ public boolean getHasExamples() { * @return true if responses contain a default response, false otherwise */ public boolean getHasDefaultResponse() { - return responses.stream().filter(response -> response.isDefault).findFirst().isPresent(); + return responses.stream().anyMatch(response -> response.isDefault); } /** diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 74d7a2b9ad6b..af222869bfe1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -679,6 +679,10 @@ public void setRequiredVars(List requiredVars) { this.requiredVars = requiredVars; } + public boolean compulsory(){ + return required && !isNullable; + } + @Override public boolean getIsNull() { return isNull; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index d184d39b4d27..56aee00ce3b1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -434,6 +434,10 @@ public boolean getRequired() { return required; } + public boolean compulsory(){ + return getRequired() && !isNullable; + } + public void setRequired(boolean required) { this.required = required; } @@ -858,6 +862,10 @@ public void setHasMultipleTypes(boolean hasMultipleTypes) { this.hasMultipleTypes = hasMultipleTypes; } + public boolean getIsUuid() { return isUuid; } + + public void setIsUuid(boolean isUuid) { this.isUuid = isUuid; } + @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenProperty{"); @@ -917,6 +925,7 @@ public String toString() { sb.append(", isArray=").append(isArray); sb.append(", isMap=").append(isMap); sb.append(", isEnum=").append(isEnum); + sb.append(", isAnyType=").append(isAnyType); sb.append(", isReadOnly=").append(isReadOnly); sb.append(", isWriteOnly=").append(isWriteOnly); sb.append(", isNullable=").append(isNullable); @@ -995,6 +1004,7 @@ public boolean equals(Object o) { isArray == that.isArray && isMap == that.isMap && isEnum == that.isEnum && + isAnyType == that.isAnyType && isReadOnly == that.isReadOnly && isWriteOnly == that.isWriteOnly && isNullable == that.isNullable && @@ -1068,9 +1078,9 @@ public int hashCode() { hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, - isArray, isMap, isEnum, isReadOnly, isWriteOnly, isNullable, isShort, isUnboundedInteger, - isSelfReference, isCircularReference, isDiscriminator, _enum, allowableValues, - items, mostInnerItems, additionalProperties, vars, requiredVars, + isArray, isMap, isEnum, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort, + isUnboundedInteger, isSelfReference, isCircularReference, isDiscriminator, _enum, + allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase, nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName, xmlNamespace, isXmlWrapped, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired, 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 90e3269930ee..1dc1cd8713b5 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 @@ -27,7 +27,7 @@ import com.samskivert.mustache.Mustache.Lambda; import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.CodegenDiscriminator.MappedModel; @@ -38,6 +38,9 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.serializer.SerializerUtils; import org.openapitools.codegen.templating.MustacheEngineAdapter; import org.openapitools.codegen.templating.mustache.*; @@ -93,7 +96,7 @@ public class DefaultCodegen implements CodegenConfig { DataTypeFeature.Int32, DataTypeFeature.Int64, DataTypeFeature.Float, DataTypeFeature.Double, DataTypeFeature.Decimal, DataTypeFeature.String, DataTypeFeature.Byte, DataTypeFeature.Binary, DataTypeFeature.Boolean, DataTypeFeature.Date, DataTypeFeature.DateTime, DataTypeFeature.Password, - DataTypeFeature.File, DataTypeFeature.Array, DataTypeFeature.Maps, DataTypeFeature.CollectionFormat, + DataTypeFeature.File, DataTypeFeature.Array, DataTypeFeature.Object, DataTypeFeature.Maps, DataTypeFeature.CollectionFormat, DataTypeFeature.CollectionFormatMulti, DataTypeFeature.Enum, DataTypeFeature.ArrayOfEnum, DataTypeFeature.ArrayOfModel, DataTypeFeature.ArrayOfCollectionOfPrimitives, DataTypeFeature.ArrayOfCollectionOfModel, DataTypeFeature.ArrayOfCollectionOfEnum, DataTypeFeature.MapOfEnum, DataTypeFeature.MapOfModel, DataTypeFeature.MapOfCollectionOfPrimitives, @@ -267,6 +270,8 @@ apiTemplateFiles are for API outputs only (controllers/handlers). // A cache to efficiently lookup schema `toModelName()` based on the schema Key private final Map schemaKeyToModelNameCache = new HashMap<>(); + protected boolean loadDeepObjectIntoItems = true; + @Override public List cliOptions() { return cliOptions; @@ -429,19 +434,19 @@ private void registerMustacheLambdas() { // override with any special post-processing for all models @Override - @SuppressWarnings({"static-method", "unchecked"}) - public Map postProcessAllModels(Map objs) { + @SuppressWarnings("static-method") + public Map postProcessAllModels(Map objs) { if (this.useOneOfInterfaces) { // First, add newly created oneOf interfaces for (CodegenModel cm : addOneOfInterfaces) { - Map modelValue = new HashMap<>(additionalProperties()); - modelValue.put("model", cm); + ModelMap modelMapValue = new ModelMap(additionalProperties()); + modelMapValue.setModel(cm); List> importsValue = new ArrayList<>(); - Map objsValue = new HashMap<>(); - objsValue.put("models", Collections.singletonList(modelValue)); + ModelsMap objsValue = new ModelsMap(); + objsValue.setModels(Collections.singletonList(modelMapValue)); objsValue.put("package", modelPackage()); - objsValue.put("imports", importsValue); + objsValue.setImports(importsValue); objsValue.put("classname", cm.classname); objsValue.putAll(additionalProperties); objs.put(cm.name, objsValue); @@ -450,13 +455,10 @@ public Map postProcessAllModels(Map objs) { // Gather data from all the models that contain oneOf into OneOfImplementorAdditionalData classes // (see docstring of that class to find out what information is gathered and why) Map additionalDataMap = new HashMap<>(); - for (Map.Entry modelsEntry : objs.entrySet()) { - Map modelsAttrs = (Map) modelsEntry.getValue(); - List models = (List) modelsAttrs.get("models"); - List> modelsImports = (List>) modelsAttrs.getOrDefault("imports", new ArrayList>()); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelsMap modelsAttrs : objs.values()) { + List> modelsImports = modelsAttrs.getImportsOrEmpty(); + for (ModelMap mo : modelsAttrs.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.oneOf.size() > 0) { cm.vendorExtensions.put("x-is-one-of-interface", true); for (String one : cm.oneOf) { @@ -472,13 +474,11 @@ public Map postProcessAllModels(Map objs) { } // Add all the data from OneOfImplementorAdditionalData classes to the implementing models - for (Map.Entry modelsEntry : objs.entrySet()) { - Map modelsAttrs = (Map) modelsEntry.getValue(); - List models = (List) modelsAttrs.get("models"); - List> imports = (List>) modelsAttrs.get("imports"); - for (Object _implmo : models) { - Map implmo = (Map) _implmo; - CodegenModel implcm = (CodegenModel) implmo.get("model"); + for (Map.Entry modelsEntry : objs.entrySet()) { + ModelsMap modelsAttrs = modelsEntry.getValue(); + List> imports = modelsAttrs.getImports(); + for (ModelMap implmo : modelsAttrs.getModels()) { + CodegenModel implcm = implmo.getModel(); String modelName = toModelName(implcm.name); if (additionalDataMap.containsKey(modelName)) { additionalDataMap.get(modelName).addToImplementor(this, implcm, imports, addOneOfInterfaceImports); @@ -511,14 +511,13 @@ protected Map getModelNameToSchemaCache() { * @param objs Map of models * @return map of all models indexed by names */ - public Map getAllModels(Map objs) { + public Map getAllModels(Map objs) { Map allModels = new HashMap<>(); - for (Entry entry : objs.entrySet()) { + for (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"); + List models = entry.getValue().getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); allModels.put(modelName, cm); } } @@ -532,7 +531,7 @@ public Map getAllModels(Map objs) { * @return maps of models with various updates */ @Override - public Map updateAllModels(Map objs) { + public Map updateAllModels(Map objs) { Map allModels = getAllModels(objs); // Fix up all parent and interface CodegenModel references. @@ -577,11 +576,9 @@ public Map updateAllModels(Map objs) { } // loop through properties of each model to detect self-reference - 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"); + for (ModelsMap entry : objs.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); removeSelfReferenceImports(cm); } } @@ -660,7 +657,7 @@ private boolean isCircularReference(final String root, // override with any special post-processing @Override @SuppressWarnings("static-method") - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return objs; } @@ -670,11 +667,9 @@ public Map postProcessModels(Map objs) { * @param objs Map of models * @return maps of models with better enum support */ - public Map postProcessModelsEnum(Map objs) { - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + public ModelsMap postProcessModelsEnum(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { @@ -816,7 +811,7 @@ public void postProcess() { // override with any special post-processing @Override @SuppressWarnings("static-method") - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { return objs; } @@ -843,7 +838,7 @@ public void postProcessParameter(CodegenParameter parameter) { @Override @SuppressWarnings("unused") public void preprocessOpenAPI(OpenAPI openAPI) { - if (useOneOfInterfaces) { + if (useOneOfInterfaces && openAPI.getComponents() != null) { // we process the openapi schema here to find oneOf schemas and create interface models for them Map schemas = new HashMap<>(openAPI.getComponents().getSchemas()); if (schemas == null) { @@ -2753,6 +2748,10 @@ public CodegenModel fromModel(String name, Schema schema) { // NOTE: Date schemas as CodegenModel is a rare use case and may be removed at a later date. m.setIsString(false); // for backward compatibility with 2.x m.isDate = Boolean.TRUE; + } else if (ModelUtils.isUUIDSchema(schema)) { + // NOTE: UUID schemas as CodegenModel is a rare use case and may be removed at a later date. + m.setIsString(false); + m.setIsUuid(true); } } else if (ModelUtils.isNumberSchema(schema)) { // NOTE: Number schemas as CodegenModel is a rare use case and may be removed at a later date. @@ -3198,7 +3197,7 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch // FIXME: for now, we assume that the discriminator property is String discriminator.setPropertyType(typeMapping.get("string")); discriminator.setMapping(sourceDiscriminator.getMapping()); - List uniqueDescendants = new ArrayList(); + List uniqueDescendants = new ArrayList<>(); if (sourceDiscriminator.getMapping() != null && !sourceDiscriminator.getMapping().isEmpty()) { for (Entry e : sourceDiscriminator.getMapping().entrySet()) { String name; @@ -4005,7 +4004,7 @@ public CodegenOperation fromOperation(String path, List responseHeaders = new ArrayList<>(); for (Entry entry : headers.entrySet()) { String headerName = entry.getKey(); - Header header = entry.getValue(); + Header header = ModelUtils.getReferencedHeader(this.openAPI, entry.getValue()); CodegenParameter responseHeader = headerToCodegenParameter(header, headerName, imports, String.format(Locale.ROOT, "%sResponseParameter", r.code)); responseHeaders.add(responseHeader); } @@ -4756,10 +4755,12 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) } codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); - if (codegenParameter.isQueryParam && codegenParameter.isDeepObject) { - Schema schema = ModelUtils.getSchema(openAPI, codegenParameter.dataType); + if (codegenParameter.isQueryParam && codegenParameter.isDeepObject && loadDeepObjectIntoItems) { + Schema schema = parameterSchema; + if (schema.get$ref() != null) { + schema = ModelUtils.getReferencedSchema(openAPI, schema); + } codegenParameter.items = fromProperty(codegenParameter.paramName, schema); - // TODO Check why schema is actually null for a schema of type object defined inline // https://swagger.io/docs/specification/serialization/ if (schema != null) { Map> properties = schema.getProperties(); @@ -6756,7 +6757,10 @@ protected LinkedHashMap getContent(Content content, Se } } String contentType = contentEntry.getKey(); - CodegenProperty schemaProp = fromProperty(toMediaTypeSchemaName(contentType, mediaTypeSchemaSuffix), mt.getSchema()); + CodegenProperty schemaProp = null; + if (mt.getSchema() != null) { + schemaProp = fromProperty(toMediaTypeSchemaName(contentType, mediaTypeSchemaSuffix), mt.getSchema()); + } CodegenMediaType codegenMt = new CodegenMediaType(schemaProp, ceMap); cmtContent.put(contentType, codegenMt); if (schemaProp != null) { @@ -7367,14 +7371,28 @@ protected String getCollectionFormat(CodegenParameter codegenParameter) { } private CodegenComposedSchemas getComposedSchemas(Schema schema) { - if (!(schema instanceof ComposedSchema)) { + if (!(schema instanceof ComposedSchema) && schema.getNot()==null) { return null; } - ComposedSchema cs = (ComposedSchema) schema; + Schema notSchema = schema.getNot(); + CodegenProperty notProperty = null; + if (notSchema != null) { + notProperty = fromProperty("NotSchema", notSchema); + } + List allOf = new ArrayList<>(); + List oneOf = new ArrayList<>(); + List anyOf = new ArrayList<>(); + if (schema instanceof ComposedSchema) { + ComposedSchema cs = (ComposedSchema) schema; + allOf = getComposedProperties(cs.getAllOf(), "allOf"); + oneOf = getComposedProperties(cs.getOneOf(), "oneOf"); + anyOf = getComposedProperties(cs.getAnyOf(), "anyOf"); + } return new CodegenComposedSchemas( - getComposedProperties(cs.getAllOf(), "allOf"), - getComposedProperties(cs.getOneOf(), "oneOf"), - getComposedProperties(cs.getAnyOf(), "anyOf") + allOf, + oneOf, + anyOf, + notProperty ); } @@ -7407,5 +7425,8 @@ public String generatorLanguageVersion() { return null; } - ; + @Override + public List getSupportedVendorExtensions() { + return new ArrayList<>(); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index b316b55ef9d8..520a4a196a3b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -44,6 +44,11 @@ import org.openapitools.codegen.languages.PythonExperimentalClientCodegen; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.serializer.SerializerUtils; import org.openapitools.codegen.templating.CommonTemplateContentLocator; import org.openapitools.codegen.templating.GeneratorTemplateContentLocator; @@ -395,8 +400,7 @@ private void generateModel(List files, Map models, String } } - @SuppressWarnings("unchecked") - void generateModels(List files, List allModels, List unusedModels) { + void generateModels(List files, List allModels, List unusedModels) { if (!generateModels) { // TODO: Process these anyway and add to dryRun info LOGGER.info("Skipping generation of models."); @@ -428,7 +432,7 @@ void generateModels(List files, List allModels, List unuse } // store all processed models - Map allProcessedModels = new TreeMap<>((o1, o2) -> ObjectUtils.compare(config.toModelName(o1), config.toModelName(o2))); + Map allProcessedModels = new TreeMap<>((o1, o2) -> ObjectUtils.compare(config.toModelName(o1), config.toModelName(o2))); Boolean skipFormModel = GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ? Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL)) : @@ -484,7 +488,7 @@ void generateModels(List files, List allModels, List unuse Map schemaMap = new HashMap<>(); schemaMap.put(name, schema); - Map models = processModels(config, schemaMap); + ModelsMap models = processModels(config, schemaMap); models.put("classname", config.toModelName(name)); models.putAll(config.additionalProperties()); allProcessedModels.put(name, models); @@ -501,15 +505,15 @@ void generateModels(List files, List allModels, List unuse // generate files based on processed models for (String modelName : allProcessedModels.keySet()) { - Map models = (Map) allProcessedModels.get(modelName); + ModelsMap models = allProcessedModels.get(modelName); models.put("modelPackage", config.modelPackage()); try { // TODO revise below as we've already performed unaliasing so that the isAlias check may be removed - List modelList = (List) models.get("models"); + List modelList = models.getModels(); if (modelList != null && !modelList.isEmpty()) { - Map modelTemplate = (Map) modelList.get(0); - if (modelTemplate != null && modelTemplate.containsKey("model")) { - CodegenModel m = (CodegenModel) modelTemplate.get("model"); + ModelMap modelTemplate = modelList.get(0); + if (modelTemplate != null && modelTemplate.getModel() != null) { + CodegenModel m = modelTemplate.getModel(); if (m.isAlias && !((config instanceof PythonClientCodegen) || (config instanceof PythonExperimentalClientCodegen))) { // alias to number, string, enum, etc, which should not be generated as model // for PythonClientCodegen, all aliases are generated as models @@ -540,7 +544,7 @@ void generateModels(List files, List allModels, List unuse } @SuppressWarnings("unchecked") - void generateApis(List files, List allOperations, List allModels) { + void generateApis(List files, List allOperations, List allModels) { if (!generateApis) { // TODO: Process these anyway and present info via dryRun? LOGGER.info("Skipping generation of APIs."); @@ -565,7 +569,7 @@ void generateApis(List files, List allOperations, List all try { List ops = paths.get(tag); ops.sort((one, another) -> ObjectUtils.compare(one.operationId, another.operationId)); - Map operation = processOperations(config, tag, ops, allModels); + OperationsMap operation = processOperations(config, tag, ops, allModels); URL url = URLPathUtils.getServerURL(openAPI, config.serverVariableOverrides()); operation.put("basePath", basePath); operation.put("basePathWithoutHost", removeTrailingSlash(config.encodePath(url.getPath()))); @@ -594,9 +598,8 @@ void generateApis(List files, List allOperations, List all if (config.vendorExtensions().containsKey("x-group-parameters")) { boolean isGroupParameters = Boolean.parseBoolean(config.vendorExtensions().get("x-group-parameters").toString()); - Map objectMap = (Map) operation.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + OperationMap objectMap = operation.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation op : operations) { if (isGroupParameters && !op.vendorExtensions.containsKey("x-group-parameters")) { op.vendorExtensions.put("x-group-parameters", Boolean.TRUE); @@ -616,7 +619,7 @@ void generateApis(List files, List allOperations, List all processMimeTypes(swagger.getProduces(), operation, "produces"); */ - allOperations.add(new HashMap<>(operation)); + allOperations.add(operation); addAuthenticationSwitches(operation); @@ -745,14 +748,13 @@ private void generateSupportingFiles(List files, Map bundl generateVersionMetadata(files); } - @SuppressWarnings("unchecked") - Map buildSupportFileBundle(List allOperations, List allModels) { + Map buildSupportFileBundle(List allOperations, List allModels) { Map bundle = new HashMap<>(config.additionalProperties()); bundle.put("apiPackage", config.apiPackage()); - Map apis = new HashMap<>(); - apis.put("apis", allOperations); + ApiInfoMap apis = new ApiInfoMap(); + apis.setApis(allOperations); URL url = URLPathUtils.getServerURL(openAPI, config.serverVariableOverrides()); @@ -787,8 +789,7 @@ Map buildSupportFileBundle(List allOperations, List cm = (HashMap) allModels.get(i); - CodegenModel m = cm.get("model"); + CodegenModel m = allModels.get(i).getModel(); m.hasMoreModels = true; } @@ -884,10 +885,10 @@ public List generate() { List files = new ArrayList<>(); // models List filteredSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI); - List allModels = new ArrayList<>(); + List allModels = new ArrayList<>(); generateModels(files, allModels, filteredSchemas); // apis - List allOperations = new ArrayList<>(); + List allOperations = new ArrayList<>(); generateApis(files, allOperations, allModels); // supporting files @@ -1170,12 +1171,11 @@ private static String generateParameterId(Parameter parameter) { return parameter.getName() + ":" + parameter.getIn(); } - @SuppressWarnings("unchecked") - private Map processOperations(CodegenConfig config, String tag, List ops, List allModels) { - Map operations = new HashMap<>(); - Map objs = new HashMap<>(); - objs.put("classname", config.toApiName(tag)); - objs.put("pathPrefix", config.toApiVarName(tag)); + private OperationsMap processOperations(CodegenConfig config, String tag, List ops, List allModels) { + OperationsMap operations = new OperationsMap(); + OperationMap objs = new OperationMap(); + objs.setClassname(config.toApiName(tag)); + objs.setPathPrefix(config.toApiVarName(tag)); // check for operationId uniqueness Set opIds = new HashSet<>(); @@ -1188,9 +1188,9 @@ private Map processOperations(CodegenConfig config, String tag, } opIds.add(opId); } - objs.put("operation", ops); + objs.setOperation(ops); - operations.put("operations", objs); + operations.setOperation(objs); operations.put("package", config.apiPackage()); Set allImports = new ConcurrentSkipListSet<>(); @@ -1202,10 +1202,10 @@ private Map processOperations(CodegenConfig config, String tag, Set> imports = toImportsObjects(mappings); //Some codegen implementations rely on a list interface for the imports - operations.put("imports", imports.stream().collect(Collectors.toList())); + operations.setImports(new ArrayList<>(imports)); // add a flag to indicate whether there's any {{import}} - if (imports.size() > 0) { + if (!imports.isEmpty()) { operations.put("hasImport", true); } @@ -1240,27 +1240,23 @@ private Map getAllImportsMappings(Set allImports) { * @return The set of unique imports */ private Set> toImportsObjects(Map mappedImports) { - Set> result = new TreeSet>( - (Comparator>) (o1, o2) -> { - String s1 = o1.get("classname"); - String s2 = o2.get("classname"); - return s1.compareTo(s2); - } + Set> result = new TreeSet<>( + Comparator.comparing(o -> o.get("classname")) ); - mappedImports.entrySet().forEach(mapping -> { + mappedImports.forEach((key, value) -> { Map im = new LinkedHashMap<>(); - im.put("import", mapping.getKey()); - im.put("classname", mapping.getValue()); + im.put("import", key); + im.put("classname", value); result.add(im); }); return result; } - private Map processModels(CodegenConfig config, Map definitions) { - Map objs = new HashMap<>(); + private ModelsMap processModels(CodegenConfig config, Map definitions) { + ModelsMap objs = new ModelsMap(); objs.put("package", config.modelPackage()); - List models = new ArrayList<>(); + List modelMaps = new ArrayList<>(); Set allImports = new LinkedHashSet<>(); for (Map.Entry definitionsEntry : definitions.entrySet()) { String key = definitionsEntry.getKey(); @@ -1268,16 +1264,16 @@ private Map processModels(CodegenConfig config, Map mo = new HashMap<>(); - mo.put("model", cm); + ModelMap mo = new ModelMap(); + mo.setModel(cm); mo.put("importPath", config.toModelImport(cm.classname)); - models.add(mo); + modelMaps.add(mo); cm.removeSelfReferenceImport(); allImports.addAll(cm.imports); } - objs.put("models", models); + objs.setModels(modelMaps); Set importSet = new ConcurrentSkipListSet<>(); for (String nextImport : allImports) { String mapping = config.importMapping().get(nextImport); @@ -1299,7 +1295,7 @@ private Map processModels(CodegenConfig config, Map addedModels = new HashMap(); private Map generatedSignature = new HashMap(); + public boolean resolveInlineEnums = false; // structure mapper sorts properties alphabetically on write to ensure models are // serialized consistently for lookup of existing models @@ -51,29 +53,27 @@ public class InlineModelResolver { structureMapper.writer(new DefaultPrettyPrinter()); } - final Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class); + final Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class); - void flatten(OpenAPI openapi) { - this.openapi = openapi; + void flatten(OpenAPI openAPI) { + this.openAPI = openAPI; - if (openapi.getComponents() == null) { - openapi.setComponents(new Components()); + if (this.openAPI.getComponents() == null) { + this.openAPI.setComponents(new Components()); } - if (openapi.getComponents().getSchemas() == null) { - openapi.getComponents().setSchemas(new HashMap()); + if (this.openAPI.getComponents().getSchemas() == null) { + this.openAPI.getComponents().setSchemas(new HashMap()); } - flattenPaths(openapi); - flattenComponents(openapi); + flattenPaths(); + flattenComponents(); } /** * Flatten inline models in Paths - * - * @param openAPI target spec */ - private void flattenPaths(OpenAPI openAPI) { + private void flattenPaths() { Paths paths = openAPI.getPaths(); if (paths == null) { return; @@ -96,9 +96,212 @@ private void flattenPaths(OpenAPI openAPI) { } for (Operation operation : operations) { - flattenRequestBody(openAPI, pathname, operation); - flattenParameters(openAPI, pathname, operation); - flattenResponses(openAPI, pathname, operation); + flattenRequestBody(pathname, operation); + flattenParameters(pathname, operation); + flattenResponses(pathname, operation); + } + } + } + + /** + * Return false if model can be represented by primitives e.g. string, object + * without properties, array or map of other model (model contanier), etc. + *

    + * Return true if a model should be generated e.g. object with properties, + * enum, oneOf, allOf, anyOf, etc. + * + * @param schema target schema + */ + private boolean isModelNeeded(Schema schema) { + if (resolveInlineEnums && schema.getEnum() != null && schema.getEnum().size() > 0) { + return true; + } + if (schema.getType() == null || "object".equals(schema.getType())) { + // object or undeclared type with properties + if (schema.getProperties() != null && schema.getProperties().size() > 0) { + return true; + } + } + if (schema instanceof ComposedSchema) { + // allOf, anyOf, oneOf + ComposedSchema m = (ComposedSchema) schema; + if (m.getAllOf() != null && !m.getAllOf().isEmpty()) { + // check to ensure at least of the allOf item is model + for (Schema inner : m.getAllOf()) { + if (isModelNeeded(inner)) { + return true; + } + } + // allOf items are all non-model (e.g. type: string) only + return false; + } + if (m.getAnyOf() != null && !m.getAnyOf().isEmpty()) { + return true; + } + if (m.getOneOf() != null && !m.getOneOf().isEmpty()) { + return true; + } + } + + return false; + } + + /** + * Recursively gather inline models that need to be generated and + * replace inline schemas with $ref to schema to-be-generated. + * + * @param schema target schema + */ + private void gatherInlineModels(Schema schema, String modelPrefix) { + if (schema.get$ref() != null) { + // if ref already, no inline schemas should be present but check for + // any to catch OpenAPI violations + if (isModelNeeded(schema) || "object".equals(schema.getType()) || + schema.getProperties() != null || schema.getAdditionalProperties() != null || + schema instanceof ComposedSchema) { + LOGGER.error("Illegal schema found with $ref combined with other properties," + + " no properties should be defined alongside a $ref:\n " + schema.toString()); + } + return; + } + // Check object models / any type models / composed models for properties, + // if the schema has a type defined that is not "object" it should not define + // any properties + if (schema.getType() == null || "object".equals(schema.getType())) { + // Check properties and recurse, each property could be its own inline model + Map props = schema.getProperties(); + if (props != null) { + for (String propName : props.keySet()) { + Schema prop = props.get(propName); + // Recurse to create $refs for inner models + //gatherInlineModels(prop, modelPrefix + StringUtils.camelize(propName)); + gatherInlineModels(prop, modelPrefix + "_" + propName); + if (isModelNeeded(prop)) { + // If this schema should be split into its own model, do so + //Schema refSchema = this.makeSchemaResolve(modelPrefix, StringUtils.camelize(propName), prop); + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_" + propName, prop); + props.put(propName, refSchema); + } else if (prop instanceof ComposedSchema) { + ComposedSchema m = (ComposedSchema) prop; + if (m.getAllOf() != null && m.getAllOf().size() == 1 && + !(m.getAllOf().get(0).getType() == null || "object".equals(m.getAllOf().get(0).getType()))) { + // allOf with only 1 type (non-model) + LOGGER.info("allOf schema used by the property `{}` replaced by its only item (a type)", propName); + props.put(propName, m.getAllOf().get(0)); + } + } + } + } + // Check additionalProperties for inline models + if (schema.getAdditionalProperties() != null) { + if (schema.getAdditionalProperties() instanceof Schema) { + Schema inner = (Schema) schema.getAdditionalProperties(); + // Recurse to create $refs for inner models + gatherInlineModels(inner, modelPrefix + "_addl_props"); + if (isModelNeeded(inner)) { + // If this schema should be split into its own model, do so + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_addl_props", inner); + schema.setAdditionalProperties(refSchema); + } + } + } + } else if (schema.getProperties() != null) { + // If non-object type is specified but also properties + LOGGER.error("Illegal schema found with non-object type combined with properties," + + " no properties should be defined:\n " + schema.toString()); + return; + } else if (schema.getAdditionalProperties() != null) { + // If non-object type is specified but also additionalProperties + LOGGER.error("Illegal schema found with non-object type combined with" + + " additionalProperties, no additionalProperties should be defined:\n " + + schema.toString()); + return; + } + // Check array items + if (schema instanceof ArraySchema) { + ArraySchema array = (ArraySchema) schema; + Schema items = array.getItems(); + if (items == null) { + LOGGER.error("Illegal schema found with array type but no items," + + " items must be defined for array schemas:\n " + schema.toString()); + return; + } + // Recurse to create $refs for inner models + gatherInlineModels(items, modelPrefix + "Items"); + + if (isModelNeeded(items)) { + // If this schema should be split into its own model, do so + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_inner", items); + array.setItems(refSchema); + } + } + // Check allOf, anyOf, oneOf for inline models + if (schema instanceof ComposedSchema) { + ComposedSchema m = (ComposedSchema) schema; + if (m.getAllOf() != null) { + List newAllOf = new ArrayList(); + boolean atLeastOneModel = false; + for (Schema inner : m.getAllOf()) { + // Recurse to create $refs for inner models + gatherInlineModels(inner, modelPrefix + "_allOf"); + if (isModelNeeded(inner)) { + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_allOf", inner); + newAllOf.add(refSchema); // replace with ref + atLeastOneModel = true; + } else { + newAllOf.add(inner); + } + } + if (atLeastOneModel) { + m.setAllOf(newAllOf); + } else { + // allOf is just one or more types only so do not generate the inline allOf model + if (m.getAllOf().size() == 1) { + // handle earlier in this function when looping through properites + } else if (m.getAllOf().size() > 1) { + LOGGER.warn("allOf schema `{}` containing multiple types (not model) is not supported at the moment.", schema.getName()); + } else { + LOGGER.error("allOf schema `{}` contains no items.", schema.getName()); + } + } + } + if (m.getAnyOf() != null) { + List newAnyOf = new ArrayList(); + for (Schema inner : m.getAnyOf()) { + // Recurse to create $refs for inner models + gatherInlineModels(inner, modelPrefix + "_anyOf"); + if (isModelNeeded(inner)) { + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_anyOf", inner); + newAnyOf.add(refSchema); // replace with ref + } else { + newAnyOf.add(inner); + } + } + m.setAnyOf(newAnyOf); + } + if (m.getOneOf() != null) { + List newOneOf = new ArrayList(); + for (Schema inner : m.getOneOf()) { + // Recurse to create $refs for inner models + gatherInlineModels(inner, modelPrefix + "_oneOf"); + if (isModelNeeded(inner)) { + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_oneOf", inner); + newOneOf.add(refSchema); // replace with ref + } else { + newOneOf.add(inner); + } + } + m.setOneOf(newOneOf); + } + } + // Check not schema + if (schema.getNot() != null) { + Schema not = schema.getNot(); + // Recurse to create $refs for inner models + gatherInlineModels(not, modelPrefix + "_not"); + if (isModelNeeded(not)) { + Schema refSchema = this.makeSchemaResolve(modelPrefix, "_not", not); + schema.setNot(refSchema); } } } @@ -106,11 +309,10 @@ private void flattenPaths(OpenAPI openAPI) { /** * Flatten inline models in RequestBody * - * @param openAPI target spec - * @param pathname target pathname + * @param pathname target pathname * @param operation target operation */ - private void flattenRequestBody(OpenAPI openAPI, String pathname, Operation operation) { + private void flattenRequestBody(String pathname, Operation operation) { RequestBody requestBody = operation.getRequestBody(); if (requestBody == null) { return; @@ -196,11 +398,10 @@ private void flattenRequestBody(OpenAPI openAPI, String pathname, Operation oper /** * Flatten inline models in parameters * - * @param openAPI target spec - * @param pathname target pathname + * @param pathname target pathname * @param operation target operation */ - private void flattenParameters(OpenAPI openAPI, String pathname, Operation operation) { + private void flattenParameters(String pathname, Operation operation) { List parameters = operation.getParameters(); if (parameters == null) { return; @@ -254,11 +455,10 @@ private void flattenParameters(OpenAPI openAPI, String pathname, Operation opera /** * Flatten inline models in ApiResponses * - * @param openAPI target spec - * @param pathname target pathname + * @param pathname target pathname * @param operation target operation */ - private void flattenResponses(OpenAPI openAPI, String pathname, Operation operation) { + private void flattenResponses(String pathname, Operation operation) { ApiResponses responses = operation.getResponses(); if (responses == null) { return; @@ -349,30 +549,29 @@ private void flattenResponses(OpenAPI openAPI, String pathname, Operation operat * Flattens properties of inline object schemas that belong to a composed schema into a * single flat list of properties. This is useful to generate a single or multiple * inheritance model. - * + *

    * In the example below, codegen may generate a 'Dog' class that extends from the * generated 'Animal' class. 'Dog' has additional properties 'name', 'age' and 'breed' that * are flattened as a single list of properties. - * + *

    * Dog: - * allOf: - * - $ref: '#/components/schemas/Animal' - * - type: object - * properties: - * name: - * type: string - * age: - * type: string - * - type: object - * properties: - * breed: - * type: string + * allOf: + * - $ref: '#/components/schemas/Animal' + * - type: object + * properties: + * name: + * type: string + * age: + * type: string + * - type: object + * properties: + * breed: + * type: string * - * @param openAPI the OpenAPI document - * @param key a unique name ofr the composed schema. + * @param key a unique name ofr the composed schema. * @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf). */ - private void flattenComposedChildren(OpenAPI openAPI, String key, List children) { + private void flattenComposedChildren(String key, List children) { if (children == null || children.isEmpty()) { return; } @@ -380,9 +579,9 @@ private void flattenComposedChildren(OpenAPI openAPI, String key, List c while (listIterator.hasNext()) { Schema component = listIterator.next(); if ((component != null) && - (component.get$ref() == null) && - ((component.getProperties() != null && !component.getProperties().isEmpty()) || - (component.getEnum() != null && !component.getEnum().isEmpty()))) { + (component.get$ref() == null) && + ((component.getProperties() != null && !component.getProperties().isEmpty()) || + (component.getEnum() != null && !component.getEnum().isEmpty()))) { // If a `title` attribute is defined in the inline schema, codegen uses it to name the // inline schema. Otherwise, we'll use the default naming such as InlineObject1, etc. // We know that this is not the best way to name the model. @@ -413,10 +612,8 @@ private void flattenComposedChildren(OpenAPI openAPI, String key, List c /** * Flatten inline models in components - * - * @param openAPI target spec */ - private void flattenComponents(OpenAPI openAPI) { + private void flattenComponents() { Map models = openAPI.getComponents().getSchemas(); if (models == null) { return; @@ -428,15 +625,17 @@ private void flattenComponents(OpenAPI openAPI) { if (ModelUtils.isComposedSchema(model)) { ComposedSchema m = (ComposedSchema) model; // inline child schemas - flattenComposedChildren(openAPI, modelName + "_allOf", m.getAllOf()); - flattenComposedChildren(openAPI, modelName + "_anyOf", m.getAnyOf()); - flattenComposedChildren(openAPI, modelName + "_oneOf", m.getOneOf()); + flattenComposedChildren(modelName + "_allOf", m.getAllOf()); + flattenComposedChildren(modelName + "_anyOf", m.getAnyOf()); + flattenComposedChildren(modelName + "_oneOf", m.getOneOf()); } else if (model instanceof Schema) { - Schema m = model; - Map properties = m.getProperties(); - flattenProperties(openAPI, properties, modelName); - fixStringModel(m); - } else if (ModelUtils.isArraySchema(model)) { + //Schema m = model; + //Map properties = m.getProperties(); + //flattenProperties(openAPI, properties, modelName); + //fixStringModel(m); + gatherInlineModels(model, modelName); + + } /*else if (ModelUtils.isArraySchema(model)) { ArraySchema m = (ArraySchema) model; Schema inner = m.getItems(); if (inner instanceof ObjectSchema) { @@ -458,7 +657,7 @@ private void flattenComponents(OpenAPI openAPI) { } } } - } + }*/ } } @@ -488,12 +687,11 @@ private boolean schemaContainsExample(Schema m) { /** * 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 - * + * @param key String model name * @return if provided the sanitized {@code title}, else the sanitized {@code key} */ private String resolveModelName(String title, String key) { @@ -532,24 +730,24 @@ private void addGenerated(String name, Schema model) { /** * 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]", "_$0") // e.g. 12object => _12object - .replaceAll("[^A-Za-z0-9]", "_"); // e.g. io.schema.User name => io_schema_User_name + .replaceAll("^[0-9]", "_$0") // e.g. 12object => _12object + .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) { + if (openAPI.getComponents().getSchemas() == null) { return name; } String uniqueName = name; int count = 0; while (true) { - if (!openapi.getComponents().getSchemas().containsKey(uniqueName)) { + if (!openAPI.getComponents().getSchemas().containsKey(uniqueName)) { return uniqueName; } uniqueName = name + "_" + ++count; @@ -582,7 +780,7 @@ private void flattenProperties(OpenAPI openAPI, Map properties, propsToUpdate.put(key, schema); modelsToAdd.put(modelName, model); addGenerated(modelName, model); - openapi.getComponents().addSchemas(modelName, model); + openAPI.getComponents().addSchemas(modelName, model); } } else if (property instanceof ArraySchema) { ArraySchema ap = (ArraySchema) property; @@ -603,7 +801,7 @@ private void flattenProperties(OpenAPI openAPI, Map properties, schema.setRequired(op.getRequired()); ap.setItems(schema); addGenerated(modelName, innerModel); - openapi.getComponents().addSchemas(modelName, innerModel); + openAPI.getComponents().addSchemas(modelName, innerModel); } } } @@ -626,7 +824,7 @@ private void flattenProperties(OpenAPI openAPI, Map properties, schema.setRequired(op.getRequired()); property.setAdditionalProperties(schema); addGenerated(modelName, innerModel); - openapi.getComponents().addSchemas(modelName, innerModel); + openAPI.getComponents().addSchemas(modelName, innerModel); } } } @@ -638,7 +836,7 @@ private void flattenProperties(OpenAPI openAPI, Map properties, } } for (String key : modelsToAdd.keySet()) { - openapi.getComponents().addSchemas(key, modelsToAdd.get(key)); + openAPI.getComponents().addSchemas(key, modelsToAdd.get(key)); this.addedModels.put(key, modelsToAdd.get(key)); } } @@ -690,7 +888,8 @@ private Schema modelFromProperty(OpenAPI openAPI, Schema object, String path) { model.setExtensions(object.getExtensions()); model.setExclusiveMinimum(object.getExclusiveMinimum()); model.setExclusiveMaximum(object.getExclusiveMaximum()); - model.setExample(object.getExample()); + // no need to set it again as it's set earlier + //model.setExample(object.getExample()); model.setDeprecated(object.getDeprecated()); if (properties != null) { @@ -700,6 +899,49 @@ private Schema modelFromProperty(OpenAPI openAPI, Schema object, String path) { return model; } + /** + * Resolve namespace conflicts using: + * title (if title exists) or + * prefix + suffix (if title not specified) + * + * @param prefix used to form name if no title found in schema + * @param suffix used to form name if no title found in schema + * @param schema title property used to form name if exists and schema definition used + * to create new schema if doesn't exist + * @return a new schema or $ref to an existing one if it was already created + */ + private Schema makeSchemaResolve(String prefix, String suffix, Schema schema) { + if (schema.getTitle() == null) { + return makeSchemaInComponents(uniqueName(sanitizeName(prefix + suffix)), schema); + } + return makeSchemaInComponents(uniqueName(sanitizeName(schema.getTitle())), schema); + } + + /** + * Move schema to components (if new) and return $ref to schema or + * existing schema. + * + * @param name new schema name + * @param schema schema to move to components or find existing ref + * @return {@link Schema} $ref schema to new or existing schema + */ + private Schema makeSchemaInComponents(String name, Schema schema) { + String existing = matchGenerated(schema); + Schema refSchema; + if (existing != null) { + refSchema = new Schema().$ref(existing); + } else { + if (resolveInlineEnums && schema.getEnum() != null && schema.getEnum().size() > 0) { + LOGGER.warn("Model " + name + " promoted to its own schema due to resolveInlineEnums=true"); + } + refSchema = new Schema().$ref(name); + addGenerated(name, schema); + openAPI.getComponents().addSchemas(name, schema); + } + this.copyVendorExtensions(schema, refSchema); + return refSchema; + } + /** * Make a Schema * @@ -723,7 +965,7 @@ private Schema makeSchema(String ref, Schema property) { private void copyVendorExtensions(Schema source, Schema target) { Map vendorExtensions = source.getExtensions(); if (vendorExtensions == null) { - return; + return; } for (String extName : vendorExtensions.keySet()) { target.addExtension(extName, vendorExtensions.get(extName)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/VendorExtension.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/VendorExtension.java new file mode 100644 index 000000000000..b662fe0006cc --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/VendorExtension.java @@ -0,0 +1,58 @@ +package org.openapitools.codegen; + +import java.util.Collections; +import java.util.List; + +public enum VendorExtension { + + X_IMPLEMENTS("x-implements", ExtensionLevel.MODEL, "Ability to specify interfaces that model must implements", "empty array"), + X_SPRING_PAGINATED("x-spring-paginated", ExtensionLevel.OPERATION, "Add org.springframework.data.domain.Pageable to controller method. Can be used to handle page & size query parameters", "false"), + X_DISCRIMINATOR_VALUE("x-discriminator-value", ExtensionLevel.MODEL, "Used with model inheritance to specify value for discriminator that identifies current model", ""), + X_SETTER_EXTRA_ANNOTATION("x-setter-extra-annotation", ExtensionLevel.FIELD, "Custom annotation that can be specified over java setter for specific field", "When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value"), + X_WEBCLIENT_BLOCKING("x-webclient-blocking", ExtensionLevel.OPERATION, "Specifies if method for specific operation should be blocking or non-blocking(ex: return `Mono/Flux` or `return T/List/Set` & execute `.block()` inside generated method)", "false"), + X_TAGS("x-tags", ExtensionLevel.OPERATION, "Specify multiple swagger tags for operation", null), + X_ACCEPTS("x-accepts", ExtensionLevel.OPERATION, "Specify custom value for 'Accept' header for operation", null), + X_CONTENT_TYPE("x-content-type", ExtensionLevel.OPERATION, "Specify custom value for 'Content-Type' header for operation", null), + X_CLASS_EXTRA_ANNOTATION("x-class-extra-annotation", ExtensionLevel.MODEL, "List of custom annotations to be added to model", null), + X_FIELD_EXTRA_ANNOTATION("x-field-extra-annotation", ExtensionLevel.FIELD, "List of custom annotations to be added to property", null), + ; + + private final String name; + private final List levels; + private final String description; + private final String defaultValue; + + VendorExtension(final String name, final List levels, final String description, final String defaultValue) { + this.name = name; + this.levels = levels; + this.description = description; + this.defaultValue = defaultValue; + } + + VendorExtension(final String name, final ExtensionLevel level, final String description, final String defaultValue) { + this(name, Collections.singletonList(level), description, defaultValue); + } + + public String getName() { + return name; + } + + public List getLevels() { + return levels; + } + + public String getDescription() { + return description; + } + + public String getDefaultValue() { + return defaultValue; + } + + public enum ExtensionLevel { + FIELD, + MODEL, + OPERATION + } + +} 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 9106d3bd02c9..4a1933e094ad 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 @@ -34,6 +34,10 @@ import org.openapitools.codegen.meta.features.SchemaSupportFeature; import org.openapitools.codegen.meta.features.SecurityFeature; import org.openapitools.codegen.meta.features.WireFormatFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,7 +54,7 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg protected String packageName = "defaultPackage"; protected String projectName = "defaultProject"; - protected List> orderedModels; + protected List orderedModels; protected final Map> modelDepends; protected final Map nullableTypeMapping; protected final Map operationsScopes; @@ -605,9 +609,9 @@ private Map> getAuthScopes(List securi @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op1 : operationList) { if (op1.summary != null) { @@ -676,43 +680,39 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // Collect the model dependencies. - List> models = (List>) objs.get("models"); - for (Map model : models) { - Object v = model.get("model"); - if (v instanceof CodegenModel) { - CodegenModel m = (CodegenModel) v; - List d = new ArrayList<>(); - for (CodegenProperty p : m.vars) { - boolean isModel = false; - CodegenProperty item = p; - if (p.isContainer) { - item = p.items; - } - if (item != null && !item.isString && !item.isPrimitiveType && !item.isContainer && !item.isInteger) { - if (!d.contains(item.dataType)) { - // LOGGER.info("Model " + m.name + " uses " + p.datatype); - d.add(item.dataType); - } - isModel = true; - } - p.vendorExtensions.put("x-is-model-type", isModel); - p.vendorExtensions.put("x-is-stream-type", isStreamType(p)); - Boolean required = p.getRequired(); - - // Convert optional members to use the Nullable_ type. - if (!Boolean.TRUE.equals(required) && nullableTypeMapping.containsKey(p.dataType)) { - p.dataType = nullableTypeMapping.get(p.dataType); - p.vendorExtensions.put("x-is-required", false); - } else { - p.vendorExtensions.put("x-is-required", true); + for (ModelMap model : objs.getModels()) { + CodegenModel m = model.getModel(); + List d = new ArrayList<>(); + for (CodegenProperty p : m.vars) { + boolean isModel = false; + CodegenProperty item = p; + if (p.isContainer) { + item = p.items; + } + if (item != null && !item.isString && !item.isPrimitiveType && !item.isContainer && !item.isInteger) { + if (!d.contains(item.dataType)) { + // LOGGER.info("Model " + m.name + " uses " + p.datatype); + d.add(item.dataType); } + isModel = true; + } + p.vendorExtensions.put("x-is-model-type", isModel); + p.vendorExtensions.put("x-is-stream-type", isStreamType(p)); + Boolean required = p.getRequired(); + + // Convert optional members to use the Nullable_ type. + if (!Boolean.TRUE.equals(required) && nullableTypeMapping.containsKey(p.dataType)) { + p.dataType = nullableTypeMapping.get(p.dataType); + p.vendorExtensions.put("x-is-required", false); + } else { + p.vendorExtensions.put("x-is-required", true); } - // let us work with fully qualified names only - modelDepends.put(modelPackage + ".Models." + m.classname, d); - orderedModels.add(model); } + // let us work with fully qualified names only + modelDepends.put(modelPackage + ".Models." + m.classname, d); + orderedModels.add(model); } // Sort models using dependencies: @@ -722,15 +722,15 @@ public Map postProcessModels(Map objs) { // if I find a model that has no dependencies, or all of its dependencies are in revisedOrderedModels, consider it the independentModel // put the independentModel at the end of revisedOrderedModels, and remove it from orderedModels // - List> revisedOrderedModels = new ArrayList<>(); + List revisedOrderedModels = new ArrayList<>(); List collectedModelNames = new ArrayList<>(); int sizeOrderedModels = orderedModels.size(); for (int i = 0; i < sizeOrderedModels; i++) { - Map independentModel = null; + ModelMap independentModel = null; String independentModelName = null; - for (Map model : orderedModels) { + for (ModelMap model : orderedModels) { // let us work with fully qualified names only - String modelName = modelPackage + ".Models." + ((CodegenModel) model.get("model")).classname; + String modelName = modelPackage + ".Models." + model.getModel().classname; boolean dependent = false; for (String dependency : modelDepends.get(modelName)) { if (!collectedModelNames.contains(dependency)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index 278be7eada5d..8f96a4bd34ec 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -26,6 +26,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -476,7 +477,7 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return postProcessModelsEnum(objs); } 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 fefad19184a0..bc39b898fa8f 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 @@ -19,13 +19,18 @@ import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache.Lambda; +import com.samskivert.mustache.Mustache; +import com.samskivert.mustache.Template; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -33,6 +38,7 @@ import java.io.File; import java.io.IOException; +import java.io.Writer; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -396,6 +402,18 @@ public void processOpts() { // This either updates additionalProperties with the above fixes, or sets the default if the option was not specified. additionalProperties.put(CodegenConstants.INTERFACE_PREFIX, interfacePrefix); + + // add lambda for mustache templates + additionalProperties.put("lambdaCref", new Mustache.Lambda() { + @Override + public void execute(Template.Fragment fragment, Writer writer) throws IOException { + String content = fragment.execute(); + content = content.trim().replace("<", "{"); + content = content.replace(">", "}"); + content = content.replace("{string}", "{String}"); + writer.write(content); + } + }); } @Override @@ -403,7 +421,8 @@ protected ImmutableMap.Builder addMustacheLambdas() { return super.addMustacheLambdas() .put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true)) .put("required", new RequiredParameterLambda().generator(this)) - .put("optional", new OptionalParameterLambda().generator(this)); + .put("optional", new OptionalParameterLambda().generator(this)) + .put("joinWithComma", new JoinWithCommaLambda()); } @Override @@ -412,11 +431,9 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModels(Map objs) { - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + public ModelsMap postProcessModels(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); for (CodegenProperty var : cm.vars) { // check to see if model name is same as the property name // which will result in compilation error @@ -437,8 +454,8 @@ public Map postProcessModels(Map objs) { * @return An in-place modified state of the codegen object model. */ @Override - public Map postProcessAllModels(Map objs) { - final Map processed = super.postProcessAllModels(objs); + public Map postProcessAllModels(Map objs) { + final Map processed = super.postProcessAllModels(objs); postProcessEnumRefs(processed); updateValueTypeProperty(processed); updateNullableTypeProperty(processed); @@ -471,18 +488,16 @@ protected List> buildEnumVars(List values, String da * * @param models processed models to be further processed for enum references */ - @SuppressWarnings("unchecked") - private void postProcessEnumRefs(final Map models) { + private void postProcessEnumRefs(final Map models) { Map enumRefs = new HashMap<>(); - for (Map.Entry entry : models.entrySet()) { + for (Map.Entry entry : models.entrySet()) { CodegenModel model = ModelUtils.getModelByName(entry.getKey(), models); if (model.isEnum) { enumRefs.put(entry.getKey(), model); } } - for (Map.Entry entry : models.entrySet()) { - String openAPIName = entry.getKey(); + for (String openAPIName : models.keySet()) { CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model != null) { for (CodegenProperty var : model.allVars) { @@ -635,9 +650,8 @@ public void updateCodegenPropertyEnum(CodegenProperty var) { * * @param models list of all models */ - protected void updateValueTypeProperty(Map models) { - for (Map.Entry entry : models.entrySet()) { - String openAPIName = entry.getKey(); + protected void updateValueTypeProperty(Map models) { + for (String openAPIName : models.keySet()) { CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model != null) { for (CodegenProperty var : model.vars) { @@ -652,9 +666,8 @@ protected void updateValueTypeProperty(Map models) { * * @param models list of all models */ - protected void updateNullableTypeProperty(Map models) { - for (Map.Entry entry : models.entrySet()) { - String openAPIName = entry.getKey(); + protected void updateNullableTypeProperty(Map models) { + for (String openAPIName : models.keySet()) { CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model != null) { for (CodegenProperty var : model.vars) { @@ -667,12 +680,12 @@ protected void updateNullableTypeProperty(Map models) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); if (objs != null) { - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { // Check return types for collection @@ -731,8 +744,8 @@ public Map postProcessOperationsWithModels(Map o if (!isSupportNullable()) { for (CodegenParameter parameter : operation.allParams) { CodegenModel model = null; - for (Object modelHashMap : allModels) { - CodegenModel codegenModel = ((HashMap) modelHashMap).get("model"); + for (ModelMap modelHashMap : allModels) { + CodegenModel codegenModel = modelHashMap.getModel(); if (codegenModel.getClassname().equals(parameter.dataType)) { model = codegenModel; break; @@ -771,11 +784,11 @@ protected void processOperation(CodegenOperation operation) { // default noop } - private void updateCodegenParametersEnum(List parameters, List allModels) { + private void updateCodegenParametersEnum(List parameters, List allModels) { for (CodegenParameter parameter : parameters) { CodegenModel model = null; - for (Object modelHashMap : allModels) { - CodegenModel codegenModel = ((HashMap) modelHashMap).get("model"); + for (ModelMap modelHashMap : allModels) { + CodegenModel codegenModel = modelHashMap.getModel(); if (codegenModel.getClassname().equals(parameter.dataType)) { model = codegenModel; break; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java index a82430bb4a4d..a05999bd7ffa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java @@ -28,6 +28,8 @@ import org.openapitools.codegen.*; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; @@ -379,12 +381,9 @@ public void preprocessOpenAPI(OpenAPI openAPI) { } @Override - @SuppressWarnings("unchecked") - public Map postProcessModels(Map objs) { - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + public ModelsMap postProcessModels(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // cannot handle inheritance from maps and arrays in C++ if((cm.isArray || cm.isMap ) && (cm.parentModel == null)) { cm.parent = null; @@ -394,17 +393,17 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessAllModels(Map objs){ - Map models = super.postProcessAllModels(objs); - for (final Entry model : models.entrySet()) { - CodegenModel mo = ModelUtils.getModelByName(model.getKey(), models); + public Map postProcessAllModels(Map objs){ + Map models = super.postProcessAllModels(objs); + for (final String key : models.keySet()) { + CodegenModel mo = ModelUtils.getModelByName(key, models); addForwardDeclarations(mo, models); } return models; } - private void addForwardDeclarations(CodegenModel parentModel, Map objs) { - List forwardDeclarations = new ArrayList(); + private void addForwardDeclarations(CodegenModel parentModel, Map objs) { + List forwardDeclarations = new ArrayList<>(); if(!parentModel.hasVars) { return; } @@ -413,8 +412,8 @@ private void addForwardDeclarations(CodegenModel parentModel, Map mo : objs.entrySet()) { - CodegenModel childModel = ModelUtils.getModelByName(mo.getKey(), objs); + for(final String key : objs.keySet()) { + CodegenModel childModel = ModelUtils.getModelByName(key, objs); if( !childPropertyType.equals(childModel.classname) || childPropertyType.equals(parentModel.classname) || !childModel.hasVars ){ continue; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java index 7f509f60e5da..2efb3790d760 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java @@ -1,9 +1,9 @@ package org.openapitools.codegen.languages; -import com.google.common.collect.Lists; import com.google.common.collect.Sets; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.servers.Server; @@ -11,6 +11,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -21,6 +25,8 @@ import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.openapitools.codegen.utils.StringUtils.*; @@ -48,7 +54,8 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { protected String pubAuthorEmail = "author@homepage"; protected String pubHomepage = "homepage"; protected boolean useEnumExtension = false; - protected String sourceFolder = ""; + protected String sourceFolder = "src"; + protected String libPath = "lib" + File.separator; protected String apiDocPath = "doc" + File.separator; protected String modelDocPath = "doc" + File.separator; protected String apiTestPath = "test" + File.separator; @@ -93,8 +100,8 @@ public AbstractDartCodegen() { modelTemplateFiles.put("model.mustache", ".dart"); apiTemplateFiles.put("api.mustache", ".dart"); embeddedTemplateDir = templateDir = "dart2"; - apiPackage = "lib.api"; - modelPackage = "lib.model"; + apiPackage = "api"; + modelPackage = "model"; modelDocTemplateFiles.put("object_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md"); @@ -176,15 +183,15 @@ public AbstractDartCodegen() { imports.put("Object", "dart:core"); imports.put("MultipartFile", "package:http/http.dart"); - cliOptions.add(new CliOption(PUB_LIBRARY, "Library name in generated code")); - cliOptions.add(new CliOption(PUB_NAME, "Name in generated pubspec")); - cliOptions.add(new CliOption(PUB_VERSION, "Version in generated pubspec")); - cliOptions.add(new CliOption(PUB_DESCRIPTION, "Description in generated pubspec")); - cliOptions.add(new CliOption(PUB_AUTHOR, "Author name in generated pubspec")); - cliOptions.add(new CliOption(PUB_AUTHOR_EMAIL, "Email address of the author in generated pubspec")); - cliOptions.add(new CliOption(PUB_HOMEPAGE, "Homepage in generated pubspec")); - cliOptions.add(new CliOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums")); - cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, "Source folder for generated code")); + addOption(PUB_LIBRARY, "Library name in generated code", pubLibrary); + addOption(PUB_NAME, "Name in generated pubspec", pubName); + addOption(PUB_VERSION, "Version in generated pubspec", pubVersion); + addOption(PUB_DESCRIPTION, "Description in generated pubspec", pubDescription); + addOption(PUB_AUTHOR, "Author name in generated pubspec", pubAuthor); + addOption(PUB_AUTHOR_EMAIL, "Email address of the author in generated pubspec", pubAuthorEmail); + addOption(PUB_HOMEPAGE, "Homepage in generated pubspec", pubHomepage); + addOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums", String.valueOf(useEnumExtension)); + addOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC, sourceFolder); } @Override @@ -206,6 +213,13 @@ public String getHelp() { public void processOpts() { super.processOpts(); + // Fix a couple Java notation properties + modelPackage = modelPackage.replace('.', '/'); + apiPackage = apiPackage.replace('.', '/'); + // And overwrite them in the additional properties + additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage); + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); + 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)."); @@ -268,8 +282,10 @@ public void processOpts() { } if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { - this.setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); + String srcFolder = (String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER); + this.setSourceFolder(srcFolder.replace('/', File.separatorChar)); } + additionalProperties.put(CodegenConstants.SOURCE_FOLDER, sourceFolder); // make api and model doc path available in mustache template additionalProperties.put("apiDocPath", apiDocPath); @@ -301,32 +317,32 @@ public String escapeReservedWord(String name) { @Override public String apiFileFolder() { - return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar); + return (outputFolder + File.separator + libPath + sourceFolder + File.separator + apiPackage()).replace('/', File.separatorChar); } @Override public String modelFileFolder() { - return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar); + return (outputFolder + File.separator + libPath + sourceFolder + File.separator + modelPackage()).replace('/', File.separatorChar); } @Override public String apiTestFileFolder() { - return outputFolder + File.separator + apiTestPath.replace('/', File.separatorChar); + return outputFolder + File.separator + apiTestPath; } @Override public String modelTestFileFolder() { - return outputFolder + File.separator + modelTestPath.replace('/', File.separatorChar); + return outputFolder + File.separator + modelTestPath; } @Override public String apiDocFileFolder() { - return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar); + return outputFolder + File.separator + apiDocPath; } @Override public String modelDocFileFolder() { - return outputFolder + File.separator + modelDocPath.replace('/', File.separatorChar); + return outputFolder + File.separator + modelDocPath; } @Override @@ -500,14 +516,14 @@ public String getSchemaType(Schema p) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return postProcessModelsEnum(objs); } @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); - if (!model.isEnum && property.isEnum) { + if (!model.isEnum && property.isEnum && property.getComposedSchemas() == null) { // These are inner enums, enums which do not exist as models, just as properties. // They are handled via the enum_inline template and are generated in the // same file as the containing class. To prevent name clashes the inline enum classes @@ -529,6 +545,37 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } } + @Override + public CodegenProperty fromProperty(String name, Schema p) { + final CodegenProperty property = super.fromProperty(name, p); + + // Handle composed properties + if (ModelUtils.isComposedSchema(p)) { + ComposedSchema composed = (ComposedSchema) p; + + // Count the occurrences of allOf/anyOf/oneOf with exactly one child element + long count = Stream.of(composed.getAllOf(), composed.getAnyOf(), composed.getOneOf()) + .filter(list -> list != null && list.size() == 1).count(); + + if (count == 1) { + // Continue only if there is one element that matches + // and basically treat it as simple property. + Stream.of(composed.getAllOf(), composed.getAnyOf(), composed.getOneOf()) + .filter(list -> list != null && list.size() == 1) + .findFirst() + .map(list -> list.get(0).get$ref()) + .map(ModelUtils::getSimpleRef) + .map(ref -> ModelUtils.getSchemas(this.openAPI).get(ref)) + .ifPresent(schema -> { + property.isEnum = schema.getEnum() != null; + property.isModel = true; + }); + + } + } + return property; + } + @Override public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, List servers) { final CodegenOperation op = super.fromOperation(path, httpMethod, operation, servers); @@ -559,11 +606,11 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation op : ops) { if (op.hasConsumes) { if (!op.formParams.isEmpty() || op.isMultipart) { @@ -613,13 +660,6 @@ private List> prioritizeContentTypes(List> enumVars, Map vendorExtensions, String dataType) { if (vendorExtensions != null && useEnumExtension && vendorExtensions.containsKey("x-enum-values")) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index 26069c778bb3..7e3846981f28 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -24,6 +24,10 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -360,11 +364,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { // http method verb conversion (e.g. PUT => Put) @@ -372,7 +374,7 @@ public Map postProcessOperationsWithModels(Map o } // remove model imports to avoid error - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); if (imports == null) return objs; @@ -399,7 +401,7 @@ public Map postProcessOperationsWithModels(Map o } // recursively add import for mapping one type to multiple imports - List> recursiveImports = (List>) objs.get("imports"); + List> recursiveImports = objs.getImports(); if (recursiveImports == null) return objs; @@ -418,7 +420,7 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // remove model imports to avoid error // List> imports = (List>) objs.get("imports"); // final String prefix = modelPackage(); @@ -451,14 +453,14 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessAllModels(final Map models) { + public Map postProcessAllModels(final Map models) { - final Map processed = super.postProcessAllModels(models); + final Map processed = super.postProcessAllModels(models); postProcessParentModels(models); return processed; } - private void postProcessParentModels(final Map models) { + private void postProcessParentModels(final Map models) { for (final String parent : parentModels) { final CodegenModel parentModel = ModelUtils.getModelByName(parent, models); final Collection childrenModels = childrenByParent.get(parent); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java index b780186d65b9..b8a44efe9314 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java @@ -25,6 +25,10 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -312,12 +316,10 @@ protected ImmutableMap.Builder addMustacheLambdas() { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { super.postProcessModels(objs); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); for (CodegenProperty var : cm.vars) { // check to see if model name is same as the property name // which will result in compilation error @@ -338,8 +340,8 @@ public Map postProcessModels(Map objs) { * @return (ew) modified state of the codegen object model. */ @Override - public Map postProcessAllModels(Map objs) { - final Map processed = super.postProcessAllModels(objs); + public Map postProcessAllModels(Map objs) { + final Map processed = super.postProcessAllModels(objs); postProcessEnumRefs(processed); return postProcessDependencyOrders(processed); } @@ -349,8 +351,7 @@ public Map postProcessAllModels(Map objs) { * Output of CodeGen models must therefore be in dependency order (rather than alphabetical order, which seems to be the default). * This could probably be made more efficient if absolutely needed. */ - @SuppressWarnings("unchecked") - public Map postProcessDependencyOrders(final Map objs) { + public Map postProcessDependencyOrders(final Map objs) { Map> dependencies = new HashMap<>(); @@ -381,7 +382,7 @@ public Map postProcessDependencyOrders(final Map } } - Map sorted = new LinkedHashMap<>(); + Map sorted = new LinkedHashMap<>(); for (int i = sortedKeys.length - 1; i >= 0; i--) { Object k = sortedKeys[i]; sorted.put(k.toString(), objs.get(k)); @@ -401,17 +402,16 @@ public Map postProcessDependencyOrders(final Map * @param models processed models to be further processed for enum references */ @SuppressWarnings("unchecked") - private void postProcessEnumRefs(final Map models) { + private void postProcessEnumRefs(final Map models) { Map enumRefs = new HashMap<>(); - for (Map.Entry entry : models.entrySet()) { - CodegenModel model = ModelUtils.getModelByName(entry.getKey(), models); + for (String key : models.keySet()) { + CodegenModel model = ModelUtils.getModelByName(key, models); if (model.isEnum) { - enumRefs.put(entry.getKey(), model); + enumRefs.put(key, model); } } - for (Map.Entry entry : models.entrySet()) { - String openAPIName = entry.getKey(); + for (String openAPIName : models.keySet()) { CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model != null) { for (CodegenProperty var : model.allVars) { @@ -514,12 +514,12 @@ public void updateCodegenPropertyEnum(CodegenProperty var) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); if (objs != null) { - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { // Check return types for collection @@ -565,8 +565,8 @@ public Map postProcessOperationsWithModels(Map o if (!isSupportNullable()) { for (CodegenParameter parameter : operation.allParams) { CodegenModel model = null; - for (Object modelHashMap : allModels) { - CodegenModel codegenModel = ((HashMap) modelHashMap).get("model"); + for (ModelMap modelHashMap : allModels) { + CodegenModel codegenModel = modelHashMap.getModel(); if (codegenModel.getClassname().equals(parameter.dataType)) { model = codegenModel; break; 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 a071f2f4a805..6dd27a80479d 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 @@ -22,6 +22,10 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -460,11 +464,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { // http method verb conversion (e.g. PUT => Put) @@ -472,7 +474,7 @@ public Map postProcessOperationsWithModels(Map o } // remove model imports to avoid error - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); if (imports == null) return objs; @@ -563,7 +565,7 @@ public Map postProcessOperationsWithModels(Map o } // recursively add import for mapping one type to multiple imports - List> recursiveImports = (List>) objs.get("imports"); + List> recursiveImports = objs.getImports(); if (recursiveImports == null) return objs; @@ -601,15 +603,16 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert // For primitive types and custom types (e.g. interface{}, map[string]interface{}...), // the generated code has a wrapper type and a Get() function to access the underlying type. // For containers (e.g. Array, Map), the generated code returns the type directly. - if (property.isContainer || property.isFreeFormObject || property.isAnyType) { + if (property.isContainer || property.isFreeFormObject + || (property.isAnyType && !property.isModel)) { property.vendorExtensions.put("x-golang-is-container", true); } } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // remove model imports to avoid error - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); final String prefix = modelPackage(); Iterator> iterator = imports.iterator(); while (iterator.hasNext()) { @@ -620,42 +623,38 @@ public Map postProcessModels(Map objs) { boolean addedTimeImport = false; boolean addedOSImport = false; - List> models = (List>) objs.get("models"); - for (Map m : models) { - Object v = m.get("model"); - if (v instanceof CodegenModel) { - CodegenModel model = (CodegenModel) v; - for (CodegenProperty param : model.vars) { - if (!addedTimeImport - && ("time.Time".equals(param.dataType) || ("[]time.Time".equals(param.dataType)))) { - imports.add(createMapping("import", "time")); - addedTimeImport = true; - } - if (!addedOSImport && "*os.File".equals(param.baseType)) { - imports.add(createMapping("import", "os")); - addedOSImport = true; - } + for (ModelMap m : objs.getModels()) { + CodegenModel model = m.getModel(); + for (CodegenProperty param : model.vars) { + if (!addedTimeImport + && ("time.Time".equals(param.dataType) || ("[]time.Time".equals(param.dataType)))) { + imports.add(createMapping("import", "time")); + addedTimeImport = true; } - - if (this instanceof GoClientCodegen && model.isEnum) { - imports.add(createMapping("import", "fmt")); + if (!addedOSImport && "*os.File".equals(param.baseType)) { + imports.add(createMapping("import", "os")); + addedOSImport = true; } + } - // if oneOf contains "null" type - if (model.oneOf != null && !model.oneOf.isEmpty() && model.oneOf.contains("nil")) { - model.isNullable = true; - model.oneOf.remove("nil"); - } + if (this instanceof GoClientCodegen && model.isEnum) { + imports.add(createMapping("import", "fmt")); + } - // if anyOf contains "null" type - if (model.anyOf != null && !model.anyOf.isEmpty() && model.anyOf.contains("nil")) { - model.isNullable = true; - model.anyOf.remove("nil"); - } + // if oneOf contains "null" type + if (model.oneOf != null && !model.oneOf.isEmpty() && model.oneOf.contains("nil")) { + model.isNullable = true; + model.oneOf.remove("nil"); + } + + // if anyOf contains "null" type + if (model.anyOf != null && !model.anyOf.isEmpty() && model.anyOf.contains("nil")) { + model.isNullable = true; + model.anyOf.remove("nil"); } } // recursively add import for mapping one type to multiple imports - List> recursiveImports = (List>) objs.get("imports"); + List> recursiveImports = objs.getImports(); if (recursiveImports == null) return objs; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java index bc9914a2b00f..1966b0548276 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java @@ -20,6 +20,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -420,10 +423,10 @@ public String toModelImport(String name) { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); - for (CodegenOperation op : (List) objs.get("operation")) { + for (CodegenOperation op : objs.getOperation()) { // non GET/HEAD methods are mutation if (!"GET".equals(op.httpMethod.toUpperCase(Locale.ROOT)) && !"HEAD".equals(op.httpMethod.toUpperCase(Locale.ROOT))) { op.vendorExtensions.put("x-is-mutation", Boolean.TRUE); @@ -439,7 +442,7 @@ public Map postProcessOperationsWithModels(Map o } } - return objs; + return operations; } public String graphQlInputsPackage() { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 7ab48af34a90..87cb92356d6a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -17,6 +17,8 @@ package org.openapitools.codegen.languages; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ArrayNode; import com.google.common.base.Strings; import com.google.common.collect.Sets; import io.swagger.v3.oas.models.OpenAPI; @@ -34,6 +36,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +51,9 @@ import java.util.*; import java.util.concurrent.ConcurrentSkipListSet; import java.util.regex.Pattern; +import java.util.stream.Collectors; import java.util.stream.Stream; +import java.util.stream.StreamSupport; import static org.openapitools.codegen.utils.StringUtils.*; @@ -70,6 +78,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public static final String OPENAPI_NULLABLE = "openApiNullable"; public static final String JACKSON = "jackson"; public static final String TEST_OUTPUT = "testOutput"; + public static final String IMPLICIT_HEADERS = "implicitHeaders"; + public static final String IMPLICIT_HEADERS_REGEX = "implicitHeadersRegex"; public static final String DEFAULT_TEST_FOLDER = "${project.build.directory}/generated-test-sources/openapi"; @@ -117,6 +127,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected String outputTestFolder = ""; protected DocumentationProvider documentationProvider; protected AnnotationLibrary annotationLibrary; + protected boolean implicitHeaders = false; + protected String implicitHeadersRegex = null; public AbstractJavaCodegen() { super(); @@ -246,6 +258,8 @@ public AbstractJavaCodegen() { cliOptions.add(CliOption.newString(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, "Additional annotations for enum type(class level annotations)")); cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)")); cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable)); + cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders)); + cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true")); cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC)); cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC)); @@ -525,6 +539,14 @@ public void processOpts() { this.setParentVersion((String) additionalProperties.get(CodegenConstants.PARENT_VERSION)); } + if (additionalProperties.containsKey(IMPLICIT_HEADERS)) { + this.setImplicitHeaders(Boolean.parseBoolean(additionalProperties.get(IMPLICIT_HEADERS).toString())); + } + + if (additionalProperties.containsKey(IMPLICIT_HEADERS_REGEX)) { + this.setImplicitHeadersRegex(additionalProperties.get(IMPLICIT_HEADERS_REGEX).toString()); + } + if (!StringUtils.isEmpty(parentGroupId) && !StringUtils.isEmpty(parentArtifactId) && !StringUtils.isEmpty(parentVersion)) { additionalProperties.put("parentOverridden", true); } @@ -575,6 +597,7 @@ public void processOpts() { importMapping.put("JsonCreator", "com.fasterxml.jackson.annotation.JsonCreator"); importMapping.put("JsonValue", "com.fasterxml.jackson.annotation.JsonValue"); importMapping.put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore"); + importMapping.put("JsonIgnoreProperties", "com.fasterxml.jackson.annotation.JsonIgnoreProperties"); importMapping.put("JsonInclude", "com.fasterxml.jackson.annotation.JsonInclude"); importMapping.put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable"); importMapping.put("SerializedName", "com.google.gson.annotations.SerializedName"); @@ -629,7 +652,7 @@ public void processOpts() { } @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); objs = super.updateAllModels(objs); @@ -989,6 +1012,17 @@ public String toDefaultParameterValue(final Schema schema) { LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); return localDate.toString(); } + if (ModelUtils.isArraySchema(schema)) { + if (defaultValue instanceof ArrayNode) { + ArrayNode array = (ArrayNode) defaultValue; + return StreamSupport.stream(array.spliterator(), false) + .map(JsonNode::toString) + // remove wrapper quotes + .map(item -> StringUtils.removeStart(item, "\"")) + .map(item -> StringUtils.removeEnd(item, "\"")) + .collect(Collectors.joining(",")); + } + } // escape quotes return defaultValue.toString().replace("\"", "\\\""); } @@ -1235,6 +1269,7 @@ public CodegenModel fromModel(String name, Schema model) { if (codegenModel.discriminator != null && additionalProperties.containsKey(JACKSON)) { codegenModel.imports.add("JsonSubTypes"); codegenModel.imports.add("JsonTypeInfo"); + codegenModel.imports.add("JsonIgnoreProperties"); } if (allDefinitions != null && codegenModel.parentSchema != null && codegenModel.hasEnums) { final Schema parentModel = allDefinitions.get(codegenModel.parentSchema); @@ -1298,9 +1333,9 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // recursively add import for mapping one type to multiple imports - List> recursiveImports = (List>) objs.get("imports"); + List> recursiveImports = objs.getImports(); if (recursiveImports == null) return objs; @@ -1316,14 +1351,23 @@ public Map postProcessModels(Map objs) { } } + // add x-implements for serializable to all models + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); + if (this.serializableModel) { + cm.getVendorExtensions().putIfAbsent("x-implements", new ArrayList()); + ((ArrayList) cm.getVendorExtensions().get("x-implements")).add("Serializable"); + } + } + return postProcessModelsEnum(objs); } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // Remove imports of List, ArrayList, Map and HashMap as they are // imported in the template already. - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); Pattern pattern = Pattern.compile("java\\.util\\.(List|ArrayList|Map|HashMap)"); for (Iterator> itr = imports.iterator(); itr.hasNext(); ) { String itrImport = itr.next().get("import"); @@ -1332,8 +1376,8 @@ public Map postProcessOperationsWithModels(Map o } } - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { Collection operationImports = new ConcurrentSkipListSet<>(); for (CodegenParameter p : op.allParams) { @@ -1342,6 +1386,8 @@ public Map postProcessOperationsWithModels(Map o } } op.vendorExtensions.put("x-java-import", operationImports); + + handleImplicitHeaders(op); } return objs; } @@ -1365,11 +1411,10 @@ public void preprocessOpenAPI(OpenAPI openAPI) { String defaultContentType = hasFormParameter(openAPI, operation) ? "application/x-www-form-urlencoded" : "application/json"; List consumes = new ArrayList<>(getConsumesInfo(openAPI, operation)); String contentType = consumes.isEmpty() ? defaultContentType : consumes.get(0); - operation.addExtension("x-contentType", contentType); + operation.addExtension("x-content-type", contentType); } String accepts = getAccept(openAPI, operation); operation.addExtension("x-accepts", accepts); - } } } @@ -1808,6 +1853,14 @@ public void setAnnotationLibrary(AnnotationLibrary annotationLibrary) { this.annotationLibrary = annotationLibrary; } + public void setImplicitHeaders(boolean implicitHeaders) { + this.implicitHeaders = implicitHeaders; + } + + public void setImplicitHeadersRegex(String implicitHeadersRegex) { + this.implicitHeadersRegex = implicitHeadersRegex; + } + @Override public String escapeQuotationMark(String input) { // remove " to avoid code injection @@ -1989,4 +2042,56 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } } + /** + * This method removes all implicit header parameters from the list of parameters + * + * @param operation - operation to be processed + */ + protected void handleImplicitHeaders(CodegenOperation operation) { + if (operation.allParams.isEmpty()) { + return; + } + final ArrayList copy = new ArrayList<>(operation.allParams); + operation.allParams.clear(); + + for (CodegenParameter p : copy) { + if (p.isHeaderParam && (implicitHeaders || shouldBeImplicitHeader(p))) { + operation.implicitHeadersParams.add(p); + operation.headerParams.removeIf(header -> header.baseName.equals(p.baseName)); + LOGGER.info("Update operation [{}]. Remove header [{}] because it's marked to be implicit", operation.operationId, p.baseName); + } else { + operation.allParams.add(p); + } + } + } + + private boolean shouldBeImplicitHeader(CodegenParameter parameter) { + return StringUtils.isNotBlank(implicitHeadersRegex) && parameter.baseName.matches(implicitHeadersRegex); + } + + @Override + public void addImportsToOneOfInterface(List> imports) { + if (additionalProperties.containsKey(JACKSON)) { + for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo")) { + Map oneImport = new HashMap<>(); + oneImport.put("import", importMapping.get(i)); + if (!imports.contains(oneImport)) { + imports.add(oneImport); + } + } + } + } + @Override + public List getSupportedVendorExtensions() { + List extensions = super.getSupportedVendorExtensions(); + extensions.add(VendorExtension.X_DISCRIMINATOR_VALUE); + extensions.add(VendorExtension.X_IMPLEMENTS); + extensions.add(VendorExtension.X_SETTER_EXTRA_ANNOTATION); + extensions.add(VendorExtension.X_TAGS); + extensions.add(VendorExtension.X_ACCEPTS); + extensions.add(VendorExtension.X_CONTENT_TYPE); + extensions.add(VendorExtension.X_CLASS_EXTRA_ANNOTATION); + extensions.add(VendorExtension.X_FIELD_EXTRA_ANNOTATION); + return extensions; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java index 0cb56e084e11..b2b25af540b3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java @@ -24,6 +24,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,6 +70,7 @@ public AbstractJavaJAXRSServerCodegen() { updateOption(CodegenConstants.API_PACKAGE, apiPackage); updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage); updateOption(DATE_LIBRARY, this.getDateLibrary()); + updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder()); additionalProperties.put("title", title); // java inflector uses the jackson lib @@ -167,17 +171,23 @@ public void preprocessOpenAPI(OpenAPI openAPI) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - return jaxrsPostProcessOperations(objs); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationsMap updatedObjs = jaxrsPostProcessOperations(objs); + OperationMap operations = updatedObjs.getOperations(); + if (operations != null) { + List ops = operations.getOperation(); + for (CodegenOperation co : ops) { + handleImplicitHeaders(co); + } + } + return updatedObjs; } - static Map jaxrsPostProcessOperations(Map objs) { - @SuppressWarnings("unchecked") - Map operations = (Map) objs.get("operations"); + static OperationsMap jaxrsPostProcessOperations(OperationsMap objs) { + OperationMap operations = objs.getOperations(); String commonPath = null; if (operations != null) { - @SuppressWarnings("unchecked") - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (operation.hasConsumes == Boolean.TRUE) { Map firstType = operation.consumes.get(0); 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 1999d51bce48..f66de36b3ed0 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.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -392,12 +394,10 @@ public String modelFileFolder() { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap 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 (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.getDiscriminator() != null) { cm.vendorExtensions.put("x-has-data-class-body", true); break; @@ -1005,7 +1005,7 @@ public String toDefaultValue(Schema schema) { } } else if (ModelUtils.isURISchema(p)) { if (p.getDefault() != null) { - return "URI.create('" + p.getDefault() + "')"; + return importMapping.get("URI") + ".create(\"" + p.getDefault() + "\")"; } } else if (ModelUtils.isArraySchema(p)) { if (p.getDefault() != null) { 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 bfbeb59452a5..985a74c08b00 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 @@ -22,6 +22,10 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -695,15 +699,15 @@ public String toEnumName(CodegenProperty property) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { // for API test method name // e.g. public function test{{vendorExtensions.x-testOperationId}}() diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java index 65b1a202f52b..080112520cae 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java @@ -634,33 +634,40 @@ public String getSchemaType(Schema p) { @Override public String toModelName(String name) { - name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. + String sanitizedName = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. // remove dollar sign - name = name.replaceAll("$", ""); - - // model name cannot use reserved keyword, e.g. return - if (isReservedWord(name)) { - LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, camelize("model_" + name)); - name = "model_" + name; // e.g. return => ModelReturn (after camelize) - } - - // model name starts with number - if (name.matches("^\\d.*")) { - LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", name, camelize("model_" + name)); - name = "model_" + name; // e.g. 200Response => Model200Response (after camelize) - } + sanitizedName = sanitizedName.replaceAll("$", ""); + String nameWithPrefixSuffix = sanitizedName; if (!StringUtils.isEmpty(modelNamePrefix)) { - name = modelNamePrefix + "_" + name; + // add '_' so that model name can be camelized correctly + nameWithPrefixSuffix = modelNamePrefix + "_" + nameWithPrefixSuffix; } if (!StringUtils.isEmpty(modelNameSuffix)) { - name = name + "_" + modelNameSuffix; + // add '_' so that model name can be camelized correctly + nameWithPrefixSuffix = nameWithPrefixSuffix + "_" + modelNameSuffix; } // camelize the model name // phone_number => PhoneNumber - return camelize(name); + String camelizedName = camelize(nameWithPrefixSuffix); + + // model name cannot use reserved keyword, e.g. return + if (isReservedWord(camelizedName)) { + String modelName = "Model" + camelizedName; // e.g. return => ModelReturn (after camelize) + LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", camelizedName, modelName); + return modelName; + } + + // model name starts with number + if (camelizedName.matches("^\\d.*")) { + String modelName = "Model" + camelizedName; // e.g. return => ModelReturn (after camelize) + LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", camelizedName, modelName); + return modelName; + } + + return camelizedName; } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java index b9ddac1fecd0..77c3c6beade5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java @@ -32,6 +32,11 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +45,6 @@ import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; public abstract class AbstractPythonConnexionServerCodegen extends AbstractPythonCodegen implements CodegenConfig { private final Logger LOGGER = LoggerFactory.getLogger(AbstractPythonConnexionServerCodegen.class); @@ -179,16 +183,16 @@ public void processOpts() { typeMapping.put("long", "long"); } if (additionalProperties.containsKey(FEATURE_CORS)) { - setFeatureCORS((String) additionalProperties.get(FEATURE_CORS)); + setFeatureCORS(String.valueOf(additionalProperties.get(FEATURE_CORS))); } if (additionalProperties.containsKey(USE_NOSE)) { - setUseNose((String) additionalProperties.get(USE_NOSE)); + setUseNose(String.valueOf(additionalProperties.get(USE_NOSE))); } if (additionalProperties.containsKey(USE_PYTHON_SRC_ROOT_IN_IMPORTS)) { - setUsePythonSrcRootInImports((String) additionalProperties.get(USE_PYTHON_SRC_ROOT_IN_IMPORTS)); + setUsePythonSrcRootInImports(String.valueOf(additionalProperties.get(USE_PYTHON_SRC_ROOT_IN_IMPORTS))); } if (additionalProperties.containsKey(MOVE_TESTS_UNDER_PYTHON_SRC_ROOT)) { - setMoveTestsUnderPythonSrcRoot((String) additionalProperties.get(MOVE_TESTS_UNDER_PYTHON_SRC_ROOT)); + setMoveTestsUnderPythonSrcRoot(String.valueOf(additionalProperties.get(MOVE_TESTS_UNDER_PYTHON_SRC_ROOT))); } if (additionalProperties.containsKey(PYTHON_SRC_ROOT)) { String pythonSrcRoot = (String) additionalProperties.get(PYTHON_SRC_ROOT); @@ -464,13 +468,11 @@ private void addSecurityExtensions(OpenAPI openAPI) { } } - @SuppressWarnings("unchecked") - private static List> getOperations(Map objs) { - List> result = new ArrayList>(); - Map apiInfo = (Map) objs.get("apiInfo"); - List> apis = (List>) apiInfo.get("apis"); - for (Map api : apis) { - result.add((Map) api.get("operations")); + private static List getOperations(Map objs) { + List result = new ArrayList<>(); + ApiInfoMap apiInfo = (ApiInfoMap) objs.get("apiInfo"); + for (OperationsMap api : apiInfo.getApis()) { + result.add(api.getOperations()); } return result; } @@ -482,9 +484,9 @@ private static List> sortOperationsByPath(List> opsByPathList = new ArrayList>(); + List> opsByPathList = new ArrayList<>(); for (Map.Entry> entry : opsByPath.asMap().entrySet()) { - Map opsByPathEntry = new HashMap(); + Map opsByPathEntry = new HashMap<>(); opsByPathList.add(opsByPathEntry); opsByPathEntry.put("path", entry.getKey()); opsByPathEntry.put("operation", entry.getValue()); @@ -569,9 +571,8 @@ public Map postProcessSupportingFileData(Map obj generateJSONSpecFile(objs); generateYAMLSpecFile(objs); - for (Map operations : getOperations(objs)) { - @SuppressWarnings("unchecked") - List ops = (List) operations.get("operation"); + for (OperationMap operations : getOperations(objs)) { + List ops = operations.getOperation(); List> opsByPathList = sortOperationsByPath(ops); operations.put("operationsByPath", opsByPathList); @@ -608,19 +609,17 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); // Add additional filename information for imports mo.put("pyImports", toPyImports(cm, cm.imports)); } @@ -646,9 +645,9 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation operation : operationList) { Map skipTests = new HashMap<>(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index 21e7d80d7abf..10ddac83e569 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -21,9 +21,12 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; + import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -354,16 +357,21 @@ public String modelFileFolder() { @Override public String getTypeDeclaration(Schema p) { - if (ModelUtils.isArraySchema(p)) { - ArraySchema ap = (ArraySchema) p; - Schema inner = ap.getItems(); - return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; - } else if (ModelUtils.isMapSchema(p)) { - Schema inner = getAdditionalProperties(p); - - return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; + Schema schema = ModelUtils.unaliasSchema(this.openAPI, p, importMapping); + Schema target = ModelUtils.isGenerateAliasAsModel() ? p : schema; + if (ModelUtils.isArraySchema(target)) { + Schema items = getSchemaItems((ArraySchema) schema); + return getSchemaType(target) + "[" + getTypeDeclaration(items) + "]"; + } else if (ModelUtils.isMapSchema(target)) { + Schema inner = getAdditionalProperties(target); + if (inner == null) { + LOGGER.error("`{}` (map property) does not have a proper inner type defined. Default to type:string", p.getName()); + inner = new StringSchema().description("TODO default missing map inner type to string"); + p.setAdditionalProperties(inner); + } + return getSchemaType(target) + "[String, " + getTypeDeclaration(inner) + "]"; } - return super.getTypeDeclaration(p); + return super.getTypeDeclaration(target); } @Override @@ -466,9 +474,9 @@ public CodegenProperty fromProperty(String name, Schema p) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // remove model imports to avoid warnings for importing class in the same package in Scala - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); final String prefix = modelPackage() + "."; Iterator> iterator = imports.iterator(); while (iterator.hasNext()) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index ee69893ecf70..ab7cd031b026 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -29,6 +29,8 @@ import org.openapitools.codegen.CodegenConstants.PARAM_NAMING_TYPE; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -765,13 +767,12 @@ protected void addImport(CodegenModel m, String type) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models - List models = (List) postProcessModelsEnum(objs).get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + List models = postProcessModelsEnum(objs).getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); // name enum with model name, e.g. StatusEnum => Pet.StatusEnum for (CodegenProperty var : cm.vars) { if (Boolean.TRUE.equals(var.isEnum)) { @@ -792,14 +793,12 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.discriminator != null && cm.children != null) { for (CodegenModel child : cm.children) { this.setDiscriminatorValue(child, cm.discriminator.getPropertyName(), this.getDiscriminatorValue(child)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java index 50efc04b72e4..bdfafa4dd552 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java @@ -19,6 +19,9 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -87,18 +90,17 @@ public String escapeUnsafeCharacters(String input) { return input.replace("*/", "*_/").replace("/*", "/_*"); } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); - List newOpList = new ArrayList(); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); + List newOpList = new ArrayList<>(); for (CodegenOperation op : operationList) { String path = op.path; String[] items = path.split("/", -1); - List splitPath = new ArrayList(); + List splitPath = new ArrayList<>(); for (String item : items) { if (item.matches("^\\{(.*)\\}$")) { item = "*"; @@ -112,9 +114,10 @@ public Map postProcessOperationsWithModels(Map o if (!foundInNewList) { if (op1.path.equals(op.path)) { foundInNewList = true; + @SuppressWarnings("unchecked") List currentOtherMethodList = (List) op1.vendorExtensions.get("x-codegen-otherMethods"); if (currentOtherMethodList == null) { - currentOtherMethodList = new ArrayList(); + currentOtherMethodList = new ArrayList<>(); } op.operationIdCamelCase = op1.operationIdCamelCase; currentOtherMethodList.add(op); @@ -126,7 +129,7 @@ public Map postProcessOperationsWithModels(Map o newOpList.add(op); } } - operations.put("operation", newOpList); + operations.setOperation(newOpList); return objs; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 58eea7e9a553..f72187c77cb1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -23,6 +23,9 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -461,13 +464,13 @@ protected void processOperation(CodegenOperation operation) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); // We need to postprocess the operations to add proper consumes tags and fix form file handling if (objs != null) { - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (operation.consumes == null) { continue; 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 0caf7dc85db8..8918cd88fe06 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 @@ -21,11 +21,12 @@ import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelsMap; + import java.io.File; import java.util.Arrays; import java.util.EnumSet; import java.util.HashSet; -import java.util.Map; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -123,7 +124,7 @@ public String modelFileFolder() { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return postProcessModelsEnum(objs); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 5cc50db1415a..65efb273c70f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -26,7 +26,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.servers.Server; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index da9b8d200be5..a2bdc183207b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -716,7 +717,7 @@ public String toEnumName(CodegenProperty property) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 405cb0b67103..a7e1ad495c12 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -25,6 +25,8 @@ import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -394,41 +396,67 @@ public CodegenModel fromModel(String name, Schema model) { // avoid breaking changes if (GENERICHOST.equals(getLibrary())) { - Comparator comparatorByDefaultValue = new Comparator() { - @Override - public int compare(CodegenProperty one, CodegenProperty another) { - if (one.defaultValue == another.defaultValue) - return 0; - else if (Boolean.FALSE.equals(one.defaultValue)) - return -1; - else - return 1; - } - }; - - Comparator comparatorByRequired = new Comparator() { - @Override - public int compare(CodegenProperty one, CodegenProperty another) { - if (one.required == another.required) - return 0; - else if (Boolean.TRUE.equals(one.required)) - return -1; - else - return 1; - } - }; - - Collections.sort(codegenModel.vars, comparatorByDefaultValue); - Collections.sort(codegenModel.vars, comparatorByRequired); - Collections.sort(codegenModel.allVars, comparatorByDefaultValue); - Collections.sort(codegenModel.allVars, comparatorByRequired); - Collections.sort(codegenModel.readWriteVars, comparatorByDefaultValue); - Collections.sort(codegenModel.readWriteVars, comparatorByRequired); + Comparator comparatorByRequiredAndDefault = propertyComparatorByRequired.thenComparing(propertyComparatorByDefaultValue); + Collections.sort(codegenModel.vars, comparatorByRequiredAndDefault); + Collections.sort(codegenModel.allVars, comparatorByRequiredAndDefault); + Collections.sort(codegenModel.requiredVars, comparatorByRequiredAndDefault); + Collections.sort(codegenModel.optionalVars, comparatorByRequiredAndDefault); + Collections.sort(codegenModel.readOnlyVars, comparatorByRequiredAndDefault); + Collections.sort(codegenModel.readWriteVars, comparatorByRequiredAndDefault); + Collections.sort(codegenModel.parentVars, comparatorByRequiredAndDefault); } return codegenModel; } + public static Comparator propertyComparatorByDefaultValue = new Comparator() { + @Override + public int compare(CodegenProperty one, CodegenProperty another) { + if ((one.defaultValue == null) == (another.defaultValue == null)) + return 0; + else if (one.defaultValue == null) + return -1; + else + return 1; + } + }; + + public static Comparator propertyComparatorByRequired = new Comparator() { + @Override + public int compare(CodegenProperty one, CodegenProperty another) { + if (one.required == another.required) + return 0; + else if (Boolean.TRUE.equals(one.required)) + return -1; + else + return 1; + } + }; + + public static Comparator parameterComparatorByDefaultValue = new Comparator() { + @Override + public int compare(CodegenParameter one, CodegenParameter another) { + if ((one.defaultValue == null) == (another.defaultValue == null)) + return 0; + else if (one.defaultValue == null) + return -1; + else + return 1; + } + }; + + public static Comparator parameterComparatorByRequired = new Comparator() { + @Override + public int compare(CodegenParameter one, CodegenParameter another) { + if (one.required == another.required) + return 0; + else if (Boolean.TRUE.equals(one.required)) + return -1; + else + return 1; + } + }; + @Override public String getHelp() { return "Generates a C# client library (.NET Standard, .NET Core)."; @@ -516,6 +544,14 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert postProcessPattern(property.pattern, property.vendorExtensions); postProcessEmitDefaultValue(property.vendorExtensions); + if (GENERICHOST.equals(getLibrary())) { + // all c# libraries should want this, but avoid breaking changes for now + // a class cannot contain a property with the same name + if (property.name.equals(model.classname)) { + property.name = property.name + "Property"; + } + } + super.postProcessModelProperty(model, property); } @@ -773,29 +809,17 @@ public CodegenOperation fromOperation(String path, return op; } - Collections.sort(op.allParams, new Comparator() { - @Override - public int compare(CodegenParameter one, CodegenParameter another) { - if (one.defaultValue == another.defaultValue) - return 0; - else if (Boolean.FALSE.equals(one.defaultValue)) - return -1; - else - return 1; - } - }); - - Collections.sort(op.allParams, new Comparator() { - @Override - public int compare(CodegenParameter one, CodegenParameter another) { - if (one.required == another.required) - return 0; - else if (Boolean.TRUE.equals(one.required)) - return -1; - else - return 1; - } - }); + Comparator comparatorByRequiredAndDefault = parameterComparatorByRequired.thenComparing(parameterComparatorByDefaultValue); + Collections.sort(op.allParams, comparatorByRequiredAndDefault); + Collections.sort(op.bodyParams, comparatorByRequiredAndDefault); + Collections.sort(op.pathParams, comparatorByRequiredAndDefault); + Collections.sort(op.queryParams, comparatorByRequiredAndDefault); + Collections.sort(op.headerParams, comparatorByRequiredAndDefault); + Collections.sort(op.implicitHeadersParams, comparatorByRequiredAndDefault); + Collections.sort(op.formParams, comparatorByRequiredAndDefault); + Collections.sort(op.cookieParams, comparatorByRequiredAndDefault); + Collections.sort(op.requiredParams, comparatorByRequiredAndDefault); + Collections.sort(op.optionalParams, comparatorByRequiredAndDefault); return op; } @@ -875,7 +899,7 @@ public void addRestSharpSupportingFiles(final String clientPackageDir, final Str } public void addGenericHostSupportingFiles(final String clientPackageDir, final String packageFolder, - final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir) { + final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir) { supportingFiles.add(new SupportingFile("TokenProvider`1.mustache", clientPackageDir, "TokenProvider`1.cs")); supportingFiles.add(new SupportingFile("RateLimitProvider`1.mustache", clientPackageDir, "RateLimitProvider`1.cs")); supportingFiles.add(new SupportingFile("TokenContainer`1.mustache", clientPackageDir, "TokenContainer`1.cs")); @@ -892,10 +916,10 @@ public void addGenericHostSupportingFiles(final String clientPackageDir, final S supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln")); supportingFiles.add(new SupportingFile("netcore_project.mustache", packageFolder, packageName + ".csproj")); supportingFiles.add(new SupportingFile("appveyor.mustache", "", "appveyor.yml")); - supportingFiles.add(new SupportingFile("AbstractOpenAPISchema.mustache", modelPackageDir, "AbstractOpenAPISchema.cs")); - supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", clientPackageDir, "OpenAPIDateConverter.cs")); + supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", clientPackageDir, "OpenAPIDateJsonConverter.cs")); supportingFiles.add(new SupportingFile("ApiResponseEventArgs.mustache", clientPackageDir, "ApiResponseEventArgs.cs")); supportingFiles.add(new SupportingFile("IApi.mustache", clientPackageDir, getInterfacePrefix() + "Api.cs")); + supportingFiles.add(new SupportingFile("JsonSerializerOptionsProvider.mustache", clientPackageDir, "JsonSerializerOptionsProvider.cs")); String apiTestFolder = testFolder + File.separator + testPackageName() + File.separator + apiPackage(); @@ -1305,16 +1329,13 @@ public String toInstantiationType(Schema schema) { } } - @SuppressWarnings("unchecked") @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - List models = (List) objs.get("models"); // add implements for serializable/parcelable to all models - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.oneOf != null && !cm.oneOf.isEmpty() && cm.oneOf.contains("Null")) { // if oneOf contains "null" type @@ -1327,11 +1348,137 @@ public Map postProcessModels(Map objs) { cm.isNullable = true; cm.anyOf.remove("Null"); } + + if (cm.getComposedSchemas() != null && cm.getComposedSchemas().getOneOf() != null && !cm.getComposedSchemas().getOneOf().isEmpty()) { + cm.getComposedSchemas().getOneOf().removeIf(o -> o.dataType.equals("Null")); + } + + if (cm.getComposedSchemas() != null && cm.getComposedSchemas().getAnyOf() != null && !cm.getComposedSchemas().getAnyOf().isEmpty()) { + cm.getComposedSchemas().getAnyOf().removeIf(o -> o.dataType.equals("Null")); + } + + for (CodegenProperty cp : cm.readWriteVars) { + // ISSUE: https://github.com/OpenAPITools/openapi-generator/issues/11844 + // allVars may not have all properties + // see modules\openapi-generator\src\test\resources\3_0\allOf.yaml + // property boosterSeat will be in readWriteVars but not allVars + // the property is present in the model but gets removed at CodegenModel#removeDuplicatedProperty + if (Boolean.FALSE.equals(cm.allVars.stream().anyMatch(v -> v.baseName.equals(cp.baseName)))) { + LOGGER.debug("Property " + cp.baseName + " was found in readWriteVars but not in allVars. Adding it back to allVars"); + cm.allVars.add(cp); + } + } + + for (CodegenProperty cp : cm.allVars) { + // ISSUE: https://github.com/OpenAPITools/openapi-generator/issues/11845 + // some properties do not have isInherited set correctly + // see modules\openapi-generator\src\test\resources\3_0\allOf.yaml + // Child properties Type, LastName, FirstName will have isInherited set to false when it should be true + if (cp.isInherited){ + continue; + } + if (Boolean.TRUE.equals(cm.parentVars.stream().anyMatch(v -> v.baseName.equals(cp.baseName) && v.dataType.equals(cp.dataType)))) { + LOGGER.debug("Property " + cp.baseName + " was found in the parentVars but not marked as inherited."); + cp.isInherited = true; + } + } + } + + return objs; + } + + /** + * ISSUE: https://github.com/OpenAPITools/openapi-generator/issues/11846 + * Ensures that a model has all inherited properties + * Check modules\openapi-generator\src\test\resources\3_0\java\petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml + * Without this method, property petType in GrandparentAnimal will not make it through ParentPet and into ChildCat + */ + private void EnsureInheritedPropertiesArePresent(CodegenModel derivedModel) { + // every c# generator should definetly want this, or we should fix the issue + // still, lets avoid breaking changes :( + if (Boolean.FALSE.equals(GENERICHOST.equals(getLibrary()))){ + return; + } + + if (derivedModel.parentModel == null){ + return; + } + + for (CodegenProperty parentProperty : derivedModel.parentModel.allVars){ + if (Boolean.FALSE.equals(derivedModel.allVars.stream().anyMatch(v -> v.baseName.equals(parentProperty.baseName)))) { + CodegenProperty clone = parentProperty.clone(); + clone.isInherited = true; + LOGGER.debug("Inherited property " + clone.name + " from model" + derivedModel.parentModel.classname + " was not found in " + derivedModel.classname + ". Adding a clone now."); + derivedModel.allVars.add(clone); + } + } + + EnsureInheritedPropertiesArePresent(derivedModel.parentModel); + } + + /** + * Invoked by {@link DefaultGenerator} after all models have been post-processed, allowing for a last pass of codegen-specific model cleanup. + * + * @param objs Current state of codegen object model. + * @return An in-place modified state of the codegen object model. + */ + @Override + public Map postProcessAllModels(Map objs) { + objs = super.postProcessAllModels(objs); + + // other libraries probably want these fixes, but lets avoid breaking changes for now + if (Boolean.FALSE.equals(GENERICHOST.equals(getLibrary()))){ + return objs; + } + + ArrayList allModels = new ArrayList<>(); + for (String key : objs.keySet()) { + CodegenModel model = ModelUtils.getModelByName(key, objs); + allModels.add(model); + } + + for (CodegenModel cm : allModels) { + cm.anyOf.forEach(anyOf -> removePropertiesDeclaredInComposedClass(anyOf, allModels, cm)); + cm.oneOf.forEach(oneOf -> removePropertiesDeclaredInComposedClass(oneOf, allModels, cm)); + cm.allOf.forEach(allOf -> removePropertiesDeclaredInComposedClass(allOf, allModels, cm)); + + if (cm.getComposedSchemas() != null && cm.getComposedSchemas().getAllOf() != null && !cm.getComposedSchemas().getAllOf().isEmpty()) { + cm.getComposedSchemas().getAllOf().forEach(allOf -> { + if (allOf.dataType.equals(cm.parent)){ + allOf.isInherited = true; + } + }); + } + + EnsureInheritedPropertiesArePresent(cm); } return objs; } + /** + * Removes properties from a model which are also defined in a composed class. + * + * @param className The name which may be a composed model + * @param allModels A collection of all CodegenModel + * @param cm The CodegenModel to correct + */ + private void removePropertiesDeclaredInComposedClass(String className, List allModels, CodegenModel cm) { + CodegenModel otherModel = allModels.stream().filter(m -> m.classname.equals(className)).findFirst().orElse(null); + if (otherModel == null){ + return; + } + + otherModel.readWriteVars.stream().filter(v -> cm.readWriteVars.stream().anyMatch(cmV -> cmV.baseName.equals(v.baseName))).collect(Collectors.toList()) + .forEach(v -> { + cm.readWriteVars.removeIf(item -> item.baseName.equals(v.baseName)); + cm.vars.removeIf(item -> item.baseName.equals(v.baseName)); + cm.readOnlyVars.removeIf(item -> item.baseName.equals(v.baseName)); + cm.requiredVars.removeIf(item -> item.baseName.equals(v.baseName)); + cm.allVars.removeIf(item -> item.baseName.equals(v.baseName)); + }); + } + @Override public void postProcess() { System.out.println("################################################################################"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java index d0447bd69684..4d4495fda4d1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java @@ -23,6 +23,8 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -1084,16 +1086,13 @@ public String toInstantiationType(Schema schema) { } } - @SuppressWarnings("unchecked") @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - List models = (List) objs.get("models"); // add implements for serializable/parcelable to all models - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.oneOf != null && !cm.oneOf.isEmpty() && cm.oneOf.contains("ModelNull")) { // if oneOf contains "null" type diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java index 8527aba03f64..c5163ecb6e2f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java @@ -26,6 +26,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -353,9 +356,9 @@ public String escapeText(String input) { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); - List ops = (List) objs.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); + List ops = objs.getOperation(); for (CodegenOperation op : ops) { // Convert httpMethod to lower case, e.g. "get", "post" op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index 20c3fb253737..a8ea8c701e8a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -21,6 +21,10 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.apache.commons.lang3.StringUtils; @@ -115,9 +119,9 @@ public String getTypeDeclaration(Schema p) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); } @@ -125,7 +129,7 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return postProcessModelsEnum(objs); } @@ -148,7 +152,11 @@ public String escapeText(String input) { } // chomp tailing newline because it breaks the tables and keep all other sign to show documentation properly - return StringUtils.chomp(input); + return StringUtils.chomp(input.replace("\\", "\\\\") + .replace("{", "\\{").replace("}", "\\}") + .replace("]", "\\]") + .replace("|", "\\|") + .replace("!", "\\!")); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 886060e702ce..8a49343ca12e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -25,6 +25,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -254,14 +257,13 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation return op; } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - String classname = (String) operations.get("classname"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + String classname = operations.getClassname(); operations.put("classnameSnakeUpperCase", underscore(classname).toUpperCase(Locale.ROOT)); operations.put("classnameSnakeLowerCase", underscore(classname).toLowerCase(Locale.ROOT)); - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { boolean consumeJson = false; boolean isParsingSupported = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java index cef3b4039615..573242d54942 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java @@ -6,6 +6,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -309,16 +312,15 @@ protected boolean needToImport(String type) { @Override - @SuppressWarnings("unchecked") - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map objectMap = (Map) objs.get("operations"); - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); Map codegenModels = new HashMap<>(); - for (Object moObj : allModels) { - CodegenModel mo = ((Map) moObj).get("model"); + for (ModelMap moObj : allModels) { + CodegenModel mo = moObj.getModel(); if (mo.isEnum) { codegenModels.put(mo.classname, mo); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index 881b3cc8c477..8810aefabc23 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -27,6 +27,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import java.util.*; @@ -320,11 +324,10 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } // override with any special post-processing - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { for (String hdr : op.imports) { if (importMapping.containsKey(hdr)) { @@ -457,13 +460,13 @@ public String getSchemaType(Schema p) { } @Override - public Map postProcessAllModels(final Map models) { - final Map processed = super.postProcessAllModels(models); + public Map postProcessAllModels(final Map models) { + final Map processed = super.postProcessAllModels(models); postProcessParentModels(models); return processed; } - private void postProcessParentModels(final Map models) { + private void postProcessParentModels(final Map models) { for (final String parent : parentModels) { final CodegenModel parentModel = ModelUtils.getModelByName(parent, models); final Collection childrenModels = childrenByParent.get(parent); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 3f21f4adf14d..9d7ce46bafaa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -22,6 +22,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -122,7 +126,7 @@ public CppRestbedServerCodegen() { } @Override - public Map updateAllModels(Map objs) { + public Map updateAllModels(Map objs) { // Index all CodegenModels by model name. Map allModels = getAllModels(objs); @@ -280,11 +284,10 @@ public String toApiFilename(String name) { return toApiName(name); } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); List newOpList = new ArrayList<>(); for (CodegenOperation op : operationList) { @@ -316,6 +319,7 @@ public Map postProcessOperationsWithModels(Map o if (op1.path.equals(op.path)) { foundInNewList = true; final String X_CODEGEN_OTHER_METHODS = "x-codegen-other-methods"; + @SuppressWarnings("unchecked") List currentOtherMethodList = (List) op1.vendorExtensions.get(X_CODEGEN_OTHER_METHODS); if (currentOtherMethodList == null) { currentOtherMethodList = new ArrayList<>(); @@ -330,7 +334,7 @@ public Map postProcessOperationsWithModels(Map o newOpList.add(op); } } - operations.put("operation", newOpList); + operations.setOperation(newOpList); return objs; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java index 19fa27e7acf7..998b875dd16d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java @@ -24,6 +24,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.PrefixWithHashLambda; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -473,7 +477,7 @@ public String toEnumName(CodegenProperty property) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } @@ -554,19 +558,18 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); HashMap modelMaps = new HashMap<>(); HashMap processedModelMaps = new HashMap<>(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + for (ModelMap modelMap : allModels) { + CodegenModel m = modelMap.getModel(); modelMaps.put(m.classname, m); } - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { for (CodegenParameter p : op.allParams) { p.vendorExtensions.put("x-crystal-example", constructExampleCode(p, modelMaps, processedModelMaps)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpNetcoreFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpNetcoreFunctionsServerCodegen.java index 8e020f3e6413..5ddaa4845603 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpNetcoreFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpNetcoreFunctionsServerCodegen.java @@ -16,90 +16,586 @@ package org.openapitools.codegen.languages; +import com.samskivert.mustache.Mustache; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; -import io.swagger.models.properties.ArrayProperty; -import io.swagger.models.properties.MapProperty; -import io.swagger.models.properties.Property; -import io.swagger.models.parameters.Parameter; +import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; +import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.utils.URLPathUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; -import java.util.*; +import java.net.URL; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.Map; -import org.apache.commons.lang3.StringUtils; +import static java.util.UUID.randomUUID; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +public class CsharpNetcoreFunctionsServerCodegen extends AbstractCSharpCodegen { + + public static final String NET_CORE_VERSION = "netCoreVersion"; + public static final String AZURE_FUNCTIONS_VERSION = "azureFunctionsVersion"; + public static final String CLASS_MODIFIER = "classModifier"; + public static final String OPERATION_MODIFIER = "operationModifier"; + public static final String OPERATION_IS_ASYNC = "operationIsAsync"; + public static final String OPERATION_RESULT_TASK = "operationResultTask"; + public static final String GENERATE_BODY = "generateBody"; + public static final String BUILD_TARGET = "buildTarget"; + public static final String MODEL_CLASS_MODIFIER = "modelClassModifier"; + public static final String TARGET_FRAMEWORK = "targetFramework"; + public static final String FUNCTIONS_SDK_VERSION = "functionsSDKVersion"; + + public static final String COMPATIBILITY_VERSION = "compatibilityVersion"; + public static final String USE_NEWTONSOFT = "useNewtonsoft"; + public static final String NEWTONSOFT_VERSION = "newtonsoftVersion"; + + private String packageGuid = "{" + randomUUID().toString().toUpperCase(Locale.ROOT) + "}"; + private String userSecretsGuid = randomUUID().toString(); + + protected final Logger LOGGER = LoggerFactory.getLogger(AspNetCoreServerCodegen.class); + + protected int serverPort = 8080; + protected String serverHost = "0.0.0.0"; + protected CliOption netCoreVersion = new CliOption(NET_CORE_VERSION, ".NET Core version: 6.0, 5.0, 3.1, 3.0"); + protected CliOption azureFunctionsVersion = new CliOption(AZURE_FUNCTIONS_VERSION, "Azure functions version: v4, v3"); + private CliOption classModifier = new CliOption(CLASS_MODIFIER, "Class Modifier for function classes: Empty string or abstract."); + private CliOption operationModifier = new CliOption(OPERATION_MODIFIER, "Operation Modifier can be virtual or abstract"); + private CliOption modelClassModifier = new CliOption(MODEL_CLASS_MODIFIER, "Model Class Modifier can be nothing or partial"); + private boolean generateBody = true; + private CliOption buildTarget = new CliOption("buildTarget", "Target to build an application or library"); + private String projectSdk = "Microsoft.NET.Sdk"; + private boolean operationIsAsync = false; + private boolean operationResultTask = false; + private boolean isLibrary = false; + private boolean useFrameworkReference = false; + private boolean useNewtonsoft = true; + private String newtonsoftVersion = "3.0.0"; + + public CsharpNetcoreFunctionsServerCodegen() { + super(); + + // TODO: AspnetCore community review + modifyFeatureSet(features -> features + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .includeSecurityFeatures( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + ); + + outputFolder = "generated-code" + File.separator + getName(); + + modelTemplateFiles.put("model.mustache", ".cs"); + apiTemplateFiles.put("function.mustache", ".cs"); + + embeddedTemplateDir = templateDir = "csharp-netcore-functions"; + + // contextually reserved words + // NOTE: C# uses camel cased reserved words, while models are title cased. We don't want lowercase comparisons. + reservedWords.addAll( + Arrays.asList("var", "async", "await", "dynamic", "yield") + ); + + cliOptions.clear(); + + typeMapping.put("boolean", "bool"); + typeMapping.put("integer", "int"); + typeMapping.put("float", "float"); + typeMapping.put("long", "long"); + typeMapping.put("double", "double"); + typeMapping.put("number", "decimal"); + typeMapping.put("DateTime", "DateTime"); + typeMapping.put("date", "DateTime"); + typeMapping.put("UUID", "Guid"); + typeMapping.put("URI", "string"); + + setSupportNullable(Boolean.TRUE); + + // CLI options + addOption(CodegenConstants.PACKAGE_DESCRIPTION, + CodegenConstants.PACKAGE_DESCRIPTION_DESC, + packageDescription); + + addOption(CodegenConstants.LICENSE_URL, + CodegenConstants.LICENSE_URL_DESC, + licenseUrl); + + addOption(CodegenConstants.LICENSE_NAME, + CodegenConstants.LICENSE_NAME_DESC, + licenseName); + + addOption(CodegenConstants.PACKAGE_COPYRIGHT, + CodegenConstants.PACKAGE_COPYRIGHT_DESC, + packageCopyright); + + addOption(CodegenConstants.PACKAGE_AUTHORS, + CodegenConstants.PACKAGE_AUTHORS_DESC, + packageAuthors); + + addOption(CodegenConstants.PACKAGE_TITLE, + CodegenConstants.PACKAGE_TITLE_DESC, + packageTitle); + + addOption(CodegenConstants.PACKAGE_NAME, + "C# package name (convention: Title.Case).", + packageName); + + addOption(CodegenConstants.PACKAGE_VERSION, + "C# package version.", + packageVersion); + + addOption(CodegenConstants.OPTIONAL_PROJECT_GUID, + CodegenConstants.OPTIONAL_PROJECT_GUID_DESC, + null); -public class CsharpNetcoreFunctionsServerCodegen extends CSharpNetCoreReducedClientCodegen { - public static final String PROJECT_NAME = "projectName"; + addOption(CodegenConstants.SOURCE_FOLDER, + CodegenConstants.SOURCE_FOLDER_DESC, + sourceFolder); - final Logger LOGGER = LoggerFactory.getLogger(CsharpNetcoreFunctionsServerCodegen.class); + netCoreVersion.addEnum("3.0", ".NET Core 3.0"); + netCoreVersion.addEnum("3.1", ".NET Core 3.1"); + netCoreVersion.addEnum("5.0", ".NET Core 5.0"); + netCoreVersion.addEnum("6.0", ".NET Core 6.0"); + netCoreVersion.setDefault("3.1"); + netCoreVersion.setOptValue(netCoreVersion.getDefault()); + cliOptions.add(netCoreVersion); + azureFunctionsVersion.addEnum("v4", "Azure Functions v4"); + azureFunctionsVersion.addEnum("v3", "Azure Functions v3"); + azureFunctionsVersion.setDefault("v4"); + azureFunctionsVersion.setOptValue(azureFunctionsVersion.getDefault()); + cliOptions.add(azureFunctionsVersion); + + // CLI Switches + addSwitch(CodegenConstants.NULLABLE_REFERENCE_TYPES, + CodegenConstants.NULLABLE_REFERENCE_TYPES_DESC, + this.nullReferenceTypesFlag); + + addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, + CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC, + sortParamsByRequiredFlag); + + addSwitch(CodegenConstants.USE_DATETIME_OFFSET, + CodegenConstants.USE_DATETIME_OFFSET_DESC, + useDateTimeOffsetFlag); + + addSwitch(CodegenConstants.USE_COLLECTION, + CodegenConstants.USE_COLLECTION_DESC, + useCollection); + + addSwitch(CodegenConstants.RETURN_ICOLLECTION, + CodegenConstants.RETURN_ICOLLECTION_DESC, + returnICollection); + + addSwitch(USE_NEWTONSOFT, + "Uses the Newtonsoft JSON library.", + useNewtonsoft); + + addOption(NEWTONSOFT_VERSION, + "Version for Newtonsoft.Json for .NET Core 3.0+", + newtonsoftVersion); + + addOption(CodegenConstants.ENUM_NAME_SUFFIX, + CodegenConstants.ENUM_NAME_SUFFIX_DESC, + enumNameSuffix); + + addOption(CodegenConstants.ENUM_VALUE_SUFFIX, + "Suffix that will be appended to all enum values.", + enumValueSuffix); + + classModifier.addEnum("", "Keep class default with no modifier"); + classModifier.addEnum("abstract", "Make class abstract"); + classModifier.setDefault(""); + classModifier.setOptValue(classModifier.getDefault()); + addOption(classModifier.getOpt(), classModifier.getDescription(), classModifier.getOptValue()); + + operationModifier.addEnum("virtual", "Keep method virtual"); + operationModifier.addEnum("abstract", "Make method abstract"); + operationModifier.setDefault("virtual"); + operationModifier.setOptValue(operationModifier.getDefault()); + cliOptions.add(operationModifier); + + buildTarget.addEnum("program", "Generate code for a standalone server"); + buildTarget.addEnum("library", "Generate code for a server abstract class library"); + buildTarget.setDefault("program"); + buildTarget.setOptValue(buildTarget.getDefault()); + cliOptions.add(buildTarget); + + addSwitch(GENERATE_BODY, + "Generates method body.", + generateBody); + + addSwitch(OPERATION_IS_ASYNC, + "Set methods to async or sync (default).", + operationIsAsync); + + addSwitch(OPERATION_RESULT_TASK, + "Set methods result to Task<>.", + operationResultTask); + + modelClassModifier.setType("String"); + modelClassModifier.addEnum("", "Keep model class default with no modifier"); + modelClassModifier.addEnum("partial", "Make model class partial"); + modelClassModifier.setDefault("partial"); + modelClassModifier.setOptValue(modelClassModifier.getDefault()); + addOption(modelClassModifier.getOpt(), modelClassModifier.getDescription(), modelClassModifier.getOptValue()); + } + + @Override public CodegenType getTag() { return CodegenType.SERVER; } + @Override public String getName() { return "csharp-netcore-functions"; } + @Override public String getHelp() { - return "Generates a csharp server."; + return "Creates Azure function templates on top of the models/converters created by the C# codegens. This function is contained in a partial class. Default Get/Create/Patch/Post etc. methods are created with an underscore prefix. The assumption is that when the function is implemented, the partial class will be completed with another partial class. The implementing code should be located in a method of the same name, only without the underscore prefix. If no such method is found then the function will throw a Not Implemented exception. This setup allows the endpoints to be specified in the schema at build time, and separated from the implementing function."; } - public CsharpNetcoreFunctionsServerCodegen() { - super(); + @Override + public void preprocessOpenAPI(OpenAPI openAPI) { + super.preprocessOpenAPI(openAPI); + URL url = URLPathUtils.getServerURL(openAPI, serverVariableOverrides()); + additionalProperties.put("serverHost", url.getHost()); + additionalProperties.put("serverPort", URLPathUtils.getPort(url, 8080)); - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.BETA) - .build(); + setApiBasePath(); + } - outputFolder = "generated-code" + File.separator + "csharp"; - modelTemplateFiles.put("model.mustache", ".cs"); - apiTemplateFiles.put("functions.mustache", ".cs"); - embeddedTemplateDir = templateDir = "csharp-netcore-functions"; - apiPackage = "Apis"; - modelPackage = "Models"; - String clientPackageDir = "generatedSrc/Client"; - supportingFiles.add(new SupportingFile("README.mustache", "generatedSrc", "README.md")); - supportingFiles.add(new SupportingFile("project.mustache", "generatedSrc", "project.json")); - - supportingFiles.add(new SupportingFile("IApiAccessor.mustache", - clientPackageDir, "IApiAccessor.cs")); - supportingFiles.add(new SupportingFile("Configuration.mustache", - clientPackageDir, "Configuration.cs")); - supportingFiles.add(new SupportingFile("ApiClient.mustache", - clientPackageDir, "ApiClient.cs")); - supportingFiles.add(new SupportingFile("ApiException.mustache", - clientPackageDir, "ApiException.cs")); - supportingFiles.add(new SupportingFile("ApiResponse.mustache", - clientPackageDir, "ApiResponse.cs")); - supportingFiles.add(new SupportingFile("ExceptionFactory.mustache", - clientPackageDir, "ExceptionFactory.cs")); - supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", - clientPackageDir, "OpenAPIDateConverter.cs")); + @Override + public void processOpts() { + super.processOpts(); + + if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_GUID)) { + setPackageGuid((String) additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_GUID)); + } + additionalProperties.put("packageGuid", packageGuid); + additionalProperties.put("userSecretsGuid", userSecretsGuid); + + if (!additionalProperties.containsKey(NEWTONSOFT_VERSION)) { + additionalProperties.put(NEWTONSOFT_VERSION, newtonsoftVersion); + } else { + newtonsoftVersion = (String) additionalProperties.get(NEWTONSOFT_VERSION); + } + + // Check for the modifiers etc. + // The order of the checks is important. + setClassModifier(); + setOperationModifier(); + setModelClassModifier(); + setOperationIsAsync(); + + + additionalProperties.put("dockerTag", packageName.toLowerCase(Locale.ROOT)); + + if (!additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) { + apiPackage = packageName + ".Functions"; + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); + } + + if (!additionalProperties.containsKey(CodegenConstants.MODEL_PACKAGE)) { + modelPackage = packageName + ".Models"; + additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage); + } + + String packageFolder = sourceFolder + File.separator + packageName; + + // determine the ASP.NET core version setting + setAzureFunctionsVersion(); + setNetCoreVersion(packageFolder); + setUseNewtonsoft(); + + // Check for class modifier if not present set the default value. + + supportingFiles.add(new SupportingFile("build.sh.mustache", "", "build.sh")); + supportingFiles.add(new SupportingFile("build.bat.mustache", "", "build.bat")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln")); + supportingFiles.add(new SupportingFile("gitignore", packageFolder, ".gitignore")); + supportingFiles.add(new SupportingFile("OpenApi" + File.separator + "TypeExtensions.mustache", packageFolder + File.separator + "OpenApi", "TypeExtensions.cs")); + supportingFiles.add(new SupportingFile("Project.csproj.mustache", packageFolder, packageName + ".csproj")); + supportingFiles.add(new SupportingFile("typeConverter.mustache", packageFolder + File.separator + "Converters", "CustomEnumConverter.cs")); + supportingFiles.add(new SupportingFile("host.json.mustache", packageFolder, "host.json")); + supportingFiles.add(new SupportingFile("local.settings.json.mustache", packageFolder, "local.settings.json")); + } + + public void setPackageGuid(String packageGuid) { + this.packageGuid = packageGuid; } @Override public String apiFileFolder() { - return outputFolder + File.separator + "generatedSrc" + File.separator + "Functions"; + return outputFolder + File.separator + sourceFolder + File.separator + packageName + File.separator + "Functions"; } @Override public String modelFileFolder() { - return outputFolder + File.separator + "generatedSrc" + File.separator + "Models"; + return outputFolder + File.separator + sourceFolder + File.separator + packageName + File.separator + "Models"; + } + + @Override + public Map postProcessSupportingFileData(Map objs) { + generateJSONSpecFile(objs); + return super.postProcessSupportingFileData(objs); + } + + @Override + protected void processOperation(CodegenOperation operation) { + super.processOperation(operation); + + // HACK: Unlikely in the wild, but we need to clean operation paths for MVC Routing + if (operation.path != null) { + if (operation.path.startsWith("/")) { + operation.path = operation.path.substring(1); + } + String original = operation.path; + operation.path = operation.path.replace("?", "/"); + if (!original.equals(operation.path)) { + LOGGER.warn("Normalized {} to {}. Please verify generated source.", original, operation.path); + } + } + + // Converts, for example, PUT to HttpPut for function attributes + operation.httpMethod = operation.httpMethod.charAt(0) + operation.httpMethod.substring(1).toLowerCase(Locale.ROOT); + } + + @Override + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + super.postProcessOperationsWithModels(objs, allModels); + // We need to postprocess the operations to add proper consumes tags and fix form file handling + if (objs != null) { + OperationMap operations = objs.getOperations(); + if (operations != null) { + List ops = operations.getOperation(); + for (CodegenOperation operation : ops) { + if (operation.consumes == null) { + continue; + } + if (operation.consumes.size() == 0) { + continue; + } + + // Build a consumes string for the operation we cannot iterate in the template as we need a ',' + // after each entry but the last + + StringBuilder consumesString = new StringBuilder(); + for (Map consume : operation.consumes) { + if (!consume.containsKey("mediaType")) { + continue; + } + + if (consumesString.toString().isEmpty()) { + consumesString = new StringBuilder("\"" + consume.get("mediaType") + "\""); + } else { + consumesString.append(", \"").append(consume.get("mediaType")).append("\""); + } + + // In a multipart/form-data consuming context binary data is best handled by an IFormFile + if (!consume.get("mediaType").equals("multipart/form-data")) { + continue; + } + + // Change dataType of binary parameters to IFormFile for formParams in multipart/form-data + for (CodegenParameter param : operation.formParams) { + if (param.isBinary) { + param.dataType = "IFormFile"; + param.baseType = "IFormFile"; + } + } + + for (CodegenParameter param : operation.allParams) { + if (param.isBinary && param.isFormParam) { + param.dataType = "IFormFile"; + param.baseType = "IFormFile"; + } + } + } + + if (!consumesString.toString().isEmpty()) { + operation.vendorExtensions.put("x-aspnetcore-consumes", consumesString.toString()); + } + } + } + } + return objs; + } + + @Override + public Mustache.Compiler processCompiler(Mustache.Compiler compiler) { + // To avoid unexpected behaviors when options are passed programmatically such as { "useCollection": "" } + return super.processCompiler(compiler).emptyStringIsFalse(true); } @Override - public String apiDocFileFolder() { - return (outputFolder + "/Docs").replace('/', File.separatorChar); + public String toRegularExpression(String pattern) { + return escapeText(pattern); } + @SuppressWarnings("rawtypes") @Override - public String apiTestFileFolder() { - return outputFolder + File.separator + "Tests" + File.separator + "Tests" + File.separator + apiPackage(); + public String getNullableType(Schema p, String type) { + if (languageSpecificPrimitives.contains(type)) { + if (isSupportNullable() && ModelUtils.isNullable(p) && (nullableType.contains(type) || nullReferenceTypesFlag)) { + return type + "?"; + } else { + return type; + } + } else { + return null; + } + } + + private void setCliOption(CliOption cliOption) throws IllegalArgumentException { + if (additionalProperties.containsKey(cliOption.getOpt())) { + // TODO Hack - not sure why the empty strings become boolean. + Object obj = additionalProperties.get(cliOption.getOpt()); + if (!SchemaTypeUtil.BOOLEAN_TYPE.equals(cliOption.getType())) { + if (obj instanceof Boolean) { + obj = ""; + additionalProperties.put(cliOption.getOpt(), obj); + } + } + cliOption.setOptValue(obj.toString()); + } else { + additionalProperties.put(cliOption.getOpt(), cliOption.getOptValue()); + } + if (cliOption.getOptValue() == null) { + cliOption.setOptValue(cliOption.getDefault()); + throw new IllegalArgumentException(cliOption.getOpt() + ": Invalid value '" + additionalProperties.get(cliOption.getOpt()).toString() + "'" + + ". " + cliOption.getDescription()); + } + } + + private void setClassModifier() { + // CHeck for class modifier if not present set the default value. + setCliOption(classModifier); + + // If class modifier is abstract then the methods need to be abstract too. + if ("abstract".equals(classModifier.getOptValue())) { + operationModifier.setOptValue(classModifier.getOptValue()); + additionalProperties.put(OPERATION_MODIFIER, operationModifier.getOptValue()); + LOGGER.warn("classModifier is {} so forcing operationModifier to {}", classModifier.getOptValue(), operationModifier.getOptValue()); + } + } + + private void setOperationModifier() { + setCliOption(operationModifier); + + // If operation modifier is abstract then dont generate any body + if ("abstract".equals(operationModifier.getOptValue())) { + generateBody = false; + additionalProperties.put(GENERATE_BODY, generateBody); + LOGGER.warn("operationModifier is {} so forcing generateBody to {}", operationModifier.getOptValue(), generateBody); + } else if (additionalProperties.containsKey(GENERATE_BODY)) { + generateBody = convertPropertyToBooleanAndWriteBack(GENERATE_BODY); + } else { + additionalProperties.put(GENERATE_BODY, generateBody); + } + } + + private void setModelClassModifier() { + setCliOption(modelClassModifier); + + // If operation modifier is abstract then dont generate any body + if (isLibrary) { + modelClassModifier.setOptValue(""); + additionalProperties.put(MODEL_CLASS_MODIFIER, modelClassModifier.getOptValue()); + LOGGER.warn("buildTarget is {} so removing any modelClassModifier ", buildTarget.getOptValue()); + } + } + + private void setNetCoreVersion(String packageFolder) { + setCliOption(netCoreVersion); + + LOGGER.info("ASP.NET core version: {}", netCoreVersion.getOptValue()); + } + + private void setAzureFunctionsVersion() { + setCliOption(azureFunctionsVersion); + String functionsSDKVersion = "3.0.13"; + + if ("v4".equals(azureFunctionsVersion.getOptValue())) { + functionsSDKVersion = "4.0.1"; + + if (!netCoreVersion.getOptValue().startsWith("6.")) { + LOGGER.warn("ASP.NET core version: {} is not compatible with Azure functions v4. Using version 6.0.", netCoreVersion.getOptValue()); + netCoreVersion.setOptValue("6.0"); + } + } + + additionalProperties.put(FUNCTIONS_SDK_VERSION, functionsSDKVersion); + + //set .NET target version + String targetFrameworkVersion = "net" + netCoreVersion.getOptValue(); + additionalProperties.put(TARGET_FRAMEWORK, targetFrameworkVersion); } + private void setOperationIsAsync() { + if (isLibrary) { + operationIsAsync = false; + additionalProperties.put(OPERATION_IS_ASYNC, operationIsAsync); + } else if (additionalProperties.containsKey(OPERATION_IS_ASYNC)) { + operationIsAsync = convertPropertyToBooleanAndWriteBack(OPERATION_IS_ASYNC); + } else { + additionalProperties.put(OPERATION_IS_ASYNC, operationIsAsync); + } + } + + private void setUseNewtonsoft() { + if (additionalProperties.containsKey(USE_NEWTONSOFT)) { + useNewtonsoft = convertPropertyToBooleanAndWriteBack(USE_NEWTONSOFT); + } else { + additionalProperties.put(USE_NEWTONSOFT, useNewtonsoft); + } + } + + private void setApiBasePath() { + URL url = URLPathUtils.getServerURL(openAPI, serverVariableOverrides()); + String apiBasePath = encodePath(url.getPath()).replaceAll("/$", ""); + + // if a base path exists, remove leading '/' and append trailing '/' + if (apiBasePath != null && apiBasePath.length() > 0) { + if (apiBasePath.startsWith("/")) + apiBasePath = apiBasePath.substring(1); + + if (apiBasePath.endsWith("/")) + apiBasePath = apiBasePath.substring(0, apiBasePath.lastIndexOf("/")); + } + + additionalProperties.put("apiBasePath", apiBasePath); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 5693d19265c9..40edd69ed377 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -17,14 +17,12 @@ package org.openapitools.codegen.languages; -import com.google.common.collect.Sets; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.SupportingFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; import java.util.HashMap; import java.util.Map; @@ -45,6 +43,8 @@ public DartClientCodegen() { serializationOptions.put(SERIALIZATION_LIBRARY_NATIVE, "Use native serializer, backwards compatible"); serializationLibrary.setEnum(serializationOptions); cliOptions.add(serializationLibrary); + + sourceFolder = ""; } @Override @@ -61,15 +61,14 @@ public void processOpts() { this.setSerializationLibrary(); - 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("api_client.mustache", libFolder, "api_client.dart")); - supportingFiles.add(new SupportingFile("api_exception.mustache", libFolder, "api_exception.dart")); - supportingFiles.add(new SupportingFile("api_helper.mustache", libFolder, "api_helper.dart")); - supportingFiles.add(new SupportingFile("apilib.mustache", libFolder, "api.dart")); + supportingFiles.add(new SupportingFile("api_client.mustache", libPath, "api_client.dart")); + supportingFiles.add(new SupportingFile("api_exception.mustache", libPath, "api_exception.dart")); + supportingFiles.add(new SupportingFile("api_helper.mustache", libPath, "api_helper.dart")); + supportingFiles.add(new SupportingFile("apilib.mustache", libPath, "api.dart")); - final String authFolder = sourceFolder + File.separator + "lib" + File.separator + "auth"; + final String authFolder = libPath + "auth"; supportingFiles.add(new SupportingFile("auth/authentication.mustache", authFolder, "authentication.dart")); supportingFiles.add(new SupportingFile("auth/http_basic_auth.mustache", authFolder, "http_basic_auth.dart")); supportingFiles.add(new SupportingFile("auth/http_bearer_auth.mustache", authFolder, "http_bearer_auth.dart")); 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 deleted file mode 100644 index 517d1023b980..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * 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 - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.languages; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; -import com.samskivert.mustache.Mustache; -import io.swagger.v3.oas.models.media.Schema; -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.features.ClientModificationFeature; -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.*; -import java.util.stream.Collectors; - -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class DartDioClientCodegen extends AbstractDartCodegen { - - private final Logger LOGGER = LoggerFactory.getLogger(DartDioClientCodegen.class); - - public static final String NULLABLE_FIELDS = "nullableFields"; - public static final String DATE_LIBRARY = "dateLibrary"; - - private static final String CLIENT_NAME = "clientName"; - - private boolean nullableFields = false; - private String dateLibrary = "core"; - - public DartDioClientCodegen() { - super(); - - modifyFeatureSet(features -> features - .includeClientModificationFeatures( - ClientModificationFeature.Authorizations, - ClientModificationFeature.UserAgent - ) - ); - - outputFolder = "generated-code/dart-dio"; - embeddedTemplateDir = "dart-dio"; - this.setTemplateDir(embeddedTemplateDir); - - cliOptions.add(new CliOption(NULLABLE_FIELDS, "Make all fields nullable in the JSON payload")); - CliOption dateLibrary = new CliOption(DATE_LIBRARY, "Option. Date library to use").defaultValue(this.getDateLibrary()); - Map dateOptions = new HashMap<>(); - dateOptions.put("core", "Dart core library (DateTime)"); - dateOptions.put("timemachine", "Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing."); - dateLibrary.setEnum(dateOptions); - cliOptions.add(dateLibrary); - - typeMapping.put("Array", "BuiltList"); - typeMapping.put("array", "BuiltList"); - typeMapping.put("List", "BuiltList"); - typeMapping.put("set", "BuiltSet"); - typeMapping.put("map", "BuiltMap"); - typeMapping.put("file", "Uint8List"); - typeMapping.put("binary", "Uint8List"); - typeMapping.put("object", "JsonObject"); - typeMapping.put("AnyType", "JsonObject"); - - imports.put("BuiltList", "package:built_collection/built_collection.dart"); - imports.put("BuiltSet", "package:built_collection/built_collection.dart"); - imports.put("BuiltMap", "package:built_collection/built_collection.dart"); - imports.put("JsonObject", "package:built_value/json_object.dart"); - imports.put("Uint8List", "dart:typed_data"); - } - - public String getDateLibrary() { - return dateLibrary; - } - - public void setDateLibrary(String library) { - this.dateLibrary = library; - } - - public boolean getNullableFields() { - return nullableFields; - } - - public void setNullableFields(boolean nullableFields) { - this.nullableFields = nullableFields; - } - - @Override - public String getName() { - return "dart-dio"; - } - - @Override - public String getHelp() { - return "Generates a Dart Dio client library."; - } - - @Override - protected ImmutableMap.Builder addMustacheLambdas() { - return super.addMustacheLambdas() - .put("escapeBuiltValueEnum", (fragment, writer) -> { - // Raw strings don't work correctly in built_value enum strings. - // Dollar signs need to be escaped in to make them work. - // @BuiltValueEnumConst(wireName: r'$') produces '$' in generated code. - // @BuiltValueEnumConst(wireName: r'\$') produces '\$' in generated code. - writer.write(fragment.execute().replace("$", "\\$")); - }); - } - - @Override - public String toDefaultValue(Schema schema) { - if (schema.getDefault() != null) { - if (ModelUtils.isArraySchema(schema)) { - if (ModelUtils.isSet(schema)) { - return "SetBuilder()"; - } - return "ListBuilder()"; - } - if (ModelUtils.isMapSchema(schema)) { - return "MapBuilder()"; - } - if (ModelUtils.isDateSchema(schema) || ModelUtils.isDateTimeSchema(schema)) { - // this is currently not supported and would create compile errors - return null; - } - if (ModelUtils.isStringSchema(schema)) { - return "'" + schema.getDefault().toString().replaceAll("'", "\\'") + "'"; - } - return schema.getDefault().toString(); - } - return null; - } - - @Override - public void processOpts() { - super.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)) { - this.setNullableFields(convertPropertyToBooleanAndWriteBack(NULLABLE_FIELDS)); - } else { - //not set, use to be passed to template - additionalProperties.put(NULLABLE_FIELDS, nullableFields); - } - - if (!additionalProperties.containsKey(CLIENT_NAME)) { - additionalProperties.put(CLIENT_NAME, org.openapitools.codegen.utils.StringUtils.camelize(pubName)); - } - - if (additionalProperties.containsKey(DATE_LIBRARY)) { - this.setDateLibrary(additionalProperties.get(DATE_LIBRARY).toString()); - } - // 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("api_util.mustache", libFolder, "api_util.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")); - - final String authFolder = libFolder + File.separator + "auth"; - supportingFiles.add(new SupportingFile("auth/api_key_auth.mustache", authFolder, "api_key_auth.dart")); - supportingFiles.add(new SupportingFile("auth/basic_auth.mustache", authFolder, "basic_auth.dart")); - supportingFiles.add(new SupportingFile("auth/oauth.mustache", authFolder, "oauth.dart")); - supportingFiles.add(new SupportingFile("auth/auth.mustache", authFolder, "auth.dart")); - - if ("core".equals(dateLibrary)) { - // this option uses the same classes as normal dart generator - additionalProperties.put("core", "true"); - } else if ("timemachine".equals(dateLibrary)) { - additionalProperties.put("timeMachine", "true"); - typeMapping.put("date", "OffsetDate"); - typeMapping.put("Date", "OffsetDate"); - typeMapping.put("DateTime", "OffsetDateTime"); - typeMapping.put("datetime", "OffsetDateTime"); - imports.put("OffsetDate", "package:time_machine/time_machine.dart"); - imports.put("OffsetDateTime", "package:time_machine/time_machine.dart"); - supportingFiles.add(new SupportingFile("local_date_serializer.mustache", libFolder, "local_date_serializer.dart")); - } - } - - @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; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = rewriteImports(cm.imports); - cm.vendorExtensions.put("x-has-vars", !cm.vars.isEmpty()); - } - return objs; - } - - @Override - public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { - super.postProcessModelProperty(model, property); - if (nullableFields) { - property.isNullable = true; - } - - if (property.isEnum) { - // enums are generated with built_value and make use of BuiltSet - model.imports.add("BuiltSet"); - } - - property.getVendorExtensions().put("x-built-value-serializer-type", createBuiltValueSerializerType(property)); - } - - private String createBuiltValueSerializerType(CodegenProperty property) { - final StringBuilder sb = new StringBuilder("const FullType("); - if (property.isContainer) { - appendCollection(sb, property); - } else { - sb.append(property.datatypeWithEnum); - } - sb.append(")"); - return sb.toString(); - } - - private void appendCollection(StringBuilder sb, CodegenProperty property) { - sb.append(property.baseType); - sb.append(", [FullType("); - if (property.isMap) { - // a map always has string keys - sb.append("String), FullType("); - } - if (property.items.isContainer) { - appendCollection(sb, property.items); - } else { - sb.append(property.items.datatypeWithEnum); - } - sb.append(")]"); - } - - @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); - - Set> serializers = new HashSet<>(); - Set resultImports = new HashSet<>(); - - for (CodegenOperation op : operationList) { - for (CodegenParameter param : op.bodyParams) { - if (param.baseType != null && param.baseType.equalsIgnoreCase("Uint8List") && op.isMultipart) { - param.baseType = "MultipartFile"; - param.dataType = "MultipartFile"; - } - if (param.isContainer) { - final Map serializer = new HashMap<>(); - serializer.put("isArray", param.isArray); - serializer.put("uniqueItems", param.uniqueItems); - serializer.put("isMap", param.isMap); - serializer.put("baseType", param.baseType); - serializers.add(serializer); - } - } - - resultImports.addAll(rewriteImports(op.imports)); - if (op.getHasFormParams()) { - resultImports.add("package:" + pubName + "/api_util.dart"); - } - - if (op.returnContainer != null) { - final Map serializer = new HashMap<>(); - serializer.put("isArray", Objects.equals("array", op.returnContainer) || Objects.equals("set", op.returnContainer)); - serializer.put("uniqueItems", op.uniqueItems); - serializer.put("isMap", Objects.equals("map", op.returnContainer)); - serializer.put("baseType", op.returnBaseType); - serializers.add(serializer); - } - } - - objs.put("imports", resultImports.stream().sorted().collect(Collectors.toList())); - objs.put("serializers", serializers); - - return objs; - } - - private Set rewriteImports(Set originalImports) { - Set resultImports = Sets.newHashSet(); - for (String modelImport : originalImports) { - if (imports.containsKey(modelImport)) { - resultImports.add(imports.get(modelImport)); - } else { - resultImports.add("package:" + pubName + "/model/" + underscore(modelImport) + ".dart"); - } - } - return resultImports; - } -} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java index 5b9f96a21624..b6eea21d1a8a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java @@ -17,13 +17,24 @@ package org.openapitools.codegen.languages; import com.google.common.collect.Sets; +import com.samskivert.mustache.Mustache; +import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.api.TemplatePathLocator; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.ClientModificationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; +import org.openapitools.codegen.templating.CommonTemplateContentLocator; +import org.openapitools.codegen.templating.GeneratorTemplateContentLocator; +import org.openapitools.codegen.templating.MustacheEngineAdapter; +import org.openapitools.codegen.templating.TemplateManagerOptions; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -54,6 +65,8 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { private String clientName; + private TemplateManager templateManager; + public DartDioNextClientCodegen() { super(); @@ -71,9 +84,6 @@ public DartDioNextClientCodegen() { embeddedTemplateDir = "dart/libraries/dio"; this.setTemplateDir(embeddedTemplateDir); - apiPackage = "lib.src.api"; - modelPackage = "lib.src.model"; - supportedLibraries.put(SERIALIZATION_LIBRARY_BUILT_VALUE, "[DEFAULT] built_value"); final CliOption serializationLibrary = CliOption.newString(CodegenConstants.SERIALIZATION_LIBRARY, "Specify serialization library"); serializationLibrary.setEnum(supportedLibraries); @@ -149,10 +159,9 @@ public void processOpts() { supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - final String libFolder = sourceFolder + File.separator + "lib"; - supportingFiles.add(new SupportingFile("lib.mustache", libFolder, pubName + ".dart")); + supportingFiles.add(new SupportingFile("lib.mustache", libPath, pubName + ".dart")); - final String srcFolder = libFolder + File.separator + "src"; + final String srcFolder = libPath + sourceFolder; supportingFiles.add(new SupportingFile("api_client.mustache", srcFolder, "api.dart")); final String authFolder = srcFolder + File.separator + "auth"; @@ -174,6 +183,28 @@ private void configureSerializationLibrary(String srcFolder) { configureSerializationLibraryBuiltValue(srcFolder); break; } + + TemplateManagerOptions templateManagerOptions = new TemplateManagerOptions(isEnableMinimalUpdate(), isSkipOverwrite()); + TemplatePathLocator commonTemplateLocator = new CommonTemplateContentLocator(); + TemplatePathLocator generatorTemplateLocator = new GeneratorTemplateContentLocator(this); + templateManager = new TemplateManager( + templateManagerOptions, + getTemplatingEngine(), + new TemplatePathLocator[]{generatorTemplateLocator, commonTemplateLocator} + ); + + // A lambda which allows for easy includes of serialization library specific + // templates without having to change the main template files. + additionalProperties.put("includeLibraryTemplate", (Mustache.Lambda) (fragment, writer) -> { + MustacheEngineAdapter engine = ((MustacheEngineAdapter) getTemplatingEngine()); + String templateFile = "serialization/" + library + "/" + fragment.execute() + ".mustache"; + Template tmpl = engine.getCompiler() + .withLoader(name -> engine.findTemplate(templateManager, name)) + .defaultValue("") + .compile(templateManager.getFullTemplateContents(templateFile)); + + fragment.executeTemplate(tmpl, writer); + }); } private void configureSerializationLibraryBuiltValue(String srcFolder) { @@ -218,8 +249,8 @@ private void configureDateLibrary(String srcFolder) { if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library)) { typeMapping.put("date", "Date"); typeMapping.put("Date", "Date"); - importMapping.put("Date", "package:" + pubName + "/src/model/date.dart"); - supportingFiles.add(new SupportingFile("serialization/built_value/date.mustache", srcFolder + File.separator + "model", "date.dart")); + importMapping.put("Date", "package:" + pubName + "/" + sourceFolder + "/" + modelPackage() + "/date.dart"); + supportingFiles.add(new SupportingFile("serialization/built_value/date.mustache", srcFolder + File.separator + modelPackage(), "date.dart")); supportingFiles.add(new SupportingFile("serialization/built_value/date_serializer.mustache", srcFolder, "date_serializer.dart")); } break; @@ -253,14 +284,13 @@ public String toDefaultValue(Schema schema) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - List models = (List) objs.get("models"); + List models = objs.getModels(); ProcessUtils.addIndexToProperties(models, 1); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); cm.imports = rewriteImports(cm.imports, true); cm.vendorExtensions.put("x-has-vars", !cm.vars.isEmpty()); } @@ -271,7 +301,7 @@ public Map postProcessModels(Map objs) { public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library)) { - if (property.isEnum) { + if (property.isEnum && property.getComposedSchemas() == null) { // enums are generated with built_value and make use of BuiltSet model.imports.add("BuiltSet"); } @@ -294,10 +324,10 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); Set resultImports = new HashSet<>(); @@ -348,7 +378,7 @@ public Map postProcessOperationsWithModels(Map o resultImports.addAll(rewriteImports(op.imports, false)); if (op.getHasFormParams() || op.getHasQueryParams()) { - resultImports.add("package:" + pubName + "/src/api_util.dart"); + resultImports.add("package:" + pubName + "/" + sourceFolder + "/api_util.dart"); } // Generate serializer factories for response types. @@ -364,6 +394,7 @@ public Map postProcessOperationsWithModels(Map o } } + // for some reason "import" structure is changed .. objs.put("imports", resultImports.stream().sorted().collect(Collectors.toList())); return objs; @@ -402,7 +433,7 @@ private Set rewriteImports(Set originalImports, boolean isModel) } else if (importMapping().containsKey(modelImport)) { resultImports.add(importMapping().get(modelImport)); } else { - resultImports.add("package:" + pubName + "/src/model/" + underscore(modelImport) + ".dart"); + resultImports.add("package:" + pubName + "/" + sourceFolder + "/" + modelPackage() + "/" + underscore(modelImport) + ".dart"); } } return resultImports; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java deleted file mode 100644 index a767bbd33d8a..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * 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 - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.languages; - -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; - -import io.swagger.v3.oas.models.media.*; - -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.utils.ProcessUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.*; - -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class DartJaguarClientCodegen extends AbstractDartCodegen { - - private final Logger LOGGER = LoggerFactory.getLogger(DartJaguarClientCodegen.class); - - private static final String NULLABLE_FIELDS = "nullableFields"; - private static final String SERIALIZATION_FORMAT = "serialization"; - private static final String IS_FORMAT_JSON = "jsonFormat"; - private static final String IS_FORMAT_PROTO = "protoFormat"; - private static final String CLIENT_NAME = "clientName"; - - private final Set modelToIgnore = new HashSet<>(); - private final HashMap protoTypeMapping = new HashMap<>(); - - private static final String SERIALIZATION_JSON = "json"; - private static final String SERIALIZATION_PROTO = "proto"; - - private boolean nullableFields = true; - - public DartJaguarClientCodegen() { - super(); - - modelToIgnore.add("datetime"); - modelToIgnore.add("map"); - modelToIgnore.add("object"); - modelToIgnore.add("list"); - modelToIgnore.add("file"); - modelToIgnore.add("list"); - - modifyFeatureSet(features -> features - .includeDocumentationFeatures(DocumentationFeature.Readme) - .securityFeatures(EnumSet.of( - SecurityFeature.OAuth2_Implicit, - SecurityFeature.BasicAuth, - SecurityFeature.ApiKey - )) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .excludeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - .includeParameterFeatures( - ParameterFeature.Cookie - ) - .wireFormatFeatures(EnumSet.of( - WireFormatFeature.JSON, - WireFormatFeature.PROTOBUF - )) - .includeClientModificationFeatures( - ClientModificationFeature.BasePath - ) - ); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.DEPRECATED) - .build(); - - outputFolder = "generated-code/dart-jaguar"; - embeddedTemplateDir = templateDir = "dart-jaguar"; - - cliOptions.add(new CliOption(NULLABLE_FIELDS, "Is the null fields should be in the JSON payload")); - cliOptions.add(new CliOption(SERIALIZATION_FORMAT, "Choose serialization format JSON or PROTO is supported")); - - typeMapping.put("file", "List"); - typeMapping.put("binary", "List"); - - protoTypeMapping.put("Array", "repeated"); - protoTypeMapping.put("array", "repeated"); - protoTypeMapping.put("List", "repeated"); - protoTypeMapping.put("boolean", "bool"); - protoTypeMapping.put("string", "string"); - protoTypeMapping.put("char", "string"); - protoTypeMapping.put("int", "int32"); - protoTypeMapping.put("long", "int64"); - protoTypeMapping.put("short", "int32"); - protoTypeMapping.put("number", "double"); - protoTypeMapping.put("float", "float"); - protoTypeMapping.put("double", "double"); - protoTypeMapping.put("object", "google.protobuf.Any"); - protoTypeMapping.put("integer", "int32"); - protoTypeMapping.put("Date", "google.protobuf.Timestamp"); - protoTypeMapping.put("date", "google.protobuf.Timestamp"); - protoTypeMapping.put("File", "bytes"); - protoTypeMapping.put("file", "bytes"); - protoTypeMapping.put("binary", "bytes"); - protoTypeMapping.put("UUID", "string"); - protoTypeMapping.put("URI", "string"); - protoTypeMapping.put("ByteArray", "bytes"); - - } - - @Override - public String getName() { - return "dart-jaguar"; - } - - @Override - public String getHelp() { - return "Generates a Dart Jaguar client library."; - } - - @Override - public String toDefaultValue(Schema schema) { - if (ModelUtils.isMapSchema(schema)) { - return "const {}"; - } else if (ModelUtils.isArraySchema(schema)) { - return "const []"; - } - - if (schema.getDefault() != null) { - if (ModelUtils.isStringSchema(schema)) { - return "'" + schema.getDefault().toString().replaceAll("'", "\\'") + "'"; - } - return schema.getDefault().toString(); - } else { - return "null"; - } - } - - @Override - public void processOpts() { - super.processOpts(); - - if (additionalProperties.containsKey(NULLABLE_FIELDS)) { - nullableFields = convertPropertyToBooleanAndWriteBack(NULLABLE_FIELDS); - } else { - //not set, use to be passed to template - additionalProperties.put(NULLABLE_FIELDS, nullableFields); - } - - if (additionalProperties.containsKey(SERIALIZATION_FORMAT)) { - String serialization = ((String) additionalProperties.get(SERIALIZATION_FORMAT)); - boolean isProto = serialization.equalsIgnoreCase(SERIALIZATION_PROTO); - additionalProperties.put(IS_FORMAT_JSON, serialization.equalsIgnoreCase(SERIALIZATION_JSON)); - additionalProperties.put(IS_FORMAT_PROTO, isProto); - - modelTemplateFiles.put("model.mustache", isProto ? ".proto" : ".dart"); - - } else { - //not set, use to be passed to template - additionalProperties.put(IS_FORMAT_JSON, true); - additionalProperties.put(IS_FORMAT_PROTO, false); - } - - additionalProperties.put(CLIENT_NAME, org.openapitools.codegen.utils.StringUtils.camelize(pubName)); - - 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); - } - - // 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("git_push.sh.mustache", "", "git_push.sh")); - supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml")); - - final String authFolder = sourceFolder + File.separator + "lib" + File.separator + "auth"; - supportingFiles.add(new SupportingFile("auth/api_key_auth.mustache", authFolder, "api_key_auth.dart")); - supportingFiles.add(new SupportingFile("auth/basic_auth.mustache", authFolder, "basic_auth.dart")); - supportingFiles.add(new SupportingFile("auth/oauth.mustache", authFolder, "oauth.dart")); - supportingFiles.add(new SupportingFile("auth/auth.mustache", authFolder, "auth.dart")); - } - - @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 (!modelToIgnore.contains(modelImport.toLowerCase(Locale.ROOT))) { - modelImports.add(underscore(modelImport)); - } - } - - for (CodegenProperty p : cm.vars) { - String protoType = protoTypeMapping.get(p.openApiType); - if (p.isArray) { - String innerType = protoTypeMapping.get(p.mostInnerItems.openApiType); - protoType = protoType + " " + (innerType == null ? p.mostInnerItems.openApiType : innerType); - } - p.vendorExtensions.put("x-proto-type", protoType == null ? p.openApiType : protoType); - } - - cm.imports = modelImports; - boolean hasVars = cm.vars.size() > 0; - cm.vendorExtensions.put("x-has-vars", hasVars); - } - return objs; - } - - @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 = StringUtils.capitalize(op.httpMethod.toLowerCase(Locale.ROOT)); - boolean isJson = true; //default to JSON - boolean isForm = false; - boolean isProto = 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"); - isProto = type.equalsIgnoreCase("application/octet-stream"); - isForm = type.equalsIgnoreCase("application/x-www-form-urlencoded"); - isMultipart = type.equalsIgnoreCase("multipart/form-data"); - break; - } - } - } - - for (CodegenParameter param : op.allParams) { - if (param.baseType != null && param.baseType.equalsIgnoreCase("List") && isMultipart) { - param.baseType = "MultipartFile"; - param.dataType = "MultipartFile"; - } - } - for (CodegenParameter param : op.formParams) { - if (param.baseType != null && param.baseType.equalsIgnoreCase("List") && isMultipart) { - param.baseType = "MultipartFile"; - param.dataType = "MultipartFile"; - } - } - for (CodegenParameter param : op.bodyParams) { - if (param.baseType != null && param.baseType.equalsIgnoreCase("List") && isMultipart) { - param.baseType = "MultipartFile"; - param.dataType = "MultipartFile"; - } - } - - op.vendorExtensions.put("x-is-form", isForm); - op.vendorExtensions.put("x-is-json", isJson); - op.vendorExtensions.put("x-is-proto", isProto); - op.vendorExtensions.put("x-is-multipart", isMultipart); - - - Set imports = new HashSet<>(); - for (String item : op.imports) { - if (!modelToIgnore.contains(item.toLowerCase(Locale.ROOT))) { - imports.add(underscore(item)); - } - } - modelImports.addAll(imports); - op.imports = imports; - - String[] items = op.path.split("/", -1); - String jaguarPath = ""; - - for (int i = 0; i < items.length; ++i) { - if (items[i].matches("^\\{(.*)\\}$")) { // wrap in {} - jaguarPath = jaguarPath + ":" + items[i].replace("{", "").replace("}", ""); - } else { - jaguarPath = jaguarPath + items[i]; - } - - if (i != items.length - 1) { - jaguarPath = jaguarPath + "/"; - } - } - - op.path = jaguarPath; - } - - objs.put("modelImports", modelImports); - objs.put("fullImports", fullImports); - - return objs; - } -} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index e3291df86114..5ae204450b36 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -27,6 +27,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -297,9 +300,9 @@ public void preprocessOpenAPI(OpenAPI openAPI) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) super.postProcessOperationsWithModels(objs, allModels).get("operations"); - List os = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = super.postProcessOperationsWithModels(objs, allModels).getOperations(); + List os = operations.getOperation(); List newOs = new ArrayList<>(); Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}([^\\{]*)"); for (CodegenOperation o : os) { @@ -331,7 +334,7 @@ public Map postProcessOperationsWithModels(Map o newOs.add(eco); } - operations.put("operation", newOs); + operations.setOperation(newOs); 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 78241218e217..16f1a974895b 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 @@ -26,6 +26,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -270,20 +274,18 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @SuppressWarnings({"static-method", "unchecked"}) - public Map postProcessAllModels(final Map orgObjs) { - final Map objs = super.postProcessAllModels(orgObjs); + public Map postProcessAllModels(final Map orgObjs) { + final Map objs = super.postProcessAllModels(orgObjs); // put all models in one file - final Map objects = new HashMap<>(); - final Map dataObj = objs.values().stream() - .map(obj -> (Map) obj) + final Map objects = new HashMap<>(); + final ModelsMap dataObj = objs.values().stream() .findFirst() - .orElse(new HashMap<>()); - final List> models = objs.values().stream() - .map(obj -> (Map) obj) - .flatMap(obj -> ((List>) obj.get("models")).stream()) + .orElse(new ModelsMap()); + final List models = objs.values().stream() + .flatMap(obj -> obj.getModels().stream()) .flatMap(obj -> { - final CodegenModel model = (CodegenModel) obj.get("model"); + final CodegenModel model = obj.getModel(); // circular references model.vars.forEach(var -> { var.isCircularReference = model.allVars.stream() @@ -319,16 +321,16 @@ public Map postProcessAllModels(final Map orgObj final boolean includeTime = anyVarMatches(models, prop -> prop.isDate || prop.isDateTime); final boolean includeUuid = anyVarMatches(models, prop -> prop.isUuid); - dataObj.put("models", models); + dataObj.setModels(models); dataObj.put("includeTime", includeTime); dataObj.put("includeUuid", includeUuid); objects.put("Data", dataObj); return objects; } - private boolean anyVarMatches(final List> models, final Predicate predicate) { + private boolean anyVarMatches(final List models, final Predicate predicate) { return models.stream() - .map(obj -> (CodegenModel) obj.get("model")) + .map(ModelMap::getModel) .flatMap(model -> model.vars.stream()).anyMatch(var -> { CodegenProperty prop = var; while (prop != null) { @@ -342,31 +344,27 @@ private boolean anyVarMatches(final List> models, final Pred } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return postProcessModelsEnum(objs); } private static boolean anyOperationParam(final List operations, final Predicate predicate) { return operations.stream() .flatMap(operation -> operation.allParams.stream()) - .filter(predicate) - .findAny() - .isPresent(); + .anyMatch(predicate); } private static boolean anyOperationResponse(final List operations, final Predicate predicate) { return operations.stream() .flatMap(operation -> operation.responses.stream()) - .filter(predicate) - .findAny() - .isPresent(); + .anyMatch(predicate); } @Override - @SuppressWarnings({"static-method", "unchecked"}) - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); - List ops = (List) objs.get("operation"); + @SuppressWarnings("static-method") + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); + List ops = objs.getOperation(); ops.forEach(op -> { op.allParams = op.allParams.stream().sorted(new ParameterSorter()).collect(Collectors.toList()); op.responses.forEach(response -> { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index 3ba5232be169..fc6806f13169 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -22,6 +22,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.JoinWithCommaLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -308,10 +311,10 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List os = (List) operations.get("operation"); - List newOs = new ArrayList(); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List os = operations.getOperation(); + List newOs = new ArrayList<>(); Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}"); for (CodegenOperation o : os) { // force http method to lower case @@ -321,7 +324,7 @@ public Map postProcessOperationsWithModels(Map o o.returnType = "[" + o.returnBaseType + "]"; } - ArrayList pathTemplateNames = new ArrayList(); + ArrayList pathTemplateNames = new ArrayList<>(); Matcher matcher = pattern.matcher(o.path); StringBuffer buffer = new StringBuffer(); while (matcher.find()) { @@ -340,7 +343,7 @@ public Map postProcessOperationsWithModels(Map o eco.setPathTemplateNames(pathTemplateNames); newOs.add(eco); } - operations.put("operation", newOs); + operations.setOperation(newOs); return objs; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index e065ca217eea..0dc8fb5884f7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -22,6 +22,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -367,9 +370,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List os = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List os = operations.getOperation(); List newOs = new ArrayList<>(); Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}"); for (CodegenOperation o : os) { @@ -396,7 +399,7 @@ public Map postProcessOperationsWithModels(Map o } newOs.add(eco); } - operations.put("operation", newOs); + operations.setOperation(newOs); return objs; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java index 05e488e5354a..49f15cc26c38 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java @@ -19,6 +19,9 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -269,9 +272,9 @@ public String toApiFilename(String name) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { if (op.path != null) { op.path = op.path.replaceAll("\\{(.*?)\\}", ":$1"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 60872186a1ae..5558345785c7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -18,6 +18,8 @@ package org.openapitools.codegen.languages; import com.google.common.collect.Iterables; +import com.samskivert.mustache.Mustache; +import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.commons.lang3.StringUtils; @@ -25,12 +27,18 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; 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.io.IOException; +import java.io.Writer; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -245,6 +253,19 @@ public void processOpts() { .get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString())); } + // add lambda for mustache templates to handle oneOf/anyOf naming + // e.g. []string => ArrayOfString + additionalProperties.put("lambda.type-to-name", new Mustache.Lambda() { + @Override + public void execute(Template.Fragment fragment, Writer writer) throws IOException { + String content = fragment.execute(); + content = content.trim().replace("[]", "array_of_"); + content = content.trim().replace("[", "map_of_"); + content = content.trim().replace("]", ""); + writer.write(camelize(content)); + } + }); + supportingFiles.add(new SupportingFile("openapi.mustache", "api", "openapi.yaml")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); @@ -383,78 +404,72 @@ public CodegenProperty fromProperty(String name, Schema p) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // The superclass determines the list of required golang imports. The actual list of imports // depends on which types are used, some of which are changed in the code below (but then preserved // and used through x-go-base-type in templates). So super.postProcessModels // must be invoked at the beginning of this method. objs = super.postProcessModels(objs); - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); - 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) { - continue; - } + for (ModelMap m : objs.getModels()) { + CodegenModel model = m.getModel(); + if (model.isEnum) { + continue; + } - for (CodegenProperty param : Iterables.concat(model.vars, model.allVars, model.requiredVars, model.optionalVars)) { - param.vendorExtensions.put("x-go-base-type", param.dataType); - if (!param.isNullable || param.isMap || param.isArray || - param.isFreeFormObject || param.isAnyType) { - continue; - } - if (param.isDateTime) { - // Note this could have been done by adding the following line in processOpts(), - // however, we only want to represent the DateTime object as NullableTime if - // it's marked as nullable in the spec. - // typeMapping.put("DateTime", "NullableTime"); - param.dataType = "NullableTime"; - } else { - param.dataType = "Nullable" + Character.toUpperCase(param.dataType.charAt(0)) - + param.dataType.substring(1); - } + for (CodegenProperty param : Iterables.concat(model.vars, model.allVars, model.requiredVars, model.optionalVars)) { + param.vendorExtensions.put("x-go-base-type", param.dataType); + if (!param.isNullable || param.isContainer || param.isFreeFormObject + || (param.isAnyType && !param.isModel)) { + continue; } - - // additional import for different cases - // oneOf - if (model.oneOf != null && !model.oneOf.isEmpty()) { - imports.add(createMapping("import", "fmt")); + if (param.isDateTime) { + // Note this could have been done by adding the following line in processOpts(), + // however, we only want to represent the DateTime object as NullableTime if + // it's marked as nullable in the spec. + // typeMapping.put("DateTime", "NullableTime"); + param.dataType = "NullableTime"; + } else { + param.dataType = "Nullable" + Character.toUpperCase(param.dataType.charAt(0)) + + param.dataType.substring(1); } + } - // anyOf - if (model.anyOf != null && !model.anyOf.isEmpty()) { - imports.add(createMapping("import", "fmt")); - } + // additional import for different cases + // oneOf + if (model.oneOf != null && !model.oneOf.isEmpty()) { + imports.add(createMapping("import", "fmt")); + } - // additionalProperties: true and parent - if (model.isAdditionalPropertiesTrue && model.parent != null && Boolean.FALSE.equals(model.isMap)) { - imports.add(createMapping("import", "reflect")); - imports.add(createMapping("import", "strings")); - } + // anyOf + if (model.anyOf != null && !model.anyOf.isEmpty()) { + imports.add(createMapping("import", "fmt")); + } + // additionalProperties: true and parent + if (model.isAdditionalPropertiesTrue && model.parent != null && Boolean.FALSE.equals(model.isMap)) { + imports.add(createMapping("import", "reflect")); + imports.add(createMapping("import", "strings")); } } return objs; } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - HashMap modelMaps = new HashMap(); - HashMap processedModelMaps = new HashMap(); + OperationMap operations = objs.getOperations(); + HashMap modelMaps = new HashMap<>(); + HashMap> processedModelMaps = new HashMap<>(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + for (ModelMap modelMap : allModels) { + CodegenModel m = modelMap.getModel(); modelMaps.put(m.classname, m); } - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { for (CodegenParameter p : op.allParams) { p.vendorExtensions.put("x-go-example", constructExampleCode(p, modelMaps, processedModelMaps)); @@ -475,21 +490,24 @@ public Map postProcessOperationsWithModels(Map o return objs; } - private String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps, HashMap processedModelMap) { + private String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps, HashMap> processedModelMap) { if (codegenParameter.isArray) { // array String prefix = codegenParameter.dataType; String dataType = StringUtils.removeStart(codegenParameter.dataType, "[]"); if (modelMaps.containsKey(dataType)) { prefix = "[]" + goImportAlias + "." + dataType; } - return prefix + "{" + constructExampleCode(codegenParameter.items, modelMaps, processedModelMap) + "}"; + return prefix + "{" + constructExampleCode(codegenParameter.items, modelMaps, processedModelMap, 0) + "}"; } else if (codegenParameter.isMap) { String prefix = codegenParameter.dataType; String dataType = StringUtils.removeStart(codegenParameter.dataType, "map[string][]"); if (modelMaps.containsKey(dataType)) { prefix = "map[string][]" + goImportAlias + "." + dataType; } - return prefix + "{\"key\": " + constructExampleCode(codegenParameter.items, modelMaps, processedModelMap) + "}"; + if (codegenParameter.items == null) { + return prefix + "{ ... }"; + } + return prefix + "{\"key\": " + constructExampleCode(codegenParameter.items, modelMaps, processedModelMap, 0) + "}"; } else if (codegenParameter.isPrimitiveType) { // primitive type if (codegenParameter.isString) { if (!StringUtils.isEmpty(codegenParameter.example) && !"null".equals(codegenParameter.example)) { @@ -506,7 +524,9 @@ private String constructExampleCode(CodegenParameter codegenParameter, HashMap v = new ArrayList<>(); + v.add(1); + processedModelMap.put("time.Time", v); return "time.Now()"; } else if (codegenParameter.isFile) { return "os.NewFile(1234, \"some_file\")"; @@ -520,7 +540,7 @@ private String constructExampleCode(CodegenParameter codegenParameter, HashMap v = new ArrayList<>(); + v.add(1); + processedModelMap.put("time.Time", v); return "time.Now()"; } else { //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenParameter.dataType); @@ -537,7 +559,7 @@ private String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps, HashMap processedModelMap) { + private String constructExampleCode(CodegenProperty codegenProperty, HashMap modelMaps, HashMap> processedModelMap, int depth) { if (codegenProperty.isArray) { // array String prefix = codegenProperty.dataType; String dataType = StringUtils.removeStart(codegenProperty.dataType, "[]"); @@ -548,7 +570,7 @@ private String constructExampleCode(CodegenProperty codegenProperty, HashMap v = new ArrayList<>(); + v.add(1); + processedModelMap.put("time.Time", v); return "time.Now()"; } else { // numeric String example; @@ -590,7 +614,7 @@ private String constructExampleCode(CodegenProperty codegenProperty, HashMap v = new ArrayList<>(); + v.add(1); + processedModelMap.put("time.Time", v); return "time.Now()"; } else { //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenProperty.dataType); @@ -607,17 +633,20 @@ private String constructExampleCode(CodegenProperty codegenProperty, HashMap modelMaps, HashMap processedModelMap) { + private String constructExampleCode(CodegenModel codegenModel, HashMap modelMaps, HashMap> processedModelMap, int depth) { // break infinite recursion. Return, in case a model is already processed in the current context. String model = codegenModel.name; if (processedModelMap.containsKey(model)) { - int count = processedModelMap.get(model); - if (count == 1) { - processedModelMap.put(model, 2); - } else if (count == 2) { + ArrayList depthList = processedModelMap.get(model); + if (depthList.size() == 1) { + if (depthList.get(0) != depth) { + depthList.add(depth); + processedModelMap.put(model, depthList); + } + } else if (depthList.size() == 2) { return ""; } else { - throw new RuntimeException("Invalid count when constructing example: " + count); + throw new RuntimeException("Invalid count when constructing example: " + depthList.size()); } } else if (codegenModel.isEnum) { Map allowableValues = codegenModel.allowableValues; @@ -629,15 +658,17 @@ private String constructExampleCode(CodegenModel codegenModel, HashMap v = new ArrayList<>(); + v.add(depth); + processedModelMap.put(model, v); } List propertyExamples = new ArrayList<>(); for (CodegenProperty codegenProperty : codegenModel.requiredVars) { - propertyExamples.add(constructExampleCode(codegenProperty, modelMaps, processedModelMap)); + propertyExamples.add(constructExampleCode(codegenProperty, modelMaps, processedModelMap, depth+1)); } return "*" + goImportAlias + ".New" + toModelName(model) + "(" + StringUtils.join(propertyExamples, ", ") + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoEchoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoEchoServerCodegen.java index 2089bd15bf33..ed1f4ca40e30 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoEchoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoEchoServerCodegen.java @@ -20,6 +20,9 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.util.Arrays; @@ -106,11 +109,11 @@ public GoEchoServerCodegen() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { if (op.path != null) { op.path = op.path.replaceAll("\\{(.*?)\\}", ":$1"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java index 857bfa2a45b9..ec3ca3ad75f1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java @@ -22,6 +22,9 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -121,11 +124,11 @@ public GoGinServerCodegen() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { if (op.path != null) { op.path = op.path.replaceAll("\\{(.*?)\\}", ":$1"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index a8a98fac36d5..2a8acd9c23ca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -21,6 +21,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,6 +56,8 @@ public class GoServerCodegen extends AbstractGoCodegen { protected String sourceFolder = "go"; protected Boolean corsFeatureEnabled = false; protected Boolean addResponseHeaders = false; + protected Boolean outputAsLibrary = false; + protected Boolean onlyInterfaces = false; public GoServerCodegen() { @@ -109,6 +114,18 @@ public GoServerCodegen() { optAddResponseHeaders.defaultValue(addResponseHeaders.toString()); cliOptions.add(optAddResponseHeaders); + + // option to exclude service factories; only interfaces are rendered + CliOption optOnlyInterfaces = new CliOption("onlyInterfaces", "Exclude default service creators from output; only generate interfaces"); + optOnlyInterfaces.setType("bool"); + optOnlyInterfaces.defaultValue(onlyInterfaces.toString()); + cliOptions.add(optOnlyInterfaces); + + // option to exclude main package (main.go), Dockerfile, and go.mod files + CliOption optOutputAsLibrary = new CliOption("outputAsLibrary", "Exclude main.go, go.mod, and Dockerfile from output"); + optOutputAsLibrary.setType("bool"); + optOutputAsLibrary.defaultValue(outputAsLibrary.toString()); + cliOptions.add(optOutputAsLibrary); /* * Models. You can write model files using the modelTemplateFiles map. * if you want to create one template for file, you can do so here. @@ -214,6 +231,22 @@ public void processOpts() { additionalProperties.put("addResponseHeaders", addResponseHeaders); } + if (additionalProperties.containsKey("onlyInterfaces")) { + this.setOnlyInterfaces(convertPropertyToBooleanAndWriteBack("onlyInterfaces")); + } else { + additionalProperties.put("onlyInterfaces", onlyInterfaces); + } + + if (this.onlyInterfaces) { + apiTemplateFiles.remove("service.mustache"); + } + + if (additionalProperties.containsKey("outputAsLibrary")) { + this.setOutputAsLibrary(convertPropertyToBooleanAndWriteBack("outputAsLibrary")); + } else { + additionalProperties.put("outputAsLibrary", outputAsLibrary); + } + if (additionalProperties.containsKey(CodegenConstants.ENUM_CLASS_PREFIX)) { setEnumClassPrefix(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.ENUM_CLASS_PREFIX).toString())); if (enumClassPrefix) { @@ -238,10 +271,12 @@ public void processOpts() { * entire object tree available. If the input file has a suffix of `.mustache * it will be processed by the template engine. Otherwise, it will be copied */ + if (!outputAsLibrary) { + supportingFiles.add(new SupportingFile("main.mustache", "", "main.go")); + supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile")); + supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod")); + } supportingFiles.add(new SupportingFile("openapi.mustache", "api", "openapi.yaml")); - supportingFiles.add(new SupportingFile("main.mustache", "", "main.go")); - supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile")); - supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod")); supportingFiles.add(new SupportingFile("routers.mustache", sourceFolder, "routers.go")); supportingFiles.add(new SupportingFile("logger.mustache", sourceFolder, "logger.go")); supportingFiles.add(new SupportingFile("impl.mustache", sourceFolder, "impl.go")); @@ -253,14 +288,12 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); if (imports == null) return objs; @@ -363,6 +396,14 @@ public void setAddResponseHeaders(Boolean addResponseHeaders) { this.addResponseHeaders = addResponseHeaders; } + public void setOnlyInterfaces(Boolean onlyInterfaces) { + this.onlyInterfaces = onlyInterfaces; + } + + public void setOutputAsLibrary(Boolean outputAsLibrary) { + this.outputAsLibrary = outputAsLibrary; + } + @Override protected void updateModelForObject(CodegenModel m, Schema schema) { /** diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java index c12ce8393750..5bbb1819a547 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java @@ -32,6 +32,9 @@ import org.openapitools.codegen.meta.features.SchemaSupportFeature; import org.openapitools.codegen.meta.features.SecurityFeature; import org.openapitools.codegen.meta.features.WireFormatFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; public class GroovyClientCodegen extends AbstractJavaCodegen { @@ -125,9 +128,9 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); - List ops = (List) objs.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); + List ops = objs.getOperation(); for (CodegenOperation op : ops) { // Overwrite path to map variable with path parameters op.path = op.path.replace("{", "${"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 3f7845bfa7c3..f728c766517f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -23,11 +23,15 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.commons.io.FilenameUtils; -import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; +import org.apache.commons.text.StringEscapeUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -777,7 +781,7 @@ public List fromSecurity(Map schemes) { } @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { updateGlobalAdditionalProps(); return super.postProcessAllModels(objs); } @@ -807,26 +811,25 @@ public int compare(Map o1, Map o2) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map ret = super.postProcessOperationsWithModels(objs, allModels); - HashMap pathOps = (HashMap) ret.get("operations"); - ArrayList ops = (ArrayList) pathOps.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationsMap ret = super.postProcessOperationsWithModels(objs, allModels); + OperationMap pathOps = ret.getOperations(); + List ops = pathOps.getOperation(); if (ops.size() > 0) { ops.get(0).vendorExtensions.put(VENDOR_EXTENSION_X_HAS_NEW_TAG, true); } updateGlobalAdditionalProps(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + for (ModelMap modelMap : allModels) { + CodegenModel m = modelMap.getModel(); if (modelMimeTypes.containsKey(m.classname)) { Set mimeTypes = modelMimeTypes.get(m.classname); m.vendorExtensions.put(VENDOR_EXTENSION_X_MIME_TYPES, mimeTypes); if ((boolean) additionalProperties.get(PROP_GENERATE_FORM_URLENCODED_INSTANCES) && mimeTypes.contains("MimeFormUrlEncoded")) { - Boolean hasMimeFormUrlEncoded = true; + boolean hasMimeFormUrlEncoded = true; for (CodegenProperty v : m.vars) { if (!(v.isPrimitiveType || v.isString || v.isDate || v.isDateTime)) { hasMimeFormUrlEncoded = false; @@ -1269,12 +1272,9 @@ public String toDefaultValue(Schema p) { } @Override - public Map postProcessModels(Map objs) { - List models = (List) objs.get("models"); - - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + public ModelsMap postProcessModels(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); cm.isEnum = genEnums && cm.isEnum; if (cm.isAlias) { String dataType = cm.dataType; @@ -1302,13 +1302,11 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessModelsEnum(Map objs) { - Map objsEnum = super.postProcessModelsEnum(objs); + public ModelsMap postProcessModelsEnum(ModelsMap objs) { + ModelsMap objsEnum = super.postProcessModelsEnum(objs); if (genEnums) { - List models = (List) objsEnum.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objsEnum.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.isEnum && cm.allowableValues != null) { updateAllowableValuesNames(cm.classname, cm.allowableValues); addEnumToUniques(cm.classname, cm.dataType, cm.allowableValues.values().toString(), cm.allowableValues, cm.description); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java index a47161d84603..a45e743b8f98 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java @@ -23,6 +23,8 @@ import org.openapitools.codegen.languages.features.GzipTestFeatures; import org.openapitools.codegen.languages.features.LoggingTestFeatures; import org.openapitools.codegen.languages.features.UseGenericResponseFeatures; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -165,7 +167,7 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); return AbstractJavaJAXRSServerCodegen.jaxrsPostProcessOperations(objs); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java index 82dbc6a26ed7..54e4445cfd3d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java @@ -27,7 +27,7 @@ import java.text.SimpleDateFormat; import java.util.*; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenModel; @@ -36,6 +36,10 @@ import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.languages.features.CXFExtServerFeatures; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.JsonCache; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.JsonCache.CacheException; @@ -1118,18 +1122,14 @@ private String patternFor(CodegenVariable var) { } @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); // When populating operation bodies we need to import enum types, which requires the class that defines them. if (generateOperationBody) { - for (Object value : objs.values()) { - @SuppressWarnings("unchecked") - Map inner = (Map) value; - @SuppressWarnings("unchecked") - List> models = (List>) inner.get("models"); - for (Map mo : models) - postProcessModel((CodegenModel) mo.get("model")); + for (ModelsMap value : objs.values()) { + for (ModelMap mo : value.getModels()) + postProcessModel(mo.getModel()); } } @@ -1163,29 +1163,27 @@ private void postProcessModel(CodegenModel cm) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map result = super.postProcessOperationsWithModels(objs, allModels); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationsMap result = super.postProcessOperationsWithModels(objs, allModels); if (generateOperationBody) { // We generate the operation body in code because the logic to do so is far too complicated to be expressed // in the logic-less Mustache templating system. @SuppressWarnings("unchecked") - Map operations = (Map) result.get("operations"); + OperationMap operations = result.getOperations(); if (operations != null) { - String classname = (String) operations.get("classname"); + String classname = operations.getClassname(); // Map the models so we can look them up by name. Map models = new HashMap<>(); - for (Object model : allModels) { - @SuppressWarnings("unchecked") - CodegenModel cgModel = ((Map) model).get("model"); + for (ModelMap model : allModels) { + CodegenModel cgModel = model.getModel(); models.put(cgModel.classname, cgModel); } StringBuilder buffer = new StringBuilder(); - @SuppressWarnings("unchecked") - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation op : ops) { applyDefaultContentTypes(op); String testDataPath = '/' + classname + '/' + op.operationId; @@ -1249,16 +1247,16 @@ else if (!hasCacheMethod(var)) // did not include the ones we've just added to support the code in the operation bodies. Therefore it // is necessary to recompute the imports and overwrite the existing ones. The code below was copied from // the private DefaultGenerator.processOperations() method to achieve this end. - Set allImports = new TreeSet(); + Set allImports = new TreeSet<>(); for (CodegenOperation op : ops) { allImports.addAll(op.imports); } allImports.add("List"); allImports.add("Map"); - List> imports = new ArrayList>(); + List> imports = new ArrayList<>(); for (String nextImport : allImports) { - Map im = new LinkedHashMap(); + Map im = new LinkedHashMap<>(); String mapping = importMapping().get(nextImport); if (mapping == null) { mapping = toModelImport(nextImport); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index faefb758d5f8..9154e7ad9328 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -27,6 +27,10 @@ import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.meta.features.GlobalFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.CaseFormatLambda; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -74,6 +78,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen public static final String GOOGLE_API_CLIENT = "google-api-client"; public static final String JERSEY1 = "jersey1"; public static final String JERSEY2 = "jersey2"; + public static final String JERSEY3 = "jersey3"; public static final String NATIVE = "native"; public static final String OKHTTP_GSON = "okhttp-gson"; public static final String RESTEASY = "resteasy"; @@ -84,6 +89,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen public static final String VERTX = "vertx"; public static final String MICROPROFILE = "microprofile"; public static final String APACHE = "apache-httpclient"; + public static final String MICROPROFILE_REST_CLIENT_VERSION = "microprofileRestClientVersion"; + public static final String MICROPROFILE_REST_CLIENT_DEFAULT_VERSION = "2.0"; + public static final String MICROPROFILE_REST_CLIENT_DEFAULT_ROOT_PACKAGE = "javax"; public static final String SERIALIZATION_LIBRARY_GSON = "gson"; public static final String SERIALIZATION_LIBRARY_JACKSON = "jackson"; @@ -117,6 +125,18 @@ public class JavaClientCodegen extends AbstractJavaCodegen protected String authFolder; protected String serializationLibrary = null; protected boolean useOneOfDiscriminatorLookup = false; // use oneOf discriminator's mapping for model lookup + protected String rootJavaEEPackage; + protected Map mpRestClientVersions = new HashMap<>(); + + private static class MpRestClientVersion { + public final String rootPackage; + public final String pomTemplate; + + public MpRestClientVersion(String rootPackage, String pomTemplate) { + this.rootPackage = rootPackage; + this.pomTemplate = pomTemplate; + } + } public JavaClientCodegen() { super(); @@ -133,6 +153,7 @@ public JavaClientCodegen() { artifactId = "openapi-java-client"; apiPackage = "org.openapitools.client.api"; modelPackage = "org.openapitools.client.model"; + rootJavaEEPackage = MICROPROFILE_REST_CLIENT_DEFAULT_ROOT_PACKAGE; // cliOptions default redefinition need to be updated updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); @@ -160,10 +181,12 @@ public JavaClientCodegen() { cliOptions.add(CliOption.newString(GRADLE_PROPERTIES, "Append additional Gradle properties to the gradle.properties file")); cliOptions.add(CliOption.newString(ERROR_OBJECT_TYPE, "Error Object type. (This option is for okhttp-gson-next-gen only)")); cliOptions.add(CliOption.newString(CONFIG_KEY, "Config key in @RegisterRestClient. Default to none. Only `microprofile` supports this option.")); - cliOptions.add(CliOption.newBoolean(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC + " Only jersey2, native, okhttp-gson support this option.")); + cliOptions.add(CliOption.newBoolean(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC + " Only jersey2, jersey3, native, okhttp-gson support this option.")); + cliOptions.add(CliOption.newString(MICROPROFILE_REST_CLIENT_VERSION, "Version of MicroProfile Rest Client API.")); - supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libraries instead."); + supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead."); supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x"); + supportedLibraries.put(JERSEY3, "HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x"); supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x."); supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'."); supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)"); @@ -197,6 +220,13 @@ public JavaClientCodegen() { // and the discriminator mapping schemas in the OAS document. this.setLegacyDiscriminatorBehavior(false); + initMpRestClientVersionToRootPackage(); + } + + private void initMpRestClientVersionToRootPackage() { + mpRestClientVersions.put("1.4.1", new MpRestClientVersion("javax", "pom.mustache")); + mpRestClientVersions.put("2.0", new MpRestClientVersion("javax", "pom.mustache")); + mpRestClientVersions.put("3.0", new MpRestClientVersion("jakarta", "pom_3.0.mustache")); } @Override @@ -274,6 +304,28 @@ public void processOpts() { } additionalProperties.put(MICROPROFILE_FRAMEWORK, microprofileFramework); + if (!additionalProperties.containsKey(MICROPROFILE_REST_CLIENT_VERSION)) { + additionalProperties.put(MICROPROFILE_REST_CLIENT_VERSION, MICROPROFILE_REST_CLIENT_DEFAULT_VERSION); + } else { + String mpRestClientVersion = (String) additionalProperties.get(MICROPROFILE_REST_CLIENT_VERSION); + if (!mpRestClientVersions.containsKey(mpRestClientVersion)) { + throw new IllegalArgumentException( + String.format(Locale.ROOT, + "Version %s of MicroProfile Rest Client is not supported or incorrect. Supported versions are %s", + mpRestClientVersion, + String.join(", ", mpRestClientVersions.keySet()) + ) + ); + } + } + if (!additionalProperties.containsKey("rootJavaEEPackage")) { + String mpRestClientVersion = (String) additionalProperties.get(MICROPROFILE_REST_CLIENT_VERSION); + if (mpRestClientVersions.containsKey(mpRestClientVersion)) { + rootJavaEEPackage = mpRestClientVersions.get(mpRestClientVersion).rootPackage; + } + additionalProperties.put("rootJavaEEPackage", rootJavaEEPackage); + } + if (additionalProperties.containsKey(CONFIG_KEY)) { this.setConfigKey(additionalProperties.get(CONFIG_KEY).toString()); } @@ -367,7 +419,7 @@ public void processOpts() { } // helper for client library that allow to parse/format java.time.OffsetDateTime or org.threeten.bp.OffsetDateTime - if (additionalProperties.containsKey("jsr310") && (isLibrary(WEBCLIENT) || isLibrary(VERTX) || isLibrary(RESTTEMPLATE) || isLibrary(RESTEASY) || isLibrary(MICROPROFILE) || isLibrary(JERSEY1) || isLibrary(JERSEY2) || isLibrary(APACHE))) { + if (additionalProperties.containsKey("jsr310") && (isLibrary(WEBCLIENT) || isLibrary(VERTX) || isLibrary(RESTTEMPLATE) || isLibrary(RESTEASY) || isLibrary(MICROPROFILE) || isLibrary(JERSEY1) || isLibrary(JERSEY2) || isLibrary(JERSEY3) || isLibrary(APACHE))) { supportingFiles.add(new SupportingFile("JavaTimeFormatter.mustache", invokerFolder, "JavaTimeFormatter.java")); } @@ -444,6 +496,14 @@ public void processOpts() { //supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java")); //supportingFiles.add(new SupportingFile("auth/RetryingOAuth.mustache", authFolder, "RetryingOAuth.java")); forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON); + + // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. + // In principle, this should be enabled by default for all code generators. However due to limitations + // in other code generators, support needs to be enabled on a case-by-case basis. + // The flag below should be set for all Java libraries, but the templates need to be ported + // one by one for each library. + supportsAdditionalPropertiesWithComposedSchema = true; + } else if (RETROFIT_2.equals(getLibrary())) { supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java")); supportingFiles.add(new SupportingFile("CollectionFormats.mustache", invokerFolder, "CollectionFormats.java")); @@ -468,6 +528,23 @@ public void processOpts() { // one by one for each library. supportsAdditionalPropertiesWithComposedSchema = true; + } else if (JERSEY3.equals(getLibrary())) { + additionalProperties.put("jersey3", true); + supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); + supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java")); + if (ProcessUtils.hasHttpSignatureMethods(openAPI)) { + supportingFiles.add(new SupportingFile("auth/HttpSignatureAuth.mustache", authFolder, "HttpSignatureAuth.java")); + } + supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", modelsFolder, "AbstractOpenApiSchema.java")); + forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); + + // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. + // In principle, this should be enabled by default for all code generators. However due to limitations + // in other code generators, support needs to be enabled on a case-by-case basis. + // The flag below should be set for all Java libraries, but the templates need to be ported + // one by one for each library. + supportsAdditionalPropertiesWithComposedSchema = true; + } else if (NATIVE.equals(getLibrary())) { supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java")); supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); @@ -511,7 +588,9 @@ public void processOpts() { } else if (MICROPROFILE.equals(getLibrary())) { supportingFiles.clear(); // Don't need extra files provided by Java Codegen String apiExceptionFolder = (sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); - supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")); + String mpRestClientVersion = (String) additionalProperties.get(MICROPROFILE_REST_CLIENT_VERSION); + String pomTemplate = mpRestClientVersions.get(mpRestClientVersion).pomTemplate; + supportingFiles.add(new SupportingFile(pomTemplate, "", "pom.xml")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("api_exception.mustache", apiExceptionFolder, "ApiException.java")); supportingFiles.add(new SupportingFile("api_exception_mapper.mustache", apiExceptionFolder, "ApiExceptionMapper.java")); @@ -522,6 +601,10 @@ public void processOpts() { supportingFiles.add(new SupportingFile("kumuluzee.config.yaml.mustache", "src/main/resources", "config.yaml")); supportingFiles.add(new SupportingFile("kumuluzee.beans.xml.mustache", "src/main/resources/META-INF", "beans.xml")); } + + if ("3.0".equals(mpRestClientVersion)) { + additionalProperties.put("microprofile3", true); + } } else if (APACHE.equals(getLibrary())) { forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); } else { @@ -606,14 +689,13 @@ public void processOpts() { } } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); if (RETROFIT_2.equals(getLibrary())) { - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (operation.hasConsumes == Boolean.TRUE) { @@ -651,8 +733,8 @@ public int compare(CodegenParameter one, CodegenParameter another) { // camelize path variables for Feign client if (FEIGN.equals(getLibrary())) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); Pattern methodPattern = Pattern.compile("^(.*):([^:]*)$"); for (CodegenOperation op : operationList) { String path = op.path; @@ -797,15 +879,13 @@ public CodegenModel fromModel(String name, Schema model) { } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Needed import for Gson based libraries if (additionalProperties.containsKey(SERIALIZATION_LIBRARY_GSON)) { - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("SerializedName")); @@ -820,15 +900,14 @@ public Map postProcessModelsEnum(Map objs) { @SuppressWarnings("unchecked") @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - List models = (List) objs.get("models"); + List models = objs.getModels(); if (additionalProperties.containsKey(SERIALIZATION_LIBRARY_JACKSON) && !JERSEY1.equals(getLibrary())) { - List> imports = (List>) objs.get("imports"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); boolean addImports = false; for (CodegenProperty var : cm.vars) { @@ -855,10 +934,10 @@ public Map postProcessModels(Map objs) { // add import for Set, HashSet cm.imports.add("Set"); - Map importsSet = new HashMap(); + Map importsSet = new HashMap<>(); importsSet.put("import", "java.util.Set"); imports.add(importsSet); - Map importsHashSet = new HashMap(); + Map importsHashSet = new HashMap<>(); importsHashSet.put("import", "java.util.HashSet"); imports.add(importsHashSet); } @@ -872,7 +951,7 @@ public Map postProcessModels(Map objs) { imports2Classnames.put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore"); for (Map.Entry entry : imports2Classnames.entrySet()) { cm.imports.add(entry.getKey()); - Map importsItem = new HashMap(); + Map importsItem = new HashMap<>(); importsItem.put("import", entry.getValue()); imports.add(importsItem); } @@ -881,12 +960,11 @@ public Map postProcessModels(Map objs) { } // add implements for serializable/parcelable to all models - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); cm.getVendorExtensions().putIfAbsent("x-implements", new ArrayList()); - if (JERSEY2.equals(getLibrary()) || NATIVE.equals(getLibrary()) || OKHTTP_GSON.equals(getLibrary())) { + if (JERSEY2.equals(getLibrary()) || JERSEY3.equals(getLibrary()) || NATIVE.equals(getLibrary()) || OKHTTP_GSON.equals(getLibrary())) { cm.getVendorExtensions().put("x-implements", new ArrayList()); if (cm.oneOf != null && !cm.oneOf.isEmpty() && cm.oneOf.contains("ModelNull")) { @@ -904,9 +982,6 @@ public Map postProcessModels(Map objs) { if (this.parcelableModel) { ((ArrayList) cm.getVendorExtensions().get("x-implements")).add("Parcelable"); } - if (this.serializableModel) { - ((ArrayList) cm.getVendorExtensions().get("x-implements")).add("Serializable"); - } } return objs; @@ -1054,7 +1129,7 @@ public String toApiVarName(String name) { @Override public void addImportsToOneOfInterface(List> imports) { - for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo")) { + for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo", "JsonIgnoreProperties")) { Map oneImport = new HashMap<>(); oneImport.put("import", importMapping.get(i)); if (!imports.contains(oneImport)) { @@ -1062,4 +1137,11 @@ public void addImportsToOneOfInterface(List> imports) { } } } + + @Override + public List getSupportedVendorExtensions() { + List extensions = super.getSupportedVendorExtensions(); + extensions.add(VendorExtension.X_WEBCLIENT_BLOCKING); + return extensions; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java index 5bc602fc9aa5..471fb2a14cca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java @@ -23,6 +23,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -128,7 +132,7 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera } List opList = operations.get(basePath); if (opList == null) { - opList = new ArrayList(); + opList = new ArrayList<>(); operations.put(basePath, opList); } opList.add(co); @@ -136,10 +140,10 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (operation.returnType == null) { operation.returnType = "Void"; @@ -185,19 +189,17 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); - Map item = new HashMap(); + Map item = new HashMap<>(); item.put("import", importMapping.get("JsonValue")); imports.add(item); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java index 57ad135e867f..9f92940ae97a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java @@ -21,6 +21,8 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import java.util.*; @@ -133,15 +135,13 @@ public void processOpts() { @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java index be13c533ebd8..80aebea562e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java @@ -21,6 +21,8 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import java.util.HashMap; import java.util.List; @@ -121,15 +123,13 @@ public void processOpts() { } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java index 68b194ce4b15..6ef455d894fc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java @@ -3,15 +3,20 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.languages.features.OptionalFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.meta.features.SecurityFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.util.*; import java.util.stream.Collectors; import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE; -public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures { +public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, OptionalFeatures { public static final String OPT_TITLE = "title"; public static final String OPT_BUILD = "build"; public static final String OPT_BUILD_GRADLE = "gradle"; @@ -23,9 +28,14 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i public static final String OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR = "requiredPropertiesInConstructor"; public static final String OPT_MICRONAUT_VERSION = "micronautVersion"; public static final String OPT_USE_AUTH = "useAuth"; + public static final String OPT_DATE_LIBRARY_JAVA8 = "java8"; + public static final String OPT_DATE_LIBRARY_JAVA8_LOCAL_DATETIME = "java8-localdatetime"; + public static final String OPT_DATE_FORMAT = "dateFormat"; + public static final String OPT_DATETIME_FORMAT = "datetimeFormat"; protected String title; protected boolean useBeanValidation; + protected boolean useOptional; protected String buildTool; protected String testTool; protected boolean requiredPropertiesInConstructor = true; @@ -35,12 +45,16 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i public static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; public static final String CONTENT_TYPE_MULTIPART_FORM_DATA = "multipart/form-data"; public static final String CONTENT_TYPE_ANY = "*/*"; + public static final String DATE_FORMAT = "yyyy-MM-dd"; + public static final String DATETIME_FORMAT = DATE_FORMAT + "'T'HH:mm:ss.SSS"; + public static final String OFFSET_DATETIME_FORMAT = DATETIME_FORMAT + "XXXX"; public JavaMicronautAbstractCodegen() { super(); // Set all the fields useBeanValidation = true; + useOptional = false; buildTool = OPT_BUILD_ALL; testTool = OPT_TEST_JUNIT; outputFolder = "generated-code/java-micronaut-client"; @@ -52,6 +66,7 @@ public JavaMicronautAbstractCodegen() { embeddedTemplateDir = templateDir = "java-micronaut"; apiDocPath = "docs/apis"; modelDocPath = "docs/models"; + dateLibrary = OPT_DATE_LIBRARY_JAVA8; // Set implemented features for user information modifyFeatureSet(features -> features @@ -83,6 +98,7 @@ public JavaMicronautAbstractCodegen() { cliOptions.add(new CliOption(OPT_TITLE, "Client service name").defaultValue(title)); cliOptions.add(new CliOption(OPT_MICRONAUT_VERSION, "Micronaut version, only >=3.0.0 versions are supported").defaultValue(micronautVersion)); cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation)); + cliOptions.add(CliOption.newBoolean(USE_OPTIONAL, "Use Optional container for optional parameters", useOptional)); cliOptions.add(CliOption.newBoolean(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "Allow only to create models with all the required properties provided in constructor", requiredPropertiesInConstructor)); CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool); @@ -100,9 +116,16 @@ public JavaMicronautAbstractCodegen() { testToolOption.setEnum(testToolOptionMap); cliOptions.add(testToolOption); - // Remove the date library option - cliOptions.stream().filter(o -> o.getOpt().equals("dateLibrary")).findFirst() - .ifPresent(v -> cliOptions.remove(v)); + cliOptions.add(new CliOption(OPT_DATE_FORMAT, "Specify the format pattern of date as a string")); + cliOptions.add(new CliOption(OPT_DATETIME_FORMAT, "Specify the format pattern of date-time as a string")); + + // Modify the DATE_LIBRARY option to only have supported values + cliOptions.stream().filter(o -> o.getOpt().equals(DATE_LIBRARY)).findFirst().ifPresent(opt -> { + Map valuesEnum = new HashMap<>(); + valuesEnum.put(OPT_DATE_LIBRARY_JAVA8, opt.getEnum().get(OPT_DATE_LIBRARY_JAVA8)); + valuesEnum.put(OPT_DATE_LIBRARY_JAVA8_LOCAL_DATETIME, opt.getEnum().get(OPT_DATE_LIBRARY_JAVA8_LOCAL_DATETIME)); + opt.setEnum(valuesEnum); + }); // Add reserved words String[] reservedWordsArray = { @@ -139,6 +162,11 @@ public void processOpts() { } writePropertyBack(USE_BEANVALIDATION, useBeanValidation); + if (additionalProperties.containsKey(USE_OPTIONAL)) { + this.setUseOptional(convertPropertyToBoolean(USE_OPTIONAL)); + } + writePropertyBack(USE_OPTIONAL, useOptional); + if (additionalProperties.containsKey(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR)) { this.requiredPropertiesInConstructor = convertPropertyToBoolean(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR); } @@ -209,11 +237,20 @@ public void processOpts() { // Git files supportingFiles.add(new SupportingFile("common/configuration/git/gitignore.mustache", "", ".gitignore").doNotOverwrite()); - // Use the default java LocalDate - typeMapping.put("date", "LocalDate"); - typeMapping.put("DateTime", "LocalDateTime"); - importMapping.put("LocalDate", "java.time.LocalDate"); - importMapping.put("LocalDateTime", "java.time.LocalDateTime"); + // Use the default java time + additionalProperties.putIfAbsent(OPT_DATE_FORMAT, DATE_FORMAT); + if (dateLibrary.equals(OPT_DATE_LIBRARY_JAVA8)) { + typeMapping.put("DateTime", "OffsetDateTime"); + typeMapping.put("date", "LocalDate"); + additionalProperties.putIfAbsent(OPT_DATETIME_FORMAT, OFFSET_DATETIME_FORMAT); + } else if (dateLibrary.equals(OPT_DATE_LIBRARY_JAVA8_LOCAL_DATETIME)) { + typeMapping.put("DateTime", "LocalDateTime"); + typeMapping.put("date", "LocalDate"); + additionalProperties.putIfAbsent(OPT_DATETIME_FORMAT, DATETIME_FORMAT); + } + importMapping.putIfAbsent("LocalDateTime", "java.time.LocalDateTime"); + importMapping.putIfAbsent("OffsetDateTime", "java.time.OffsetDateTime"); + importMapping.putIfAbsent("LocalDate", "java.time.LocalDate"); // Add documentation files modelDocTemplateFiles.clear(); @@ -278,6 +315,11 @@ public void setUseBeanValidation(boolean useBeanValidation) { this.useBeanValidation = useBeanValidation; } + @Override + public void setUseOptional(boolean useOptional) { + this.useOptional = useOptional; + } + @Override public String toApiVarName(String name) { String apiVarName = super.toApiVarName(name); @@ -291,15 +333,19 @@ public boolean isUseBeanValidation() { return useBeanValidation; } + public boolean isUseOptional() { + return useOptional; + } + @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); Map models = allModels.stream() - .map(v -> ((Map) v).get("model")) + .map(ModelMap::getModel) .collect(Collectors.toMap(v -> v.classname, v -> v)); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { // Set whether body is supported in request @@ -365,12 +411,11 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); - for (String modelName: objs.keySet()) { - CodegenModel model = ((Map>>) objs.get(modelName)) - .get("models").get(0).get("model"); + for (ModelsMap models: objs.values()) { + CodegenModel model = models.getModels().get(0).getModel(); if (model.getParentModel() != null) { model.vendorExtensions.put("requiredParentVars", model.getParentModel().requiredVars); } @@ -431,6 +476,8 @@ public String getExampleValue( example = example != null ? example : "false"; } else if ("File".equals(dataType)) { example = null; + } else if ("OffsetDateTime".equals(dataType)) { + example = "OffsetDateTime.of(2001, 2, 3, 12, 0, 0, 0, java.time.ZoneOffset.of(\"+02:00\"))"; } else if ("LocalDate".equals(dataType)) { example = "LocalDate.of(2001, 2, 3)"; } else if ("LocalDateTime".equals(dataType)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java index 997ecf317230..76dc4fe4ae8b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java @@ -11,7 +11,7 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { - private final Logger LOGGER = LoggerFactory.getLogger(JavaClientCodegen.class); + private final Logger LOGGER = LoggerFactory.getLogger(JavaMicronautClientCodegen.class); public static final String OPT_CONFIGURE_AUTH = "configureAuth"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java index da071b68ec8e..95764efd2cd0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java @@ -3,12 +3,17 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen { @@ -16,7 +21,15 @@ public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen { public static final String OPT_GENERATE_CONTROLLER_FROM_EXAMPLES = "generateControllerFromExamples"; public static final String OPT_GENERATE_CONTROLLER_AS_ABSTRACT = "generateControllerAsAbstract"; - private final Logger LOGGER = LoggerFactory.getLogger(JavaClientCodegen.class); + public static final String EXTENSION_ROLES = "x-roles"; + public static final String ANONYMOUS_ROLE_KEY = "isAnonymous()"; + public static final String ANONYMOUS_ROLE = "SecurityRule.IS_ANONYMOUS"; + public static final String AUTHORIZED_ROLE_KEY = "isAuthorized()"; + public static final String AUTHORIZED_ROLE = "SecurityRule.IS_AUTHENTICATED"; + public static final String DENY_ALL_ROLE_KEY = "denyAll()"; + public static final String DENY_ALL_ROLE = "SecurityRule.DENY_ALL"; + + private final Logger LOGGER = LoggerFactory.getLogger(JavaMicronautServerCodegen.class); public static final String NAME = "java-micronaut-server"; @@ -140,18 +153,27 @@ public void processOpts() { supportingFiles.add(new SupportingFile("common/configuration/Application.mustache", invokerFolder, "Application.java").doNotOverwrite()); } + @Override + public String apiTestFileFolder() { + // Set it to the whole output dir, so that validation always passes + return super.getOutputDir(); + } + @Override public String apiTestFilename(String templateName, String tag) { + // For controller implementation if (generateControllerAsAbstract && templateName.contains("controllerImplementation")) { - return ( - outputFolder + File.separator + + String implementationFolder = outputFolder + File.separator + sourceFolder + File.separator + - controllerPackage.replace('.', File.separatorChar) + File.separator + + controllerPackage.replace('.', File.separatorChar); + return (implementationFolder + File.separator + StringUtils.camelize(controllerPrefix + "_" + tag + "_" + controllerSuffix) + ".java" ).replace('/', File.separatorChar); } - return super.apiTestFilename(templateName, tag); + // For api tests + String suffix = apiTestTemplateFiles().get(templateName); + return super.apiTestFileFolder() + File.separator + toApiTestFilename(tag) + suffix; } @Override @@ -165,14 +187,39 @@ public void setParameterExampleValue(CodegenParameter p) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); // Add the controller classname to operations - Map operations = (Map) objs.get("operations"); - String controllerClassname = StringUtils.camelize(controllerPrefix + "_" + operations.get("pathPrefix") + "_" + controllerSuffix); + OperationMap operations = objs.getOperations(); + String controllerClassname = StringUtils.camelize(controllerPrefix + "_" + operations.getPathPrefix() + "_" + controllerSuffix); objs.put("controllerClassname", controllerClassname); + List allOperations = (List) operations.get("operation"); + if (useAuth) { + for (CodegenOperation operation : allOperations) { + if (!operation.vendorExtensions.containsKey(EXTENSION_ROLES)) { + String role = operation.hasAuthMethods ? AUTHORIZED_ROLE : ANONYMOUS_ROLE; + operation.vendorExtensions.put(EXTENSION_ROLES, Collections.singletonList(role)); + } else { + List roles = (List) operation.vendorExtensions.get(EXTENSION_ROLES); + roles = roles.stream().map(role -> { + switch (role) { + case ANONYMOUS_ROLE_KEY: + return ANONYMOUS_ROLE; + case AUTHORIZED_ROLE_KEY: + return AUTHORIZED_ROLE; + case DENY_ALL_ROLE_KEY: + return DENY_ALL_ROLE; + default: + return "\"" + escapeText(role) + "\""; + } + }).collect(Collectors.toList()); + operation.vendorExtensions.put(EXTENSION_ROLES, roles); + } + } + } + return objs; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java index 90c3d3b4ff45..22bd809dde61 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java @@ -23,6 +23,10 @@ import io.swagger.v3.oas.models.tags.Tag; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -45,7 +49,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen { protected String basePackage = "com.prokarma.pkmst"; protected String serviceName = "Pkmst"; protected String configPackage = "com.prokarma.pkmst.config"; - protected boolean implicitHeaders = false; protected String title; protected String eurekaUri; protected String zipkinUri; @@ -310,12 +313,11 @@ public void processOpts() { serviceName + "IT.java")); } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (final CodegenOperation operation : ops) { List responses = operation.responses; if (responses != null) { @@ -347,34 +349,13 @@ public void setReturnContainer(final String returnContainer) { } }); - if (implicitHeaders) { - removeHeadersFromAllParams(operation.allParams); - } + handleImplicitHeaders(operation); } } return objs; } - /** - * This method removes header parameters from the list of parameters - * - * @param allParams list of all parameters - */ - private void removeHeadersFromAllParams(List allParams) { - if (allParams.isEmpty()) { - return; - } - final ArrayList copy = new ArrayList<>(allParams); - allParams.clear(); - - for (CodegenParameter p : copy) { - if (!p.isHeaderParam) { - allParams.add(p); - } - } - } - /** * @param returnType The return type that needs to be converted * @param dataTypeAssigner An object that will assign the data to the respective fields @@ -429,21 +410,18 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } - @SuppressWarnings("unchecked") @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); // Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(this.importMapping.get("JsonValue")); - Map item = new HashMap(); + Map item = new HashMap<>(); item.put("import", this.importMapping.get("JsonValue")); imports.add(item); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java index 400ed76f95aa..9de29a5ef90c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java @@ -22,6 +22,9 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -304,11 +307,11 @@ public void setSupportAsync(boolean supportAsync) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { for (CodegenParameter param : operation.allParams) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java index 8698bd98dea6..223b4c48429c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java @@ -23,6 +23,8 @@ import org.openapitools.codegen.languages.features.JbossFeature; import org.openapitools.codegen.languages.features.SwaggerFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import java.io.File; import java.util.HashMap; @@ -117,11 +119,6 @@ public void processOpts() { } - @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - return super.postProcessOperationsWithModels(objs, allModels); - } - @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); @@ -136,15 +133,13 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); // Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java index 5a86c38ab25a..69f99eaa9a5b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java @@ -21,6 +21,8 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.JbossFeature; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import java.io.File; import java.util.HashMap; @@ -128,11 +130,6 @@ public void processOpts() { } } - @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - return super.postProcessOperationsWithModels(objs, allModels); - } - @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); @@ -147,19 +144,17 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); - Map item = new HashMap(); + Map item = new HashMap<>(); item.put("import", importMapping.get("JsonValue")); imports.add(item); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java index fe6e26a230d1..58f6f3626553 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java @@ -21,6 +21,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,10 +122,10 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (operation.returnType == null) { operation.returnType = "Void"; @@ -167,19 +171,17 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); - Map item = new HashMap(); + Map item = new HashMap<>(); item.put("import", importMapping.get("JsonValue")); imports.add(item); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java index e2fc4de08d66..ddff4cf71089 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java @@ -27,6 +27,9 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -190,11 +193,11 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map newObjs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) newObjs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationsMap newObjs = super.postProcessOperationsWithModels(objs, allModels); + OperationMap operations = newObjs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { operation.httpMethod = operation.httpMethod.toLowerCase(Locale.ROOT); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java index b498ec02cfee..a7fc895b2153 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java @@ -20,6 +20,9 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.util.*; @@ -125,13 +128,12 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map newObjs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) newObjs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationsMap newObjs = super.postProcessOperationsWithModels(objs, allModels); + OperationMap operations = newObjs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { operation.httpMethod = operation.httpMethod.toLowerCase(Locale.ROOT); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 276494953463..d27716dffdbb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -27,6 +27,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -906,13 +910,13 @@ private boolean isPrimitiveType(String type) { @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // Generate and store argument list string of each operation into // vendor-extension: x-codegen-argList. - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { List argList = new ArrayList<>(); boolean hasOptionalParams = false; @@ -954,15 +958,12 @@ public Map postProcessOperationsWithModels(Map o return objs; } - @SuppressWarnings("unchecked") @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap 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 (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // Collect each model's required property names in *document order*. // NOTE: can't use 'mandatory' as it is built from ModelImpl.getRequired(), which sorts names diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 1f8f973e029c..f6398e2f114b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -26,6 +26,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -200,9 +204,6 @@ public JavascriptClientCodegen() { .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) .defaultValue(Boolean.TRUE.toString())); - cliOptions.add(new CliOption(USE_ES6, - "use JavaScript ES6 (ECMAScript 6). Default is ES6. (This option has been deprecated and will be removed in the 5.x release as ES5 is no longer supported)") - .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase")); cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); } @@ -224,11 +225,6 @@ public String getHelp() { @Override public void processOpts() { - if (additionalProperties.containsKey(USE_ES6)) { - setUseES6(convertPropertyToBooleanAndWriteBack(USE_ES6)); - } else { - setUseES6(true); // default to ES6 - } super.processOpts(); if (StringUtils.isEmpty(System.getenv("JS_POST_PROCESS_FILE"))) { @@ -453,17 +449,6 @@ public void setNpmRepository(String npmRepository) { this.npmRepository = npmRepository; } - public void setUseES6(boolean useES6) { - this.useES6 = useES6; - if (useES6) { - embeddedTemplateDir = templateDir = "Javascript/es6"; - LOGGER.info("Using JS ES6 templates"); - } else { - embeddedTemplateDir = templateDir = "Javascript"; - LOGGER.info("Using JS ES5 templates"); - } - } - public void setUseInheritance(boolean useInheritance) { this.supportsInheritance = useInheritance; this.supportsMixins = useInheritance; @@ -986,15 +971,14 @@ private boolean isPrimitiveType(String type) { return Arrays.asList(primitives).contains(type); } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // Generate and store argument list string of each operation into // vendor-extension: x-codegen-argList. - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { List argList = new ArrayList<>(); boolean hasOptionalParams = false; @@ -1039,15 +1023,12 @@ public Map postProcessOperationsWithModels(Map o return objs; } - @SuppressWarnings("unchecked") @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap 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 (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // Collect each model's required property names in *document order*. // NOTE: can't use 'mandatory' as it is built from ModelImpl.getRequired(), which sorts names diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index 8744934020a6..f93d32affc20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -22,6 +22,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -255,13 +258,10 @@ public String getSchemaType(Schema p) { } @Override - public Map postProcessModels(Map objs) { - - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + public ModelsMap postProcessModels(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); for (CodegenProperty var : cm.vars) { // handle default value for enum, e.g. available => StatusEnum.available if (var.isEnum && var.defaultValue != null && !"null".equals(var.defaultValue)) { @@ -273,16 +273,10 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - if (objs.get("imports") instanceof List) { - List> imports = (ArrayList>)objs.get("imports"); - Collections.sort(imports, new Comparator>() { - public int compare(Map o1, Map o2) { - return o1.get("import").compareTo(o2.get("import")); - } - }); - objs.put("imports", imports); - } + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + List> imports = objs.getImports(); + imports.sort(Comparator.comparing(o -> o.get("import"))); + objs.put("imports", imports); return objs; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index cf344c8281c2..c459232438b0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -23,6 +23,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; + import java.util.*; import static org.openapitools.codegen.utils.StringUtils.dashize; @@ -163,13 +166,12 @@ public void preprocessOpenAPI(OpenAPI openAPI) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models - List models = (List) postProcessModelsEnum(objs).get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + List models = postProcessModelsEnum(objs).getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); // name enum with model name, e.g. StatusEnum => Pet.StatusEnum for (CodegenProperty var : cm.vars) { if (Boolean.TRUE.equals(var.isEnum)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java index 05a9d1536d4d..c9785fc21554 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java @@ -1007,7 +1007,7 @@ private Optional extractOperationGrouping(CodegenOperation cg && cgOperation.vendorExtensions.get(X_OPERATION_GROUPING) instanceof java.util.Map) { Map.Entry operationGroupingEntry = ((Map) cgOperation.vendorExtensions - .get(X_OPERATION_GROUPING)).entrySet().stream().findFirst().get(); + .get(X_OPERATION_GROUPING)).entrySet().stream().findFirst().orElse(null); return Optional.of(new OperationGrouping(String.valueOf(operationGroupingEntry.getKey()), Integer.parseInt(String.valueOf(operationGroupingEntry.getValue())))); 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 6e0eea1e4844..67bd6701f30e 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 @@ -33,6 +33,10 @@ import org.openapitools.codegen.meta.features.SchemaSupportFeature; import org.openapitools.codegen.meta.features.SecurityFeature; import org.openapitools.codegen.meta.features.WireFormatFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -232,7 +236,7 @@ public KotlinClientCodegen() { cliOptions.add(CliOption.newBoolean(GENERATE_ROOM_MODELS, "Generate Android Room database models in addition to API models (JVM Volley library only)", false)); - cliOptions.add(CliOption.newBoolean(SUPPORT_ANDROID_API_LEVEL_25_AND_BELLOW, "[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in oder to support Android API level 25 and bellow. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284")); + cliOptions.add(CliOption.newBoolean(SUPPORT_ANDROID_API_LEVEL_25_AND_BELLOW, "[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in order to support Android API level 25 and bellow. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284")); } public CodegenType getTag() { @@ -703,6 +707,7 @@ private void processMultiplatformLibrary(final String infrastructureFolder) { private void commonJvmMultiplatformSupportingFiles(String infrastructureFolder) { supportingFiles.add(new SupportingFile("infrastructure/ApiClient.kt.mustache", infrastructureFolder, "ApiClient.kt")); supportingFiles.add(new SupportingFile("infrastructure/ApiAbstractions.kt.mustache", infrastructureFolder, "ApiAbstractions.kt")); + supportingFiles.add(new SupportingFile("infrastructure/PartConfig.kt.mustache", infrastructureFolder, "PartConfig.kt")); supportingFiles.add(new SupportingFile("infrastructure/RequestConfig.kt.mustache", infrastructureFolder, "RequestConfig.kt")); supportingFiles.add(new SupportingFile("infrastructure/RequestMethod.kt.mustache", infrastructureFolder, "RequestMethod.kt")); } @@ -730,13 +735,11 @@ private void commonSupportingFiles() { } @Override - public Map postProcessModels(Map objs) { - Map objects = super.postProcessModels(objs); - @SuppressWarnings("unchecked") List models = (List) objs.get("models"); + public ModelsMap postProcessModels(ModelsMap objs) { + ModelsMap objects = super.postProcessModels(objs); - for (Object model : models) { - @SuppressWarnings("unchecked") Map mo = (Map) model; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objects.getModels()) { + CodegenModel cm = mo.getModel(); if (getGenerateRoomModels()) { cm.vendorExtensions.put("x-has-data-class-body", true); } @@ -767,12 +770,11 @@ private boolean usesRetrofit2Library() { } @Override - @SuppressWarnings("unchecked") - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (JVM_RETROFIT2.equals(getLibrary()) && StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")) { @@ -789,22 +791,22 @@ public Map postProcessOperationsWithModels(Map o // match on first part in mediaTypes like 'application/json; charset=utf-8' int endIndex = mediaTypeValue.indexOf(';'); String mediaType = (endIndex == -1 - ? mediaTypeValue - : mediaTypeValue.substring(0, endIndex) + ? mediaTypeValue + : mediaTypeValue.substring(0, endIndex) ).trim(); return "multipart/form-data".equals(mediaType) - || "application/x-www-form-urlencoded".equals(mediaType) - || (mediaType.startsWith("application/") && mediaType.endsWith("json")); + || "application/x-www-form-urlencoded".equals(mediaType) + || (mediaType.startsWith("application/") && mediaType.endsWith("json")); }; operation.consumes = operation.consumes == null ? null : operation.consumes.stream() - .filter(isSerializable) - .limit(1) - .collect(Collectors.toList()); + .filter(isSerializable) + .limit(1) + .collect(Collectors.toList()); operation.hasConsumes = operation.consumes != null && !operation.consumes.isEmpty(); operation.produces = operation.produces == null ? null : operation.produces.stream() - .filter(isSerializable) - .collect(Collectors.toList()); + .filter(isSerializable) + .collect(Collectors.toList()); operation.hasProduces = operation.produces != null && !operation.produces.isEmpty(); } @@ -850,7 +852,7 @@ public Map postProcessOperationsWithModels(Map o } } } - return operations; + return objs; } private static boolean isMultipartType(List> consumes) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 6adf38be3581..8cfdc2026381 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -24,6 +24,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -552,16 +556,14 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); //Add imports for Jackson - List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); + List> imports = objs.getImports(); - models.stream() - .map(mo -> (Map) mo) - .map(mo -> (CodegenModel) mo.get("model")) + objs.getModels().stream() + .map(ModelMap::getModel) .filter(cm -> Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) .forEach(cm -> { cm.imports.add(importMapping.get("JsonValue")); @@ -578,10 +580,10 @@ public Map postProcessModelsEnum(Map objs) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); ops.forEach(operation -> { List responses = operation.responses; if (responses != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java index b4f1b12081d6..adfef4bf3c84 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java @@ -20,6 +20,8 @@ import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -282,19 +284,17 @@ public void processOpts() { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel model = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel model = mo.getModel(); String modelName = model.getName(); String tableName = toTableName(modelName); String modelDescription = model.getDescription(); Map modelVendorExtensions = model.getVendorExtensions(); - Map ktormSchema = new HashMap(); - Map tableDefinition = new HashMap(); + Map ktormSchema = new HashMap<>(); + Map tableDefinition = new HashMap<>(); if (getIdentifierNamingConvention().equals("snake_case") && !modelName.equals(tableName)) { // add original name in table comment diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index 84af5454e0d6..aeff481eaf6e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -24,6 +24,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -418,11 +422,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation op : operations) { String[] items = op.path.split("/", -1); @@ -449,9 +451,9 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // remove model imports to avoid error - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); final String prefix = modelPackage(); Iterator> iterator = imports.iterator(); while (iterator.hasNext()) { @@ -461,7 +463,7 @@ public Map postProcessModels(Map objs) { } // recursively add import for mapping one type to multiple imports - List> recursiveImports = (List>) objs.get("imports"); + List> recursiveImports = objs.getImports(); if (recursiveImports == null) return objs; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java index d1f958971358..deb82787d0f1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java @@ -18,6 +18,8 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.commons.lang3.StringUtils; @@ -252,13 +254,11 @@ public void processOpts() { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel model = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel model = mo.getModel(); String modelName = model.getName(); String tableName = this.toTableName(modelName); String modelDescription = model.getDescription(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 4db55bcb17e7..c524436a0519 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -23,6 +23,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; @@ -169,7 +173,7 @@ public void setPackageVersion(String packageVersion) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return postProcessModelsEnum(objs); } @@ -256,11 +260,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { operation.httpMethod = operation.httpMethod.toLowerCase(Locale.ROOT); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java index 774df093e1d0..0f01e91e89dc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java @@ -31,6 +31,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -237,11 +241,9 @@ public void setExportedName(String name) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { operation.httpMethod = operation.httpMethod.toLowerCase(Locale.ROOT); @@ -271,13 +273,11 @@ public Map postProcessOperationsWithModels(Map o return objs; } - @SuppressWarnings("unchecked") - private static List> getOperations(Map objs) { - List> result = new ArrayList<>(); - Map apiInfo = (Map) objs.get("apiInfo"); - List> apis = (List>) apiInfo.get("apis"); - for (Map api : apis) { - result.add((Map) api.get("operations")); + private static List getOperations(Map objs) { + List result = new ArrayList<>(); + ApiInfoMap apiInfo = (ApiInfoMap) objs.get("apiInfo"); + for (OperationsMap api : apiInfo.getApis()) { + result.add(api.getOperations()); } return result; } @@ -400,9 +400,8 @@ public void preprocessOpenAPI(OpenAPI openAPI) { public Map postProcessSupportingFileData(Map objs) { generateYAMLSpecFile(objs); - for (Map operations : getOperations(objs)) { - @SuppressWarnings("unchecked") - List ops = (List) operations.get("operation"); + for (OperationMap operations : getOperations(objs)) { + List ops = operations.getOperation(); List> opsByPathList = sortOperationsByPath(ops); operations.put("operationsByPath", opsByPathList); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index c9319b48ea43..509f6d499562 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -25,6 +25,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -189,16 +193,14 @@ public OCamlClientCodegen() { } @Override - public Map postProcessAllModels(Map superobjs) { + public Map postProcessAllModels(Map superobjs) { List toRemove = new ArrayList<>(); - for (Map.Entry modelEntry : superobjs.entrySet()) { - Map objs = (Map) modelEntry.getValue(); + for (Map.Entry modelEntry : superobjs.entrySet()) { // process enum in models - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + List models = modelEntry.getValue().getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { @@ -705,19 +707,17 @@ private CodegenModel buildEnumModel(String enumName, String values) { return m; } - private Map buildEnumModelWrapper(String enumName, String values) { - Map m = new HashMap<>(); + private ModelMap buildEnumModelWrapper(String enumName, String values) { + ModelMap m = new ModelMap(); m.put("importPath", packageName + "." + enumName); - m.put("model", buildEnumModel(enumName, values)); + m.setModel(buildEnumModel(enumName, values)); return m; } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { // http method verb conversion, depending on client library (e.g. Hyper: PUT => Put, Reqwest: PUT => put) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 5667e3e29189..5a2a38224778 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -22,6 +22,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -651,11 +654,11 @@ public void setLicense(String license) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { if (!operation.allParams.isEmpty()) { String firstParamName = operation.allParams.get(0).paramName; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java index 5dbaec3bbdd2..c2b27f479773 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java @@ -21,6 +21,9 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.util.*; @@ -233,11 +236,9 @@ public void processOpts() { // override with any special post-processing @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation op : operations) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); @@ -260,12 +261,7 @@ public Map postProcessOperationsWithModels(Map o // sort the endpoints in ascending to avoid the route priority issue. // https://github.com/swagger-api/swagger-codegen/issues/2643 - Collections.sort(operations, new Comparator() { - @Override - public int compare(CodegenOperation lhs, CodegenOperation rhs) { - return lhs.path.compareTo(rhs.path); - } - }); + operations.sort(Comparator.comparing(lhs -> lhs.path)); return objs; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java index 5d68510e9ae3..fc5b114d3f47 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java @@ -21,6 +21,9 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.util.*; @@ -165,23 +168,16 @@ public void processOpts() { // override with any special post-processing @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation op : operations) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); } // sort the endpoints in ascending to avoid the route priority issue. - Collections.sort(operations, new Comparator() { - @Override - public int compare(CodegenOperation lhs, CodegenOperation rhs) { - return lhs.path.compareTo(rhs.path); - } - }); + operations.sort(Comparator.comparing(lhs -> lhs.path)); escapeMediaType(operations); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java index c45a8af07ca9..cd81b3174a60 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java @@ -30,6 +30,9 @@ import io.swagger.v3.oas.models.responses.ApiResponses; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -415,10 +418,10 @@ protected void generateContainerSchemas(OpenAPI openAPI, Schema schema) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); String httpMethodDeclaration; String pathPattern = null; for (CodegenOperation op : operationList) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index 212459d8d340..fd7106883263 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -22,6 +22,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; @@ -259,9 +262,9 @@ public String escapeUnsafeCharacters(String input) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { String path = op.path; String[] items = path.split("/", -1); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java index dc6fefcee776..d3cff59571e1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java @@ -19,7 +19,7 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.servers.Server; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.CodegenOperation; @@ -30,6 +30,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -225,6 +229,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("register_dependencies.mustache", toSrcPath(appPackage, srcBasePath), "RegisterDependencies.php")); supportingFiles.add(new SupportingFile("register_middlewares.mustache", toSrcPath(appPackage, srcBasePath), "RegisterMiddlewares.php")); supportingFiles.add(new SupportingFile("register_routes.mustache", toSrcPath(appPackage, srcBasePath), "RegisterRoutes.php")); + supportingFiles.add(new SupportingFile("response_emitter.mustache", toSrcPath(appPackage, srcBasePath), "ResponseEmitter.php")); // don't generate phpunit config when tests generation disabled if (Boolean.TRUE.equals(generateApiTests) || Boolean.TRUE.equals(generateModelTests)) { @@ -237,6 +242,8 @@ public void processOpts() { supportingFiles.add(new SupportingFile("htaccess_deny_all", "config", ".htaccess")); supportingFiles.add(new SupportingFile("config_dev_default.mustache", "config" + File.separator + "dev", "default.inc.php")); supportingFiles.add(new SupportingFile("config_prod_default.mustache", "config" + File.separator + "prod", "default.inc.php")); + // add restricted htaccess to create log folder + supportingFiles.add(new SupportingFile("htaccess_deny_all", "logs", ".htaccess")); if (Boolean.TRUE.equals(generateModels)) { supportingFiles.add(new SupportingFile("base_model.mustache", toSrcPath(invokerPackage, srcBasePath), "BaseModel.php")); @@ -245,12 +252,16 @@ public void processOpts() { if (Boolean.TRUE.equals(generateModelTests)) { supportingFiles.add(new SupportingFile("base_model_test.mustache", toSrcPath(invokerPackage, testBasePath), "BaseModelTest.php")); } + + // based on example from link + // @see https://github.com/shivammathur/setup-php/blob/master/examples/slim-framework.yml + supportingFiles.add(new SupportingFile("github_action.yml.mustache", ".github" + File.separator + "workflows" + File.separator, "main.yml")); } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); addUserClassnameToOperations(operations); escapeMediaType(operationList); return objs; @@ -258,21 +269,16 @@ public Map postProcessOperationsWithModels(Map o @Override public Map postProcessSupportingFileData(Map objs) { - Map apiInfo = (Map) objs.get("apiInfo"); - List> apiList = (List>) apiInfo.get("apis"); - for (HashMap api : apiList) { - HashMap operations = (HashMap) api.get("operations"); - List operationList = (List) operations.get("operation"); + ApiInfoMap apiInfo = (ApiInfoMap) objs.get("apiInfo"); + for (OperationsMap api : apiInfo.getApis()) { + List operationList = api.getOperations().getOperation(); // Sort operations to avoid static routes shadowing // ref: https://github.com/nikic/FastRoute/blob/master/src/DataGenerator/RegexBasedAbstract.php#L92-L101 - Collections.sort(operationList, new Comparator() { - @Override - public int compare(CodegenOperation one, CodegenOperation another) { + operationList.sort((one, another) -> { if (one.getHasPathParams() && !another.getHasPathParams()) return 1; if (!one.getHasPathParams() && another.getHasPathParams()) return -1; return 0; - } }); } @@ -304,8 +310,8 @@ public String toApiTestFilename(String name) { * * @param operations codegen object with operations */ - private void addUserClassnameToOperations(Map operations) { - String classname = (String) operations.get("classname"); + private void addUserClassnameToOperations(OperationMap operations) { + String classname = operations.getClassname(); classname = classname.replaceAll("^" + abstractNamePrefix, ""); classname = classname.replaceAll(abstractNameSuffix + "$", ""); operations.put(USER_CLASSNAME_KEY, classname); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java index cd955144fdab..eacf50eb9b12 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java @@ -20,12 +20,16 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.servers.Server; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -156,9 +160,9 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); addUserClassnameToOperations(operations); escapeMediaType(operationList); return objs; @@ -166,21 +170,16 @@ public Map postProcessOperationsWithModels(Map o @Override public Map postProcessSupportingFileData(Map objs) { - Map apiInfo = (Map) objs.get("apiInfo"); - List> apiList = (List>) apiInfo.get("apis"); - for (HashMap api : apiList) { - HashMap operations = (HashMap) api.get("operations"); - List operationList = (List) operations.get("operation"); + ApiInfoMap apiInfo = (ApiInfoMap) objs.get("apiInfo"); + for (OperationsMap api : apiInfo.getApis()) { + List operationList = api.getOperations().getOperation(); // Sort operations to avoid static routes shadowing // ref: https://github.com/nikic/FastRoute/blob/master/src/DataGenerator/RegexBasedAbstract.php#L92-L101 - Collections.sort(operationList, new Comparator() { - @Override - public int compare(CodegenOperation one, CodegenOperation another) { + operationList.sort((one, another) -> { if (one.getHasPathParams() && !another.getHasPathParams()) return 1; if (!one.getHasPathParams() && another.getHasPathParams()) return -1; return 0; - } }); } return objs; @@ -216,8 +215,8 @@ public String toApiTestFilename(String name) { * * @param operations codegen object with operations */ - private void addUserClassnameToOperations(Map operations) { - String classname = (String) operations.get("classname"); + private void addUserClassnameToOperations(OperationMap operations) { + String classname = operations.getClassname(); classname = classname.replaceAll("^" + abstractNamePrefix, ""); classname = classname.replaceAll(abstractNameSuffix + "$", ""); operations.put(USER_CLASSNAME_KEY, classname); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index 7ffaf723136a..36048286d03c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -22,6 +22,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -389,15 +393,15 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - operations.put("controllerName", toControllerName((String) operations.get("pathPrefix"))); - operations.put("symfonyService", toSymfonyService((String) operations.get("pathPrefix"))); + OperationMap operations = objs.getOperations(); + operations.put("controllerName", toControllerName(operations.getPathPrefix())); + operations.put("symfonyService", toSymfonyService(operations.getPathPrefix())); List authMethods = new ArrayList<>(); - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { // Loop through all input parameters to determine, whether we have to import something to @@ -447,12 +451,11 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = super.postProcessModels(objs); - ArrayList modelsArray = (ArrayList) objs.get("models"); - Map models = (Map) modelsArray.get(0); - CodegenModel model = (CodegenModel) models.get("model"); + ModelMap models = objs.getModels().get(0); + CodegenModel model = models.getModel(); // Simplify model var type for (CodegenProperty var : model.vars) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java index 8df3f2a3c4d2..6212b7929b55 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java @@ -19,6 +19,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,11 +59,9 @@ public PlantumlDocumentationCodegen() { @SuppressWarnings("unchecked") @Override public Map postProcessSupportingFileData(Map objs) { - Object models = objs.get("models"); - List modelsList = (List) models; - List codegenModelList = modelsList.stream() - .filter(listItem -> listItem instanceof HashMap) - .map(listItem -> (CodegenModel) ((HashMap) listItem).get("model")) + List models = (List) objs.get("models"); + List codegenModelList = models.stream() + .map(ModelMap::getModel) .collect(Collectors.toList()); List inlineAllOfCodegenModelList = codegenModelList.stream() 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 fee739c2c820..89227f989bc1 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 @@ -19,12 +19,16 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -1010,18 +1014,17 @@ public String toParamName(String name) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); HashMap modelMaps = new HashMap<>(); HashMap processedModelMaps = new HashMap<>(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + for (ModelMap modelMap : allModels) { + CodegenModel m = modelMap.getModel(); modelMaps.put(m.classname, m); } - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { int index = 0; for (CodegenParameter p : op.allParams) { @@ -1086,15 +1089,14 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { - List models = (List) objs.get("models"); + public ModelsMap postProcessModels(ModelsMap objs) { + List models = objs.getModels(); // add x-index to properties ProcessUtils.addIndexToProperties(models); // add x-data-type to store powershell type - for (Object _mo : models) { - Map _model = (Map) _mo; - CodegenModel model = (CodegenModel) _model.get("model"); + for (ModelMap _model : models) { + CodegenModel model = _model.getModel(); CodegenProperty lastWritableProperty = null; for (CodegenProperty cp : model.allVars) { @@ -1123,7 +1125,8 @@ public Map postProcessModels(Map objs) { } } - return objs; + // process enum in models + return postProcessModelsEnum(objs); } @Override @@ -1182,7 +1185,9 @@ private String constructExampleCode(CodegenParameter codegenParameter, HashMap> enumVars) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { objs = postProcessModelsEnum(objs); - List models = (List) objs.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); if(cm.isEnum) { Map allowableValues = cm.getAllowableValues(); @@ -344,7 +346,7 @@ else if (Boolean.TRUE.equals(var.isNullable && var.isPrimitiveType)) { * {@inheritDoc} */ @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { super.postProcessAllModels(objs); Map allModels = this.getAllModels(objs); @@ -368,22 +370,22 @@ public Map postProcessAllModels(Map objs) { return objs; } - public void addImport(Map objs, CodegenModel cm, String importValue) { + public void addImport(Map objs, CodegenModel cm, String importValue) { String modelFileName = this.toModelFilename(importValue); boolean skipImport = isImportAlreadyPresentInModel(objs, cm, modelFileName); if (!skipImport) { this.addImport(cm, importValue); - Map importItem = new HashMap<>(); + Map importItem = new HashMap<>(); importItem.put(IMPORT, modelFileName); - ((List>) ((Map) objs.get(cm.getName())).get(IMPORTS)).add(importItem); + objs.get(cm.getName()).getImports().add(importItem); } } - private boolean isImportAlreadyPresentInModel(Map objs, CodegenModel cm, String importValue) { + private boolean isImportAlreadyPresentInModel(Map objs, CodegenModel cm, String importValue) { boolean skipImport = false; - List> cmImports = ((List>) ((Map) objs.get(cm.getName())).get(IMPORTS)); - for (Map cmImportItem : cmImports) { - for (Entry cmImportItemEntry : cmImportItem.entrySet()) { + List> cmImports = objs.get(cm.getName()).getImports(); + for (Map cmImportItem : cmImports) { + for (Entry cmImportItemEntry : cmImportItem.entrySet()) { if (importValue.equals(cmImportItemEntry.getValue())) { skipImport = true; break; @@ -541,9 +543,9 @@ public String getSchemaType(Schema p) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { int index = 1; for (CodegenParameter p : op.allParams) { 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 1a64e3909abb..942358eac042 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 @@ -29,6 +29,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.CodegenDiscriminator.MappedModel; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.openapitools.codegen.meta.GeneratorMetadata; @@ -108,6 +112,9 @@ public PythonClientCodegen() { cliOptions.add(new CliOption(CodegenConstants.PYTHON_ATTR_NONE_IF_UNSET, CodegenConstants.PYTHON_ATTR_NONE_IF_UNSET_DESC) .defaultValue(Boolean.FALSE.toString())); + cliOptions.add(new CliOption(CodegenConstants.INIT_REQUIRED_VARS, CodegenConstants.INIT_REQUIRED_VARS_DESC) + .defaultValue(Boolean.FALSE.toString())); + // option to change how we process + set the data in the 'additionalProperties' keyword. CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean( CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, @@ -144,7 +151,7 @@ public void processOpts() { .reduce((a, b) -> { throw new IllegalStateException("Multiple elements: " + a + ", " + b); }) - .get(); + .orElse(null); supportingFiles.remove(originalInitModel); supportingFiles.add(new SupportingFile("__init__model.mustache", packagePath() + File.separatorChar + "model", "__init__.py")); supportingFiles.add(new SupportingFile("__init__apis.mustache", packagePath() + File.separatorChar + "apis", "__init__.py")); @@ -184,6 +191,11 @@ public void processOpts() { } this.setDisallowAdditionalPropertiesIfNotPresent(disallowAddProps); + Boolean initRequiredVars = false; + if (additionalProperties.containsKey(CodegenConstants.INIT_REQUIRED_VARS)) { + initRequiredVars = Boolean.valueOf(additionalProperties.get(CodegenConstants.INIT_REQUIRED_VARS).toString()); + } + additionalProperties.put("initRequiredVars", initRequiredVars); // check library option to ensure only urllib3 is supported if (!DEFAULT_LIBRARY.equals(getLibrary())) { @@ -355,13 +367,13 @@ public String toModelImport(String name) { @Override @SuppressWarnings("static-method") - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // fix the imports that each model has, add the module reference to the model // loops through imports and converts them all // from 'Pet' to 'from petstore_api.model.pet import Pet' - HashMap val = (HashMap) objs.get("operations"); - ArrayList operations = (ArrayList) val.get("operation"); + OperationMap val = objs.getOperations(); + List operations = val.getOperation(); for (CodegenOperation operation : operations) { if (operation.imports.isEmpty()) { continue; @@ -388,7 +400,7 @@ public Map postProcessOperationsWithModels(Map o * @return the updated objs */ @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { super.postProcessAllModels(objs); List modelsToRemove = new ArrayList<>(); @@ -400,11 +412,10 @@ public Map postProcessAllModels(Map objs) { if (unaliasedSchema.get$ref() == null) { modelsToRemove.add(modelName); } else { - HashMap objModel = (HashMap) objs.get(modelName); + ModelsMap objModel = objs.get(modelName); if (objModel != null) { // to avoid form parameter's models that are not generated (skipFormModel=true) - List> models = (List>) objModel.get("models"); - for (Map model : models) { - CodegenModel cm = (CodegenModel) model.get("model"); + for (ModelMap model : objModel.getModels()) { + CodegenModel cm = model.getModel(); String[] importModelNames = cm.imports.toArray(new String[0]); cm.imports.clear(); for (String importModelName : importModelNames) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 3a893cb40cb3..97e5b650ee7a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -17,13 +17,19 @@ package org.openapitools.codegen.languages; import com.github.curiousoddman.rgxgen.RgxGen; +import com.github.curiousoddman.rgxgen.config.RgxGenOption; +import com.github.curiousoddman.rgxgen.config.RgxGenProperties; +import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.tags.Tag; -import org.apache.commons.lang3.tuple.Triple; + import org.openapitools.codegen.api.TemplatePathLocator; import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.*; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.*; @@ -52,7 +58,6 @@ import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.stream.Collectors; import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -86,13 +91,18 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { public PythonExperimentalClientCodegen() { super(); + loadDeepObjectIntoItems = false; modifyFeatureSet(features -> features .includeSchemaSupportFeatures( SchemaSupportFeature.Simple, SchemaSupportFeature.Composite, SchemaSupportFeature.Polymorphism, - SchemaSupportFeature.Union + SchemaSupportFeature.Union, + SchemaSupportFeature.allOf, + SchemaSupportFeature.anyOf, + SchemaSupportFeature.oneOf, + SchemaSupportFeature.not ) .includeDocumentationFeatures(DocumentationFeature.Readme) .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.Custom)) @@ -102,6 +112,11 @@ public PythonExperimentalClientCodegen() { SecurityFeature.ApiKey, SecurityFeature.OAuth2_Implicit )) + .includeDataTypeFeatures( + DataTypeFeature.Null, + DataTypeFeature.AnyType, + DataTypeFeature.Uuid + ) .includeGlobalFeatures( GlobalFeature.ParameterizedServer, GlobalFeature.ParameterStyling @@ -179,9 +194,7 @@ public PythonExperimentalClientCodegen() { cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); supportedLibraries.put("urllib3", "urllib3-based client"); - supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)"); - supportedLibraries.put("tornado", "tornado-based client"); - CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: asyncio, tornado, urllib3"); + CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: urllib3"); libraryOption.setDefault(DEFAULT_LIBRARY); cliOptions.add(libraryOption); setLibrary(DEFAULT_LIBRARY); @@ -424,12 +437,13 @@ protected File processTemplateToFile(Map templateData, String te It is very verbose to write all of this info into the api template This ingests all operations under a tag in the objs input and writes out one file for each endpoint */ - protected void generateEndpoints(Map objs) { + protected void generateEndpoints(OperationsMap objs) { if (!(Boolean) additionalProperties.get(CodegenConstants.GENERATE_APIS)) { return; } - HashMap operations = (HashMap) objs.get("operations"); - ArrayList codegenOperations = (ArrayList) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List codegenOperations = operations.getOperation(); + Set tagsNeedingInitFiles = new HashSet<>(); for (CodegenOperation co: codegenOperations) { for (Tag tag: co.tags) { String tagName = tag.getName(); @@ -441,13 +455,28 @@ protected void generateEndpoints(Map objs) { String templateName = "endpoint.handlebars"; String filename = endpointFilename(templateName, pythonTagName, co.operationId); + tagsNeedingInitFiles.add(pythonTagName); try { - File written = processTemplateToFile(operationMap, templateName, filename, true, CodegenConstants.APIS); + processTemplateToFile(operationMap, templateName, filename, true, CodegenConstants.APIS); } catch (IOException e) { LOGGER.error("Error when writing template file {}", e.toString()); } } } + String templateName = "__init__api_endpoints.handlebars"; + for (String tagNeedingInitFiles: tagsNeedingInitFiles) { + try { + Map operationMap = new HashMap<>(); + String apiModuleName = toApiFilename(tagNeedingInitFiles); + operationMap.put("packageName", packageName); + operationMap.put("apiModuleName", apiModuleName); + operationMap.put("classname", toApiName(tagNeedingInitFiles)); + String filename = endpointFilename(templateName, tagNeedingInitFiles, "__init__"); + processTemplateToFile(operationMap, templateName, filename, true, CodegenConstants.APIS); + } catch (IOException e) { + LOGGER.error("Error when writing endpoint __init__ file {}", e.toString()); + } + } } /* @@ -508,12 +537,13 @@ public String getHelp() { "Features in this generator:", "- type hints on endpoints and model creation", "- model parameter names use the spec defined keys and cases", - "- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only", + "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", "- endpoint parameter names use the spec defined keys and cases", "- inline schemas are supported at any location including composition", "- multiple content types supported in request body and response bodies", "- run time type checking", "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", + "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", "- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed", "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", @@ -609,7 +639,7 @@ public String pythonDate(Object dateValue) { } else { strValue = dateValue.toString(); } - return "isoparse('" + strValue + "').date()"; + return strValue; } public String pythonDateTime(Object dateTimeValue) { @@ -626,7 +656,7 @@ public String pythonDateTime(Object dateTimeValue) { } else { strValue = dateTimeValue.toString(); } - return "isoparse('" + strValue + "')"; + return strValue; } /** @@ -671,14 +701,14 @@ public String toModelImport(String name) { @Override @SuppressWarnings("static-method") - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // fix the imports that each model has, add the module reference to the model // loops through imports and converts them all // from 'Pet' to 'from petstore_api.model.pet import Pet' - HashMap val = (HashMap) objs.get("operations"); - ArrayList operations = (ArrayList) val.get("operation"); - ArrayList> imports = (ArrayList>) objs.get("imports"); + OperationMap val = objs.getOperations(); + List operations = val.getOperation(); + List> imports = objs.getImports(); for (CodegenOperation operation : operations) { if (operation.imports.size() == 0) { continue; @@ -706,7 +736,7 @@ public Map postProcessOperationsWithModels(Map o * @return the updated objs */ @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { super.postProcessAllModels(objs); Map allDefinitions = ModelUtils.getSchemas(this.openAPI); @@ -717,11 +747,10 @@ public Map postProcessAllModels(Map objs) { if (unaliasedSchema.get$ref() == null) { continue; } else { - HashMap objModel = (HashMap) objs.get(modelName); + ModelsMap objModel = objs.get(modelName); if (objModel != null) { // to avoid form parameter's models that are not generated (skipFormModel=true) - List> models = (List>) objModel.get("models"); - for (Map model : models) { - CodegenModel cm = (CodegenModel) model.get("model"); + for (ModelMap model : objModel.getModels()) { + CodegenModel cm = model.getModel(); String[] importModelNames = cm.imports.toArray(new String[0]); cm.imports.clear(); for (String importModelName : importModelNames) { @@ -737,28 +766,30 @@ public Map postProcessAllModels(Map objs) { public CodegenParameter fromParameter(Parameter parameter, Set imports) { CodegenParameter cp = super.fromParameter(parameter, imports); - switch(parameter.getStyle()) { - case MATRIX: - cp.style = "MATRIX"; - break; - case LABEL: - cp.style = "LABEL"; - break; - case FORM: - cp.style = "FORM"; - break; - case SIMPLE: - cp.style = "SIMPLE"; - break; - case SPACEDELIMITED: - cp.style = "SPACE_DELIMITED"; - break; - case PIPEDELIMITED: - cp.style = "PIPE_DELIMITED"; - break; - case DEEPOBJECT: - cp.style = "DEEP_OBJECT"; - break; + if (parameter.getStyle() != null) { + switch(parameter.getStyle()) { + case MATRIX: + cp.style = "MATRIX"; + break; + case LABEL: + cp.style = "LABEL"; + break; + case FORM: + cp.style = "FORM"; + break; + case SIMPLE: + cp.style = "SIMPLE"; + break; + case SPACEDELIMITED: + cp.style = "SPACE_DELIMITED"; + break; + case PIPEDELIMITED: + cp.style = "PIPE_DELIMITED"; + break; + case DEEPOBJECT: + cp.style = "DEEP_OBJECT"; + break; + } } // clone this so we can change some properties on it CodegenProperty schemaProp = cp.getSchema().clone(); @@ -1352,6 +1383,13 @@ private String ensureQuotes(String in) { return "\"" + in + "\""; } + @Override + public String toExampleValue(Schema schema) { + String modelName = getModelName(schema); + Object objExample = getObjectExample(schema); + return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0, new ArrayList<>()); + } + public String toExampleValue(Schema schema, Object objExample) { String modelName = getModelName(schema); return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0, new ArrayList<>()); @@ -1444,12 +1482,66 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o } String refModelName = getModelName(schema); return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, includedSchemas); - } else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) { + } else if (ModelUtils.isNullType(schema)) { // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x, // though this tooling supports it. return fullPrefix + "None" + closeChars; + } else if (ModelUtils.isAnyType(schema)) { + /* + This schema may be a composed schema + TODO generate examples for some of these use cases in the future like + only oneOf without a discriminator + */ + Boolean hasProperties = (schema.getProperties() != null && !schema.getProperties().isEmpty()); + CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); + if (ModelUtils.isComposedSchema(schema)) { + // complex composed object type schemas not yet handled and the code returns early + if (hasProperties) { + // what if this composed schema defined properties + allOf? + // or items + properties, both a ist and a dict could be accepted as payloads + return fullPrefix + "{}" + closeChars; + } + ComposedSchema cs = (ComposedSchema) schema; + Integer allOfExists = 0; + if (cs.getAllOf() != null && !cs.getAllOf().isEmpty()) { + allOfExists = 1; + } + Integer anyOfExists = 0; + if (cs.getAnyOf() != null && !cs.getAnyOf().isEmpty()) { + anyOfExists = 1; + } + Integer oneOfExists = 0; + if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { + oneOfExists = 1; + } + if (allOfExists + anyOfExists + oneOfExists > 1) { + // what if it needs one oneOf schema, one anyOf schema, and two allOf schemas? + return fullPrefix + "None" + closeChars; + } + // for now only oneOf with discriminator is supported + if (oneOfExists == 1 && disc != null) { + ; + } else { + return fullPrefix + "None" + closeChars; + } + } + if (disc != null) { + // a discriminator means that the type must be object + MappedModel mm = getDiscriminatorMappedModel(disc); + if (mm == null) { + return fullPrefix + "None" + closeChars; + } + String discPropNameValue = mm.getMappingName(); + String chosenModelName = mm.getModelName(); + Schema modelSchema = getModelNameToSchemaCache().get(chosenModelName); + CodegenProperty cp = new CodegenProperty(); + cp.setName(disc.getPropertyName()); + cp.setExample(discPropNameValue); + return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); + } + return fullPrefix + "None" + closeChars; } else if (ModelUtils.isBooleanSchema(schema)) { - if (objExample == null) { + if (example == null) { example = "True"; } else { if ("false".equalsIgnoreCase(objExample.toString())) { @@ -1459,60 +1551,82 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o } } return fullPrefix + example + closeChars; - } else if (ModelUtils.isDateSchema(schema)) { - if (objExample == null) { - example = pythonDate("1970-01-01"); - } else { - example = pythonDate(objExample); - } - return fullPrefix + example + closeChars; - } else if (ModelUtils.isDateTimeSchema(schema)) { - if (objExample == null) { - example = pythonDateTime("1970-01-01T00:00:00.00Z"); - } else { - example = pythonDateTime(objExample); - } - return fullPrefix + example + closeChars; - } else if (ModelUtils.isBinarySchema(schema)) { - if (objExample == null) { - example = "/path/to/file"; - } - example = "open('" + example + "', 'rb')"; - return fullPrefix + example + closeChars; - } else if (ModelUtils.isByteArraySchema(schema)) { - if (objExample == null) { - example = "'YQ=='"; - } - return fullPrefix + example + closeChars; } else if (ModelUtils.isStringSchema(schema)) { - if (objExample == null) { + if (example != null) { + return fullPrefix + ensureQuotes(example) + closeChars; + } + if (ModelUtils.isDateSchema(schema)) { + if (objExample == null) { + example = pythonDate("1970-01-01"); + } else { + example = pythonDate(objExample); + } + } else if (ModelUtils.isDateTimeSchema(schema)) { + if (objExample == null) { + example = pythonDateTime("1970-01-01T00:00:00.00Z"); + } else { + example = pythonDateTime(objExample); + } + } else if (ModelUtils.isBinarySchema(schema)) { + if (example == null) { + example = "/path/to/file"; + } + example = "open('" + example + "', 'rb')"; + return fullPrefix + example + closeChars; + } else if (ModelUtils.isByteArraySchema(schema)) { + if (objExample == null) { + example = "'YQ=='"; + } + } else if ("Number".equalsIgnoreCase(schema.getFormat())) { // a BigDecimal: - if ("Number".equalsIgnoreCase(schema.getFormat())) { - example = "2"; - return fullPrefix + example + closeChars; - } else if (StringUtils.isNotBlank(schema.getPattern())) { - String pattern = schema.getPattern(); - RgxGen rgxGen = new RgxGen(pattern); - // this seed makes it so if we have [a-z] we pick a - Random random = new Random(18); - String sample = rgxGen.generate(random); - // omit leading / and trailing /, omit trailing /i - Pattern valueExtractor = Pattern.compile("^/?(.+?)/?.?$"); - Matcher m = valueExtractor.matcher(sample); - if (m.find()) { - example = m.group(m.groupCount()); - } else { - example = ""; + example = "2"; + } else if (StringUtils.isNotBlank(schema.getPattern())) { + String pattern = schema.getPattern(); + /* + RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56 + So strip off the leading / and trailing / and turn on ignore case if we have it + */ + Pattern valueExtractor = Pattern.compile("^/?(.+?)/?(.?)$"); + Matcher m = valueExtractor.matcher(pattern); + RgxGen rgxGen = null; + if (m.find()) { + int groupCount = m.groupCount(); + if (groupCount == 1) { + // only pattern found + String isolatedPattern = m.group(1); + rgxGen = new RgxGen(isolatedPattern); + } else if (groupCount == 2) { + // patterns and flag found + String isolatedPattern = m.group(1); + String flags = m.group(2); + if (flags.contains("i")) { + rgxGen = new RgxGen(isolatedPattern); + RgxGenProperties properties = new RgxGenProperties(); + RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true); + rgxGen.setProperties(properties); + } else { + rgxGen = new RgxGen(isolatedPattern); + } } - } else if (schema.getMinLength() != null) { - example = ""; - int len = schema.getMinLength().intValue(); - for (int i = 0; i < len; i++) example += "a"; - } else if (ModelUtils.isUUIDSchema(schema)) { - example = "046b6c7f-0b8a-43b9-b35d-6489e6daee91"; } else { - example = "string_example"; + rgxGen = new RgxGen(pattern); } + + // this seed makes it so if we have [a-z] we pick a + Random random = new Random(18); + if (rgxGen != null) { + example = rgxGen.generate(random); + } else { + throw new RuntimeException("rgxGen cannot be null. Please open an issue in the openapi-generator github repo."); + } + } else if (schema.getMinLength() != null) { + example = ""; + int len = schema.getMinLength().intValue(); + for (int i = 0; i < len; i++) example += "a"; + } else if (ModelUtils.isUUIDSchema(schema)) { + example = "046b6c7f-0b8a-43b9-b35d-6489e6daee91"; + } else { + example = "string_example"; } return fullPrefix + ensureQuotes(example) + closeChars; } else if (ModelUtils.isIntegerSchema(schema)) { @@ -1536,7 +1650,11 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o } else if (ModelUtils.isArraySchema(schema)) { if (objExample instanceof Iterable) { // If the example is already a list, return it directly instead of wrongly wrap it in another list - return fullPrefix + objExample.toString(); + return fullPrefix + objExample.toString() + closeChars; + } + if (ModelUtils.isComposedSchema(schema)) { + // complex composed array type schemas not yet handled and the code returns early + return fullPrefix + "[]" + closeChars; } ArraySchema arrayschema = (ArraySchema) schema; Schema itemSchema = arrayschema.getItems(); @@ -1544,18 +1662,68 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o includedSchemas.add(schema); String itemExample = toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1, includedSchemas); if (StringUtils.isEmpty(itemExample) || cycleFound) { - return fullPrefix + "[]"; + return fullPrefix + "[]" + closeChars; } else { return fullPrefix + "[" + "\n" + itemExample + "\n" + closingIndentation + "]" + closeChars; } - } else if (ModelUtils.isMapSchema(schema)) { + } else if (ModelUtils.isTypeObjectSchema(schema)) { if (modelName == null) { fullPrefix += "dict("; closeChars = ")"; } + if (cycleFound) { + return fullPrefix + closeChars; + } + Boolean hasProperties = (schema.getProperties() != null && !schema.getProperties().isEmpty()); + CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); + if (ModelUtils.isComposedSchema(schema)) { + // complex composed object type schemas not yet handled and the code returns early + if (hasProperties) { + // what if this composed schema defined properties + allOf? + return fullPrefix + closeChars; + } + ComposedSchema cs = (ComposedSchema) schema; + Integer allOfExists = 0; + if (cs.getAllOf() != null && !cs.getAllOf().isEmpty()) { + allOfExists = 1; + } + Integer anyOfExists = 0; + if (cs.getAnyOf() != null && !cs.getAnyOf().isEmpty()) { + anyOfExists = 1; + } + Integer oneOfExists = 0; + if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { + oneOfExists = 1; + } + if (allOfExists + anyOfExists + oneOfExists > 1) { + // what if it needs one oneOf schema, one anyOf schema, and two allOf schemas? + return fullPrefix + closeChars; + } + // for now only oneOf with discriminator is supported + if (oneOfExists == 1 && disc != null) { + ; + } else { + return fullPrefix + closeChars; + } + } + if (disc != null) { + MappedModel mm = getDiscriminatorMappedModel(disc); + if (mm == null) { + return fullPrefix + closeChars; + } + String discPropNameValue = mm.getMappingName(); + String chosenModelName = mm.getModelName(); + Schema modelSchema = getModelNameToSchemaCache().get(chosenModelName); + CodegenProperty cp = new CodegenProperty(); + cp.setName(disc.getPropertyName()); + cp.setExample(discPropNameValue); + return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); + } Object addPropsObj = schema.getAdditionalProperties(); - // TODO handle true case for additionalProperties - if (addPropsObj instanceof Schema && !cycleFound) { + if (hasProperties) { + return exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation, includedSchemas); + } else if (addPropsObj instanceof Schema) { + // TODO handle true case for additionalProperties Schema addPropsSchema = (Schema) addPropsObj; String key = "key"; Object addPropsExample = getObjectExample(addPropsSchema); @@ -1573,51 +1741,6 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o } else { example = fullPrefix + closeChars; } - return example; - } else if (ModelUtils.isObjectSchema(schema)) { - if (modelName == null) { - fullPrefix += "dict("; - closeChars = ")"; - } - if (cycleFound) { - return fullPrefix + closeChars; - } - CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); - if (disc != null) { - MappedModel mm = getDiscriminatorMappedModel(disc); - if (mm != null) { - String discPropNameValue = mm.getMappingName(); - String chosenModelName = mm.getModelName(); - // TODO handle this case in the future, this is when the discriminated - // schema allOf includes this schema, like Cat allOf includes Pet - // so this is the composed schema use case - } else { - return fullPrefix + closeChars; - } - } - return exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation, includedSchemas); - } else if (ModelUtils.isComposedSchema(schema)) { - if (cycleFound) { - return fullPrefix + closeChars; - } - // TODO add examples for composed schema models without discriminators - - CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); - if (disc != null) { - MappedModel mm = getDiscriminatorMappedModel(disc); - if (mm != null) { - String discPropNameValue = mm.getMappingName(); - String chosenModelName = mm.getModelName(); - Schema modelSchema = getModelNameToSchemaCache().get(chosenModelName); - CodegenProperty cp = new CodegenProperty(); - cp.setName(disc.getPropertyName()); - cp.setExample(discPropNameValue); - return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); - } else { - return fullPrefix + closeChars; - } - } - return fullPrefix + closeChars; } else { LOGGER.warn("Type " + schema.getType() + " not handled properly in toExampleValue"); } @@ -1892,20 +2015,21 @@ protected void updatePropertyForString(CodegenProperty property, Schema p) { property.isBinary = true; property.isFile = true; // file = binary in OAS3 } else if (ModelUtils.isUUIDSchema(p)) { - property.isUuid = true; + property.setIsString(false); // so the templates only see isUuid + property.setIsUuid(true); } else if (ModelUtils.isURISchema(p)) { property.isUri = true; } else if (ModelUtils.isEmailSchema(p)) { property.isEmail = true; } else if (ModelUtils.isDateSchema(p)) { // date format - property.setIsString(false); // for backward compatibility with 2.x + property.setIsString(false); // so the templates only see isDate property.isDate = true; } else if (ModelUtils.isDateTimeSchema(p)) { // date-time format - property.setIsString(false); // for backward compatibility with 2.x + property.setIsString(false); // so the templates only see isDateTime property.isDateTime = true; } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number + property.setIsString(false); // so the templates only see isDecimal property.isDecimal = true; - property.setIsString(false); } property.pattern = toRegularExpression(p.getPattern()); } @@ -2015,7 +2139,7 @@ protected void updateModelForComposedSchema(CodegenModel m, Schema schema, Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } @@ -2189,4 +2313,30 @@ public String defaultTemplatingEngine() { @Override public String generatorLanguageVersion() { return ">=3.9"; }; + + @Override + public void preprocessOpenAPI(OpenAPI openAPI) { + String originalSpecVersion; + if (openAPI.getExtensions() != null && !openAPI.getExtensions().isEmpty()) { + originalSpecVersion = (String) openAPI.getExtensions().get("x-original-swagger-version"); + } else { + originalSpecVersion = openAPI.getOpenapi(); + } + Integer specMajorVersion = Integer.parseInt(originalSpecVersion.substring(0, 1)); + if (specMajorVersion < 3) { + throw new RuntimeException("Your spec version of "+originalSpecVersion+" is too low. python-experimental only works with specs with version >= 3.X.X. Please use a tool like Swagger Editor or Swagger Converter to convert your spec to v3"); + } + } + + @Override + public void postProcess() { + System.out.println("################################################################################"); + System.out.println("# Thanks for using OpenAPI Generator. #"); + System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); + System.out.println("# https://opencollective.com/openapi_generator/donate #"); + System.out.println("# #"); + System.out.println("# This generator was written by Justin Black (https://github.com/spacether) #"); + System.out.println("# Please support his work directly via https://github.com/sponsors/spacether \uD83D\uDE4F#"); + System.out.println("################################################################################"); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java index 72001434c033..627e7ae10028 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java @@ -28,7 +28,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -187,12 +190,12 @@ public String getTypeDeclaration(Schema p) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); // Set will make sure that no duplicated items are used. Set securityImports = new HashSet<>(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (final CodegenOperation operation : ops) { List responses = operation.responses; if (responses != null) { @@ -229,19 +232,17 @@ public Map postProcessOperationsWithModels(Map o } } - objs.put("securityImports", new ArrayList(securityImports)); + objs.put("securityImports", new ArrayList<>(securityImports)); return objs; } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (Map.Entry entry : result.entrySet()) { + for (ModelMap mo : entry.getValue().getModels()) { + CodegenModel cm = mo.getModel(); // Add additional filename information for imports mo.put("pyImports", toPyImports(cm, cm.imports)); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java index 70b251e29b02..c088f3861a7e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java @@ -20,6 +20,7 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -292,7 +293,7 @@ public String toModelImport(String name) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 99294b06a150..1e24fc3ad521 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -24,6 +24,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -412,9 +416,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // remove model imports to avoid error - List> imports = (List>) objs.get("imports"); + List> imports = objs.getImports(); final String prefix = modelPackage(); Iterator> iterator = imports.iterator(); while (iterator.hasNext()) { @@ -424,7 +428,7 @@ public Map postProcessModels(Map objs) { } // recursively add import for mapping one type to multiple imports - List> recursiveImports = (List>) objs.get("imports"); + List> recursiveImports = objs.getImports(); if (recursiveImports == null) return objs; @@ -687,17 +691,16 @@ public String toModelTestFilename(String name) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map objectMap = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); - HashMap modelMaps = new HashMap(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + HashMap modelMaps = new HashMap<>(); + for (ModelMap modelMap : allModels) { + CodegenModel m = modelMap.getModel(); modelMaps.put(m.classname, m); } - List operations = (List) objectMap.get("operation"); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { for (CodegenParameter cp : operation.allParams) { cp.vendorExtensions.put("x-r-example", constructExampleCode(cp, modelMaps)); 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 88a8aa6547d5..1ac9398c1aaa 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 @@ -21,6 +21,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -486,7 +490,7 @@ public String toEnumName(CodegenProperty property) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } @@ -571,19 +575,18 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map operations = (Map) objs.get("operations"); - HashMap modelMaps = new HashMap(); - HashMap processedModelMaps = new HashMap(); + OperationMap operations = objs.getOperations(); + HashMap modelMaps = new HashMap<>(); + HashMap processedModelMaps = new HashMap<>(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + for (ModelMap modelMap : allModels) { + CodegenModel m = modelMap.getModel(); modelMaps.put(m.classname, m); } - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { for (CodegenParameter p : op.allParams) { p.vendorExtensions.put("x-ruby-example", constructExampleCode(p, modelMaps, processedModelMaps)); @@ -614,6 +617,9 @@ private String constructExampleCode(CodegenParameter codegenParameter, HashMap postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models return postProcessModelsEnum(objs); } - @SuppressWarnings({"static-method", "unchecked"}) - public Map postProcessAllModels(Map objs) { + @SuppressWarnings("static-method") + public Map postProcessAllModels(Map objs) { // Index all CodegenModels by model name. Map allModels = new HashMap<>(); - for (Map.Entry entry : objs.entrySet()) { + 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"); + List models = entry.getValue().getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); 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"); + for (Map.Entry entry : objs.entrySet()) { + List models = entry.getValue().getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); if (cm.discriminator != null) { List discriminatorVars = new ArrayList<>(); for (CodegenDiscriminator.MappedModel mappedModel : cm.discriminator.getMappedModels()) { @@ -252,9 +254,9 @@ public Map postProcessAllModels(Map objs) { public void processOpts() { super.processOpts(); - if (additionalProperties.containsKey(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT)) { - withAWSV4Signature = Boolean.parseBoolean(additionalProperties.get(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT).toString()); - } + if (additionalProperties.containsKey(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT)) { + withAWSV4Signature = Boolean.parseBoolean(additionalProperties.get(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT).toString()); + } if (additionalProperties.containsKey(CodegenConstants.ENUM_NAME_SUFFIX)) { enumSuffix = additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString(); @@ -525,11 +527,9 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - @SuppressWarnings("unchecked") - Map objectMap = (Map) objs.get("operations"); - @SuppressWarnings("unchecked") - List operations = (List) objectMap.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { // http method verb conversion, depending on client library (e.g. Hyper: PUT => Put, Reqwest: PUT => put) if (HYPER_LIBRARY.equals(getLibrary())) { 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 e4eb0dc9d79d..c6d73c6c2ea5 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 @@ -33,6 +33,11 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -966,9 +971,9 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { postProcessOperationWithModels(op, allModels); @@ -977,7 +982,7 @@ public Map postProcessOperationsWithModels(Map o return objs; } - private void postProcessOperationWithModels(CodegenOperation op, List allModels) { + private void postProcessOperationWithModels(CodegenOperation op, List allModels) { boolean consumesPlainText = false; boolean consumesXml = false; @@ -1263,23 +1268,20 @@ public CodegenModel fromModel(String name, Schema model) { } @Override - public Map postProcessAllModels(Map objs) { - Map newObjs = super.postProcessAllModels(objs); + public Map postProcessAllModels(Map objs) { + Map newObjs = super.postProcessAllModels(objs); //Index all CodegenModels by model name. - HashMap allModels = new HashMap(); - for (Entry entry : objs.entrySet()) { + HashMap allModels = new HashMap<>(); + for (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); + List models = entry.getValue().getModels(); + for (ModelMap mo : models) { + allModels.put(modelName, mo.getModel()); } } for (Entry entry : allModels.entrySet()) { - String modelName = entry.getKey(); CodegenModel model = entry.getValue(); if (uuidType.equals(model.dataType)) { @@ -1371,12 +1373,9 @@ public int compare(Map.Entry> a, Map.Entry bundle) { - Map apiInfo = (Map) bundle.get("apiInfo"); - List apis = (List) apiInfo.get("apis"); - for (Object api : apis) { - Map apiData = (Map) api; - Map opss = (Map) apiData.get("operations"); - List ops = (List) opss.get("operation"); + ApiInfoMap apiInfo = (ApiInfoMap) bundle.get("apiInfo"); + for (OperationsMap api : apiInfo.getApis()) { + List ops = api.getOperations().getOperation(); for (CodegenOperation op : ops) { if (!op.callbacks.isEmpty()) { return true; @@ -1558,12 +1557,9 @@ private String matchingIntType(boolean unsigned, Long inclusiveMin, Long inclusi } @Override - public Map postProcessModels(Map objs) { - List models = (List) objs.get("models"); - - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + public ModelsMap postProcessModels(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); LOGGER.trace("Post processing model: {}", cm); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index 021603e448b1..a74eabfcfe86 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -25,6 +25,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,6 +46,7 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code protected String artifactId = "openapi-client"; protected String artifactVersion = "1.0.0"; protected String resourcesFolder = "src/main/resources"; + protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; protected String configKey = "apiRequest"; protected int defaultTimeoutInMs = 5000; @@ -86,6 +90,7 @@ public ScalaAkkaClientCodegen() { outputFolder = "generated-code/scala-akka"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); + apiDocTemplateFiles.put("api_doc.mustache", ".md"); modelDocTemplateFiles.put("model_doc.mustache", ".md"); embeddedTemplateDir = templateDir = "scala-akka-client"; apiPackage = mainPackage + ".api"; @@ -166,6 +171,8 @@ public void processOpts() { } } additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); + // make api and model doc path available in mustache template + additionalProperties.put("apiDocPath", apiDocPath); additionalProperties.put("modelDocPath", modelDocPath); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); @@ -207,13 +214,12 @@ public String escapeReservedWord(String name) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { if (registerNonStandardStatusCodes) { try { - @SuppressWarnings("unchecked") - Map> opsMap = (Map>) objs.get("operations"); - HashSet unknownCodes = new HashSet(); - for (CodegenOperation operation : opsMap.get("operation")) { + OperationMap opsMap = objs.getOperations(); + HashSet unknownCodes = new HashSet<>(); + for (CodegenOperation operation : opsMap.getOperation()) { for (CodegenResponse response : operation.responses) { if ("default".equals(response.code)) { continue; @@ -246,13 +252,7 @@ public List fromSecurity(Map schemes) { } // Remove OAuth securities - Iterator it = codegenSecurities.iterator(); - while (it.hasNext()) { - final CodegenSecurity security = it.next(); - if (security.isOAuth) { - it.remove(); - } - } + codegenSecurities.removeIf(security -> security.isOAuth); if (codegenSecurities.isEmpty()) { return null; } @@ -364,6 +364,11 @@ public void setMainPackage(String mainPackage) { this.configKeyPath = this.mainPackage = mainPackage; } + @Override + public String apiDocFileFolder() { + return (outputFolder + File.separator + apiDocPath).replace('/', File.separatorChar); + } + @Override public String modelDocFileFolder() { return (outputFolder + File.separator + modelDocPath).replace('/', File.separatorChar); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaHttpServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaHttpServerCodegen.java index ea4583aec17f..dd50aec48895 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaHttpServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaHttpServerCodegen.java @@ -25,6 +25,9 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -281,8 +284,8 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map baseObjs = super.postProcessOperationsWithModels(objs, allModels); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationsMap baseObjs = super.postProcessOperationsWithModels(objs, allModels); pathMatcherPatternsPostProcessor(baseObjs); marshallingPostProcessor(baseObjs); return baseObjs; @@ -343,13 +346,12 @@ protected void addPathMatcher(CodegenOperation codegenOperation) { public static String PATH_MATCHER_PATTERNS_KEY = "pathMatcherPatterns"; - @SuppressWarnings("unchecked") - private static void pathMatcherPatternsPostProcessor(Map objs) { + private static void pathMatcherPatternsPostProcessor(OperationsMap objs) { if (objs != null) { HashMap patternMap = new HashMap<>(); - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { for (CodegenParameter parameter : operation.pathParams) { if (parameter.pattern != null && !parameter.pattern.isEmpty()) { @@ -370,8 +372,7 @@ private static String pathMatcherPatternName(CodegenParameter parameter) { } // Responsible for setting up Marshallers/Unmarshallers - @SuppressWarnings("unchecked") - public static void marshallingPostProcessor(Map objs) { + public static void marshallingPostProcessor(OperationsMap objs) { if (objs == null) { return; @@ -383,9 +384,9 @@ public static void marshallingPostProcessor(Map objs) { boolean hasCookieParams = false; boolean hasMultipart = false; - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List operationList = (List) operations.get("operation"); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { boolean isMultipart = op.isMultipart; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index 7aa5bfcce978..4dde3ea3b6f2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -21,6 +21,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -228,11 +231,10 @@ public String modelFileFolder() { return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar); } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { // Converts GET /foo/bar => get("foo" :: "bar") diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java index 36ec66b3712a..c4d38de101c3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java @@ -20,6 +20,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -163,12 +167,10 @@ public String toOperationId(String operationId) { } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap 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 (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); for (CodegenProperty var : cm.vars) { if (var.isEnum) { @@ -186,9 +188,8 @@ public Map postProcessModelsEnum(Map objs) { if (additionalProperties.containsKey("gson")) { List> imports = (List>) objs.get("imports"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("SerializedName")); @@ -203,9 +204,9 @@ public Map postProcessModelsEnum(Map objs) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - ArrayList oplist = (ArrayList) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List oplist = operations.getOperation(); for (CodegenOperation codegenOperation : oplist) { String path = codegenOperation.path; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index d918994d3ece..eaa7dcf08a34 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -23,6 +23,11 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ApiInfoMap; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -221,19 +226,18 @@ protected ImmutableMap.Builder addMustacheLambdas() { .put("indented_4", new IndentedLambda(4, " ")); } - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { Map models = new HashMap<>(); - for (Object _mo : allModels) { - CodegenModel model = (CodegenModel) ((Map) _mo).get("model"); - models.put(model.classname, model); + for (ModelMap _mo : allModels) { + CodegenModel model = _mo.getModel(); + models.put(model.classname, _mo.getModel()); } - Map operations = (Map) objs.get("operations"); + OperationMap operations = objs.getOperations(); if (operations != null) { - List ops = (List) operations.get("operation"); + List ops = operations.getOperation(); for (CodegenOperation operation : ops) { Pattern pathVariableMatcher = Pattern.compile("\\{([^}]+)}"); Matcher match = pathVariableMatcher.matcher(operation.path); @@ -252,18 +256,14 @@ public Map postProcessOperationsWithModels(Map o return objs; } - @SuppressWarnings("unchecked") @Override - public Map postProcessAllModels(Map objs) { + public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); Map modelsByClassName = new HashMap<>(); - for (Object _outer : objs.values()) { - Map outer = (Map) _outer; - List> models = (List>) outer.get("models"); - - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelsMap outer : objs.values()) { + for (ModelMap mo : outer.getModels()) { + CodegenModel cm = mo.getModel(); postProcessModelsEnum(outer); cm.classVarName = camelize(cm.classVarName, true); modelsByClassName.put(cm.classname, cm); @@ -279,18 +279,15 @@ public Map postProcessAllModels(Map objs) { return objs; } - @SuppressWarnings("unchecked") @Override public Map postProcessSupportingFileData(Map objs) { objs = super.postProcessSupportingFileData(objs); generateJSONSpecFile(objs); // Prettify routes file - Map apiInfo = (Map) objs.get("apiInfo"); - List> apis = (List>) apiInfo.get("apis"); - List ops = apis.stream() - .map(api -> (Map) api.get("operations")) - .flatMap(operations -> ((List) operations.get("operation")).stream()) + ApiInfoMap apiInfo = (ApiInfoMap) objs.get("apiInfo"); + List ops = apiInfo.getApis().stream() + .flatMap(api -> api.getOperations().getOperation().stream()) .collect(Collectors.toList()); int maxPathLength = ops.stream() .mapToInt(op -> op.httpMethod.length() + op.path.length()) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java index a31d41ff4a8c..0d3c45fd9b8d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java @@ -28,6 +28,10 @@ import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -219,7 +223,7 @@ public String escapeReservedWord(String name) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { return objs; } @@ -231,8 +235,8 @@ public Map postProcessModels(Map objs) { * @return An in-place modified state of the codegen object model. */ @Override - public Map postProcessAllModels(Map objs) { - final Map processed = super.postProcessAllModels(objs); + public Map postProcessAllModels(Map objs) { + final Map processed = super.postProcessAllModels(objs); postProcessUpdateImports(processed); return processed; } @@ -246,26 +250,25 @@ public Map postProcessAllModels(Map objs) { * @param models processed models to be further processed */ @SuppressWarnings("unchecked") - private void postProcessUpdateImports(final Map models) { + private void postProcessUpdateImports(final Map models) { final String prefix = modelPackage() + "."; - Map enumRefs = new HashMap(); - for (Map.Entry entry : models.entrySet()) { - CodegenModel model = ModelUtils.getModelByName(entry.getKey(), models); + Map enumRefs = new HashMap<>(); + for (String key : models.keySet()) { + CodegenModel model = ModelUtils.getModelByName(key, models); if (model.isEnum) { - Map objs = (Map)models.get(entry.getKey()); - enumRefs.put(entry.getKey(), objs); + ModelsMap objs = models.get(key); + enumRefs.put(key, objs); } } - for (Map.Entry entry : models.entrySet()) { - String openAPIName = entry.getKey(); + for (String openAPIName : models.keySet()) { CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model == null) { - LOGGER.warn("Expected to retrieve model %s by name, but no model was found. Check your -Dmodels inclusions.", openAPIName); + LOGGER.warn("Expected to retrieve model {} by name, but no model was found. Check your -Dmodels inclusions.", openAPIName); continue; } - Map objs = (Map)models.get(openAPIName); - List> imports = (List>) objs.get("imports"); + ModelsMap objs = models.get(openAPIName); + List> imports = objs.getImports(); if (imports == null || imports.isEmpty()) { continue; } @@ -274,7 +277,7 @@ private void postProcessUpdateImports(final Map models) { while (iterator.hasNext()) { String importPath = iterator.next().get("import"); if (importPath.startsWith(prefix)) { - if (isEnumClass(importPath, (Map)enumRefs)) { + if (isEnumClass(importPath, enumRefs)) { Map item = new HashMap<>(); item.put("import", importPath.concat("._")); newImports.add(item); @@ -288,25 +291,21 @@ private void postProcessUpdateImports(final Map models) { } // reset imports - objs.put("imports", newImports); + objs.setImports(newImports); } } - @SuppressWarnings("unchecked") - private boolean isEnumClass(final String importPath, final Map enumModels) { + private boolean isEnumClass(final String importPath, final Map enumModels) { if (enumModels == null || enumModels.isEmpty()) { return false; } - for (Map.Entry entry : enumModels.entrySet()) { - String name = entry.getKey(); - Map objs = (Map)enumModels.get(name); - List> modles = (List>) objs.get("models"); + for (ModelsMap objs : enumModels.values()) { + List modles = objs.getModels(); if (modles == null || modles.isEmpty()) { continue; } - Iterator> iterator = modles.iterator(); - while (iterator.hasNext()) { - String enumImportPath = (String)iterator.next().get("importPath"); + for (final Map modle : modles) { + String enumImportPath = (String) modle.get("importPath"); if (enumImportPath != null && enumImportPath.equals(importPath)) { return true; } @@ -316,13 +315,12 @@ private boolean isEnumClass(final String importPath, final Map e } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { if (registerNonStandardStatusCodes) { try { - @SuppressWarnings("unchecked") - Map> opsMap = (Map>) objs.get("operations"); - HashSet unknownCodes = new HashSet(); - for (CodegenOperation operation : opsMap.get("operation")) { + OperationMap opsMap = objs.getOperations(); + HashSet unknownCodes = new HashSet<>(); + for (CodegenOperation operation : opsMap.getOperation()) { for (CodegenResponse response : operation.responses) { if ("default".equals(response.code)) { continue; @@ -355,13 +353,7 @@ public List fromSecurity(Map schemes) { } // Remove OAuth securities - Iterator it = codegenSecurities.iterator(); - while (it.hasNext()) { - final CodegenSecurity security = it.next(); - if (security.isOAuth) { - it.remove(); - } - } + codegenSecurities.removeIf(security -> security.isOAuth); if (codegenSecurities.isEmpty()) { return null; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java index f781e8dc817a..b22533ff2ccf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java @@ -19,6 +19,9 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.util.*; @@ -166,9 +169,9 @@ public String getHelp() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { // force http method to lower case op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 3230786bca85..4067c83c76b8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -32,9 +32,12 @@ import java.util.Arrays; import java.util.EnumSet; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Objects; +import java.util.Set; import java.util.regex.Matcher; import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.Pair; @@ -48,6 +51,7 @@ import org.openapitools.codegen.CodegenSecurity; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.VendorExtension; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; import org.openapitools.codegen.languages.features.OptionalFeatures; @@ -59,6 +63,10 @@ import org.openapitools.codegen.meta.features.SchemaSupportFeature; import org.openapitools.codegen.meta.features.SecurityFeature; import org.openapitools.codegen.meta.features.WireFormatFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.SplitStringLambda; import org.openapitools.codegen.templating.mustache.TrimWhitespaceLambda; import org.openapitools.codegen.utils.URLPathUtils; @@ -85,7 +93,6 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String USE_TAGS = "useTags"; public static final String SPRING_BOOT = "spring-boot"; public static final String SPRING_CLOUD_LIBRARY = "spring-cloud"; - public static final String IMPLICIT_HEADERS = "implicitHeaders"; public static final String API_FIRST = "apiFirst"; public static final String SPRING_CONTROLLER = "useSpringController"; public static final String HATEOAS = "hateoas"; @@ -109,7 +116,6 @@ public class SpringCodegen extends AbstractJavaCodegen protected boolean useTags = false; protected boolean useBeanValidation = true; protected boolean performBeanValidation = false; - protected boolean implicitHeaders = false; protected boolean apiFirst = false; protected boolean useOptional = false; protected boolean virtualService = false; @@ -179,9 +185,6 @@ public SpringCodegen() { .add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation)); cliOptions.add(CliOption.newBoolean(PERFORM_BEANVALIDATION, "Use Bean Validation Impl. to perform BeanValidation", performBeanValidation)); - cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, - "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", - implicitHeaders)); cliOptions.add(CliOption.newBoolean(API_FIRST, "Generate the API from the OAI spec at server compile time (API first approach)", apiFirst)); cliOptions @@ -285,6 +288,8 @@ public void processOpts() { } super.processOpts(); + useOneOfInterfaces = true; + legacyDiscriminatorBehavior = false; if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) { LOGGER.warn("The springfox documentation provider is deprecated for removal. Use the springdoc provider instead."); @@ -368,10 +373,6 @@ public void processOpts() { this.setUseOptional(convertPropertyToBoolean(USE_OPTIONAL)); } - if (additionalProperties.containsKey(IMPLICIT_HEADERS)) { - this.setImplicitHeaders(Boolean.parseBoolean(additionalProperties.get(IMPLICIT_HEADERS).toString())); - } - if (additionalProperties.containsKey(API_FIRST)) { this.setApiFirst(Boolean.parseBoolean(additionalProperties.get(API_FIRST).toString())); } @@ -626,10 +627,10 @@ public void preprocessOpenAPI(OpenAPI openAPI) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - final Map operations = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + final OperationMap operations = objs.getOperations(); if (operations != null) { - final List ops = (List) operations.get("operation"); + final List ops = operations.getOperation(); for (final CodegenOperation operation : ops) { final List responses = operation.responses; if (responses != null) { @@ -664,10 +665,9 @@ public void setReturnContainer(final String returnContainer) { } }); - if (implicitHeaders) { - removeHeadersFromAllParams(operation.allParams); - } + handleImplicitHeaders(operation); } + objs.put("tagDescription", ops.get(0).tags.get(0).getDescription()); } return objs; @@ -688,46 +688,30 @@ private void doDataTypeAssignment(String returnType, DataTypeAssigner dataTypeAs final String rt = returnType; if (rt == null) { dataTypeAssigner.setReturnType("Void"); - } else if (rt.startsWith("List")) { + } else if (rt.startsWith("List") || rt.startsWith("java.util.List")) { + final int start = rt.indexOf("<"); final int end = rt.lastIndexOf(">"); - if (end > 0) { - dataTypeAssigner.setReturnType(rt.substring("List<".length(), end).trim()); + if (start > 0 && end > 0) { + dataTypeAssigner.setReturnType(rt.substring(start + 1, end).trim()); dataTypeAssigner.setReturnContainer("List"); } - } else if (rt.startsWith("Map")) { + } else if (rt.startsWith("Map") || rt.startsWith("java.util.Map")) { + final int start = rt.indexOf("<"); final int end = rt.lastIndexOf(">"); - if (end > 0) { - dataTypeAssigner.setReturnType(rt.substring("Map<".length(), end).split(",", 2)[1].trim()); + if (start > 0 && end > 0) { + dataTypeAssigner.setReturnType(rt.substring(start + 1, end).split(",", 2)[1].trim()); dataTypeAssigner.setReturnContainer("Map"); } - } else if (rt.startsWith("Set")) { + } else if (rt.startsWith("Set") || rt.startsWith("java.util.Set")) { + final int start = rt.indexOf("<"); final int end = rt.lastIndexOf(">"); - if (end > 0) { - dataTypeAssigner.setReturnType(rt.substring("Set<".length(), end).trim()); + if (start > 0 && end > 0) { + dataTypeAssigner.setReturnType(rt.substring(start + 1, end).trim()); dataTypeAssigner.setReturnContainer("Set"); } } } - /** - * This method removes header parameters from the list of parameters - * - * @param allParams list of all parameters - */ - private void removeHeadersFromAllParams(List allParams) { - if (allParams.isEmpty()) { - return; - } - final ArrayList copy = new ArrayList<>(allParams); - allParams.clear(); - - for (final CodegenParameter p : copy) { - if (!p.isHeaderParam) { - allParams.add(p); - } - } - } - @Override public Map postProcessSupportingFileData(Map objs) { generateYAMLSpecFile(objs); @@ -838,10 +822,6 @@ public void setUseTags(boolean useTags) { this.useTags = useTags; } - public void setImplicitHeaders(boolean implicitHeaders) { - this.implicitHeaders = implicitHeaders; - } - public void setApiFirst(boolean apiFirst) { this.apiFirst = apiFirst; } @@ -907,9 +887,67 @@ public CodegenModel fromModel(String name, Schema model) { codegenModel.imports.remove("ApiModelProperty"); codegenModel.imports.remove("ApiModel"); } + return codegenModel; } + /** + * Analyse and post process all Models. + * Add parentVars to every Model which has a parent. This allows to generate + * fluent setter methods for inherited properties. + * @param objs the models map. + * @return the processed models map. + */ + @Override + public Map postProcessAllModels(Map objs) { + objs = super.postProcessAllModels(objs); + objs = super.updateAllModels(objs); + + for (ModelsMap modelsAttrs : objs.values()) { + for (ModelMap mo : modelsAttrs.getModels()) { + CodegenModel codegenModel = mo.getModel(); + Set inheritedImports = new HashSet<>(); + Map propertyHash = new HashMap<>(codegenModel.vars.size()); + for (final CodegenProperty property : codegenModel.vars) { + propertyHash.put(property.name, property); + } + CodegenModel parentCodegenModel = codegenModel.parentModel; + while (parentCodegenModel != null) { + for (final CodegenProperty property : parentCodegenModel.vars) { + // helper list of parentVars simplifies templating + if (!propertyHash.containsKey(property.name)) { + propertyHash.put(property.name, property); + final CodegenProperty parentVar = property.clone(); + parentVar.isInherited = true; + LOGGER.info("adding parent variable {}", property.name); + codegenModel.parentVars.add(parentVar); + Set imports = parentVar.getImports(true).stream().filter(Objects::nonNull).collect(Collectors.toSet()); + for (String imp: imports) { + // Avoid dupes + if (!codegenModel.getImports().contains(imp)) { + inheritedImports.add(imp); + codegenModel.getImports().add(imp); + } + } + } + } + parentCodegenModel = parentCodegenModel.getParentModel(); + } + // There must be a better way ... + for (String imp: inheritedImports) { + String qimp = importMapping().get(imp); + if (qimp != null) { + Map toAdd = new HashMap<>(); + toAdd.put("import", qimp); + modelsAttrs.getImports().add(toAdd); + } + } + } + } + return objs; + } + + /* * Add dynamic imports based on the parameters and vendor extensions of an operation. * The imports are expanded by the mustache {{import}} tag available to model and api @@ -943,15 +981,13 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation } @Override - public Map postProcessModelsEnum(Map objs) { + public ModelsMap postProcessModelsEnum(ModelsMap objs) { objs = super.postProcessModelsEnum(objs); // Add imports for Jackson - final List> imports = (List>) objs.get("imports"); - final List models = (List) objs.get("models"); - for (final Object _mo : models) { - final Map mo = (Map) _mo; - final CodegenModel cm = (CodegenModel) mo.get("model"); + final List> imports = objs.getImports(); + for (ModelMap mo : objs.getModels()) { + CodegenModel cm = mo.getModel(); // for enum model if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) { cm.imports.add(importMapping.get("JsonValue")); @@ -983,4 +1019,11 @@ public void setUseOptional(boolean useOptional) { public void setUseSwaggerUI(boolean useSwaggerUI) { this.useSwaggerUI = useSwaggerUI; } + + @Override + public List getSupportedVendorExtensions() { + List extensions = super.getSupportedVendorExtensions(); + extensions.add(VendorExtension.X_SPRING_PAGINATED); + return extensions; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index a6a2c81328f0..b2210f39f51a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -28,6 +28,9 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.Markdown; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -141,9 +144,9 @@ public String getTypeDeclaration(Schema p) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); for (CodegenResponse response : op.responses) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index b3a34018238d..63457b57d7d7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -25,6 +25,9 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.Markdown; import org.openapitools.codegen.utils.ModelUtils; @@ -124,9 +127,9 @@ public String getTypeDeclaration(Schema p) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); for (CodegenResponse response : op.responses) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index ed0dc45e1b9c..08afea2fa608 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -22,10 +22,14 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.text.WordUtils; +import org.apache.commons.text.WordUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,8 +37,6 @@ import java.io.File; import java.io.IOException; import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.time.OffsetDateTime; import java.time.Instant; import java.time.temporal.ChronoField; @@ -1084,8 +1086,8 @@ public String toEnumName(CodegenProperty property) { } @Override - public Map postProcessModels(Map objs) { - Map postProcessedModelsEnum = postProcessModelsEnum(objs); + public ModelsMap postProcessModels(ModelsMap objs) { + ModelsMap postProcessedModelsEnum = postProcessModelsEnum(objs); // We iterate through the list of models, and also iterate through each of the // properties for each model. For each property, if: @@ -1100,10 +1102,8 @@ public Map postProcessModels(Map objs) { // // CodegenModel.vendorExtensions["x-codegen-has-escaped-property-names"] = true // - List models = (List) postProcessedModelsEnum.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : postProcessedModelsEnum.getModels()) { + CodegenModel cm = mo.getModel(); boolean modelHasPropertyWithEscapedName = false; for (CodegenProperty prop : cm.allVars) { if (!prop.name.equals(prop.baseName)) { @@ -1184,17 +1184,16 @@ public void postProcessFile(File file, String fileType) { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map objectMap = (Map) objs.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + OperationMap objectMap = objs.getOperations(); - HashMap modelMaps = new HashMap(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); + HashMap modelMaps = new HashMap<>(); + for (ModelMap modelMap: allModels) { + CodegenModel m = modelMap.getModel(); modelMaps.put(m.classname, m); } - List operations = (List) objectMap.get("operation"); + List operations = objectMap.getOperation(); for (CodegenOperation operation : operations) { for (CodegenParameter cp : operation.allParams) { cp.vendorExtensions.put("x-swift-example", constructExampleCode(cp, modelMaps, new HashSet<>())); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 5e2dd688c1ca..73903cdf9592 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -20,6 +20,10 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.SemVer; import org.slf4j.Logger; @@ -383,13 +387,13 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); // Add filename information for api imports - objs.put("apiFilename", getApiFilenameFromClassname(objs.get("classname").toString())); + objs.put("apiFilename", getApiFilenameFromClassname(objs.getClassname())); - List ops = (List) objs.get("operation"); + List ops = objs.getOperation(); boolean hasSomeFormParams = false; for (CodegenOperation op : ops) { if (op.getHasFormParams()) { @@ -444,8 +448,8 @@ public Map postProcessOperationsWithModels(Map o operations.put("hasSomeFormParams", hasSomeFormParams); // Add additional filename information for model imports in the services - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { + List> imports = operations.getImports(); + for (Map im : imports) { // This property is not used in the templates any more, subject for removal im.put("filename", im.get("import")); im.put("classname", im.get("classname")); @@ -471,19 +475,17 @@ private CodegenParameter findPathParameterByName(CodegenOperation operation, Str } @Override - public Map postProcessModels(Map objs) { - Map result = super.postProcessModels(objs); + public ModelsMap postProcessModels(ModelsMap objs) { + ModelsMap result = super.postProcessModels(objs); return postProcessModelsEnum(result); } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); if (taggedUnions) { mo.put(TAGGED_UNIONS, true); if (cm.discriminator != null && cm.children != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java index 544af6f3c68a..be3224dbb7f6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java @@ -18,6 +18,10 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import java.util.*; @@ -82,12 +86,12 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); HashSet modelImports = new HashSet<>(); - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); for (CodegenOperation op : operationList) { // Aurelia uses "asGet", "asPost", ... methods; change the method format op.httpMethod = camelize(op.httpMethod.toLowerCase(Locale.ROOT)); @@ -109,13 +113,12 @@ public Map postProcessOperationsWithModels(Map o } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models - List models = (List) postProcessModelsEnum(objs).get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + List models = postProcessModelsEnum(objs).getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); for (CodegenProperty var : cm.vars) { // name enum with model name, e.g. StatusEnum => PetStatusEnum if (Boolean.TRUE.equals(var.isEnum)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index d76292d47412..41574681763b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -22,6 +22,10 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import java.util.*; @@ -143,10 +147,10 @@ public void processOpts() { } @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); - Map vals = (Map) objs.getOrDefault("operations", new HashMap<>()); - List operations = (List) vals.getOrDefault("operation", new ArrayList<>()); + OperationMap vals = objs.getOperations(); + List operations = vals.getOperation(); /* Filter all the operations that are multipart/form-data operations and set the vendor extension flag 'multipartFormData' for the template to work with. @@ -154,9 +158,7 @@ public Map postProcessOperationsWithModels(Map o operations.stream() .filter(op -> op.hasConsumes) .filter(op -> op.consumes.stream().anyMatch(opc -> opc.values().stream().anyMatch("multipart/form-data"::equals))) - .forEach(op -> { - op.vendorExtensions.putIfAbsent("multipartFormData", true); - }); + .forEach(op -> op.vendorExtensions.putIfAbsent("multipartFormData", true)); return objs; } @@ -169,13 +171,11 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map model : models) { - CodegenModel codegenModel = (CodegenModel) model.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap model : entry.getModels()) { + CodegenModel codegenModel = model.getModel(); model.put("hasAllOf", codegenModel.allOf.size() > 0); model.put("hasOneOf", codegenModel.oneOf.size() > 0); } @@ -191,25 +191,23 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } @Override - @SuppressWarnings("unchecked") - public Map postProcessModels(Map objs) { - List models = (List) postProcessModelsEnum(objs).get("models"); + public ModelsMap postProcessModels(ModelsMap objs) { + List models = postProcessModelsEnum(objs).getModels(); boolean withoutPrefixEnums = false; if (additionalProperties.containsKey(WITHOUT_PREFIX_ENUMS)) { withoutPrefixEnums = Boolean.parseBoolean(additionalProperties.get(WITHOUT_PREFIX_ENUMS).toString()); } - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); // Deduce the model file name in kebab case cm.classFilename = cm.classname.replaceAll("([a-z0-9])([A-Z])", "$1-$2").toLowerCase(Locale.ROOT); //processed enum names if(!withoutPrefixEnums) { - cm.imports = new TreeSet(cm.imports); + cm.imports = new TreeSet<>(cm.imports); // name enum with model name, e.g. StatusEnum => PetStatusEnum for (CodegenProperty var : cm.vars) { if (Boolean.TRUE.equals(var.isEnum)) { @@ -229,7 +227,7 @@ public Map postProcessModels(Map objs) { } // Apply the model file name to the imports as well - for (Map m : (List>) objs.get("imports")) { + for (Map m : objs.getImports()) { String javaImport = m.get("import").substring(modelPackage.length() + 1); String tsImport = tsModelPackage + "/" + javaImport; m.put("tsImport", tsImport); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java index f6fa5c0050d6..d7a2af88dfe1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java @@ -23,7 +23,6 @@ import io.swagger.v3.oas.models.media.*; import io.swagger.v3.oas.models.media.MediaType; import io.swagger.v3.oas.models.parameters.RequestBody; -import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.ComposedSchema; @@ -34,6 +33,10 @@ import org.openapitools.codegen.CodegenDiscriminator.MappedModel; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -317,18 +320,17 @@ public Map postProcessSupportingFileData(Map obj } @Override - public Map postProcessOperationsWithModels(Map operations, List models) { + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List models) { // Add additional filename information for model imports in the apis - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { - im.put("filename", ((String) im.get("import")).replace(".", "/")); - im.put("classname", getModelnameFromModelFilename(im.get("import").toString())); + List> imports = operations.getImports(); + for (Map im : imports) { + im.put("filename", im.get("import").replace(".", "/")); + im.put("classname", getModelnameFromModelFilename(im.get("import"))); } - @SuppressWarnings("unchecked") - Map operationsMap = (Map) operations.get("operations"); - List operationList = (List) operationsMap.get("operation"); + OperationMap operationsMap = operations.getOperations(); + List operationList = operationsMap.getOperation(); for (CodegenOperation operation: operationList) { List responses = operation.responses; operation.returnType = this.getReturnType(responses); @@ -693,13 +695,12 @@ public String toEnumName(CodegenProperty property) { } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models - List> models = (List>) postProcessModelsEnum(objs).get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + List models = postProcessModelsEnum(objs).getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); // name enum with model name, e.g. StatusEnum => Pet.StatusEnum for (CodegenProperty var : cm.vars) { if (Boolean.TRUE.equals(var.isEnum)) { @@ -715,8 +716,8 @@ public Map postProcessModels(Map objs) { } } } - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); // Add additional filename information for imports mo.put("tsImports", toTsImports(cm, cm.imports)); } @@ -739,14 +740,12 @@ private List> toTsImports(CodegenModel cm, Set impor @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); if (cm.discriminator != null && cm.children != null) { for (CodegenModel child : cm.children) { this.setDiscriminatorValue(child, cm.discriminator.getPropertyName(), this.getDiscriminatorValue(child)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index 0d47cdcd7ac6..0fa0ba05984e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -28,6 +28,10 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.utils.ModelUtils; @@ -39,16 +43,17 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege public static final String WITH_INTERFACES = "withInterfaces"; public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter"; public static final String PREFIX_PARAMETER_INTERFACES = "prefixParameterInterfaces"; - public static final String TYPESCRIPT_THREE_PLUS = "typescriptThreePlus"; public static final String WITHOUT_RUNTIME_CHECKS = "withoutRuntimeChecks"; + public static final String STRING_ENUMS = "stringEnums"; + public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values."; protected String npmRepository = null; private boolean useSingleRequestParameter = true; private boolean prefixParameterInterfaces = false; protected boolean addedApiIndex = false; protected boolean addedModelIndex = false; - protected boolean typescriptThreePlus = true; protected boolean withoutRuntimeChecks = false; + protected boolean stringEnums = false; // "Saga and Record" mode. public static final String SAGAS_AND_RECORDS = "sagasAndRecords"; @@ -90,9 +95,9 @@ public TypeScriptFetchClientCodegen() { this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(CodegenConstants.USE_SINGLE_REQUEST_PARAMETER, CodegenConstants.USE_SINGLE_REQUEST_PARAMETER_DESC, SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString())); this.cliOptions.add(new CliOption(PREFIX_PARAMETER_INTERFACES, "Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); - this.cliOptions.add(new CliOption(TYPESCRIPT_THREE_PLUS, "Setting this property to true will generate TypeScript 3.6+ compatible code.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString())); this.cliOptions.add(new CliOption(WITHOUT_RUNTIME_CHECKS, "Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(SAGAS_AND_RECORDS, "Setting this property to true will generate additional files for use with redux-saga and immutablejs.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); + this.cliOptions.add(new CliOption(STRING_ENUMS, STRING_ENUMS_DESC, SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); } @Override @@ -113,14 +118,6 @@ public void setNpmRepository(String npmRepository) { this.npmRepository = npmRepository; } - public Boolean getTypescriptThreePlus() { - return typescriptThreePlus; - } - - public void setTypescriptThreePlus(Boolean typescriptThreePlus) { - this.typescriptThreePlus = typescriptThreePlus; - } - public Boolean getWithoutRuntimeChecks() { return withoutRuntimeChecks; } @@ -129,6 +126,13 @@ public void setWithoutRuntimeChecks(Boolean withoutRuntimeChecks) { this.withoutRuntimeChecks = withoutRuntimeChecks; } + public Boolean getStringEnums() { + return this.stringEnums; + } + public void setStringEnums(Boolean stringEnums) { + this.stringEnums = stringEnums; + } + public Boolean getSagasAndRecords() { return sagasAndRecords; } @@ -218,14 +222,14 @@ public void processOpts() { addNpmPackageGeneration(); } - if (additionalProperties.containsKey(TYPESCRIPT_THREE_PLUS)) { - this.setTypescriptThreePlus(convertPropertyToBoolean(TYPESCRIPT_THREE_PLUS)); - } - if (additionalProperties.containsKey(WITHOUT_RUNTIME_CHECKS)) { this.setWithoutRuntimeChecks(convertPropertyToBoolean(WITHOUT_RUNTIME_CHECKS)); } + if (additionalProperties.containsKey(STRING_ENUMS)) { + this.setStringEnums(convertPropertyToBoolean(STRING_ENUMS)); + } + if (!withoutRuntimeChecks) { this.modelTemplateFiles.put("models.mustache", ".ts"); typeMapping.put("date", "Date"); @@ -306,13 +310,12 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } @Override - public Map postProcessModels(Map objs) { - List models = (List) postProcessModelsEnum(objs).get("models"); + public ModelsMap postProcessModels(ModelsMap objs) { + List models = postProcessModelsEnum(objs).getModels(); // process enum and custom properties in models - for (Object _mo : models) { - Map mo = (Map) _mo; - ExtendedCodegenModel cm = (ExtendedCodegenModel) mo.get("model"); + for (ModelMap mo : models) { + ExtendedCodegenModel cm = (ExtendedCodegenModel) mo.getModel(); cm.imports = new TreeSet<>(cm.imports); this.processCodeGenModel(cm); } @@ -329,16 +332,14 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessAllModels(Map objs) { - List allModels = new ArrayList(); - List entityModelClassnames = new ArrayList(); - - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map model : models) { - ExtendedCodegenModel codegenModel = (ExtendedCodegenModel) model.get("model"); + public Map postProcessAllModels(Map objs) { + List allModels = new ArrayList<>(); + List entityModelClassnames = new ArrayList<>(); + + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap model : entry.getModels()) { + ExtendedCodegenModel codegenModel = (ExtendedCodegenModel) model.getModel(); model.put("hasImports", codegenModel.imports.size() > 0); allModels.add(codegenModel); @@ -405,6 +406,10 @@ private void addNpmPackageGeneration() { supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("package.mustache", "", "package.json")); supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json")); + // in case ECMAScript 6 is supported add another tsconfig for an ESM (ECMAScript Module) + if (supportsES6) { + supportingFiles.add(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json")); + } supportingFiles.add(new SupportingFile("npmignore.mustache", "", ".npmignore")); supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore")); } @@ -554,9 +559,9 @@ public String escapeReservedWord(String name) { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { // Add supporting file only if we plan to generate files in /apis - if (operations.size() > 0 && !addedApiIndex) { + if (!operations.isEmpty() && !addedApiIndex) { addedApiIndex = true; supportingFiles.add(new SupportingFile("apis.index.mustache", apiPackage().replace('.', File.separatorChar), "index.ts")); if (this.getSagasAndRecords()) { @@ -566,7 +571,7 @@ public Map postProcessOperationsWithModels(Map o } // Add supporting file only if we plan to generate files in /models - if (allModels.size() > 0 && !addedModelIndex) { + if (!allModels.isEmpty() && !addedModelIndex) { addedModelIndex = true; supportingFiles.add(new SupportingFile("models.index.mustache", modelPackage().replace('.', File.separatorChar), "index.ts")); } @@ -745,10 +750,9 @@ private boolean itemsAreNullable(ExtendedCodegenProperty var) { return var.items.isNullable || (var.items.items != null && var.items.items.isNullable); } - private void escapeOperationIds(Map operations) { - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); - for (ExtendedCodegenOperation op : operationList) { + private void escapeOperationIds(OperationsMap operations) { + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; String param = op.operationIdCamelCase + "Request"; if (op.imports.contains(param)) { // we import a model with the same name as the generated operation, escape it @@ -759,26 +763,25 @@ private void escapeOperationIds(Map operations) { } } - private void addOperationModelImportInformation(Map operations) { + private void addOperationModelImportInformation(OperationsMap operations) { // This method will add extra information to the operations.imports array. // The api template uses this information to import all the required // models for a given operation. - List> imports = (List>) operations.get("imports"); - List existingRecordClassNames = new ArrayList(); - List existingClassNames = new ArrayList(); - for (Map im : imports) { - String className = im.get("import").toString().replace(modelPackage() + ".", ""); + List> imports = operations.getImports(); + List existingRecordClassNames = new ArrayList<>(); + List existingClassNames = new ArrayList<>(); + for (Map im : imports) { + String className = im.get("import").replace(modelPackage() + ".", ""); existingClassNames.add(className); existingRecordClassNames.add(className + "Record"); im.put("className", className); } if (this.getSagasAndRecords()) { - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); - Set additionalPassthroughImports = new TreeSet(); - for (ExtendedCodegenOperation op : operationList) { - if (op.returnPassthrough != null && op.returnBaseTypeAlternate instanceof String) { + Set additionalPassthroughImports = new TreeSet<>(); + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; + if (op.returnPassthrough != null && op.returnBaseTypeAlternate != null) { if (op.returnTypeSupportsEntities && !existingRecordClassNames.contains(op.returnBaseTypeAlternate)) { additionalPassthroughImports.add(op.returnBaseTypeAlternate); } else if (!op.returnTypeSupportsEntities && !existingClassNames.contains(op.returnBaseTypeAlternate)) { @@ -791,14 +794,13 @@ private void addOperationModelImportInformation(Map operations) } } - private void updateOperationParameterForEnum(Map operations) { + private void updateOperationParameterForEnum(OperationsMap operations) { // This method will add extra information as to whether or not we have enums and // update their names with the operation.id prefixed. // It will also set the uniqueId status if provided. - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); boolean hasEnum = false; - for (ExtendedCodegenOperation op : operationList) { + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; for (CodegenParameter cpParam : op.allParams) { ExtendedCodegenParameter param = (ExtendedCodegenParameter) cpParam; @@ -813,13 +815,12 @@ private void updateOperationParameterForEnum(Map operations) { operations.put("hasEnums", hasEnum); } - private void updateOperationParameterForSagaAndRecords(Map operations) { + private void updateOperationParameterForSagaAndRecords(OperationsMap operations) { // This method will add extra information as to whether or not we have enums and // update their names with the operation.id prefixed. // It will also set the uniqueId status if provided. - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); - for (ExtendedCodegenOperation op : operationList) { + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; for (CodegenParameter cpParam : op.allParams) { ExtendedCodegenParameter param = (ExtendedCodegenParameter) cpParam; @@ -863,13 +864,12 @@ private void updateOperationParameterForSagaAndRecords(Map opera } } - private void addOperationObjectResponseInformation(Map operations) { + private void addOperationObjectResponseInformation(OperationsMap operations) { // This method will modify the information on the operations' return type. // The api template uses this information to know when to return a text // response for a given simple response operation. - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); - for (ExtendedCodegenOperation op : operationList) { + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; if ("object".equals(op.returnType)) { op.isMap = true; op.returnSimpleType = false; @@ -878,7 +878,6 @@ private void addOperationObjectResponseInformation(Map operation } private void addOperationPrefixParameterInterfacesInformation(Map operations) { - Map _operations = (Map) operations.get("operations"); operations.put("prefixParameterInterfaces", getPrefixParameterInterfaces()); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 378facf89f0e..6fdb5f0d1698 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -23,6 +23,11 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; + import java.io.File; import java.util.*; @@ -194,13 +199,13 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); // Add filename information for api imports - objs.put("apiFilename", getApiFilenameFromClassname(objs.get("classname").toString())); + objs.put("apiFilename", getApiFilenameFromClassname(objs.getClassname())); - List ops = (List) objs.get("operation"); + List ops = objs.getOperation(); for (CodegenOperation op : ops) { // Prep a string buffer where we're going to set up our new version of the string. StringBuilder pathBuffer = new StringBuilder(); @@ -243,31 +248,29 @@ public Map postProcessOperationsWithModels(Map o } // Add additional filename information for model imports in the services - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { + List> imports = operations.getImports(); + for (Map im : imports) { im.put("filename", im.get("import")); - im.put("classname", getModelnameFromModelFilename(im.get("filename").toString())); + im.put("classname", getModelnameFromModelFilename(im.get("filename"))); } return operations; } @Override - public Map postProcessModels(Map objs) { - Map result = super.postProcessModels(objs); + public ModelsMap postProcessModels(ModelsMap objs) { + ModelsMap result = super.postProcessModels(objs); return postProcessModelsEnum(result); } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); if (taggedUnions) { mo.put(TAGGED_UNIONS, true); if (cm.discriminator != null && cm.children != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNestjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNestjsClientCodegen.java index 524b96209a4a..5814238c94d8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNestjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNestjsClientCodegen.java @@ -20,6 +20,10 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.SemVer; import org.slf4j.Logger; @@ -265,13 +269,13 @@ public void postProcessParameter(CodegenParameter parameter) { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); // Add filename information for api imports - objs.put("apiFilename", getApiFilenameFromClassname(objs.get("classname").toString())); + objs.put("apiFilename", getApiFilenameFromClassname(objs.getClassname())); - List ops = (List) objs.get("operation"); + List ops = objs.getOperation(); boolean hasSomeFormParams = false; for (CodegenOperation op : ops) { if (op.getHasFormParams()) { @@ -325,8 +329,8 @@ public Map postProcessOperationsWithModels(Map o operations.put("hasSomeFormParams", hasSomeFormParams); // Add additional filename information for model imports in the services - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { + List> imports = operations.getImports(); + for (Map im : imports) { im.put("filename", im.get("import")); im.put("classname", im.get("classname")); } @@ -351,19 +355,17 @@ private CodegenParameter findPathParameterByName(CodegenOperation operation, Str } @Override - public Map postProcessModels(Map objs) { - Map result = super.postProcessModels(objs); + public ModelsMap postProcessModels(ModelsMap objs) { + ModelsMap result = super.postProcessModels(objs); return postProcessModelsEnum(result); } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); if (taggedUnions) { mo.put(TAGGED_UNIONS, true); if (cm.discriminator != null && cm.children != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index ad8947cb3aeb..a0685ecbe989 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -23,6 +23,10 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -30,6 +34,7 @@ import java.io.File; import java.util.*; +import static org.apache.commons.lang3.StringUtils.capitalize; import static org.openapitools.codegen.utils.StringUtils.camelize; public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen { @@ -167,14 +172,12 @@ public String toModelImport(String name) { } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); + for (ModelsMap entry : result.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); // Add additional filename information for imports mo.put("tsImports", toTsImports(cm, cm.imports)); @@ -189,7 +192,7 @@ private List> toTsImports(CodegenModel cm, Set impor if (!im.equals(cm.classname)) { HashMap tsImport = new HashMap<>(); tsImport.put("classname", im); - tsImport.put("filename", toModelFilename(im)); + tsImport.put("filename", toModelFilename(removeModelPrefixSuffix(im))); tsImports.add(tsImport); } } @@ -197,13 +200,13 @@ private List> toTsImports(CodegenModel cm, Set impor } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { - Map objs = (Map) operations.get("operations"); + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { + OperationMap objs = operations.getOperations(); // The api.mustache template requires all of the auth methods for the whole api // Loop over all the operations and pick out each unique auth method Map authMethodsMap = new HashMap<>(); - for (CodegenOperation op : (List) objs.get("operation")) { + for (CodegenOperation op : objs.getOperation()) { if (op.hasAuthMethods) { for (CodegenSecurity sec : op.authMethods) { authMethodsMap.put(sec.name, sec); @@ -218,12 +221,12 @@ public Map postProcessOperationsWithModels(Map o } // Add filename information for api imports - objs.put("apiFilename", getApiFilenameFromClassname(objs.get("classname").toString())); + objs.put("apiFilename", getApiFilenameFromClassname(objs.getClassname())); // Add additional filename information for model imports in the apis - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { - im.put("filename", im.get("import").toString()); + List> imports = operations.getImports(); + for (Map im : imports) { + im.put("filename", im.get("import")); } return operations; @@ -309,6 +312,20 @@ private String getApiFilenameFromClassname(String classname) { return toApiFilename(name); } + private String removeModelPrefixSuffix(String name) { + String result = name; + final String prefix = capitalize(this.modelNamePrefix); + final String suffix = capitalize(this.modelNameSuffix); + + if (prefix.length() > 0 && result.startsWith(prefix)) { + result = result.substring(prefix.length()); + } + if (suffix.length() > 0 && result.endsWith(suffix)) { + result = result.substring(0, result.length() - suffix.length()); + } + return result; + } + @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java index 5673163cc8a5..a4c13dbbe028 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java @@ -20,6 +20,9 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -121,14 +124,13 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } @Override - public Map postProcessModels(Map objs) { - List models = (List) postProcessModelsEnum(objs).get("models"); + public ModelsMap postProcessModels(ModelsMap objs) { + List models = postProcessModelsEnum(objs).getModels(); // process enum in models - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); // name enum with model name, e.g. StatusEnum => Pet.StatusEnum for (CodegenProperty var : cm.vars) { if (Boolean.TRUE.equals(var.isEnum)) { @@ -160,13 +162,11 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map model : models) { - CodegenModel codegenModel = (CodegenModel) model.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap model : entry.getModels()) { + CodegenModel codegenModel = model.getModel(); model.put("hasImports", codegenModel.imports.size() > 0); } } @@ -186,15 +186,15 @@ private void addNpmPackageGeneration() { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { // Add supporting file only if we plan to generate files in /apis - if (operations.size() > 0 && !addedApiIndex) { + if (!operations.isEmpty() && !addedApiIndex) { addedApiIndex = true; supportingFiles.add(new SupportingFile("apis.index.mustache", apiPackage().replace('.', File.separatorChar), "index.ts")); } // Add supporting file only if we plan to generate files in /models - if (allModels.size() > 0 && !addedModelIndex) { + if (!allModels.isEmpty() && !addedModelIndex) { addedModelIndex = true; supportingFiles.add(new SupportingFile("models.index.mustache", modelPackage().replace('.', File.separatorChar), "index.ts")); } @@ -205,13 +205,13 @@ public Map postProcessOperationsWithModels(Map o return operations; } - private void addOperationModelImportInformation(Map operations) { + private void addOperationModelImportInformation(OperationsMap operations) { // This method will add extra information to the operations.imports array. // The api template uses this information to import all the required // models for a given operation. - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { - String[] parts = im.get("import").toString().replace(modelPackage() + ".", "").split("( [|&] )|[<>]"); + List> imports = operations.getImports(); + for (Map im : imports) { + String[] parts = im.get("import").replace(modelPackage() + ".", "").split("( [|&] )|[<>]"); for (String s : parts) { if (needToImport(s)) { im.put("filename", im.get("import")); @@ -221,13 +221,11 @@ private void addOperationModelImportInformation(Map operations) } } - private void updateOperationParameterEnumInformation(Map operations) { + private void updateOperationParameterEnumInformation(OperationsMap operations) { // This method will add extra information as to whether or not we have enums and // update their names with the operation.id prefixed. - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); boolean hasEnum = false; - for (CodegenOperation op : operationList) { + for (CodegenOperation op : operations.getOperations().getOperation()) { for (CodegenParameter param : op.allParams) { if (Boolean.TRUE.equals(param.isEnum)) { hasEnum = true; @@ -240,13 +238,11 @@ private void updateOperationParameterEnumInformation(Map operati operations.put("hasEnums", hasEnum); } - private void addOperationObjectResponseInformation(Map operations) { + private void addOperationObjectResponseInformation(OperationsMap operations) { // This method will modify the information on the operations' return type. // The api template uses this information to know when to return a text // response for a given simple response operation. - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); - for (CodegenOperation op : operationList) { + for (CodegenOperation op : operations.getOperations().getOperation()) { if("object".equals(op.returnType)) { op.isMap = true; op.returnSimpleType = false; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 9a15de44bd7e..e9091517b3bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -21,6 +21,9 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,13 +121,12 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } @Override - public Map postProcessModels(Map objs) { + public ModelsMap postProcessModels(ModelsMap objs) { // process enum in models - List models = (List) postProcessModelsEnum(objs).get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - cm.imports = new TreeSet(cm.imports); + List models = postProcessModelsEnum(objs).getModels(); + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); + cm.imports = new TreeSet<>(cm.imports); // name enum with model name, e.g. StatusEnum => PetStatusEnum for (CodegenProperty var : cm.vars) { if (Boolean.TRUE.equals(var.isEnum)) { @@ -146,13 +148,11 @@ public Map postProcessModels(Map objs) { } @Override - public Map postProcessAllModels(Map objs) { - Map result = super.postProcessAllModels(objs); - for (Map.Entry entry : result.entrySet()) { - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map model : models) { - CodegenModel codegenModel = (CodegenModel) model.get("model"); + public Map postProcessAllModels(Map objs) { + Map result = super.postProcessAllModels(objs); + for (ModelsMap entry : result.values()) { + for (ModelMap model : entry.getModels()) { + CodegenModel codegenModel = model.getModel(); model.put("hasImports", codegenModel.imports.size() > 0); } } @@ -197,15 +197,14 @@ private void addNpmPackageGeneration() { } @Override - public Map postProcessOperationsWithModels(Map operations, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap operations, List allModels) { // Convert List of CodegenOperation to List of ExtendedCodegenOperation - Map _operations = (Map) operations.get("operations"); - List os = (List) _operations.get("operation"); - List newOs = new ArrayList(); + List os = operations.getOperations().getOperation(); + List newOs = new ArrayList<>(); for (CodegenOperation o : os) { newOs.add(new ExtendedCodegenOperation(o)); } - _operations.put("operation", newOs); + operations.getOperations().setOperation(newOs); this.addOperationModelImportInformation(operations); this.updateOperationParameterEnumInformation(operations); @@ -214,23 +213,22 @@ public Map postProcessOperationsWithModels(Map o return operations; } - private void addOperationModelImportInformation(Map operations) { + private void addOperationModelImportInformation(OperationsMap operations) { // This method will add extra information to the operations.imports array. // The api template uses this information to import all the required // models for a given operation. - List> imports = (List>) operations.get("imports"); - for (Map im : imports) { - im.put("className", im.get("import").toString().replace("models.", "")); + List> imports = operations.getImports(); + for (Map im : imports) { + im.put("className", im.get("import").replace("models.", "")); } } - private void updateOperationParameterEnumInformation(Map operations) { + private void updateOperationParameterEnumInformation(OperationsMap operations) { // This method will add extra information as to whether or not we have enums and // update their names with the operation.id prefixed. - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); boolean hasEnums = false; - for (ExtendedCodegenOperation op : operationList) { + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; for (CodegenParameter param : op.allParams) { if (Boolean.TRUE.equals(param.isEnum)) { hasEnums = true; @@ -250,10 +248,8 @@ private void setParamNameAlternative(CodegenParameter param, String paramName, S } } - private void addConditionalImportInformation(Map operations) { + private void addConditionalImportInformation(OperationsMap operations) { // This method will determine if there are required parameters and if there are list containers - Map _operations = (Map) operations.get("operations"); - List operationList = (List) _operations.get("operation"); boolean hasRequiredParams = false; boolean hasListContainers = false; @@ -261,7 +257,8 @@ private void addConditionalImportInformation(Map operations) { boolean hasQueryParams = false; boolean hasPathParams = false; - for (ExtendedCodegenOperation op : operationList) { + for (CodegenOperation _op : operations.getOperations().getOperation()) { + ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op; if (op.getHasRequiredParams()) { hasRequiredParams = true; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java index 42b222987581..0a35197f954b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java @@ -21,6 +21,9 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; import java.io.File; import java.text.Normalizer; @@ -92,12 +95,8 @@ public String processOpenapiSpecDescription(String description) { } @Override - public Map postProcessOperationsWithModels(Map objs, - List allModels) { - - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); - for (CodegenOperation op : operationList) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + for (CodegenOperation op : objs.getOperations().getOperation()) { op.operationId = this.generateOperationId(op); // for xml compliant primitives, lowercase dataType of openapi @@ -176,12 +175,9 @@ private void normalizeDataType(CodegenParameter param) { } @Override - public Map postProcessModels(Map objs) { - List models = (List) objs.get("models"); - - for (Object mo : models) { - Map mod = (Map) mo; - CodegenModel model = (CodegenModel) mod.get("model"); + public ModelsMap postProcessModels(ModelsMap objs) { + for (ModelMap mo : objs.getModels()) { + CodegenModel model = mo.getModel(); Map modelVendorExtensions = model.getVendorExtensions(); for (CodegenProperty var : model.vars) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ApiInfoMap.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ApiInfoMap.java new file mode 100644 index 000000000000..249ef9b437f7 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ApiInfoMap.java @@ -0,0 +1,17 @@ +package org.openapitools.codegen.model; + +import java.util.HashMap; +import java.util.List; + +public class ApiInfoMap extends HashMap { + + public void setApis(List apis) { + put("apis", apis); + } + + @SuppressWarnings("unchecked") + public List getApis() { + return (List) get("apis"); + } + +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ModelMap.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ModelMap.java new file mode 100644 index 000000000000..10ae306276bf --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ModelMap.java @@ -0,0 +1,25 @@ +package org.openapitools.codegen.model; + +import java.util.HashMap; +import java.util.Map; + +import org.openapitools.codegen.CodegenModel; + +public class ModelMap extends HashMap { + + public ModelMap() { + + } + + public ModelMap(Map init) { + putAll(init); + } + + public void setModel(CodegenModel model) { + put("model", model); + } + + public CodegenModel getModel() { + return (CodegenModel) get("model"); + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ModelsMap.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ModelsMap.java new file mode 100644 index 000000000000..e43fa200b586 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/ModelsMap.java @@ -0,0 +1,35 @@ +package org.openapitools.codegen.model; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ModelsMap extends HashMap { + + public ModelsMap() {} + + public void setModels(List modelMaps) { + put("models", modelMaps); + } + + @SuppressWarnings("unchecked") + public List getModels() { + return (List) get("models"); + } + + public void setImports(List> imports) { + put("imports", imports); + } + + @SuppressWarnings("unchecked") + public List> getImports() { + return (List>) get("imports"); + } + + @SuppressWarnings("unchecked") + public List> getImportsOrEmpty() { + return (List>) getOrDefault("imports", new ArrayList<>()); + } + +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/OperationMap.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/OperationMap.java new file mode 100644 index 000000000000..1d8806508e3e --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/OperationMap.java @@ -0,0 +1,40 @@ +package org.openapitools.codegen.model; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; + +import org.openapitools.codegen.CodegenOperation; + +public class OperationMap extends HashMap { + + public void setOperation(CodegenOperation ops) { + put("operation", Collections.singletonList(ops)); + } + + public void setOperation(List ops) { + put("operation", ops); + } + + @SuppressWarnings("unchecked") + public List getOperation() { + return (List) get("operation"); + } + + public void setClassname(String classname) { + put("classname", classname); + } + + public String getClassname() { + return (String) get("classname"); + } + + public void setPathPrefix(String pathPrefix) { + put("pathPrefix", pathPrefix); + } + + public String getPathPrefix() { + return (String) get("pathPrefix"); + } + +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/OperationsMap.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/OperationsMap.java new file mode 100644 index 000000000000..2a24644cbfc1 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/model/OperationsMap.java @@ -0,0 +1,30 @@ +package org.openapitools.codegen.model; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.codegen.CodegenOperation; + +public class OperationsMap extends HashMap { + + public void setOperation(OperationMap objs) { + put("operations", objs); + } + + public OperationMap getOperations() { + return (OperationMap) get("operations"); + } + + public void setImports(List> imports) { + put("imports", imports); + } + + @SuppressWarnings("unchecked") + public List> getImports() { + return (List>) get("imports"); + } + +} 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 eb5d5c6a2fe0..8787b70867b9 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 @@ -37,6 +37,8 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.IJsonSchemaValidationProperties; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.commons.io.FileUtils; @@ -103,20 +105,15 @@ public static boolean isGenerateAliasAsModel(Schema schema) { * @param models Map of models * @return model */ - public static CodegenModel getModelByName(final String name, final Map models) { - final Object data = models.get(name); - if (data instanceof Map) { - final Map dataMap = (Map) data; - final Object dataModels = dataMap.get("models"); - if (dataModels instanceof List) { - final List dataModelsList = (List) dataModels; - for (final Object entry : dataModelsList) { - if (entry instanceof Map) { - final Map entryMap = (Map) entry; - final Object model = entryMap.get("model"); - if (model instanceof CodegenModel) { - return (CodegenModel) model; - } + public static CodegenModel getModelByName(final String name, final Map models) { + final ModelsMap data = models.get(name); + if (data != null) { + final List dataModelsList = data.getModels(); + if (dataModelsList != null) { + for (final ModelMap entryMap : dataModelsList) { + final CodegenModel model = entryMap.getModel(); + if (model != null) { + return model; } } } @@ -1203,12 +1200,11 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { */ } if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { - // Return ObjectSchema to specify any object (map) value is allowed. - // Set nullable to specify the value of additional properties may be - // the null value. - // Free-form additionalProperties don't need to have an inner - // additional properties, the type is already free-form. - return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); + // Return an empty schema as the properties can take on any type per + // the spec. See + // https://github.com/OpenAPITools/openapi-generator/issues/9282 for + // more details. + return new Schema(); } return null; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OneOfImplementorAdditionalData.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OneOfImplementorAdditionalData.java index e77bec480e13..556f696c7834 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OneOfImplementorAdditionalData.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OneOfImplementorAdditionalData.java @@ -1,16 +1,17 @@ package org.openapitools.codegen.utils; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** * This class holds data to add to `oneOf` members. Let's consider this example: * @@ -69,15 +70,19 @@ public void addFromInterfaceModel(CodegenModel cm, List> mod // Add all vars defined on cm // a "oneOf" model (cm) by default inherits all properties from its "interfaceModels", // but we only want to add properties defined on cm itself - List toAdd = new ArrayList(cm.vars); + List toAdd = new ArrayList<>(cm.vars); + // note that we can't just toAdd.removeAll(m.vars) for every interfaceModel, // as they might have different value of `hasMore` and thus are not equal - List omitAdding = new ArrayList(); + Set omitAdding = new HashSet<>(); if (cm.interfaceModels != null) { for (CodegenModel m : cm.interfaceModels) { for (CodegenProperty v : m.vars) { omitAdding.add(v.baseName); } + for (CodegenProperty v : m.allVars) { + omitAdding.add(v.baseName); + } } } for (CodegenProperty v : toAdd) { @@ -89,7 +94,7 @@ public void addFromInterfaceModel(CodegenModel cm, List> mod // Add all imports of cm for (Map importMap : modelsImports) { // we're ok with shallow clone here, because imports are strings only - additionalImports.add(new HashMap(importMap)); + additionalImports.add(new HashMap<>(importMap)); } } @@ -120,6 +125,7 @@ public void addToImplementor(CodegenConfig cc, CodegenModel implcm, List oneImport : additionalImports) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java index 9042eb92b395..724db194867d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java @@ -5,6 +5,7 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenSecurity; +import org.openapitools.codegen.model.ModelMap; import java.util.ArrayList; import java.util.List; @@ -17,10 +18,9 @@ public class ProcessUtils { * @param models List of models * @param initialIndex starting index to use */ - public static void addIndexToProperties(List models, int initialIndex) { - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); + public static void addIndexToProperties(List models, int initialIndex) { + for (ModelMap mo : models) { + CodegenModel cm = mo.getModel(); int i = initialIndex; for (CodegenProperty var : cm.vars) { @@ -41,7 +41,7 @@ public static void addIndexToProperties(List models, int initialIndex) { * * @param models List of models */ - public static void addIndexToProperties(List models) { + public static void addIndexToProperties(List models) { addIndexToProperties(models, 0); } diff --git a/modules/openapi-generator/src/main/resources/Ada/server.mustache b/modules/openapi-generator/src/main/resources/Ada/server.mustache index 14afdf65adbf..c3708a6f9632 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server.mustache @@ -37,7 +37,7 @@ begin WS.Configure (Configure'Access); WS.Register_Application ("{{basePathWithoutHost}}", App'Unchecked_Access); App.Dump_Routes (Util.Log.INFO_LEVEL); - Log.Info ("Connect you browser to: http://localhost:{0}{{basePathWithoutHost}}/ui/index.html", + Log.Info ("Connect your browser to: http://localhost:{0}{{basePathWithoutHost}}/ui/index.html", Util.Strings.Image (Port)); WS.Start; diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 8d2ef17609c3..b8037601066b 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -34,12 +34,17 @@ set(PROJECT_VERSION_MAJOR 0) set(PROJECT_VERSION_MINOR 0) set(PROJECT_VERSION_PATCH 1) -find_package(CURL 7.58.0 REQUIRED) -if(CURL_FOUND) +if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES)) include_directories(${CURL_INCLUDE_DIR}) set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} ) -else(CURL_FOUND) - message(FATAL_ERROR "Could not find the CURL library and development files.") +else() + find_package(CURL 7.58.0 REQUIRED) + if(CURL_FOUND) + include_directories(${CURL_INCLUDE_DIR}) + set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} ) + else(CURL_FOUND) + message(FATAL_ERROR "Could not find the CURL library and development files.") + endif() endif() set(SRCS diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache index 7ee11c71fbcd..4a0c6c116b95 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache @@ -326,9 +326,10 @@ end: "{{{httpMethod}}}"); {{#responses}} - if (apiClient->response_code == {{code}}) { - printf("%s\n","{{message}}"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == {{code}}) { + // printf("%s\n","{{message}}"); + //} {{/responses}} {{#returnType}} {{#returnTypeIsPrimitive}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache index 96c5832b02b4..96384d049b3e 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache @@ -23,8 +23,8 @@ typedef struct list_t { #define list_ForEach(element, list) for(element = (list != NULL) ? (list)->firstEntry : NULL; element != NULL; element = element->nextListEntry) -list_t* List(); -void list_freeListList(list_t* listToFree); +list_t* list_createList(); +void list_freeList(list_t* listToFree); void list_addElement(list_t* list, void* dataToAddInList); listEntry_t* list_getElementAt(list_t *list, long indexOfElement); diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache index 18968d2c7c00..e632773ee210 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache @@ -336,8 +336,20 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { goto fail; } {{/isEnum}} + {{#isEnum}} + if ({{projectName}}_{{classVarName}}_{{enumName}}_NULL == {{{classname}}}->{{{name}}}) { + goto fail; + } + {{/isEnum}} + {{/required}} + {{^required}} + {{^isEnum}} + if({{{classname}}}->{{{name}}}) { + {{/isEnum}} + {{#isEnum}} + if({{{classname}}}->{{{name}}} != {{projectName}}_{{classVarName}}_{{enumName}}_NULL) { + {{/isEnum}} {{/required}} - {{^required}}{{^isEnum}}if({{{classname}}}->{{{name}}}) { {{/isEnum}}{{/required}} {{^isContainer}} {{#isPrimitiveType}} {{#isNumeric}} @@ -536,7 +548,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{/isMap}} {{/isContainer}} {{^required}} - {{^isEnum}} } {{/isEnum}} + } {{/required}} {{/vars}} @@ -553,6 +565,18 @@ fail: {{classname}}_t *{{classname}}_local_var = NULL; {{#vars}} + {{#isContainer}} + {{#isArray}} + // define the local list for {{{classname}}}->{{{name}}} + list_t *{{{name}}}List = NULL; + + {{/isArray}} + {{#isMap}} + // define the local map for {{{classname}}}->{{{name}}} + list_t *{{{name}}}List = NULL; + + {{/isMap}} + {{/isContainer}} {{^isContainer}} {{^isPrimitiveType}} {{#isModel}} @@ -693,9 +717,8 @@ fail: {{#isContainer}} {{#isArray}} {{#isPrimitiveType}} - list_t *{{{name}}}List; {{^required}}if ({{{name}}}) { {{/required}} - cJSON *{{{name}}}_local; + cJSON *{{{name}}}_local = NULL; if(!cJSON_IsArray({{{name}}})) { goto end;//primitive container } @@ -735,9 +758,8 @@ fail: } {{/isPrimitiveType}} {{^isPrimitiveType}} - list_t *{{{name}}}List; {{^required}}if ({{{name}}}) { {{/required}} - cJSON *{{{name}}}_local_nonprimitive; + cJSON *{{{name}}}_local_nonprimitive = NULL; if(!cJSON_IsArray({{{name}}})){ goto end; //nonprimitive container } @@ -756,9 +778,9 @@ fail: {{/isPrimitiveType}} {{/isArray}} {{#isMap}} - list_t *{{{name}}}List; {{^required}}if ({{{name}}}) { {{/required}} - cJSON *{{{name}}}_local_map; + {{#isPrimitiveType}} + cJSON *{{{name}}}_local_map = NULL; if(!cJSON_IsObject({{{name}}})) { goto end;//primitive map container } @@ -799,6 +821,12 @@ fail: {{/items}} list_addElement({{{name}}}List , localMapKeyPair); } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + + // The data type of the elements in {{{classname}}}->{{{name}}} is currently not supported. + + {{/isPrimitiveType}} {{/isMap}} {{/isContainer}} {{^required}} @@ -904,6 +932,74 @@ end: {{/isModel}} {{/isPrimitiveType}} {{/isContainer}} + {{#isContainer}} + {{#isArray}} + {{#isPrimitiveType}} + if ({{{name}}}List) { + {{#items}} + {{#isString}} + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, {{{name}}}List) { + free(listEntry->data); + listEntry->data = NULL; + } + {{/isString}} + {{#isNumeric}} + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, {{{name}}}List) { + free(listEntry->data); + listEntry->data = NULL; + } + {{/isNumeric}} + {{/items}} + list_freeList({{{name}}}List); + {{{name}}}List = NULL; + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + if ({{{name}}}List) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, {{{name}}}List) { + {{complexType}}_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList({{{name}}}List); + {{{name}}}List = NULL; + } + {{/isPrimitiveType}} + {{/isArray}} + {{#isMap}} + {{#isPrimitiveType}} + if ({{{name}}}List) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, {{{name}}}List) { + keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + free(localKeyValue->key); + localKeyValue->key = NULL; + {{#items}} + {{#isString}} + free(localKeyValue->value); + localKeyValue->value = NULL; + {{/isString}} + {{#isByteArray}} + free(localKeyValue->value); + localKeyValue->value = NULL; + {{/isByteArray}} + {{/items}} + keyValuePair_free(localKeyValue); + localKeyValue = NULL; + } + list_freeList({{{name}}}List); + {{{name}}}List = NULL; + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + + // The data type of the elements in {{{classname}}}->{{{name}}} is currently not supported. + + {{/isPrimitiveType}} + {{/isMap}} + {{/isContainer}} {{/vars}} return NULL; diff --git a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache index 78783f1943e5..3d3203957e62 100644 --- a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache @@ -4,9 +4,9 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} | {{/operation}}{{/operations}} {{#operations}} @@ -76,9 +76,9 @@ public class Example { ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache index c4ff01d7e552..0f99bffde09c 100644 --- a/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull {{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index f33ce8dc1bcd..7aaaa435c930 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -114,8 +114,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.6.3" - jackson_version = "2.12.5" - jackson_databind_version = "2.10.5.1" + jackson_version = "2.12.6" + jackson_databind_version = "2.12.6.1" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.2" {{/openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache index 140184fa1096..f3b6b0bad0e4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache @@ -114,8 +114,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.12.1" - jackson_databind_version = "2.10.5.1" + jackson_version = "2.12.6" + jackson_databind_version = "2.12.6.1" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.2" {{/openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache index 2c7ffb321171..e7fef245346e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache @@ -45,6 +45,8 @@ maven-compiler-plugin 3.8.1 + 1.8 + 1.8 true 128m 512m @@ -154,15 +156,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.8 - 1.8 - - org.apache.maven.plugins maven-javadoc-plugin @@ -261,7 +254,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson-version} + ${jackson-databind-version} com.fasterxml.jackson.jaxrs @@ -334,7 +327,8 @@ UTF-8 1.5.21 4.5.13 - 2.12.1 + 2.12.6 + 2.12.6.1 1.3.5 {{#useBeanValidation}} 2.0.2 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache index c494070002d5..ba0121e02475 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache @@ -44,8 +44,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}", -{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", +{{/vendorExtensions.x-content-type}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -74,8 +74,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}", -{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", +{{/vendorExtensions.x-content-type}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -119,8 +119,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}", -{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", +{{/vendorExtensions.x-content-type}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -159,8 +159,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ - {{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}", - {{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} + {{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", + {{/vendorExtensions.x-content-type}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache index 3877e9ab3af7..26c98508ea1d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache @@ -4,9 +4,9 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}}{{/operations}} {{#operations}} @@ -93,9 +93,9 @@ public class Example { ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache index c325e3d1ed2f..eb5101b1a602 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache @@ -6,18 +6,18 @@ import {{invokerPackage}}.*; import {{invokerPackage}}.auth.*; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; {{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} +{{/fullJavaUtil}} /** * API tests for {{classname}} */ @@ -28,12 +28,15 @@ public class {{classname}}Test { {{#operations}} {{#operation}} /** + {{#summary}} * {{summary}} * + {{/summary}} + {{#notes}} * {{notes}} * - * @throws ApiException - * if the Api call fails + {{/notes}} + * @throws ApiException if the Api call fails */ @Test public void {{operationId}}Test() throws ApiException { 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 5f8fc01732be..6761c4fcd99c 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 @@ -11,8 +11,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -98,15 +98,15 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.6.3" - jackson_version = "2.13.0" - jackson_databind_version = "2.13.0" + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2.2" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.2" {{/openApiNullable}} jakarta_annotation_version = "1.3.5" jersey_version = "2.35" - junit_version = "4.13.2" + junit_version = "5.8.2" {{#hasOAuthMethods}} scribejava_apis_version = "8.3.1" {{/hasOAuthMethods}} @@ -140,7 +140,12 @@ dependencies { implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" {{/hasHttpSignatureMethods}} implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() } javadoc { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index df1a939f0f2b..9f3fcfce424e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -10,19 +10,19 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "com.google.code.findbugs" % "jsr305" % "3.0.0", - "io.swagger" % "swagger-annotations" % "1.6.3", + "io.swagger" % "swagger-annotations" % "1.6.5", "org.glassfish.jersey.core" % "jersey-client" % "2.35", "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", - "com.fasterxml.jackson.core" % "jackson-core" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2.2" % "compile", {{#joda}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.13.0" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.13.2" % "compile", {{/joda}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.2" % "compile", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", {{/openApiNullable}} @@ -33,7 +33,6 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache new file mode 100644 index 000000000000..2d4ccdd1a14f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +{{#fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{/fullJavaUtil}} +/** + * Model tests for {{classname}} + */ +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache index a6c07433c604..c138284ed484 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache @@ -15,6 +15,9 @@ {{/isClassnameSanitized}} {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -63,6 +66,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index 38b24a94eec7..dc09b1e5422e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -109,7 +109,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -140,7 +140,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -241,7 +241,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -372,30 +372,30 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test UTF-8 - 1.6.3 + 1.6.5 2.35 - 2.13.0 - 2.13.0 + 2.13.2 + 2.13.2.2 0.2.2 1.3.5 {{#useBeanValidation}} 2.0.2 {{/useBeanValidation}} - 4.13.2 + 5.8.2 {{#hasHttpSignatureMethods}} 1.7 {{/hasHttpSignatureMethods}} {{#hasOAuthMethods}} 8.3.1 {{/hasOAuthMethods}} - 2.17.3 + 2.21.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache new file mode 100644 index 000000000000..afbf6a9a02c9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache @@ -0,0 +1,138 @@ +{{>licenseInfo}} + +package {{modelPackage}}; + +import {{invokerPackage}}.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + +{{>libraries/jersey2/additional_properties}} + +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache new file mode 100644 index 000000000000..2454aafa8973 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache @@ -0,0 +1,1444 @@ +package {{invokerPackage}}; + +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + +{{#hasOAuthMethods}} +import com.github.scribejava.core.model.OAuth2AccessToken; +{{/hasOAuthMethods}} +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; + +import java.io.IOException; +import java.io.InputStream; + +import java.net.URI; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.security.cert.X509Certificate; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +{{#jsr310}} +import java.time.OffsetDateTime; +{{/jsr310}} + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import {{invokerPackage}}.auth.Authentication; +import {{invokerPackage}}.auth.HttpBasicAuth; +import {{invokerPackage}}.auth.HttpBearerAuth; +{{#hasHttpSignatureMethods}} +import {{invokerPackage}}.auth.HttpSignatureAuth; +{{/hasHttpSignatureMethods}} +import {{invokerPackage}}.auth.ApiKeyAuth; +{{#hasOAuthMethods}} +import {{invokerPackage}}.auth.OAuth; +{{/hasOAuthMethods}} + +/** + *

    ApiClient class.

    + */ +{{>generatedAnnotation}} +public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String basePath = "{{{basePath}}}"; + protected String userAgent; + private static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + protected List servers = new ArrayList({{#servers}}{{#-first}}Arrays.asList( +{{/-first}} new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + new HashMap(){{#variables}}{{#-first}} {{ +{{/-first}} put("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new HashSet( + {{#enumValues}} + {{#-first}} + Arrays.asList( + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ) + {{/-last}} + {{/enumValues}} + ) + )); + {{#-last}} + }}{{/-last}}{{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + ){{/-last}}{{/servers}}); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + protected Map> operationServers = new HashMap>() {{ + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers}} + {{#-first}} + put("{{{classname}}}.{{{operationId}}}", new ArrayList(Arrays.asList( + {{/-first}} + new ServerConfiguration( + "{{{url}}}", + "{{{description}}}{{^description}}No description provided{{/description}}", + new HashMap(){{#variables}}{{#-first}} {{ +{{/-first}} put("{{{name}}}", new ServerVariable( + "{{{description}}}{{^description}}No description provided{{/description}}", + "{{{defaultValue}}}", + new HashSet( + {{#enumValues}} + {{#-first}} + Arrays.asList( + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ) + {{/-last}} + {{/enumValues}} + ) + )); + {{#-last}} + }}{{/-last}}{{/variables}} + ){{^-last}},{{/-last}} + {{#-last}} + )));{{/-last}} + {{/servers}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + }}; + protected Map operationServerIndex = new HashMap(); + protected Map> operationServerVariables = new HashMap>(); + protected boolean debugging = false; + protected ClientConfig clientConfig; + protected int connectionTimeout = 0; + private int readTimeout = 0; + + protected Client httpClient; + protected JSON json; + protected String tempFolderPath = null; + + protected Map authentications; + protected Map authenticationLookup; + + protected DateFormat dateFormat; + + /** + * Constructs a new ApiClient with default parameters. + */ + public ApiClient() { + this(null); + } + + /** + * Constructs a new ApiClient with the specified authentication parameters. + * + * @param authMap A hash map containing authentication parameters. + */ + public ApiClient(Map authMap) { + json = new JSON(); + httpClient = buildHttpClient(); + + this.dateFormat = new RFC3339DateFormat(); + + // Set default User-Agent. + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + Authentication auth = null; + {{#authMethods}} + if (authMap != null) { + auth = authMap.get("{{name}}"); + } + {{#isBasic}} + {{#isBasicBasic}} + if (auth instanceof HttpBasicAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new HttpBasicAuth()); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + if (auth instanceof HttpBearerAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}")); + } + {{/isBasicBearer}} + {{#isHttpSignature}} + if (auth instanceof HttpSignatureAuth) { + authentications.put("{{name}}", auth); + } + {{/isHttpSignature}} + {{/isBasic}} + {{#isApiKey}} + if (auth instanceof ApiKeyAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}")); + } + {{/isApiKey}} + {{#isOAuth}} + if (auth instanceof OAuth) { + authentications.put("{{name}}", auth); + } else { + authentications.put("{{name}}", new OAuth(basePath, "{{tokenUrl}}")); + } + {{/isOAuth}} + {{/authMethods}} + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + // Setup authentication lookup (key: authentication alias, value: authentication name) + authenticationLookup = new HashMap();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}} + authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}} + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + * + * @return JSON + */ + public JSON getJSON() { + return json; + } + + /** + *

    Getter for the field httpClient.

    + * + * @return a {@link jakarta.ws.rs.client.Client} object. + */ + public Client getHttpClient() { + return httpClient; + } + + /** + *

    Setter for the field httpClient.

    + * + * @param httpClient a {@link jakarta.ws.rs.client.Client} object. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ + public String getBasePath() { + return basePath; + } + + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + {{#hasOAuthMethods}} + setOauthBasePath(basePath); + {{/hasOAuthMethods}} + return this; + } + + /** + *

    Getter for the field servers.

    + * + * @return a {@link java.util.List} of servers. + */ + public List getServers() { + return servers; + } + + /** + *

    Setter for the field servers.

    + * + * @param servers a {@link java.util.List} of servers. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setServers(List servers) { + this.servers = servers; + updateBasePath(); + return this; + } + + /** + *

    Getter for the field serverIndex.

    + * + * @return a {@link java.lang.Integer} object. + */ + public Integer getServerIndex() { + return serverIndex; + } + + /** + *

    Setter for the field serverIndex.

    + * + * @param serverIndex the server index + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + updateBasePath(); + return this; + } + + /** + *

    Getter for the field serverVariables.

    + * + * @return a {@link java.util.Map} of server variables. + */ + public Map getServerVariables() { + return serverVariables; + } + + /** + *

    Setter for the field serverVariables.

    + * + * @param serverVariables a {@link java.util.Map} of server variables. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + updateBasePath(); + return this; + } + + private void updateBasePath() { + if (serverIndex != null) { + setBasePath(servers.get(serverIndex).URL(serverVariables)); + } + } + + {{#hasOAuthMethods}} + private void setOauthBasePath(String basePath) { + for(Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setBasePath(basePath); + } + } + } + + {{/hasOAuthMethods}} + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication object + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to configure authentications which respects aliases of API keys. + * + * @param secrets Hash map from authentication name to its secret. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient configureApiKeys(Map secrets) { + for (Map.Entry authEntry : authentications.entrySet()) { + Authentication auth = authEntry.getValue(); + if (auth instanceof ApiKeyAuth) { + String name = authEntry.getKey(); + // respect x-auth-id-alias property + name = authenticationLookup.containsKey(name) ? authenticationLookup.get(name) : name; + if (secrets.containsKey(name)) { + ((ApiKeyAuth) auth).setApiKey(secrets.get(name)); + } + } + } + return this; + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set bearer token for the first Bearer authentication. + * + * @param bearerToken Bearer token + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + {{#hasOAuthMethods}} + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the credentials for the first OAuth2 authentication. + * + * @param clientId the client ID + * @param clientSecret the client secret + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthCredentials(String clientId, String clientSecret) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging()); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the password flow for the first OAuth2 authentication. + * + * @param username the user name + * @param password the user password + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthPasswordFlow(String username, String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).usePasswordFlow(username, password); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the authorization code flow for the first OAuth2 authentication. + * + * @param code the authorization code + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthAuthorizationCodeFlow(String code) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).useAuthorizationCodeFlow(code); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the scopes for the first OAuth2 authentication. + * + * @param scope the oauth scope + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthScope(String scope) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setScope(scope); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + {{/hasOAuthMethods}} + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent Http user agent + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setUserAgent(String userAgent) { + this.userAgent = userAgent; + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Get the User-Agent header's value. + * + * @return User-Agent string + */ + public String getUserAgent(){ + return userAgent; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Gets the client config. + * + * @return Client config + */ + public ClientConfig getClientConfig() { + return clientConfig; + } + + /** + * Set the client config. + * + * @param clientConfig Set the client config + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setClientConfig(ClientConfig clientConfig) { + this.clientConfig = clientConfig; + // Rebuild HTTP Client according to the new "clientConfig" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is switched on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set temp folder path + * + * @param tempFolderPath Temp folder path + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Connect timeout (in milliseconds). + * + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout Connection timeout in milliseconds + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); + return this; + } + + /** + * read timeout (in milliseconds). + * + * @return Read timeout + */ + public int getReadTimeout() { + return readTimeout; + } + + /** + * Set the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout Read timeout in milliseconds + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * + * @param dateFormat Date format + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } {{#jsr310}}else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } {{/jsr310}}else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + * Format to {@code Pair} objects. + * + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + + // create the params based on the collection format + if ("multi".equals(format)) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if ("csv".equals(format)) { + delimiter = ","; + } else if ("ssv".equals(format)) { + delimiter = " "; + } else if ("tsv".equals(format)) { + delimiter = "\t"; + } else if ("pipes".equals(format)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * + * @param mime MIME + * @return True if the MIME type is JSON + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return Entity + * @throws ApiException API exception + */ + public Entity serialize(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + Entity entity; + if (contentType.startsWith("multipart/form-data")) { + MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) + .fileName(file.getName()).size(file.length()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + } + } + entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + if (isBodyNullable) { // payload is nullable + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "null" : obj, contentType); + } + } else { + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "" : obj, contentType); + } + } + } + return entity; + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON, HTTP form is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @param isBodyNullable True if the body is nullable + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + if (isBodyNullable) { + return obj == null ? "null" : json.getMapper().writeValueAsString(obj); + } else { + return obj == null ? "" : json.getMapper().writeValueAsString(obj); + } + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Deserialize object + * @throws ApiException API exception + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.getRawType() == File.class) { + // Handle file downloading. + T file = (T) downloadFileFromResponse(response); + return file; + } + + String contentType = null; + List contentTypes = response.getHeaders().get("Content-Type"); + if (contentTypes != null && !contentTypes.isEmpty()) + contentType = String.valueOf(contentTypes.get(0)); + + // read the entity stream multiple times + response.bufferEntity(); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * + * @param response Response + * @return File + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + *

    Prepare the file for download from the response.

    + * + * @param response a {@link jakarta.ws.rs.core.Response} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param operation The qualified name of the operation + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @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 + * @param isBodyNullable True if the body is nullable + * @return The response body in type of string + * @throws ApiException API exception + */ + public ApiResponse invokeAPI( + String operation, + String path, + String method, + List queryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + GenericType returnType, + boolean isBodyNullable) + throws ApiException { + + // Not using `.target(targetURL).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + String targetURL; + if (serverIndex != null && operationServers.containsKey(operation)) { + Integer index = operationServerIndex.containsKey(operation) ? operationServerIndex.get(operation) : serverIndex; + Map variables = operationServerVariables.containsKey(operation) ? + operationServerVariables.get(operation) : serverVariables; + List serverConfigurations = operationServers.get(operation); + if (index < 0 || index >= serverConfigurations.size()) { + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", + index, serverConfigurations.size())); + } + targetURL = serverConfigurations.get(index).URL(variables) + path; + } else { + targetURL = this.basePath + path; + } + WebTarget target = httpClient.target(targetURL); + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); + } + } + } + + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } + + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + for (Entry entry : defaultCookieMap.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + Entity entity = serialize(body, formParams, contentType, isBodyNullable); + + // put all headers in one place + Map allHeaderParams = new HashMap<>(defaultHeaderMap); + allHeaderParams.putAll(headerParams); + + // update different parameters (e.g. headers) for authentication + updateParamsForAuth( + authNames, + queryParams, + allHeaderParams, + cookieParams, + serializeToString(body, formParams, contentType, isBodyNullable), + method, + target.getUri()); + + for (Entry entry : allHeaderParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(entry.getKey(), value); + } + } + + Response response = null; + + try { + response = sendRequest(method, invocationBuilder, entity); + + {{#hasOAuthMethods}} + // If OAuth is used and a status 401 is received, renew the access token and retry the request + if (response.getStatusInfo() == Status.UNAUTHORIZED) { + for (String authName : authNames) { + Authentication authentication = authentications.get(authName); + if (authentication instanceof OAuth) { + OAuth2AccessToken accessToken = ((OAuth) authentication).renewAccessToken(); + if (accessToken != null) { + invocationBuilder.header("Authorization", null); + invocationBuilder.header("Authorization", "Bearer " + accessToken.getAccessToken()); + response = sendRequest(method, invocationBuilder, entity); + } + break; + } + } + } + + {{/hasOAuthMethods}} + int statusCode = response.getStatusInfo().getStatusCode(); + Map> responseHeaders = buildResponseHeaders(response); + + if (response.getStatusInfo() == Status.NO_CONTENT) { + return new ApiResponse(statusCode, responseHeaders); + } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { + if (returnType == null) { + return new ApiResponse(statusCode, responseHeaders); + } else { + return new ApiResponse(statusCode, responseHeaders, deserialize(response, returnType)); + } + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), message, buildResponseHeaders(response), respBody); + } + } finally { + try { + response.close(); + } catch (Exception e) { + // it's not critical, since the response object is local in method invokeAPI; that's fine, + // just continue + } + } + } + + private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity entity) { + Response response; + if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + response = invocationBuilder.method("DELETE", entity); + } else if ("PATCH".equals(method)) { + response = invocationBuilder.method("PATCH", entity); + } else { + response = invocationBuilder.method(method); + } + return response; + } + + /** + * @deprecated Add qualified name of the operation as a first parameter. + */ + @Deprecated + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType, boolean isBodyNullable) throws ApiException { + return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable); + } + + /** + * Build the Client used to make HTTP requests. + * + * @return Client + */ + protected Client buildHttpClient() { + // recreate the client config to pickup changes + clientConfig = getDefaultClientConfig(); + + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + customizeClientBuilder(clientBuilder); + clientBuilder = clientBuilder.withConfig(clientConfig); + return clientBuilder.build(); + } + + /** + * Get the default client config. + * + * @return Client config + */ + public ClientConfig getDefaultClientConfig() { + ClientConfig clientConfig = new ClientConfig(); + clientConfig.register(MultiPartFeature.class); + clientConfig.register(json); + clientConfig.register(JacksonFeature.class); + clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); + // turn off compliance validation to be able to send payloads with DELETE calls + clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + if (debugging) { + clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); + clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); + // Set logger to ALL + java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); + } else { + // suppress warnings for payloads with DELETE calls: + java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); + } + + return clientConfig; + } + + /** + * Customize the client builder. + * + * This method can be overridden to customize the API client. For example, this can be used to: + * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname + * against its identification information. + * 2. Set the client-side key store. + * 3. Set the SSL context that will be used when creating secured transport connections to + * server endpoints from web targets created by the client instance that is using this SSL context. + * 4. Set the client-side trust store. + * + * To completely disable certificate validation (at your own risk), you can + * override this method and invoke disableCertificateValidation(clientBuilder). + * + * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object. + */ + protected void customizeClientBuilder(ClientBuilder clientBuilder) { + // No-op extension point + } + + /** + * Disable X.509 certificate validation in TLS connections. + * + * Please note that trusting all certificates is extremely risky. + * This may be useful in a development environment with self-signed certificates. + * + * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object. + * @throws java.security.KeyManagementException if any. + * @throws java.security.NoSuchAlgorithmException if any. + */ + protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException { + TrustManager[] trustAllCerts = new X509TrustManager[] { + new X509TrustManager() { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, trustAllCerts, new SecureRandom()); + clientBuilder.sslContext(sslContext); + } + + /** + *

    Build the response headers.

    + * + * @param response a {@link jakarta.ws.rs.core.Response} object. + * @return a {@link java.util.Map} of response headers. + */ + protected Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + continue; + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiResponse.mustache new file mode 100644 index 000000000000..86c889b0f67b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiResponse.mustache @@ -0,0 +1,73 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.List; +import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; + this.data = data; + } + + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache new file mode 100644 index 000000000000..aea0628ac378 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache @@ -0,0 +1,261 @@ +package {{invokerPackage}}; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +{{#openApiNullable}} +import org.openapitools.jackson.nullable.JsonNullableModule; +{{/openApiNullable}} +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{#joda}} +import com.fasterxml.jackson.datatype.joda.JodaModule; +{{/joda}} +{{#models.0}} +import {{modelPackage}}.*; +{{/models.0}} + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +{{>generatedAnnotation}} +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + {{#joda}} + mapper.registerModule(new JodaModule()); + {{/joda}} + {{#openApiNullable}} + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + {{/openApiNullable}} + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/additional_properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/additional_properties.mustache new file mode 100644 index 000000000000..61973dc24fa1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/additional_properties.mustache @@ -0,0 +1,39 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache new file mode 100644 index 000000000000..2e14233bb93f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache @@ -0,0 +1,202 @@ +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using={{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}}, {{{.}}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + + Object deserialized = null; + {{#discriminator}} + Class cls = JSON.getClassForElement(tree, {{classname}}.class); + if (cls != null) { + // When the OAS schema includes a discriminator, use the discriminator value to + // discriminate the anyOf schemas. + // Get the discriminator mapping value to get the class. + deserialized = tree.traverse(jp.getCodec()).readValueAs(cls); + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + {{/discriminator}} + {{#anyOf}} + // deserialize {{{.}}} + try { + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log(Level.FINER, "Input data does not match '{{classname}}'", e); + } + + {{/anyOf}} + throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in anyOf + public static final Map schemas = new HashMap(); + + public {{classname}}() { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/jersey2/additional_properties }} + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#anyOf}} + public {{classname}}({{{.}}} o) { + super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + {{/anyOf}} + static { + {{#anyOf}} + schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { + }); + {{/anyOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#anyOf}} + if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + {{/anyOf}} + throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * + * @return The actual instance ({{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#anyOf}} + /** + * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{.}}}` + * @throws ClassCastException if the instance is not `{{{.}}}` + */ + public {{{.}}} get{{{.}}}() throws ClassCastException { + return ({{{.}}})super.getActualInstance(); + } + + {{/anyOf}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache new file mode 100644 index 000000000000..16cd00688679 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache @@ -0,0 +1,262 @@ +package {{package}}; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.ApiClient; +import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; +import {{invokerPackage}}.Pair; + +import jakarta.ws.rs.core.GenericType; + +{{#imports}}import {{import}}; +{{/imports}} + +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{/fullJavaUtil}} +{{>generatedAnnotation}} +{{#operations}} +public class {{classname}} { + private ApiClient apiClient; + + public {{classname}}() { + this(Configuration.getDefaultApiClient()); + } + + public {{classname}}(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + {{#operation}} + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{.}} + {{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
    Status Code Description Response Headers
    {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}}
    + {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; + } + {{/vendorExtensions.x-group-parameters}} + + {{^vendorExtensions.x-group-parameters}} + /** + * {{summary}} + * {{notes}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
    Status Code Description Response Headers
    {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}}
    + {{/responses.0}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + {{#allParams}}{{#required}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { + throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); + } + {{/required}}{{/allParams}} + // create path and map variables + String localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + + // query params + {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); + {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); + + {{#queryParams}} + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); + {{/queryParams}} + + {{#headerParams}}if ({{paramName}} != null) + localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/headerParams}} + + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + + {{#formParams}}if ({{paramName}} != null) + localVarFormParams.put("{{baseName}}", {{paramName}}); + {{/formParams}} + + final String[] localVarAccepts = { + {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; + + {{#returnType}} + GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; + + {{/returnType}} + return apiClient.invokeAPI("{{classname}}.{{operationId}}", localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); + } + {{#vendorExtensions.x-group-parameters}} + + public class API{{operationId}}Request { + {{#allParams}} + private {{#isRequired}}final {{/isRequired}}{{{dataType}}} {{paramName}}; + {{/allParams}} + + private API{{operationId}}Request({{#pathParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) { + {{#pathParams}} + this.{{paramName}} = {{paramName}}; + {{/pathParams}} + } + {{#allParams}} + {{^isPathParam}} + + /** + * Set {{paramName}} + * @param {{paramName}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) + * @return API{{operationId}}Request + */ + public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + {{/isPathParam}} + {{/allParams}} + + /** + * Execute {{operationId}} request + {{#returnType}}* @return {{.}}{{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
    Status Code Description Response Headers
    {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}}
    + {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}return {{/returnType}}this.executeWithHttpInfo().getData(); + } + + /** + * Execute {{operationId}} request with HTTP info returned + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
    Status Code Description Response Headers
    {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}}
    + {{/responses.0}} + {{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + } + + /** + * {{summary}} + * {{notes}}{{#pathParams}} + * @param {{paramName}} {{description}} (required){{/pathParams}} + * @return {{operationId}}Request + * @throws ApiException if fails to make API call + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + {{#externalDocs}}* {{description}} + * @see {{summary}} Documentation{{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public API{{operationId}}Request {{operationId}}({{#pathParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) throws ApiException { + return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}); + } + {{/vendorExtensions.x-group-parameters}} + {{/operation}} +} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/apiException.mustache new file mode 100644 index 000000000000..74a419aacf16 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/apiException.mustache @@ -0,0 +1,99 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +/** + * API Exception + */ +{{>generatedAnnotation}} +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_doc.mustache new file mode 100644 index 000000000000..26c98508ea1d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_doc.mustache @@ -0,0 +1,124 @@ +# {{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); +{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{{unescapedNotes}}}{{/notes}} + +### Example + +```java +{{#vendorExtensions.x-java-import}} +import {{.}}; +{{/vendorExtensions.x-java-import}} +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.model.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result); + {{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (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}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache new file mode 100644 index 000000000000..eb5101b1a602 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache @@ -0,0 +1,59 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.*; +import {{invokerPackage}}.auth.*; +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{/fullJavaUtil}} +/** + * API tests for {{classname}} + */ +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + * + {{/summary}} + {{#notes}} + * {{notes}} + * + {{/notes}} + * @throws ApiException if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + //{{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{^vendorExtensions.x-group-parameters}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + // .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + // .execute(); + {{/vendorExtensions.x-group-parameters}} + // TODO: test validations + } + + {{/operation}} + {{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/ApiKeyAuth.mustache new file mode 100644 index 000000000000..1731f936fb87 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/ApiKeyAuth.mustache @@ -0,0 +1,68 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/Authentication.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/Authentication.mustache new file mode 100644 index 000000000000..46d9c1ab6ace --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/Authentication.mustache @@ -0,0 +1,22 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpBasicAuth.mustache new file mode 100644 index 000000000000..13cecfa90a73 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpBasicAuth.mustache @@ -0,0 +1,44 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpBearerAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpBearerAuth.mustache new file mode 100644 index 000000000000..110a11ea7798 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpBearerAuth.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpSignatureAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpSignatureAuth.mustache new file mode 100644 index 000000000000..ac0a77db8acf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/HttpSignatureAuth.mustache @@ -0,0 +1,269 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.Key; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.List; +import java.util.TimeZone; +import java.security.spec.AlgorithmParameterSpec; +import java.security.InvalidKeyException; + +import org.tomitribe.auth.signatures.Algorithm; +import org.tomitribe.auth.signatures.Signer; +import org.tomitribe.auth.signatures.Signature; +import org.tomitribe.auth.signatures.SigningAlgorithm; + +/** + * A Configuration object for the HTTP message signature security scheme. + */ +public class HttpSignatureAuth implements Authentication { + + private Signer signer; + + // An opaque string that the server can use to look up the component they need to validate the signature. + private String keyId; + + // The HTTP signature algorithm. + private SigningAlgorithm signingAlgorithm; + + // The HTTP cryptographic algorithm. + private Algorithm algorithm; + + // The cryptographic parameters. + private AlgorithmParameterSpec parameterSpec; + + // The list of HTTP headers that should be included in the HTTP signature. + private List headers; + + // The digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + private String digestAlgorithm; + + // The maximum validity duration of the HTTP signature. + private Long maxSignatureValidity; + + /** + * Construct a new HTTP signature auth configuration object. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + * @param signingAlgorithm The signature algorithm. + * @param algorithm The cryptographic algorithm. + * @param digestAlgorithm The digest algorithm. + * @param headers The list of HTTP headers that should be included in the HTTP signature. + * @param maxSignatureValidity The maximum validity duration of the HTTP signature. + * Used to set the '(expires)' field in the HTTP signature. + */ + public HttpSignatureAuth(String keyId, + SigningAlgorithm signingAlgorithm, + Algorithm algorithm, + String digestAlgorithm, + AlgorithmParameterSpec parameterSpec, + List headers, + Long maxSignatureValidity) { + this.keyId = keyId; + this.signingAlgorithm = signingAlgorithm; + this.algorithm = algorithm; + this.parameterSpec = parameterSpec; + this.digestAlgorithm = digestAlgorithm; + this.headers = headers; + this.maxSignatureValidity = maxSignatureValidity; + } + + /** + * Returns the opaque string that the server can use to look up the component they need to validate the signature. + * + * @return The keyId. + */ + public String getKeyId() { + return keyId; + } + + /** + * Set the HTTP signature key id. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + */ + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + /** + * Returns the HTTP signature algorithm which is used to sign HTTP requests. + */ + public SigningAlgorithm getSigningAlgorithm() { + return signingAlgorithm; + } + + /** + * Sets the HTTP signature algorithm which is used to sign HTTP requests. + * + * @param signingAlgorithm The HTTP signature algorithm. + */ + public void setSigningAlgorithm(SigningAlgorithm signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } + + /** + * Returns the HTTP cryptographic algorithm which is used to sign HTTP requests. + */ + public Algorithm getAlgorithm() { + return algorithm; + } + + /** + * Sets the HTTP cryptographic algorithm which is used to sign HTTP requests. + * + * @param algorithm The HTTP signature algorithm. + */ + public void setAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + } + + /** + * Returns the cryptographic parameters which are used to sign HTTP requests. + */ + public AlgorithmParameterSpec getAlgorithmParameterSpec() { + return parameterSpec; + } + + /** + * Sets the cryptographic parameters which are used to sign HTTP requests. + * + * @param parameterSpec The cryptographic parameters. + */ + public void setAlgorithmParameterSpec(AlgorithmParameterSpec parameterSpec) { + this.parameterSpec = parameterSpec; + } + + /** + * Returns the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * @see java.security.MessageDigest + */ + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * The exact list of supported digest algorithms depends on the installed security providers. + * Every implementation of the Java platform is required to support "MD5", "SHA-1" and "SHA-256". + * Do not use "MD5" and "SHA-1", they are vulnerable to multiple known attacks. + * By default, "SHA-256" is used. + * + * @param digestAlgorithm The digest algorithm. + * + * @see java.security.MessageDigest + */ + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Returns the list of HTTP headers that should be included in the HTTP signature. + */ + public List getHeaders() { + return headers; + } + + /** + * Sets the list of HTTP headers that should be included in the HTTP signature. + * + * @param headers The HTTP headers. + */ + public void setHeaders(List headers) { + this.headers = headers; + } + + /** + * Returns the maximum validity duration of the HTTP signature. + * @return The maximum validity duration of the HTTP signature. + */ + public Long getMaxSignatureValidity() { + return maxSignatureValidity; + } + + /** + * Returns the signer instance used to sign HTTP messages. + * + * @return the signer instance. + */ + public Signer getSigner() { + return signer; + } + + /** + * Sets the signer instance used to sign HTTP messages. + * + * @param signer The signer instance to set. + */ + public void setSigner(Signer signer) { + this.signer = signer; + } + + /** + * Set the private key used to sign HTTP requests using the HTTP signature scheme. + * + * @param key The private key. + * + * @throws InvalidKeyException Unable to parse the key, or the security provider for this key + * is not installed. + */ + public void setPrivateKey(Key key) throws InvalidKeyException, ApiException { + if (key == null) { + throw new ApiException("Private key (java.security.Key) cannot be null"); + } + signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers, maxSignatureValidity)); + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + try { + if (headers.contains("host")) { + headerParams.put("host", uri.getHost()); + } + + if (headers.contains("date")) { + SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + headerParams.put("date", dateFormat.format(Calendar.getInstance().getTime())); + } + + if (headers.contains("digest")) { + headerParams.put("digest", + this.digestAlgorithm + "=" + + new String(Base64.getEncoder().encode(MessageDigest.getInstance(this.digestAlgorithm).digest(payload.getBytes())))); + } + + if (signer == null) { + throw new ApiException("Signer cannot be null. Please call the method `setPrivateKey` to set it up correctly"); + } + + // construct the path with the URL-encoded path and query. + // Calling getRawPath and getRawQuery ensures the path is URL-encoded as it will be serialized + // on the wire. The HTTP signature must use the encode URL as it is sent on the wire. + String path = uri.getRawPath(); + if (uri.getRawQuery() != null && !"".equals(uri.getRawQuery())) { + path += "?" + uri.getRawQuery(); + } + + headerParams.put("Authorization", signer.sign(method, path, headerParams).toString()); + } catch (Exception ex) { + throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString()); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache new file mode 100644 index 000000000000..73d6d19dbdbd --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache @@ -0,0 +1,182 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; +import com.github.scribejava.core.builder.ServiceBuilder; +import com.github.scribejava.core.builder.api.DefaultApi20; +import com.github.scribejava.core.exceptions.OAuthException; +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth.OAuth20Service; + +import jakarta.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; +import java.util.logging.Logger; + +{{>generatedAnnotation}} +public class OAuth implements Authentication { + private static final Logger log = Logger.getLogger(OAuth.class.getName()); + + private String tokenUrl; + private String absoluteTokenUrl; + private OAuthFlow flow = OAuthFlow.APPLICATION; + private OAuth20Service service; + private DefaultApi20 authApi; + private String scope; + private String username; + private String password; + private String code; + private volatile OAuth2AccessToken accessToken; + + public OAuth(String basePath, String tokenUrl) { + this.tokenUrl = tokenUrl; + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + authApi = new DefaultApi20() { + @Override + public String getAccessTokenEndpoint() { + return absoluteTokenUrl; + } + + @Override + protected String getAuthorizationBaseUrl() { + throw new UnsupportedOperationException("Shouldn't get there !"); + } + }; + } + + private static String createAbsoluteTokenUrl(String basePath, String tokenUrl) { + if (!URI.create(tokenUrl).isAbsolute()) { + try { + return UriBuilder.fromPath(basePath).path(tokenUrl).build().toURL().toString(); + } catch (MalformedURLException e) { + log.log(Level.SEVERE, "Couldn't create absolute token URL", e); + } + } + return tokenUrl; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + + if (accessToken == null) { + obtainAccessToken(null); + } + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken.getAccessToken()); + } + } + + public OAuth2AccessToken renewAccessToken() throws ApiException { + String refreshToken = null; + if (accessToken != null) { + refreshToken = accessToken.getRefreshToken(); + accessToken = null; + } + return obtainAccessToken(refreshToken); + } + + public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException { + if (service == null) { + log.log(Level.FINE, "service is null in obtainAccessToken."); + return null; + } + try { + if (refreshToken != null) { + return service.refreshAccessToken(refreshToken); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + log.log(Level.FINE, "Refreshing the access token using the refresh token failed", e); + } + try { + switch (flow) { + case PASSWORD: + if (username != null && password != null) { + accessToken = service.getAccessTokenPasswordGrant(username, password, scope); + } + break; + case ACCESS_CODE: + if (code != null) { + accessToken = service.getAccessToken(code); + code = null; + } + break; + case APPLICATION: + accessToken = service.getAccessTokenClientCredentialsGrant(scope); + break; + default: + log.log(Level.SEVERE, "Invalid flow in obtainAccessToken: " + flow); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException(e); + } + return accessToken; + } + + public OAuth2AccessToken getAccessToken() { + return accessToken; + } + + public OAuth setAccessToken(OAuth2AccessToken accessToken) { + this.accessToken = accessToken; + return this; + } + + public OAuth setAccessToken(String accessToken) { + this.accessToken = new OAuth2AccessToken(accessToken); + return this; + } + + public OAuth setScope(String scope) { + this.scope = scope; + return this; + } + + public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret).debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .build(authApi); + } + return this; + } + + public OAuth usePasswordFlow(String username, String password) { + this.flow = OAuthFlow.PASSWORD; + this.username = username; + this.password = password; + return this; + } + + public OAuth useAuthorizationCodeFlow(String code) { + this.flow = OAuthFlow.ACCESS_CODE; + this.code = code; + return this; + } + + public OAuth setFlow(OAuthFlow flow) { + this.flow = flow; + return this; + } + + public void setBasePath(String basePath) { + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuthFlow.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuthFlow.mustache new file mode 100644 index 000000000000..190781fb1264 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuthFlow.mustache @@ -0,0 +1,13 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +/** + * OAuth flows that are supported by this client + */ +public enum OAuthFlow { + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache new file mode 100644 index 000000000000..5ebc725c4f37 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.gradle.mustache @@ -0,0 +1,177 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'com.diffplug.spotless' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2" + {{#openApiNullable}} + jackson_databind_nullable_version = "0.2.2" + {{/openApiNullable}} + jakarta_annotation_version = "2.1.0" + jersey_version = "3.0.4" + junit_version = "5.8.2" + {{#hasOAuthMethods}} + scribejava_apis_version = "8.3.1" + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + tomitribe_http_signatures_version = "1.7" + {{/hasHttpSignatureMethods}} +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.glassfish.jersey.core:jersey-client:$jersey_version" + implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" + implementation "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{#openApiNullable}} + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{/openApiNullable}} + {{#joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{#hasOAuthMethods}} + implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" + {{/hasHttpSignatureMethods}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + removeUnusedImports() + importOrder() + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache new file mode 100644 index 000000000000..aef4fc30d162 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/build.sbt.mustache @@ -0,0 +1,38 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + Compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "com.google.code.findbugs" % "jsr305" % "3.0.0", + "io.swagger" % "swagger-annotations" % "1.6.5", + "org.glassfish.jersey.core" % "jersey-client" % "3.0.4", + "org.glassfish.jersey.inject" % "jersey-hk2" % "3.0.4", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "3.0.4", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "3.0.4", + "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "3.0.4", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2" % "compile", + {{#joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.13.0" % "compile", + {{/joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + {{#openApiNullable}} + "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", + {{/openApiNullable}} + {{#hasOAuthMethods}} + "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", + {{/hasOAuthMethods}} + {{#hasHttpSignatureMethods}} + "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", + {{/hasHttpSignatureMethods}} + "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" + ) + ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache new file mode 100644 index 000000000000..e4f87495451d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache @@ -0,0 +1 @@ +@jakarta.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache new file mode 100644 index 000000000000..914e1eb1e29a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache @@ -0,0 +1,64 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import javax.xml.bind.annotation.*; +{{/withXml}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import javax.validation.constraints.*; +import javax.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +import {{invokerPackage}}.JSON; + +{{#models}} +{{#model}} +{{#oneOf}} +{{#-first}} +import com.fasterxml.jackson.core.type.TypeReference; +{{/-first}} +{{/oneOf}} + +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>oneof_model}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>anyof_model}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>pojo}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_anyof_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_anyof_doc.mustache new file mode 100644 index 000000000000..e360aa56e6c3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_anyof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## anyOf schemas +{{#anyOf}} +* [{{{.}}}]({{{.}}}.md) +{{/anyOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#anyOf}} +import {{{package}}}.{{{.}}}; +{{/anyOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#anyOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/anyOf}} + } +} +``` diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_doc.mustache new file mode 100644 index 000000000000..be1aedcf2f31 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_doc.mustache @@ -0,0 +1,19 @@ +{{#models}}{{#model}} + +{{#isEnum}} +{{>enum_outer_doc}} +{{/isEnum}} +{{^isEnum}} +{{^oneOf.isEmpty}} +{{>model_oneof_doc}} +{{/oneOf.isEmpty}} +{{^anyOf.isEmpty}} +{{>model_anyof_doc}} +{{/anyOf.isEmpty}} +{{^anyOf}} +{{^oneOf}} +{{>pojo_doc}} +{{/oneOf}} +{{/anyOf}} +{{/isEnum}} +{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_oneof_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_oneof_doc.mustache new file mode 100644 index 000000000000..5fff76c9efa0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_oneof_doc.mustache @@ -0,0 +1,38 @@ +# {{classname}} + +{{#description}} +{{&description}} + +{{/description}} +## oneOf schemas +{{#oneOf}} +* [{{{.}}}]({{{.}}}.md) +{{/oneOf}} + +{{#isNullable}} +NOTE: this class is nullable. + +{{/isNullable}} +## Example +```java +// Import classes: +import {{{package}}}.{{{classname}}}; +{{#oneOf}} +import {{{package}}}.{{{.}}}; +{{/oneOf}} + +public class Example { + public static void main(String[] args) { + {{classname}} example{{classname}} = new {{classname}}(); + {{#oneOf}} + + // create a new {{{.}}} + {{{.}}} example{{{.}}} = new {{{.}}}(); + // set {{{classname}}} to {{{.}}} + example{{classname}}.setActualInstance(example{{{.}}}); + // to get back the {{{.}}} set earlier + {{{.}}} test{{{.}}} = ({{{.}}}) example{{classname}}.getActualInstance(); + {{/oneOf}} + } +} +``` diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache new file mode 100644 index 000000000000..2d4ccdd1a14f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +{{#fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +{{/fullJavaUtil}} +/** + * Model tests for {{classname}} + */ +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache new file mode 100644 index 000000000000..e592998299a4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache @@ -0,0 +1,235 @@ +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.JSON; + +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} +@JsonDeserialize(using = {{classname}}.{{classname}}Deserializer.class) +@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class) +public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}}, {{{.}}}{{/vendorExtensions.x-implements}} { + private static final Logger log = Logger.getLogger({{classname}}.class.getName()); + + public static class {{classname}}Serializer extends StdSerializer<{{classname}}> { + public {{classname}}Serializer(Class<{{classname}}> t) { + super(t); + } + + public {{classname}}Serializer() { + this(null); + } + + @Override + public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> { + public {{classname}}Deserializer() { + this({{classname}}.class); + } + + public {{classname}}Deserializer(Class vc) { + super(vc); + } + + @Override + public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{classname}} new{{classname}} = new {{classname}}(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}"); + switch (discriminatorValue) { + {{#mappedModels}} + case "{{{mappingName}}}": + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{modelName}}}.class); + new{{classname}}.setActualInstance(deserialized); + return new{{classname}}; + {{/mappedModels}} + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue)); + } + + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + {{#oneOf}} + // deserialize {{{.}}} + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if ({{{.}}}.class.equals(Integer.class) || {{{.}}}.class.equals(Long.class) || {{{.}}}.class.equals(Float.class) || {{{.}}}.class.equals(Double.class) || {{{.}}}.class.equals(Boolean.class) || {{{.}}}.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= (({{{.}}}.class.equals(Integer.class) || {{{.}}}.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= (({{{.}}}.class.equals(Float.class) || {{{.}}}.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= ({{{.}}}.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= ({{{.}}}.class.equals(String.class) && token == JsonToken.VALUE_STRING); + {{#isNullable}} + attemptParsing |= (token == JsonToken.VALUE_NULL); + {{/isNullable}} + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema '{{{.}}}'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema '{{{.}}}'", e); + } + + {{/oneOf}} + if (match == 1) { + {{classname}} ret = new {{classname}}(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for {{classname}}: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException { + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new JsonMappingException(ctxt.getParser(), "{{classname}} cannot be null"); + {{/isNullable}} + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public {{classname}}() { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + } +{{> libraries/jersey2/additional_properties }} + {{#additionalPropertiesType}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, (({{classname}})o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + {{/additionalPropertiesType}} + {{#oneOf}} + public {{classname}}({{{.}}} o) { + super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); + setActualInstance(o); + } + + {{/oneOf}} + static { + {{#oneOf}} + schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { + }); + {{/oneOf}} + JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas)); + {{#discriminator}} + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); + {{/discriminator}} + } + + @Override + public Map getSchemas() { + return {{classname}}.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + {{#isNullable}} + if (instance == null) { + super.setActualInstance(instance); + return; + } + + {{/isNullable}} + {{#oneOf}} + if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + {{/oneOf}} + throw new RuntimeException("Invalid instance type. Must be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}"); + } + + /** + * Get the actual instance, which can be the following: + * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * + * @return The actual instance ({{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + {{#oneOf}} + /** + * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `{{{.}}}` + * @throws ClassCastException if the instance is not `{{{.}}}` + */ + public {{{.}}} get{{{.}}}() throws ClassCastException { + return ({{{.}}})super.getActualInstance(); + } + + {{/oneOf}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache new file mode 100644 index 000000000000..156cc4cd5ccb --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache @@ -0,0 +1,413 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}}{{#description}} +@ApiModel(description = "{{{.}}}"){{/description}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +@JsonTypeName("{{name}}") +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} + {{^vendorExtensions.x-enum-as-string}} +{{>modelInnerEnum}} + {{/vendorExtensions.x-enum-as-string}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/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}}{{baseName}}{{/xmlName}}") + {{/isXmlAttribute}} + {{^isXmlAttribute}} + {{^isContainer}} + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/isContainer}} + {{#isContainer}} + // Is a container wrapped={{isXmlWrapped}} + {{#items}} + // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} + // items.example={{example}} items.type={{dataType}} + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/items}} + {{#isXmlWrapped}} + @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/isXmlWrapped}} + {{/isContainer}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; + {{/isContainer}} + {{^isContainer}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { {{#parent}}{{#parcelableModel}} + super();{{/parcelableModel}}{{/parent}}{{#gson}}{{#discriminator}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName();{{/discriminator}}{{/gson}} + }{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}}{{#jackson}} + + @JsonCreator + public {{classname}}( + {{#readOnlyVars}} + {{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{name}}; + {{/readOnlyVars}} + }{{/jackson}}{{/withXml}}{{/vendorExtensions.x-has-readonly-properties}} + {{#vars}} + + {{^isReadOnly}} + {{#vendorExtensions.x-enum-as-string}} + public static final Set {{{nameInSnakeCase}}}_VALUES = new HashSet<>(Arrays.asList( + {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} + )); + + {{/vendorExtensions.x-enum-as-string}} + public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}; + } + {{/required}} + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + **/ +{{#deprecated}} + @Deprecated +{{/deprecated}} +{{#required}} +{{#isNullable}} + @jakarta.annotation.Nullable +{{/isNullable}} +{{^isNullable}} + @jakarta.annotation.Nonnull +{{/isNullable}} +{{/required}} +{{^required}} + @jakarta.annotation.Nullable +{{/required}} +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-enum-as-string}} + if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { + throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); + } + + {{/vendorExtensions.x-enum-as-string}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/jersey2/additional_properties}} + /** + * Return true if this {{name}} object is equal to o. + */ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}}&& + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#discriminator}} +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + {{#mappedModels}} + mappings.put("{{mappingName}}", {{modelName}}.class); + {{/mappedModels}} + mappings.put("{{name}}", {{classname}}.class); + JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings); +} +{{/discriminator}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache new file mode 100644 index 000000000000..a4701007b5fc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pom.mustache @@ -0,0 +1,401 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + +{{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + +{{/parentOverridden}} + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + false + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + + attach-javadocs + + jar + + + + + none + 1.8 + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.glassfish.jersey.core + jersey-client + ${jersey-version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withXml}} + + + org.glassfish.jersey.media + jersey-media-jaxb + ${jersey-version} + + {{/withXml}} + {{#joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + {{/joda}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + {{#hasHttpSignatureMethods}} + + org.tomitribe + tomitribe-http-signatures + ${http-signature-version} + + {{/hasHttpSignatureMethods}} + {{#hasOAuthMethods}} + + com.github.scribejava + scribejava-apis + ${scribejava-apis-version} + + {{/hasOAuthMethods}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.glassfish.jersey.connectors + jersey-apache-connector + ${jersey-version} + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + 1.6.5 + 3.0.4 + 2.13.2 + 2.13.2 + 0.2.2 + 2.1.0 + {{#useBeanValidation}} + 2.0.2 + {{/useBeanValidation}} + 5.8.2 + {{#hasHttpSignatureMethods}} + 1.7 + {{/hasHttpSignatureMethods}} + {{#hasOAuthMethods}} + 8.3.1 + {{/hasOAuthMethods}} + 2.21.0 + + diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache index 119494e54d34..49ad40447d9d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache @@ -9,13 +9,18 @@ import java.io.OutputStream; import java.util.List; import java.util.Map; import java.util.Set; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; +import {{rootJavaEEPackage}}.ws.rs.*; +import {{rootJavaEEPackage}}.ws.rs.core.Response; +import {{rootJavaEEPackage}}.ws.rs.core.MediaType; {{^disableMultipart}} import org.apache.cxf.jaxrs.ext.multipart.*; {{/disableMultipart}} +{{#useBeanValidation}} +import javax.validation.constraints.*; +import javax.validation.Valid; +{{/useBeanValidation}} + import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache index fc5c5e5000ae..af0ecc7235af 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache @@ -1,7 +1,7 @@ {{>licenseInfo}} package {{apiPackage}}; -import javax.ws.rs.core.Response; +import {{rootJavaEEPackage}}.ws.rs.core.Response; public class ApiException extends Exception { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache index 9c5988414cd3..12988f5ed9db 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache @@ -1,9 +1,9 @@ {{>licenseInfo}} package {{apiPackage}}; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.Provider; +import {{rootJavaEEPackage}}.ws.rs.core.MultivaluedMap; +import {{rootJavaEEPackage}}.ws.rs.core.Response; +import {{rootJavaEEPackage}}.ws.rs.ext.Provider; import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper; @Provider diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache index a53acad5cf34..9fce40aed80f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache @@ -42,10 +42,15 @@ public class {{classname}}Test { @Before public void setup() throws MalformedURLException { + {{#microprofile3}} + // TODO initialize the client + {{/microprofile3}} + {{^microprofile3}} client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) .register(ApiException.class) .build({{classname}}.class); + {{/microprofile3}} } {{#operations}}{{#operation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/generatedAnnotation.mustache index 875d7b97afee..356a48872aae 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/generatedAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/generatedAnnotation.mustache @@ -1 +1 @@ -@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) \ No newline at end of file +@{{rootJavaEEPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/model.mustache index 5272ff094879..00a3c3db1315 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/model.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/model.mustache @@ -7,8 +7,8 @@ package {{package}}; import java.io.Serializable; {{/serializableModel}} {{#useBeanValidation}} -import javax.validation.constraints.*; -import javax.validation.Valid; +import {{rootJavaEEPackage}}.validation.constraints.*; +import {{rootJavaEEPackage}}.validation.Valid; {{/useBeanValidation}} {{#models}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache index f2f269ab7cba..84c08fbb26cf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache @@ -1,25 +1,25 @@ {{#withXml}} -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlElement; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlRootElement; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlAccessType; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlAccessorType; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlType; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlEnum; +import {{rootJavaEEPackage}}.xml.bind.annotation.XmlEnumValue; {{/withXml}} {{^withXml}} import java.lang.reflect.Type; -import javax.json.bind.annotation.JsonbTypeDeserializer; -import javax.json.bind.annotation.JsonbTypeSerializer; -import javax.json.bind.serializer.DeserializationContext; -import javax.json.bind.serializer.JsonbDeserializer; -import javax.json.bind.serializer.JsonbSerializer; -import javax.json.bind.serializer.SerializationContext; -import javax.json.stream.JsonGenerator; -import javax.json.stream.JsonParser; -import javax.json.bind.annotation.JsonbProperty; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{rootJavaEEPackage}}.json.bind.serializer.DeserializationContext; +import {{rootJavaEEPackage}}.json.bind.serializer.JsonbDeserializer; +import {{rootJavaEEPackage}}.json.bind.serializer.JsonbSerializer; +import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext; +import {{rootJavaEEPackage}}.json.stream.JsonGenerator; +import {{rootJavaEEPackage}}.json.stream.JsonParser; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty; {{#vendorExtensions.x-has-readonly-properties}} -import javax.json.bind.annotation.JsonbCreator; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator; {{/vendorExtensions.x-has-readonly-properties}} {{/withXml}} @@ -37,7 +37,10 @@ import javax.json.bind.annotation.JsonbCreator; **/ {{/description}} {{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} @@ -52,6 +55,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableM {{^withXml}} @JsonbProperty("{{baseName}}") {{/withXml}} +{{#vendorExtensions.x-field-extra-annotation}} +{{{vendorExtensions.x-field-extra-annotation}}} +{{/vendorExtensions.x-field-extra-annotation}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index cb9d96251def..d4199a18be3e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -14,7 +14,7 @@ org.jboss.jandex jandex-maven-plugin - 1.1.0 + ${jandex.maven.plugin.version} make-index @@ -26,7 +26,7 @@ maven-failsafe-plugin - 2.6 + ${maven.failsafe.plugin.version} @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.9.1 + ${build.helper.maven.plugin.version} add-source @@ -61,7 +61,7 @@ junit junit - ${junit-version} + ${junit.version} test {{#useBeanValidation}} @@ -69,7 +69,7 @@ jakarta.validation jakarta.validation-api - ${beanvalidation-version} + ${beanvalidation.version} provided {{/useBeanValidation}} @@ -77,83 +77,83 @@ org.eclipse.microprofile.rest.client microprofile-rest-client-api - 1.4.1 + ${microprofile.rest.client.api.version} jakarta.ws.rs jakarta.ws.rs-api - ${jakarta.ws.rs-version} + ${jakarta.ws.rs.version} provided io.smallrye smallrye-rest-client - 1.2.1 + ${smallrye.rest.client.version} test io.smallrye smallrye-config - 1.3.5 + ${smallrye.config.version} test {{^disableMultipart}} org.apache.cxf cxf-rt-rs-extension-providers - 3.2.6 + ${cxf.rt.rs.extension.providers.version} {{/disableMultipart}} jakarta.json.bind jakarta.json.bind-api - ${jakarta.json.bind-version} + ${jakarta.json.bind.version} jakarta.json jakarta.json-api - ${jakarta.json-version} + ${jakarta.json.version} jakarta.xml.bind jakarta.xml.bind-api - ${jakarta.xml.bind-version} + ${jakarta.xml.bind.version} com.sun.xml.bind jaxb-core - 2.2.11 + ${jaxb.core.version} com.sun.xml.bind jaxb-impl - 2.2.11 + ${jaxb.impl.version} jakarta.activation jakarta.activation-api - ${jakarta.activation-version} + ${jakarta.activation.version} com.fasterxml.jackson.datatype jackson-datatype-jsr310 - ${jackson-jaxrs-version} + ${jackson.jaxrs.version} {{#useBeanValidationFeature}} org.hibernate hibernate-validator - 5.2.2.Final + ${hibernate.validator.version} {{/useBeanValidationFeature}} jakarta.annotation jakarta.annotation-api - ${jakarta-annotation-version} + ${jakarta.annotation.version} provided @@ -170,21 +170,31 @@ 1.8 ${java.version} ${java.version} - 1.5.18 - 9.2.9.v20150224 - 4.13.2 - 1.2.10 + 1.5.18 + 9.2.9.v20150224 + 4.13.2 + 1.2.10 {{#useBeanValidation}} - 2.0.2 + 2.0.2 {{/useBeanValidation}} - 3.2.7 - 2.9.7 - 1.2.2 - 1.3.5 - 1.0.2 - 1.1.6 - 2.1.6 - 2.3.3 + 3.2.7 + 2.9.7 + 1.2.2 + 1.3.5 + 1.0.2 + 1.1.6 + 2.1.6 + 2.3.3 + {{microprofileRestClientVersion}} + 1.2.1 + 1.3.5 + 3.2.6 + 2.2.11 + 2.2.11 + 5.2.2.Final + 1.1.0 + 2.6 + 1.9.1 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache new file mode 100644 index 000000000000..f2795bf32bb1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache @@ -0,0 +1,200 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{#appDescription}} + {{.}} + {{/appDescription}} + {{artifactVersion}} + + src/main/java + + + org.jboss.jandex + jandex-maven-plugin + ${jandex.maven.plugin.version} + + + make-index + + jandex + + + + + + maven-failsafe-plugin + ${maven.failsafe.plugin.version} + + + + integration-test + verify + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.maven.plugin.version} + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + junit + junit + ${junit.version} + test + +{{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation.version} + provided + +{{/useBeanValidation}} + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-api + ${microprofile.rest.client.api.version} + + + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + provided + + + + org.glassfish.jersey.ext.microprofile + jersey-mp-rest-client + ${jersey.mp.rest.client.version} + test + + + org.apache.geronimo.config + geronimo-config-impl + ${geronimo.config.impl.version} + test + + + {{^disableMultipart}} + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.rt.rs.extension.providers.version} + + {{/disableMultipart}} + + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind.version} + + + jakarta.json + jakarta.json-api + ${jakarta.json.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb.core.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.impl.version} + + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.jaxrs.version} + +{{#useBeanValidationFeature}} + + org.hibernate + hibernate-validator + ${hibernate.validator.version} + +{{/useBeanValidationFeature}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.version} + provided + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 11 + ${java.version} + ${java.version} + 1.5.18 + 9.2.9.v20150224 + 4.13.2 + 1.2.10 +{{#useBeanValidation}} + 3.0.1 +{{/useBeanValidation}} + 3.2.7 + 2.13.2 + 2.1.0 + 2.0.0 + 2.0.0 + 2.0.1 + 3.0.0 + 3.0.1 + {{microprofileRestClientVersion}} + 3.0.4 + 1.2.3 + 3.5.1 + 3.0.2 + 3.0.2 + 7.0.4.Final + 1.1.0 + 2.6 + 1.9.1 + UTF-8 + + diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache index 62016b135bcd..14add046a0b3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache @@ -14,6 +14,7 @@ import java.io.InputStream; import java.net.URI; import java.net.URLEncoder; import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; @@ -54,6 +55,7 @@ public class ApiClient { private Consumer> responseInterceptor; private Consumer> asyncResponseInterceptor; private Duration readTimeout; + private Duration connectTimeout; private static String valueToString(Object value) { if (value == null) { @@ -158,6 +160,7 @@ public class ApiClient { updateBaseUri(getDefaultBaseUri()); interceptor = null; readTimeout = null; + connectTimeout = null; responseInterceptor = null; asyncResponseInterceptor = null; } @@ -175,6 +178,7 @@ public class ApiClient { updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri()); interceptor = null; readTimeout = null; + connectTimeout = null; responseInterceptor = null; asyncResponseInterceptor = null; } @@ -411,4 +415,35 @@ public class ApiClient { public Duration getReadTimeout() { return readTimeout; } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

    In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache index 61973dc24fa1..4086383f1528 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache @@ -9,6 +9,9 @@ /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { @@ -20,7 +23,8 @@ } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -29,6 +33,8 @@ /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public {{{.}}} getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index c507f54fda09..36d460275149 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -91,6 +91,11 @@ public class {{classname}} { {{#returnType}} * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}} {{/returnType}} + {{^returnType}} + {{#asyncNative}} + * @return CompletableFuture<Void> + {{/asyncNative}} + {{/returnType}} * @throws ApiException if fails to make API call {{#isDeprecated}} * @deprecated @@ -145,6 +150,11 @@ public class {{classname}} { {{#returnType}} * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}} {{/returnType}} + {{^returnType}} + {{#asyncNative}} + * @return CompletableFuture<Void> + {{/asyncNative}} + {{/returnType}} * @throws ApiException if fails to make API call {{#isDeprecated}} * @deprecated diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache index 3af38b33137f..474cb7954bf5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache @@ -4,10 +4,10 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} -[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +| [**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}}{{/operations}} {{#operations}} @@ -98,9 +98,9 @@ public class Example { ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} @@ -230,9 +230,9 @@ public class Example { ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} @@ -272,7 +272,7 @@ Name | Type | Description | Notes {{#allParams}}{{#-last}} | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} {{/hasParams}}{{/vendorExtensions.x-group-parameters}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index 487892debeab..abeb66295a9e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -63,7 +63,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.10.4" + jackson_version = "2.13.0" jakarta_annotation_version = "1.3.5" junit_version = "4.13.2" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache index 5f0c036797ce..776532461da7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache @@ -15,6 +15,9 @@ import {{invokerPackage}}.JSON; }) {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -63,6 +66,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache index 768cb3eb1261..35065d6499ae 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache @@ -221,7 +221,7 @@ 1.5.22 11 11 - 2.10.4 + 2.13.0 0.2.2 1.3.5 4.13.2 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache index f678b9d6f226..0bddc657e0d3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache @@ -384,7 +384,7 @@ public class ApiClient { *

    Setter for the field dateFormat.

    * * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { this.json.setDateFormat(dateFormat); @@ -395,7 +395,7 @@ public class ApiClient { *

    Set SqlDateFormat.

    * * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { this.json.setSqlDateFormat(dateFormat); @@ -418,8 +418,8 @@ public class ApiClient { /** *

    Set OffsetDateTimeFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { this.json.setOffsetDateTimeFormat(dateFormat); @@ -429,8 +429,8 @@ public class ApiClient { /** *

    Set LocalDateFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { this.json.setLocalDateFormat(dateFormat); @@ -442,7 +442,7 @@ public class ApiClient { *

    Set LenientOnJson.

    * * @param lenientOnJson a boolean - * @return a {@link org.openapitools.client.ApiClient} object + * @return a {@link {{invokerPackage}}.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { this.json.setLenientOnJson(lenientOnJson); @@ -1004,7 +1004,7 @@ public class ApiClient { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws org.openapitools.client.ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws {{invokerPackage}}.ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") @@ -1065,7 +1065,7 @@ public class ApiClient { * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws org.openapitools.client.ApiException If fail to serialize the given object + * @throws {{invokerPackage}}.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -1093,7 +1093,7 @@ public class ApiClient { * Download file from the given response. * * @param response An instance of the Response object - * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk + * @throws {{invokerPackage}}.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1157,7 +1157,7 @@ public class ApiClient { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws org.openapitools.client.ApiException If fail to execute the call + * @throws {{invokerPackage}}.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1172,7 +1172,7 @@ public class ApiClient { * @return ApiResponse object containing response status, headers and * data, which is a Java object deserialized from response body and would be null * when returnType is null. - * @throws org.openapitools.client.ApiException If fail to execute the call + * @throws {{invokerPackage}}.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -1191,13 +1191,13 @@ public class ApiClient { * @param call a {@link okhttp3.Call} object * @param returnType a {@link java.lang.reflect.Type} object * @return a {@link java.io.InputStream} object - * @throws org.openapitools.client.ApiException if any. + * @throws {{invokerPackage}}.ApiException if any. */ public InputStream executeStream(Call call, Type returnType) throws ApiException { try { Response response = call.execute(); if (!response.isSuccessful()) { - throw new ApiException(response.code(), response.message()); + throw new ApiException(response.code(), response.message(), response.headers().toMultimap(), null); } if (response.body() == null) { return null; @@ -1261,7 +1261,7 @@ public class ApiClient { * @param response Response * @param returnType Return type * @return Type - * @throws org.openapitools.client.ApiException If the response has an unsuccessful status code or + * @throws {{invokerPackage}}.ApiException If the response has an unsuccessful status code or * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { @@ -1308,7 +1308,7 @@ public class ApiClient { * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws org.openapitools.client.ApiException If fail to serialize the request body object + * @throws {{invokerPackage}}.ApiException If fail to serialize the request body object */ public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); @@ -1331,7 +1331,7 @@ public class ApiClient { * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request - * @throws org.openapitools.client.ApiException If fail to serialize the request body object + * @throws {{invokerPackage}}.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams @@ -1356,7 +1356,7 @@ public class ApiClient { reqBody = null; } else { // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create("", MediaType.parse(contentType)); + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); } } else { reqBody = serialize(body, contentType); @@ -1483,7 +1483,7 @@ public class ApiClient { * @param payload HTTP request body * @param method HTTP method * @param uri URI - * @throws org.openapitools.client.ApiException If fails to update the parameters + * @throws {{invokerPackage}}.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { @@ -1524,9 +1524,11 @@ public class ApiClient { File file = (File) param.getValue(); addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { - List files = (List) param.getValue(); - for (File file : files) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } } } else { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); @@ -1737,7 +1739,7 @@ public class ApiClient { * * @param request The HTTP request object * @return The string representation of the HTTP request body - * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string + * @throws {{invokerPackage}}.ApiException If fail to serialize the request body object into a string */ private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache new file mode 100644 index 000000000000..96c779fd24a5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache @@ -0,0 +1,37 @@ +{{#isAdditionalPropertiesTrue}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public {{classname}} putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/isAdditionalPropertiesTrue}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 410639f9a72e..952f67e77d1a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -327,14 +327,20 @@ public class {{classname}} { public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-streaming}} InputStream {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); {{#returnType}} + {{#errorObjectType}} try { Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); return localVarApiClient.executeStream(localVarCall, localVarReturnType); } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}{{^errorObjectType}}{{{returnType}}}{{/errorObjectType}}>(){}.getType())); - e.setErrorObjectType(new GenericType<{{{errorObjectType}}}{{^errorObjectType}}{{{returnType}}}{{/errorObjectType}}>(){}); + e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType())); + e.setErrorObjectType(new GenericType<{{{errorObjectType}}}>(){}); throw e; } + {{/errorObjectType}} + {{^errorObjectType}} + Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.executeStream(localVarCall, localVarReturnType); + {{/errorObjectType}} {{/returnType}} } {{/vendorExtensions.x-streaming}}{{^vendorExtensions.x-streaming}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { @@ -343,14 +349,20 @@ public class {{classname}} { return localVarApiClient.execute(localVarCall); {{/returnType}} {{#returnType}} + {{#errorObjectType}} try { Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}{{^errorObjectType}}{{{returnType}}}{{/errorObjectType}}>(){}.getType())); - e.setErrorObjectType(new GenericType<{{{errorObjectType}}}{{^errorObjectType}}{{{returnType}}}{{/errorObjectType}}>(){}); + e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType())); + e.setErrorObjectType(new GenericType<{{{errorObjectType}}}>(){}); throw e; } + {{/errorObjectType}} + {{^errorObjectType}} + Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + {{/errorObjectType}} {{/returnType}} } {{/vendorExtensions.x-streaming}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache index 59da3c51c261..9b50c429ef27 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache @@ -20,8 +20,10 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - private {{{errorObjectType}}}{{^errorObjectType}}Object{{/errorObjectType}} errorObject = null; + {{#errorObjectType}} + private {{{errorObjectType}}} errorObject = null; private GenericType errorObjectType = null; + {{/errorObjectType}} /** *

    Constructor for ApiException.

    @@ -160,6 +162,7 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us public String getResponseBody() { return responseBody; } + {{#errorObjectType}} /** * Get the error object type. @@ -184,7 +187,7 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us * * @return Error object */ - public {{{errorObjectType}}}{{^errorObjectType}}Object{{/errorObjectType}} getErrorObject() { + public {{{errorObjectType}}} getErrorObject() { return errorObject; } @@ -193,7 +196,8 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us * * @param errorObject Error object */ - public void setErrorObject({{{errorObjectType}}}{{^errorObjectType}}Object{{/errorObjectType}} errorObject) { + public void setErrorObject({{{errorObjectType}}} errorObject) { this.errorObject = errorObject; } + {{/errorObjectType}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache index 5a4e3969c93d..f97eab5c71a9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache @@ -3,9 +3,9 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}}{{/operations}} {{#operations}} @@ -75,9 +75,9 @@ public class Example { ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type @@ -98,7 +98,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| {{#responses}} -**{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}} | +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}} | {{/responses}} {{/responses.0}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache index 98a30a60cd54..f14f2cbc1968 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache @@ -5,8 +5,8 @@ package {{package}}; import {{invokerPackage}}.ApiException; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; {{^fullJavaUtil}} import java.util.ArrayList; @@ -21,19 +21,23 @@ import java.io.InputStream; /** * API tests for {{classname}} */ -@Ignore +@Disabled public class {{classname}}Test { private final {{classname}} api = new {{classname}}(); - {{#operations}}{{#operation}} + {{#operations}} + {{#operation}} /** + {{#summary}} * {{summary}} * + {{/summary}} + {{#notes}} * {{notes}} * - * @throws ApiException - * if the Api call fails + {{/notes}} + * @throws ApiException if the Api call fails */ @Test public void {{operationId}}Test() throws ApiException { @@ -41,16 +45,18 @@ public class {{classname}}Test { {{{dataType}}} {{paramName}} = null; {{/allParams}} {{#vendorExtensions.x-streaming}} - InputStream response = api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + InputStream response = api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} .{{paramName}}({{paramName}}){{/optionalParams}} .execute();{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-streaming}} {{^vendorExtensions.x-streaming}} - {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} .{{paramName}}({{paramName}}){{/optionalParams}} .execute();{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-streaming}} // TODO: test validations } - {{/operation}}{{/operations}} + + {{/operation}} + {{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index 328b72959ddd..5638aae20480 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -14,8 +14,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -110,30 +110,30 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' + implementation 'io.swagger:swagger-annotations:1.6.5' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' + implementation 'com.squareup.okhttp3:okhttp:4.9.3' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' + implementation 'com.google.code.gson:gson:2.9.0' + implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.0' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' {{#openApiNullable}} - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.2' {{/openApiNullable}} {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' {{/hasOAuthMethods}} - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' {{#joda}} implementation 'joda-time:joda-time:2.9.9' {{/joda}} {{#dynamicOperations}} - implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23' + implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.30' {{/dynamicOperations}} implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:3.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.mockito:mockito-core:3.12.4' } javadoc { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index d022166e8773..010ecb29a74d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -9,13 +9,13 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.9.3", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", + "com.google.code.gson" % "gson" % "2.9.0", + "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.0", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.2", {{/openApiNullable}} @@ -26,13 +26,13 @@ lazy val root = (project in file(".")). "joda-time" % "joda-time" % "2.9.9" % "compile", {{/joda}} {{#dynamicOperations}} - "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.23" % "compile" + "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.30" % "compile" {{/dynamicOperations}} - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache new file mode 100644 index 000000000000..ac4bf9a418cc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache @@ -0,0 +1,49 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +{{#fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{/fullJavaUtil}} + +/** + * Model tests for {{classname}} + */ +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = new {{classname}}(); + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache index dda283cf6a86..248211a3c165 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache @@ -10,6 +10,7 @@ import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -34,6 +35,9 @@ import {{invokerPackage}}.JSON; {{/isClassnameSanitized}} {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -80,6 +84,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); @@ -258,6 +265,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isReadOnly}} {{/vars}} +{{>libraries/okhttp-gson/additional_properties}} @Override public boolean equals(Object o) { @@ -273,7 +281,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && - {{/-last}}{{/vars}}{{#parent}} && + {{/-last}}{{/vars}}{{#isAdditionalPropertiesTrue}}&& + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/isAdditionalPropertiesTrue}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} {{/useReflectionEqualsHashCode}} @@ -289,7 +298,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#isAdditionalPropertiesTrue}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/isAdditionalPropertiesTrue}}); {{/useReflectionEqualsHashCode}} }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} @@ -310,6 +319,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); {{/vars}} +{{#isAdditionalPropertiesTrue}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); +{{/isAdditionalPropertiesTrue}} sb.append("}"); return sb.toString(); } @@ -417,6 +429,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens } } {{^hasChildren}} + {{^isAdditionalPropertiesTrue}} + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -424,6 +438,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `{{classname}}` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + {{/isAdditionalPropertiesTrue}} {{#requiredVars}} {{#-first}} @@ -442,22 +457,43 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#items.isModel}} JsonArray jsonArray{{name}} = jsonObj.getAsJsonArray("{{{baseName}}}"); {{#isRequired}} + // ensure the json data is an array + if (!jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + // validate the required field `{{{baseName}}}` (array) for (int i = 0; i < jsonArray{{name}}.size(); i++) { {{{items.dataType}}}.validateJsonObject(jsonArray{{name}}.get(i).getAsJsonObject()); }; {{/isRequired}} {{^isRequired}} - // validate the optional field `{{{baseName}}}` (array) if (jsonArray{{name}} != null) { + // ensure the json data is an array + if (!jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + + // validate the optional field `{{{baseName}}}` (array) for (int i = 0; i < jsonArray{{name}}.size(); i++) { {{{items.dataType}}}.validateJsonObject(jsonArray{{name}}.get(i).getAsJsonObject()); }; } {{/isRequired}} {{/items.isModel}} + {{^items.isModel}} + // ensure the json data is an array + if ({{^isRequired}}jsonObj.get("{{{baseName}}}") != null && {{/isRequired}}!jsonObj.get("{{{baseName}}}").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be an array in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + {{/items.isModel}} {{/isArray}} {{^isContainer}} + {{#isString}} + if ({{^isRequired}}jsonObj.get("{{{baseName}}}") != null && {{/isRequired}}!jsonObj.get("{{{baseName}}}").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be a primitive type in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString())); + } + {{/isString}} {{#isModel}} {{#isRequired}} // validate the required field `{{{baseName}}}` @@ -506,6 +542,25 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Override public void write(JsonWriter out, {{classname}} value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + {{#isAdditionalPropertiesTrue}} + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + {{/isAdditionalPropertiesTrue}} elementAdapter.write(out, obj); } @@ -513,7 +568,30 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens public {{classname}} read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); + {{#isAdditionalPropertiesTrue}} + // store additional fields in the deserialized instance + {{classname}} instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + {{/isAdditionalPropertiesTrue}} + {{^isAdditionalPropertiesTrue}} return thisAdapter.fromJsonTree(jsonObj); + {{/isAdditionalPropertiesTrue}} } }.nullSafe(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index 7fd5a7f964fb..b64698d7f36d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -310,7 +310,7 @@ io.swagger.parser.v3 swagger-parser-v3 - 2.0.28 + 2.0.30 {{/dynamicOperations}} {{#useBeanValidation}} @@ -360,24 +360,24 @@ javax.ws.rs jsr311-api - 1.1.1 + ${jsr311-api-version} javax.ws.rs javax.ws.rs-api - 2.0 + ${javax.ws.rs-api-version} - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test org.mockito mockito-core - 3.12.4 + ${mockito-core-version} test @@ -386,15 +386,15 @@ ${java.version} ${java.version} 1.8.5 - 1.6.3 - 4.9.2 - 2.8.8 + 1.6.5 + 4.9.3 + 2.9.0 3.12.0 {{#openApiNullable}} 0.2.2 {{/openApiNullable}} {{#joda}} - 2.10.9 + 2.10.13 {{/joda}} 1.3.5 {{#performBeanValidation}} @@ -403,8 +403,11 @@ {{#useBeanValidation}} 2.0.2 {{/useBeanValidation}} - 4.13.2 + 5.8.2 + 3.12.4 + 2.1.1 + 1.1.1 UTF-8 - 2.17.3 + 2.21.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache index 8d4602511199..137a54c8109b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache @@ -127,9 +127,9 @@ public class {{classname}} { public {{operationIdCamelCase}}Oper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; {{#vendorExtensions}} - {{#x-contentType}} - reqSpec.setContentType("{{x-contentType}}"); - {{/x-contentType}} + {{#x-content-type}} + reqSpec.setContentType("{{x-content-type}}"); + {{/x-content-type}} {{#x-accepts}} reqSpec.setAccept("{{x-accepts}}"); {{/x-accepts}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache index c000bc962a15..b3ca8dfab776 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache @@ -3,9 +3,9 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}}{{/operations}} {{#operations}} @@ -40,9 +40,9 @@ api.{{operationId}}(){{#allParams}}{{#required}}{{#isPathParam}} ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type 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 6270c6ceb3cd..56ce0754e825 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 @@ -637,8 +637,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { queryBuilder.append(encodedName); if (value != null) { String templatizedKey = encodedName + valueItemCounter++; - final String encodedValue = URLEncoder.encode(value.toString(), "UTF-8"); - uriParams.put(templatizedKey, encodedValue); + uriParams.put(templatizedKey, value.toString()); queryBuilder.append('=').append("{").append(templatizedKey).append("}"); } } @@ -785,7 +784,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { // disable default URL encoding DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory(); - uriBuilderFactory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.NONE); + uriBuilderFactory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.VALUES_ONLY); restTemplate.setUriTemplateHandler(uriBuilderFactory); return restTemplate; } 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 fe22cc4a6972..76ef15cc49ab 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 @@ -104,7 +104,7 @@ ext { jackson_databind_nullable_version = "0.2.2" {{/openApiNullable}} jakarta_annotation_version = "1.3.5" - spring_web_version = "5.2.5.RELEASE" + spring_web_version = "5.3.18" jodatime_version = "2.9.9" junit_version = "4.13.2" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index 23e83aebaa6b..bf7da3e63e27 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -301,7 +301,7 @@ UTF-8 1.5.22 - 5.2.5.RELEASE + 5.3.18 2.10.5 2.10.5.1 0.2.2 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache index 166a4fbcd29e..7b0922700e4c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache @@ -147,14 +147,14 @@ public class {{classname}} { * @see {{summary}} Documentation {{/externalDocs}} */ - public {{#returnType}}{{#isArray}}Flux<{{{returnBaseType}}}>{{/isArray}}{{^isArray}}Mono<{{{returnType}}}>{{/isArray}} {{/returnType}}{{^returnType}}Mono {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#isArray}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{{returnBaseType}}}>{{/isArray}}{{^isArray}}{{{returnType}}}{{/isArray}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#isArray}}Flux<{{{returnBaseType}}}>{{/isArray}}{{^isArray}}Mono<{{{returnType}}}>{{/isArray}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { {{#returnType}}ParameterizedTypeReference<{{#isArray}}{{{returnBaseType}}}{{/isArray}}{{^isArray}}{{{returnType}}}{{/isArray}}> localVarReturnType = new ParameterizedTypeReference<{{#isArray}}{{{returnBaseType}}}{{/isArray}}{{^isArray}}{{{returnType}}}{{/isArray}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};{{/returnType}} - return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).{{#isArray}}bodyToFlux{{/isArray}}{{^isArray}}bodyToMono{{/isArray}}(localVarReturnType); + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}{{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).{{#isArray}}bodyToFlux{{/isArray}}{{^isArray}}bodyToMono{{/isArray}}(localVarReturnType){{#vendorExtensions.x-webclient-blocking}}{{#isArray}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}{{/isArray}}.block(){{/vendorExtensions.x-webclient-blocking}}; } - public {{#returnType}}{{#isArray}}Mono>>{{/isArray}}{{^isArray}}Mono>{{/isArray}} {{/returnType}}{{^returnType}}Mono> {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#isArray}}ResponseEntity>{{/isArray}}{{^isArray}}ResponseEntity<{{{returnType}}}>{{/isArray}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#isArray}}Mono>>{{/isArray}}{{^isArray}}Mono>{{/isArray}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws WebClientResponseException { {{#returnType}}ParameterizedTypeReference<{{#isArray}}{{{returnBaseType}}}{{/isArray}}{{^isArray}}{{{returnType}}}{{/isArray}}> localVarReturnType = new ParameterizedTypeReference<{{#isArray}}{{{returnBaseType}}}{{/isArray}}{{^isArray}}{{{returnType}}}{{/isArray}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};{{/returnType}} - return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).{{#isArray}}toEntityList{{/isArray}}{{^isArray}}toEntity{{/isArray}}(localVarReturnType); + return {{operationId}}RequestCreation({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).{{#isArray}}toEntityList{{/isArray}}{{^isArray}}toEntity{{/isArray}}(localVarReturnType){{#vendorExtensions.x-webclient-blocking}}.block(){{/vendorExtensions.x-webclient-blocking}}; } {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache index b9aea5320fa6..62a89973bb34 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache @@ -34,7 +34,7 @@ public class {{classname}}Test { {{#allParams}} {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; {{/allParams}} - {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#isArray}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/isArray}}{{^isArray}}.block(){{/isArray}}; + {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{^vendorExtensions.x-webclient-blocking}}{{#isArray}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/isArray}}{{^isArray}}.block(){{/isArray}}{{/vendorExtensions.x-webclient-blocking}}; // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache index 5591e32c48e1..953b33c6b9be 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache @@ -113,7 +113,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.6.3" - spring_web_version = "2.4.3" + spring_boot_version = "2.6.6" jackson_version = "2.11.4" jackson_databind_version = "2.11.4" {{#openApiNullable}} @@ -130,7 +130,7 @@ dependencies { implementation "io.swagger:swagger-annotations:$swagger_annotations_version" implementation "com.google.code.findbugs:jsr305:3.0.2" implementation "io.projectreactor:reactor-core:$reactor_version" - implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_web_version" + implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache index da402d451603..80845549c57b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache @@ -89,7 +89,7 @@ org.springframework.boot spring-boot-starter-webflux - ${spring-web-version} + ${spring-boot-version} @@ -147,7 +147,7 @@ UTF-8 1.6.3 - 2.4.3 + 2.6.6 2.11.3 2.11.4 {{#openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index f28311cddfb0..7345b16da344 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -15,6 +15,9 @@ {{/isClassnameSanitized}} {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -61,6 +64,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#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 247aaf68617d..bae0bc48cdd2 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache @@ -6,18 +6,18 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}[{{/isModel}}{{/items}}**{{baseType}}{{#items}}<{{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}[{{/isModel}}**Map<String, {{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}[{{/isModel}}**{{dataType}}**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/isContainer}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +{{#vars}}|**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}[{{/isModel}}{{/items}}**{{baseType}}{{#items}}<{{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}[{{/isModel}}**Map<String, {{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}[{{/isModel}}**{{dataType}}**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/isContainer}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} | {{/vars}} {{#vars}}{{#isEnum}} ## Enum: {{datatypeWithEnum}} -Name | Value ----- | -----{{#allowableValues}}{{#enumVars}} -{{name}} | {{value}}{{/enumVars}}{{/allowableValues}} +| Name | Value | +|---- | -----|{{#allowableValues}}{{#enumVars}} +| {{name}} | {{value}} |{{/enumVars}}{{/allowableValues}} {{/isEnum}}{{/vars}} {{#vendorExtensions.x-implements.0}} diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache index 30a31fdd4753..8aca6988b13e 100644 --- a/modules/openapi-generator/src/main/resources/Java/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache @@ -45,6 +45,8 @@ maven-compiler-plugin 3.8.1 + 1.8 + 1.8 true 128m 512m @@ -154,15 +156,6 @@
    - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.8 - 1.8 - - org.apache.maven.plugins maven-javadoc-plugin @@ -261,7 +254,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson-version} + ${jackson-databind-version} com.fasterxml.jackson.jaxrs @@ -334,7 +327,8 @@ UTF-8 1.6.3 1.19.4 - 2.12.5 + 2.12.6 + 2.12.6.1 1.3.5 {{#useBeanValidation}} 2.0.2 diff --git a/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache index c8bf7b8e3c1e..c833321ebfa7 100644 --- a/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache @@ -1,6 +1,10 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) +@JsonIgnoreProperties( + value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) {{#discriminator.mappedModels}} {{#-first}} @JsonSubTypes({ diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache index 408a4a759b3e..fa64a4974e0c 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache @@ -1,6 +1,6 @@ {{#description}}@ApiModel(description = "{{{.}}}"){{/description}} {{>generatedAnnotation}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}} {{#isEnum}} {{^isContainer}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache index 95e6c810bc6b..09893b8df218 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache @@ -76,6 +76,13 @@ public class {{classname}} { @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}} {{/responses}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext) throws NotFoundException { return delegate.{{nickname}}({{#allParams}}{{#isFormParam}}{{#isFile}}{{paramName}}Bodypart{{/isFile}}{{/isFormParam}}{{^isFile}}{{paramName}}{{/isFile}}{{^isFormParam}}{{#isFile}}{{paramName}}{{/isFile}}{{/isFormParam}}, {{/allParams}}securityContext); diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache index b41c719f9948..fec0a5d7b25c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache @@ -51,6 +51,13 @@ public class {{classname}} { {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache index 34aa341352af..ceb113ef3108 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache @@ -6,12 +6,18 @@ import javax.xml.bind.annotation.*; {{/withXml}} {{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache index 90260741e462..4b8f2e186582 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache @@ -68,7 +68,7 @@ - + javax javaee-api @@ -76,7 +76,7 @@ provided - + org.apache.cxf cxf-rt-frontend-jaxrs @@ -86,7 +86,7 @@ provided - + com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider @@ -124,6 +124,7 @@ + UTF-8 {{#useBeanValidation}} 2.0.2 {{/useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache index 8c517fd6dd57..3c663fdf3bff 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache @@ -61,6 +61,13 @@ public interface {{classname}} { @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) public {{>returnTypes}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}); diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache index 226ef4c69a57..b08bbd6776f2 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache @@ -25,7 +25,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; */ @ApiModel(description="{{{description}}}") {{/description}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} @@ -45,6 +48,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableM {{#isDateTime}} @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'hh:mm:ss.SSSX") {{/isDateTime}} +{{#vendorExtensions.x-field-extra-annotation}} +{{{vendorExtensions.x-field-extra-annotation}}} +{{/vendorExtensions.x-field-extra-annotation}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache index 09f19bbe5dd0..bb271cdb3c15 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache @@ -61,6 +61,13 @@ public interface {{classname}} { @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}); diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache index aab11b08675f..e102680721e1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache @@ -16,7 +16,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; **/ @ApiModel(description="{{{description}}}") {{/description}} -{{>additionalModelTypeAnnotations}}{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { +{{>additionalModelTypeAnnotations}}{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} @@ -30,6 +34,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; * {{{.}}} **/ {{/description}} +{{#vendorExtensions.x-field-extra-annotation}} +{{{vendorExtensions.x-field-extra-annotation}}} +{{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache index d7299149e05a..6751fc0b0687 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache @@ -49,6 +49,13 @@ public class {{classname}} { }{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) public Response {{nickname}}( diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache index dd695a52ae3b..966956916b56 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache @@ -10,7 +10,10 @@ }) {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -30,6 +33,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializable public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache index f44bb22089d3..493a918d8079 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache @@ -186,6 +186,11 @@ provided {{/useBeanValidation}} + + javax.annotation + javax.annotation-api + 1.3.2 + diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache index 5cdf6ea0be07..c314c4d823c8 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache @@ -49,6 +49,13 @@ public class {{classname}} { }{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}} }) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache index db3a8fb34301..b4002a51d4e8 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache @@ -43,6 +43,13 @@ public interface {{classname}} { }{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}} }) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache index 8bbfc430101b..f382819c6616 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache @@ -1,7 +1,10 @@ import io.swagger.annotations.*; {{#description}}@ApiModel(description="{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#serializableModel}} private static final long serialVersionUID = 1L; {{/serializableModel}} @@ -10,7 +13,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializable {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} - + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} {{#vars}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache index 413994b55671..104d0461731b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache @@ -177,6 +177,7 @@ + UTF-8 1.5.18 9.2.9.v20150224 3.0.11.Final diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache index 50b1c726407d..f382819c6616 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache @@ -1,7 +1,10 @@ import io.swagger.annotations.*; {{#description}}@ApiModel(description="{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#serializableModel}} private static final long serialVersionUID = 1L; {{/serializableModel}} @@ -10,6 +13,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializable {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} {{#vars}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache index dec493c26180..08e4d8f12318 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache @@ -66,7 +66,7 @@ - + javax javaee-api @@ -194,6 +194,7 @@ + UTF-8 1.5.22 2.11.2 9.2.9.v20150224 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache index 77e7bd3e3dae..748fe4dcfa63 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache @@ -8,6 +8,13 @@ {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} {{#supportAsync}}{{>returnAsyncTypeInterface}}{{/supportAsync}}{{^supportAsync}}{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}}{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache index edecd390f9cf..4cf0201c7a3a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache @@ -8,6 +8,13 @@ {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache index 29b13f8a817c..c41fed1c5daa 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache @@ -50,6 +50,7 @@ + UTF-8 1.8 1.8 false diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index 62f1137a4881..6c5df9d7caca 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -12,13 +12,27 @@ import com.fasterxml.jackson.annotation.JsonTypeName; **/{{/description}} {{#useSwaggerAnnotations}}{{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{/useSwaggerAnnotations}} @JsonTypeName("{{name}}") -{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}}public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} - private {{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + private {{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}}{{#generateBuilders}}{{^additionalProperties}} + + protected {{classname}}({{classname}}Builder b) { + {{#parent}}super(b); + {{/parent}}{{#vars}}this.{{name}} = b.{{name}};{{/vars}} + } + + public {{classname}}() { }{{/additionalProperties}}{{/generateBuilders}} {{#vars}}/** {{#description}} @@ -36,12 +50,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; return this; } - {{#generateBuilders}}public {{classname}}({{#vars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vars}}) { - {{#vars}} - this.{{name}} = {{name}}; - {{/vars}} - }{{/generateBuilders}} - {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}}{{#useSwaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{/useSwaggerAnnotations}} @JsonProperty("{{baseName}}") @@ -134,36 +142,39 @@ import com.fasterxml.jackson.annotation.JsonTypeName; return o.toString().replace("\n", "\n "); } - {{#generateBuilders}} - public static Builder builder() { - return new Builder(); +{{#generateBuilders}}{{^additionalProperties}} + public static {{classname}}Builder builder() { + return new {{classname}}BuilderImpl(); } - public static class Builder { + private static final class {{classname}}BuilderImpl extends {{classname}}Builder<{{classname}}, {{classname}}BuilderImpl> { + + @Override + protected {{classname}}BuilderImpl self() { + return this; + } + + @Override + public {{classname}} build() { + return new {{classname}}(this); + } + } + + public static abstract class {{classname}}Builder> {{#parent}}extends {{{.}}}Builder{{/parent}} { {{#vars}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} + {{^parent}} + protected abstract B self(); + + public abstract C build(); + {{/parent}} {{#vars}} - /** - {{#description}} - * {{.}} - {{/description}} - {{#minimum}} - * minimum: {{.}} - {{/minimum}} - {{#maximum}} - * maximum: {{.}} - {{/maximum}} - **/ - public Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { + public B {{name}}({{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; - return this; + return self(); } {{/vars}} - - public {{classname}} build() { - return new {{classname}}({{#vars}}{{name}}{{^-last}}, {{/-last}}{{/vars}}); - } - }{{/generateBuilders}} + }{{/additionalProperties}}{{/generateBuilders}} } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache index ad229cc7a157..c0a2e6218b04 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache @@ -150,6 +150,7 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.9 4.13.2 2.10.13 diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache index 51205320c522..a66d7532a810 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache @@ -163,10 +163,10 @@ public class {{classname}}Controller extends Controller { } {{/collectionFormat}} {{^collectionFormat}} - String value{{paramName}} = (request.body().asMultipartFormData().asFormUrlEncoded().get("{{baseName}}"))[0]; + String[] value{{paramName}} = request.body().asMultipartFormData().asFormUrlEncoded().get("{{baseName}}"); {{{dataType}}} {{paramName}}; if (value{{paramName}} != null) { - {{paramName}} = {{>conversionBegin}}value{{paramName}}{{>conversionEnd}}; + {{paramName}} = {{>conversionBegin}}value{{paramName}}[0]{{>conversionEnd}}; } else { {{#required}} throw new IllegalArgumentException("'{{baseName}}' parameter is required"); diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache index f99576d83830..366bb8baf8aa 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache @@ -7,7 +7,10 @@ import javax.validation.constraints.*; */ {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -25,6 +28,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializable {{#gson}} @SerializedName("{{baseName}}") {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#isContainer}} {{#useBeanValidation}} {{>beanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 07b5818dc318..a4beae55b517 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -76,10 +76,10 @@ import javax.annotation.Generated; @Controller {{/useSpringController}} {{#swagger2AnnotationLibrary}} -@Tag(name = "{{{baseName}}}", description = "the {{{baseName}}} API") +@Tag(name = "{{{baseName}}}", description = {{#tagDescription}}"{{{.}}}"{{/tagDescription}}{{^tagDescription}}"the {{{baseName}}} API"{{/tagDescription}}) {{/swagger2AnnotationLibrary}} {{#swagger1AnnotationLibrary}} -@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API") +@Api(value = "{{{baseName}}}", description = {{#tagDescription}}"{{{.}}}"{{/tagDescription}}{{^tagDescription}}"the {{{baseName}}} API"{{/tagDescription}}) {{/swagger1AnnotationLibrary}} {{#operations}} {{#virtualService}} @@ -132,6 +132,9 @@ public interface {{classname}} { {{#summary}} summary = "{{{.}}}", {{/summary}} + {{#description}} + description= "{{{.}}}", + {{/description}} {{#vendorExtensions.x-tags.size}} tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, {{/vendorExtensions.x-tags.size}} @@ -181,26 +184,26 @@ public interface {{classname}} { {{/responses}} }) {{/swagger1AnnotationLibrary}} - {{#implicitHeaders}} + {{#implicitHeadersParams.0}} {{#swagger2AnnotationLibrary}} @Parameters({ - {{#headerParams}} + {{#implicitHeadersParams}} {{>paramDoc}}{{^-last}},{{/-last}} - {{/headerParams}} + {{/implicitHeadersParams}} {{/swagger2AnnotationLibrary}} {{#swagger1AnnotationLibrary}} @ApiImplicitParams({ - {{#headerParams}} + {{#implicitHeadersParams}} {{>implicitHeader}}{{^-last}},{{/-last}} - {{/headerParams}} + {{/implicitHeadersParams}} {{/swagger1AnnotationLibrary}} }) - {{/implicitHeaders}} + {{/implicitHeadersParams.0}} @RequestMapping( method = RequestMethod.{{httpMethod}}, value = "{{{path}}}"{{#singleContentTypes}}{{#hasProduces}}, produces = "{{{vendorExtensions.x-accepts}}}"{{/hasProduces}}{{#hasConsumes}}, - consumes = "{{{vendorExtensions.x-contentType}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, + consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, produces = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}}, consumes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}} ) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache index aac48b887c81..7fc2abc2d071 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}} @CookieValue(name="{{baseName}}"{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}} @CookieValue(name="{{baseName}}"{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache index c0e8053a7256..b5ff71e03857 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{>paramDoc}} @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{>paramDoc}} @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache index 77e151eedaa6..0453940ce574 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index 0a282788132e..f2dbeac44992 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -9,24 +9,25 @@ 1.8 ${java.version} ${java.version} + UTF-8 {{#springFoxDocumentationProvider}} 2.9.2 {{/springFoxDocumentationProvider}} {{#springDocDocumentationProvider}} - 1.6.4 + 1.6.6 {{/springDocDocumentationProvider}} {{^springFoxDocumentationProvider}} {{^springDocDocumentationProvider}} {{#swagger1AnnotationLibrary}} - 1.6.4 + 1.6.5 {{/swagger1AnnotationLibrary}} {{#swagger2AnnotationLibrary}} - }2.1.12 + }2.1.13 {{/swagger2AnnotationLibrary}} {{/springDocDocumentationProvider}} {{/springFoxDocumentationProvider}} {{#useSwaggerUI}} - 4.4.1-1 + 4.8.1 {{/useSwaggerUI}} {{#parentOverridden}} @@ -40,7 +41,8 @@ org.springframework.boot spring-boot-starter-parent - {{#springFoxDocumentationProvider}}2.5.8{{/springFoxDocumentationProvider}}{{^springFoxDocumentationProvider}}2.6.3{{/springFoxDocumentationProvider}} + {{#springFoxDocumentationProvider}}2.5.12{{/springFoxDocumentationProvider}}{{^springFoxDocumentationProvider}}2.6.6{{/springFoxDocumentationProvider}} + {{/parentOverridden}} @@ -50,6 +52,11 @@ org.springframework.boot spring-boot-maven-plugin + {{#classifier}} + + {{{classifier}}} + + {{/classifier}} {{#apiFirst}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache index 44ff87dd110b..67e89dc56eae 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache @@ -9,19 +9,20 @@ 1.8 ${java.version} ${java.version} + UTF-8 {{#springFoxDocumentationProvider}} 2.9.2 {{/springFoxDocumentationProvider}} {{#springDocDocumentationProvider}} - 1.6.4 + 1.6.6 {{/springDocDocumentationProvider}} {{^springFoxDocumentationProvider}} {{^springDocDocumentationProvider}} {{#swagger1AnnotationLibrary}} - 1.6.4 + 1.6.5 {{/swagger1AnnotationLibrary}} {{#swagger2AnnotationLibrary}} - }2.1.12 + }2.1.13 {{/swagger2AnnotationLibrary}} {{/springDocDocumentationProvider}} {{/springFoxDocumentationProvider}} @@ -37,7 +38,8 @@ org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + {{/parentOverridden}} @@ -50,7 +52,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache index 077ba5d8719a..7a82dabbcba4 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache @@ -46,7 +46,7 @@ import javax.annotation.Generated; {{>enumOuterClass}} {{/isEnum}} {{^isEnum}} -{{>pojo}} +{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}} {{/isEnum}} {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache new file mode 100644 index 000000000000..7ec79444bb9a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache @@ -0,0 +1,13 @@ +{{>additionalModelTypeAnnotations}} +{{#withXml}} +{{>xmlAnnotation}} +{{/withXml}} +{{#discriminator}} +{{>typeInfoAnnotation}} +{{/discriminator}} +{{>generatedAnnotation}} +public interface {{classname}}{{#vendorExtensions.x-implements}}{{#-first}} extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{#discriminator}} + public {{propertyType}} {{propertyGetter}}(); + {{/discriminator}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache index 77d6fed3a783..7c0c65eb1e87 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache @@ -1 +1 @@ -{{#swagger2AnnotationLibrary}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/swagger1AnnotationLibrary}} \ No newline at end of file +{{#swagger2AnnotationLibrary}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 9478514e3e16..48e6d0faf879 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -22,7 +22,10 @@ {{>xmlAnnotation}} {{/withXml}} {{>generatedAnnotation}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}{{#hateoas}} extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -48,6 +51,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{#gson}} @SerializedName("{{baseName}}") {{/gson}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#isContainer}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} {{#openApiNullable}} @@ -158,6 +164,29 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha } {{! end feature: getter and setter }} {{/vars}} + {{#parentVars}} + + {{! begin feature: fluent setter methods for inherited properties }} + public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + super.{{setter}}({{name}}); + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + super.add{{nameInCamelCase}}Item({{name}}Item); + return this; + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + super.put{{nameInCamelCase}}Item({{name}}Item); + return this; + } + {{/isMap}} + {{! end feature: fluent setter methods for inherited properties }} + {{/parentVars}} @Override public boolean equals(Object o) { @@ -172,23 +201,27 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{/-last}}{{/vars}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return true;{{/hasVars}} - }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + } + {{#vendorExtensions.x-jackson-optional-nullable-helpers}} private static boolean equalsNullable(JsonNullable a, JsonNullable b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + } + {{/vendorExtensions.x-jackson-optional-nullable-helpers}} @Override public int hashCode() { return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); - }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + } + {{#vendorExtensions.x-jackson-optional-nullable-helpers}} private static int hashCodeNullable(JsonNullable a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + } + {{/vendorExtensions.x-jackson-optional-nullable-helpers}} @Override public String toString() { diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache index 2e8911d8f531..6b78fb343f74 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/isModel}}{{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache index ccb7d4868416..c2b7f0c89dae 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache @@ -1,7 +1,21 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) +{{#discriminator.mappedModels}} +{{#-first}} +@JsonIgnoreProperties( + value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization +) +@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}}"), - {{/discriminator.mappedModels}} -}){{/jackson}} \ No newline at end of file +{{/-first}} + {{^vendorExtensions.x-discriminator-value}} + @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{{mappingName}}}"){{^-last}},{{/-last}} + {{/vendorExtensions.x-discriminator-value}} + {{#vendorExtensions.x-discriminator-value}} + @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{{vendorExtensions.x-discriminator-value}}}"){{^-last}},{{/-last}} + {{/vendorExtensions.x-discriminator-value}} +{{#-last}} +}) +{{/-last}} +{{/discriminator.mappedModels}} +{{/jackson}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache index f5ac4490774c..2b2dd7c5ff04 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache @@ -1,5 +1,5 @@ {{>additionalModelTypeAnnotations}}@JsonInclude(JsonInclude.Include.NON_NULL) -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache index f5ac4490774c..2b2dd7c5ff04 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache @@ -1,5 +1,5 @@ {{>additionalModelTypeAnnotations}}@JsonInclude(JsonInclude.Include.NON_NULL) -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache deleted file mode 100644 index 50906dbed6a6..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache +++ /dev/null @@ -1,742 +0,0 @@ -{{>licenseInfo}} -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['superagent', 'querystring'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('superagent'), require('querystring')); - } else { - // Browser globals (root is window) - if (!root.{{moduleName}}) { - root.{{moduleName}} = {}; - } - root.{{moduleName}}.ApiClient = factory(root.superagent, root.querystring); - } -}(this, function(superagent, querystring) { - 'use strict'; - -{{#emitJSDoc}} /** - * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient - * @version {{projectVersion}} - */ - - /** - * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an - * application to use this class directly - the *Api and model classes provide the public API for the service. The - * contents of this file should be regarded as internal but are documented for completeness. - * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient - * @class - */ -{{/emitJSDoc}} var exports = function() { -{{#emitJSDoc}} /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default {{{basePath}}} - */ -{{/emitJSDoc}} this.basePath = '{{{basePath}}}'.replace(/\/+$/, ''); - -{{#emitJSDoc}} /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ -{{/emitJSDoc}}{{=< >=}} this.authentications = { -<#authMethods> -<#isBasic> -<#isBasicBasic> - '': {type: 'basic'}<^-last>, - -<#isBasicBearer> - '': {type: 'bearer'}<^-last>,<#bearerFormat> // <&.> - - -<#isApiKey> - '': {type: 'apiKey', 'in': <#isKeyInHeader>'header'<^isKeyInHeader>'query', name: ''}<^-last>, - -<#isOAuth> - '': {type: 'oauth2'}<^-last>, - - - }; -<={{ }}=> -{{#emitJSDoc}} /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ -{{/emitJSDoc}} this.defaultHeaders = {}; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - -{{#emitJSDoc}} /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ -{{/emitJSDoc}} this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new superagent.agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - /* - * Allow user to add superagent plugins - */ - this.plugins = null; - }; - -{{#emitJSDoc}} /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ -{{/emitJSDoc}} exports.prototype.paramToString = function(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - if (this.canBeJsonified(param)) { - return JSON.stringify(param); - } - return param.toString(); - }; - -{{#emitJSDoc}} /** - * Returns a boolean indicating if the parameter could be JSON.stringified - * @param param The actual parameter - * @returns {Boolean} Flag indicating if param can be JSON.stringified - */ -{{/emitJSDoc}} exports.prototype.canBeJsonified = function(str) { - if (typeof str !== 'string' && typeof str !== 'object') return false; - try { - const type = str.toString(); - return type === '[object Object]' - || type === '[object Array]'; - } catch (err) { - return false; - } - }; - -{{#emitJSDoc}} - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @returns {String} The encoded path with parameter values substituted. - */ -{{/emitJSDoc}} - exports.prototype.buildUrl = function(path, pathParams, apiBasePath) { - if (!path.match(/^\//)) { - path = '/' + path; - } - var url = this.basePath + path; - - - // use API (operation, path) base path if defined - if (apiBasePath !== null && apiBasePath !== undefined) { - url = apiBasePath + path; - } - - var _this = this; - url = url.replace(/\{([\w-\.]+)\}/g, function(fullMatch, key) { - var value; - if (pathParams.hasOwnProperty(key)) { - value = _this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - return encodeURIComponent(value); - }); - return url; - }; - -{{#emitJSDoc}} /** - * Checks whether the given content type represents JSON.
    - * JSON content type examples:
    - *
      - *
    • application/json
    • - *
    • application/json; charset=UTF8
    • - *
    • APPLICATION/JSON
    • - *
    - * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ -{{/emitJSDoc}} exports.prototype.isJsonMime = function(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - }; - -{{#emitJSDoc}} /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ -{{/emitJSDoc}} exports.prototype.jsonPreferredMime = function(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - return contentTypes[0]; - }; - -{{#emitJSDoc}} /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ -{{/emitJSDoc}} exports.prototype.isFileParam = function(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - var fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - return false; - }; - -{{#emitJSDoc}} /** - * Normalizes parameter values: - *
      - *
    • remove nils
    • - *
    • keep files and arrays
    • - *
    • format to string with `paramToString` for other cases
    • - *
    - * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ -{{/emitJSDoc}} exports.prototype.normalizeParams = function(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - return newParams; - }; - -{{#emitJSDoc}} /** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ - exports.CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' - }; - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ -{{/emitJSDoc}} exports.prototype.buildCollectionParam = function buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString, this).join(','); - case 'ssv': - return param.map(this.paramToString, this).join(' '); - case 'tsv': - return param.map(this.paramToString, this).join('\t'); - case 'pipes': - return param.map(this.paramToString, this).join('|'); - case 'multi': - // return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString, this); - case 'passthrough': - return param; - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - }; - -{{#emitJSDoc}} /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ -{{/emitJSDoc}} exports.prototype.applyAuthToRequest = function(request, authNames) { - var _this = this; - authNames.forEach(function(authName) { - var auth = _this.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - break; - case 'bearer': - if (auth.accessToken) { - var localVarBearerToken = typeof auth.accessToken === 'function' - ? auth.accessToken() - : auth.accessToken - request.set({'Authorization': 'Bearer ' + localVarBearerToken}); - } - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - break; - case 'oauth2': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - }; - -{{#emitJSDoc}} /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ -{{/emitJSDoc}} exports.prototype.deserialize = function deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - return exports.convertToType(data, returnType); - }; - -{{#emitJSDoc}}{{^usePromises}} /** - * Callback function to receive the result of the operation. - * @callback module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient~callApiCallback - * @param {String} error Error message, if any. - * @param data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - -{{/usePromises}} /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} collectionQueryParams A map of collection query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type.{{^usePromises}} - * @param {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient~callApiCallback} callback The callback function.{{/usePromises}} - * @returns {{#usePromises}}{Promise} A {@link https://www.promisejs.org/|Promise} object{{/usePromises}}{{^usePromises}}{Object} The SuperAgent request object{{/usePromises}}. - */ -{{/emitJSDoc}} exports.prototype.callApi = function callApi(path, httpMethod, pathParams, - queryParams, collectionQueryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, apiBasePath{{^usePromises}}, callback{{/usePromises}}) { - - var _this = this; - var url = this.buildUrl(path, pathParams, apiBasePath); - var request = superagent(httpMethod, url); - - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]) - } - } - } - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set collection query parameters - for (var key in collectionQueryParams) { - if (collectionQueryParams.hasOwnProperty(key)) { - var param = collectionQueryParams[key]; - if (param.collectionFormat === 'csv') { - // SuperAgent normally percent-encodes all reserved characters in a query parameter. However, - // commas are used as delimiters for the 'csv' collectionFormat so they must not be encoded. We - // must therefore construct and encode 'csv' collection query parameters manually. - if (param.value != null) { - var value = param.value.map(this.paramToString).map(encodeURIComponent).join(','); - request.query(encodeURIComponent(key) + "=" + value); - } - } else { - // All other collection query parameters should be treated as ordinary query parameters. - queryParams[key] = this.buildCollectionParam(param.value, param.collectionFormat); - } - } - } - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if(contentType != 'multipart/form-data') { - request.type(contentType); - } - } - - if (contentType === 'application/x-www-form-urlencoded') { - request.send(querystring.stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - let _formParamsValue = _formParams[key]; - if (this.isFileParam(_formParamsValue)) { - // file field - request.attach(key, _formParamsValue); - } else if (Array.isArray(_formParamsValue) && _formParamsValue.length - && this.isFileParam(_formParamsValue[0])) { - // multiple files - _formParamsValue.forEach(file => request.attach(key, file)); - } else { - request.field(key, _formParamsValue); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - if (!request.header['Content-Type']) { - request.type('application/json'); - } - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('string'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies){ - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } - else { - request.withCredentials(); - } - } - -{{#usePromises}} return new Promise(function(resolve, reject) { - request.end(function(error, response) { - if (error) { - reject(error); - } else { - try { - var data = _this.deserialize(response, returnType); - if (_this.enableCookies && typeof window === 'undefined'){ - _this.agent._saveCookies(response); - } - resolve({data: data, response: response}); - } catch (err) { - reject(err); - } - } - }); - });{{/usePromises}} -{{^usePromises}} request.end(function(error, response) { - if (callback) { - var data = null; - if (!error) { - try { - data = _this.deserialize(response, returnType); - if (_this.enableCookies && typeof window === 'undefined'){ - _this.agent._saveCookies(response); - } - } catch (err) { - error = err; - } - } - callback(error, data, response); - } - }); - - return request; -{{/usePromises}} }; - -{{#emitJSDoc}} /** - * Parses an ISO-8601 string representation or epoch representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ -{{/emitJSDoc}} exports.parseDate = function(str) { - if (isNaN(str)) { - return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); - } - return new Date(+str); - }; - -{{#emitJSDoc}} /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ -{{/emitJSDoc}} exports.convertToType = function(data, type) { - if (data === null || data === undefined) - return data - - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return this.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User or enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - return data.map(function(item) { - return exports.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = exports.convertToType(k, keyType); - var value = exports.convertToType(data[k], valueType); - result[key] = value; - } - } - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - }; - - {{#emitJSDoc}} - /** - * Gets an array of host settings - * @returns An array of host settings - */ - {{/emitJSDoc}} - exports.hostSettings = function() { - return [ - {{#servers}} - { - 'url': "{{{url}}}", - 'description': "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - 'variables': { - {{/-first}} - {{{name}}}: { - 'description': "{{{description}}}{{^description}}No description provided{{/description}}", - 'default_value': "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - 'enum_values': [ - {{/-first}} - "{{{.}}}"{{^-last}},{{/-last}} - {{#-last}} - ] - {{/-last}} - {{/enumValues}} - }{{^-last}},{{/-last}} - {{#-last}} - } - {{/-last}} - {{/variables}} - }{{^-last}},{{/-last}} - {{/servers}} - ]; - }; - - exports.getBasePathFromSettings = function(index, variables) { - var variables = variables || {}; - var servers = this.hostSettings(); - - // check array index out of bound - if (index < 0 || index >= servers.length) { - throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); - } - - var server = servers[index]; - var url = server['url']; - - // go through variable and assign a value - for (var variable_name in server['variables']) { - if (variable_name in variables) { - let variable = server['variables'][variable_name]; - if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) { - url = url.replace("{" + variable_name + "}", variables[variable_name]); - } else { - throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); - } - } else { - // use default value - url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']) - } - } - return url; - }; - -{{#emitJSDoc}} /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ -{{/emitJSDoc}} exports.constructFromObject = function(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) - obj[i] = exports.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) - obj[k] = exports.convertToType(data[k], itemType); - } - } - }; - -{{#emitJSDoc}} /** - * The default API client implementation. - * @type {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient} - */ -{{/emitJSDoc}} exports.instance = new exports(); - - return exports; -})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/README.mustache deleted file mode 100644 index fbf461bdde46..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/README.mustache +++ /dev/null @@ -1,214 +0,0 @@ -# {{projectName}} - -{{moduleName}} - JavaScript client for {{projectName}} -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} -This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -- Package version: {{projectVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Installation - -### For [Node.js](https://nodejs.org/) - -#### npm - -To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). - -Then install it via: - -```shell -npm install {{{projectName}}} --save -``` - -##### Local development - -To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: - -```shell -npm install -``` - -Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: - -```shell -npm link -``` - -Finally, switch to the directory you want to use your {{{projectName}}} from, and run: - -```shell -npm link /path/to/ -``` - -You should now be able to `require('{{{projectName}}}')` in javascript files from the directory you ran the last command above from. - -### git - -If the library is hosted at a git repository, e.g. https://github.com/{{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} -then install it via: - -```shell - npm install {{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save -``` - -### For browser - -The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following the above steps with Node.js and installing browserify with `npm install -g browserify`, perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually use this library): - -```shell -browserify main.js > bundle.js -``` - -Then include *bundle.js* in the HTML pages. - -### Webpack Configuration - -Using Webpack you may encounter the following error: "Module not found: Error: -Cannot resolve module", most certainly you should disable AMD loader. Add/merge -the following section to your webpack config: - -```javascript -module: { - rules: [ - { - parser: { - amd: false - } - } - ] -} -``` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following JS code: - -```javascript -var {{{moduleName}}} = require('{{{projectName}}}'); -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} -{{#hasAuthMethods}} -var defaultClient = {{{moduleName}}}.ApiClient.instance; -{{#authMethods}} -{{#isBasic}} -{{#isBasicBasic}} -// Configure HTTP basic authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.username = 'YOUR USERNAME' -{{{name}}}.password = 'YOUR PASSWORD' -{{/isBasicBasic}} -{{#isBasicBearer}} -// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} access token for authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.accessToken = "YOUR ACCESS TOKEN" -{{/isBasicBearer}} -{{/isBasic}} -{{#isApiKey}} -// Configure API key authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.apiKey = "YOUR API KEY" -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//{{{name}}}.apiKeyPrefix['{{{keyParamName}}}'] = "Token" -{{/isApiKey}} -{{#isOAuth}} -// Configure OAuth2 access token for authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.accessToken = "YOUR ACCESS TOKEN" -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -var api = new {{{moduleName}}}.{{{classname}}}() -{{#hasParams}} -{{#requiredParams}} -var {{{paramName}}} = {{{example}}}; // {{=< >=}}{<&dataType>}<={{ }}=> {{{description}}} -{{/requiredParams}} -{{#optionalParams}} -{{#-first}} -var opts = { -{{/-first}} - '{{{paramName}}}': {{{example}}}{{^-last}},{{/-last}} // {{=< >=}}{<&dataType>}<={{ }}=> {{{description}}} -{{#-last}} -}; -{{/-last}} -{{/optionalParams}} -{{/hasParams}} -{{#usePromises}} -api.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}).then(function({{#returnType}}data{{/returnType}}) { - {{#returnType}}console.log('API called successfully. Returned data: ' + data);{{/returnType}}{{^returnType}}console.log('API called successfully.');{{/returnType}} -}, function(error) { - console.error(error); -}); - -{{/usePromises}}{{^usePromises}} -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - {{#returnType}}console.log('API called successfully. Returned data: ' + data);{{/returnType}}{{^returnType}}console.log('API called successfully.');{{/returnType}} - } -}; -api.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{#hasParams}}, {{/hasParams}}callback); -{{/usePromises}}{{/-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}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation for Models - -{{#models}}{{#model}} - [{{moduleName}}.{{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}} - -### {{name}} - -{{#isApiKey}} - -- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}} -{{#isBasicBasic}} - -- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}} - -- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} -{{/isBasicBearer}} -{{/isBasic}} -{{#isOAuth}} - -- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/api.mustache b/modules/openapi-generator/src/main/resources/Javascript/api.mustache deleted file mode 100644 index deb77ea00456..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/api.mustache +++ /dev/null @@ -1,130 +0,0 @@ -{{>licenseInfo}} -{{=< >=}}(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['<#invokerPackage><&invokerPackage>/ApiClient'<#imports>, '<#invokerPackage><&invokerPackage>/<#modelPackage><&modelPackage>/<&import>'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient')<#imports>, require('../<#modelPackage><&modelPackage>/')); - } else { - // Browser globals (root is window) - if (!root.<&moduleName>) { - root.<&moduleName> = {}; - } - root.<&moduleName>.<&classname> = factory(root.<&moduleName>.ApiClient<#imports>, root.<&moduleName>.); - } -}(this, function(ApiClient<#imports>, <&import>) { - 'use strict'; - -<#emitJSDoc> /** - * service. - * @module <#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname> - * @version - */ - - /** - * Constructs a new <&classname>. <#description> - * <&description> - * @alias module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname> - * @class - * @param {module:<#invokerPackage><&invokerPackage>/ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:<#invokerPackage><&invokerPackage>/ApiClient#instance} if unspecified. - */ - var exports = function(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - -<#operations><#operation><#emitJSDoc><^usePromises> - /** - * Callback function to receive the result of the operation. - * @callback module:<#invokerPackage>/<#apiPackage>/~Callback - * @param {String} error Error message, if any. - * @param <#vendorExtensions.x-jsdoc-type>{<&vendorExtensions.x-jsdoc-type>} data The data returned by the service call.<^vendorExtensions.x-jsdoc-type>data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /**<#summary> - * <&summary><#notes> - * <¬es><#allParams><#required> - * @param {<&vendorExtensions.x-jsdoc-type>} <¶mName> <&description><#hasOptionalParams> - * @param {Object} opts Optional parameters<#allParams><^required> - * @param {<&vendorExtensions.x-jsdoc-type>} opts.<¶mName> <&description><#defaultValue> (default to <&.>)<^usePromises> - * @param {module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>~<&operationId>Callback} callback The callback function, accepting three arguments: error, data, response<#returnType> - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>}<#usePromises> - * @return {Promise} a {@link https://www.promisejs.org/|Promise}<#returnType>, with an object containing data of type {@link <&vendorExtensions.x-jsdoc-type>} and HTTP response<^returnType>, with an object containing HTTP response - */ - this.<#usePromises>WithHttpInfo = function() {<#hasOptionalParams> - opts = opts || {}; - var postBody = <#bodyParam><#required><^required>opts['']<^bodyParam>null; -<#allParams> -<#required> - // verify the required parameter '' is set - if ( === undefined || === null) { - throw new Error("Missing the required parameter '' when calling "); - } - - - - var pathParams = {<#pathParams> - '': <#required><^required>opts['']<^-last>, - }; - var queryParams = {<#queryParams><^collectionFormat> - '': <#required><^required>opts[''], - }; - var collectionQueryParams = {<#queryParams><#collectionFormat> - '': { - value: <#required><^required>opts[''], - collectionFormat: '' - }, - }; - var headerParams = {<#headerParams> - '': <#required><^required>opts['']<^-last>, - }; - var formParams = {<#formParams> - '': <#collectionFormat>this.apiClient.buildCollectionParam(<#required><^required>opts[''], '')<^collectionFormat><#required><^required>opts['']<^-last>, - }; - - var authNames = [<#authMethods>''<^-last>, ]; - var contentTypes = [<#consumes>'<& mediaType>'<^-last>, ]; - var accepts = [<#produces>'<& mediaType>'<^-last>, ]; - var returnType = <#vendorExtensions.x-return-type><&vendorExtensions.x-return-type><^vendorExtensions.x-return-type>null; - <#servers.0> - let basePaths = [<#servers>''<^-last>, ]; - let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI - if (typeof opts['_base_path_index'] !== 'undefined') { - if (opts['_base_path_index'] < 0 || opts['_base_path_index'] >= basePaths.length) { - throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length); - } - basePath = basePaths[opts['_base_path_index']]; - } - - - return this.apiClient.callApi( - '<&path>', '', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, <#servers.0>basePath<^servers.0>null<^usePromises>, callback - ); - } -<#usePromises> - <#emitJSDoc> - - /**<#summary> - * <&summary><#notes> - * <¬es><#allParams><#required> - * @param {<&vendorExtensions.x-jsdoc-type>} <¶mName> <&description><#hasOptionalParams> - * @param {Object} opts Optional parameters<#allParams><^required> - * @param {<&vendorExtensions.x-jsdoc-type>} opts.<¶mName> <&description><#defaultValue> (default to <&.>)<^usePromises> - * @param {module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>~<&operationId>Callback} callback The callback function, accepting three arguments: error, data, response<#returnType> - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>}<#usePromises> - * @return {Promise} a {@link https://www.promisejs.org/|Promise}<#returnType>, with data of type {@link <&vendorExtensions.x-jsdoc-type>} - */ - this. = function() { - return this.WithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - }; - - return exports; -}));<={{ }}=> diff --git a/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache deleted file mode 100644 index 05a9d1e042c8..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache +++ /dev/null @@ -1,114 +0,0 @@ -# {{moduleName}}.{{classname}}{{#description}} - -{{.}}{{/description}} - -All URIs are relative to *{{basePath}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} - -## {{operationId}} - -> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) - -{{summary}}{{#notes}} - -{{.}}{{/notes}} - -### Example - -```javascript -var {{{moduleName}}} = require('{{{projectName}}}'); -{{#hasAuthMethods}} -var defaultClient = {{{moduleName}}}.ApiClient.instance; -{{#authMethods}} -{{#isBasic}} -{{#isBasicBasic}} -// Configure HTTP basic authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.username = 'YOUR USERNAME'; -{{{name}}}.password = 'YOUR PASSWORD'; -{{/isBasicBasic}} -{{#isBasicBearer}} -// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} access token for authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.accessToken = 'YOUR ACCESS TOKEN'; -{{/isBasicBearer}} -{{/isBasic}} -{{#isApiKey}} -// Configure API key authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//{{{name}}}.apiKeyPrefix = 'Token'; -{{/isApiKey}} -{{#isOAuth}} -// Configure OAuth2 access token for authorization: {{{name}}} -var {{{name}}} = defaultClient.authentications['{{{name}}}']; -{{{name}}}.accessToken = 'YOUR ACCESS TOKEN'; -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -var apiInstance = new {{{moduleName}}}.{{{classname}}}(); -{{#requiredParams}} -var {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} -{{/requiredParams}} -{{#optionalParams}} -{{#-first}} -var opts = { -{{/-first}} - '{{{paramName}}}': {{{example}}}{{^-last}},{{/-last}} // {{{dataType}}} | {{{description}}} -{{#-last}} -}; -{{/-last}} -{{/optionalParams}} -{{#usePromises}} -apiInstance.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}).then(function({{#returnType}}data{{/returnType}}) { - {{#returnType}}console.log('API called successfully. Returned data: ' + data);{{/returnType}}{{^returnType}}console.log('API called successfully.');{{/returnType}} -}, function(error) { - console.error(error); -}); - -{{/usePromises}} -{{^usePromises}} -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - {{#returnType}}console.log('API called successfully. Returned data: ' + data);{{/returnType}}{{^returnType}}console.log('API called successfully.');{{/returnType}} - } -}; -apiInstance.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{#hasParams}}, {{/hasParams}}callback); -{{/usePromises}} -``` - -### Parameters - -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} - -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (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}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} -- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -{{/operation}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache deleted file mode 100644 index 398e3041a718..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache +++ /dev/null @@ -1,55 +0,0 @@ -{{>licenseInfo}} -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.{{moduleName}}); - } -}(this, function(expect, {{moduleName}}) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new {{moduleName}}.{{classname}}(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('{{classname}}', function() { -{{#operations}} -{{#operation}} - describe('{{operationId}}', function() { - it('should call {{operationId}} successfully', function(done) { - //uncomment below and update the code to test {{operationId}} - //instance.{{operationId}}(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); -{{/operation}} -{{/operations}} - }); - -})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/enumClass.mustache b/modules/openapi-generator/src/main/resources/Javascript/enumClass.mustache deleted file mode 100644 index fb1e228577c9..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/enumClass.mustache +++ /dev/null @@ -1,19 +0,0 @@ -{{#emitJSDoc}} /** - * Allowed values for the {{baseName}} property. - * @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%> - * @readonly - */{{/emitJSDoc}} - exports.{{datatypeWithEnum}} = { - {{#allowableValues}} - {{#enumVars}} -{{#emitJSDoc}} - /** - * value: {{{value}}} - * @const - */ -{{/emitJSDoc}} - "{{name}}": {{{value}}}{{^-last}}, - {{/-last}} - {{/enumVars}} - {{/allowableValues}} - }; diff --git a/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache deleted file mode 100755 index 0e3776ae6dd4..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - 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/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache b/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache deleted file mode 100644 index e920c16718d1..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache +++ /dev/null @@ -1,33 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -node_modules - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history diff --git a/modules/openapi-generator/src/main/resources/Javascript/index.mustache b/modules/openapi-generator/src/main/resources/Javascript/index.mustache deleted file mode 100644 index 1286f772bf94..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/index.mustache +++ /dev/null @@ -1,63 +0,0 @@ -{{>licenseInfo}} -(function(factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient'{{#models}}, '{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{importPath}}'{{/models}}{{#apiInfo}}{{#apis}}, '{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#apiPackage}}{{.}}/{{/apiPackage}}{{importPath}}'{{/apis}}{{/apiInfo}}], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('./ApiClient'){{#models}}, require('./{{#modelPackage}}{{.}}/{{/modelPackage}}{{importPath}}'){{/models}}{{#apiInfo}}{{#apis}}, require('./{{#apiPackage}}{{.}}/{{/apiPackage}}{{importPath}}'){{/apis}}{{/apiInfo}}); - } -}(function(ApiClient{{#models}}{{#model}}, {{classFilename}}{{/model}}{{/models}}{{#apiInfo}}{{#apis}}, {{importPath}}{{/apis}}{{/apiInfo}}) { - 'use strict'; - -{{#emitJSDoc}} /**{{#projectDescription}} - * {{.}}.
    {{/projectDescription}} - * The index module provides access to constructors for all the classes which comprise the public API. - *

    - * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: - *

    -   * var {{moduleName}} = require('{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'); // See note below*.
    -   * var xxxSvc = new {{moduleName}}.XxxApi(); // Allocate the API class we're going to use.
    -   * var yyyModel = new {{moduleName}}.Yyy(); // Construct a model instance.
    -   * yyyModel.someProperty = 'someValue';
    -   * ...
    -   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
    -   * ...
    -   * 
    - * *NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], function(){...}) - * and put the application logic within the callback function. - *

    - *

    - * A non-AMD browser application (discouraged) might do something like this: - *

    -   * var xxxSvc = new {{moduleName}}.XxxApi(); // Allocate the API class we're going to use.
    -   * var yyy = new {{moduleName}}.Yyy(); // Construct a model instance.
    -   * yyyModel.someProperty = 'someValue';
    -   * ...
    -   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
    -   * ...
    -   * 
    - *

    - * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}index - * @version {{projectVersion}} - */{{/emitJSDoc}} -{{=< >=}} var exports = {<#emitJSDoc> - /** - * The ApiClient constructor. - * @property {module:<#invokerPackage>/ApiClient} - */ - ApiClient: ApiClient<#models>,<#emitJSDoc> - /** - * The model constructor. - * @property {module:<#invokerPackage>/<#modelPackage>/} - */ - : <#apiInfo><#apis>,<#emitJSDoc> - /** - * The service constructor. - * @property {module:<#invokerPackage>/<#apiPackage>/} - */ - : - }; - - return exports;<={{ }}=> -})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache deleted file mode 100644 index 571d22d4a65e..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache +++ /dev/null @@ -1,19 +0,0 @@ -/** - * {{{appName}}} - * {{{appDescription}}} - * - {{#version}} - * The version of the OpenAPI document: {{{.}}} - {{/version}} - {{#infoEmail}} - * Contact: {{{.}}} - {{/infoEmail}} - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * - * OpenAPI Generator version: {{{generatorVersion}}} - * - * Do not edit the class manually. - * - */ diff --git a/modules/openapi-generator/src/main/resources/Javascript/mocha.opts b/modules/openapi-generator/src/main/resources/Javascript/mocha.opts deleted file mode 100644 index 907011807d68..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---timeout 10000 diff --git a/modules/openapi-generator/src/main/resources/Javascript/model.mustache b/modules/openapi-generator/src/main/resources/Javascript/model.mustache deleted file mode 100644 index 2621ddcba652..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/model.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{>licenseInfo}} -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient'{{#imports}}, '{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{import}}'{{/imports}}], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'){{#imports}}, require('./{{import}}'){{/imports}}); - } else { - // Browser globals (root is window) - if (!root.{{moduleName}}) { - root.{{moduleName}} = {}; - } - root.{{moduleName}}.{{classname}} = factory(root.{{moduleName}}.ApiClient{{#imports}}, root.{{moduleName}}.{{import}}{{/imports}}); - } -}(this, function(ApiClient{{#imports}}, {{import}}{{/imports}}) { - 'use strict'; - -{{#models}}{{#model}} -{{#isEnum}}{{>partial_model_enum_class}}{{/isEnum}}{{^isEnum}}{{>partial_model_generic}}{{/isEnum}} -{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache deleted file mode 100644 index fc21ae6e9f1f..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{#models}}{{#model}}{{#isEnum}}# {{moduleName}}.{{classname}} - -## Enum - -{{#allowableValues}}{{#enumVars}} -* `{{name}}` (value: `{{{value}}}`) -{{/enumVars}}{{/allowableValues}} -{{/isEnum}}{{^isEnum}}# {{moduleName}}.{{classname}} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/vars}} -{{#vars}}{{#isEnum}} - - -## Enum: {{datatypeWithEnum}} - -{{#allowableValues}}{{#enumVars}} -* `{{name}}` (value: `{{{value}}}`) -{{/enumVars}}{{/allowableValues}} - -{{/isEnum}}{{/vars}} -{{/isEnum}}{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache deleted file mode 100644 index 53071a6ce09b..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache +++ /dev/null @@ -1,66 +0,0 @@ -{{>licenseInfo}} -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.{{moduleName}}); - } -}(this, function(expect, {{moduleName}}) { - 'use strict'; - - var instance; - - beforeEach(function() { -{{#models}} -{{#model}} -{{^isEnum}} - // create a new instance - //instance = new {{moduleName}}.{{classname}}(); -{{/isEnum}} -{{/model}} -{{/models}} - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('{{classname}}', function() { - it('should create an instance of {{classname}}', function() { - // uncomment below and update the code to test {{classname}} - //var instance = new {{moduleName}}.{{classname}}(); - //expect(instance).to.be.a({{moduleName}}.{{classname}}); - }); - -{{#models}} -{{#model}} -{{#vars}} - it('should have the property {{name}} (base name: "{{baseName}}")', function() { - // uncomment below and update the code to test the property {{name}} - //var instance = new {{moduleName}}.{{classname}}(); - //expect(instance).to.be(); - }); - -{{/vars}} -{{/model}} -{{/models}} - }); - -})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache deleted file mode 100644 index 50f02589eff5..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "{{{projectName}}}", - "version": "{{{projectVersion}}}", - "description": "{{{projectDescription}}}", - "license": "{{licenseName}}", - "main": "{{sourceFolder}}{{#invokerPackage}}/{{.}}{{/invokerPackage}}/index.js", - "scripts": { - "test": "mocha --recursive" - }, - "browser": { - "fs": false - }, -{{#npmRepository}} - "publishConfig":{ - "registry":"{{npmRepository}}" - }, -{{/npmRepository}} - "dependencies": { - "superagent": "5.1.0" - }, - "devDependencies": { - "expect.js": "^0.3.1", - "mocha": "^5.2.0", - "sinon": "^7.2.0" - } -} diff --git a/modules/openapi-generator/src/main/resources/Javascript/partial_model_enum_class.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_enum_class.mustache deleted file mode 100644 index f72afdd14d77..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/partial_model_enum_class.mustache +++ /dev/null @@ -1,33 +0,0 @@ -{{#emitJSDoc}} - /** - * Enum class {{classname}}. - * @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%> - * @readonly - */ -{{/emitJSDoc}} - var exports = { - {{#allowableValues}} - {{#enumVars}} -{{#emitJSDoc}} - /** - * value: {{{value}}} - * @const - */ -{{/emitJSDoc}} - "{{name}}": {{{value}}}{{^-last}}, - {{/-last}} - {{/enumVars}} - {{/allowableValues}} - }; - - /** - * Returns a {{classname}} enum value from a Javascript object name. - * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> The enum {{classname}} value. - */ - exports.constructFromObject = function(object) { - return object; - } - - return exports; -})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache deleted file mode 100644 index 6da2a98af9dc..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache +++ /dev/null @@ -1,157 +0,0 @@ -{{#models}}{{#model}} -{{#emitJSDoc}} - /** - * The {{classname}} model module. - * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} - * @version {{projectVersion}} - */ - - /** - * Constructs a new {{classname}}.{{#description}} - * {{.}}{{/description}} - * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} - * @class{{#useInheritance}}{{#parent}} - * @extends {{#parentModel}}module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} - * @implements module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} - * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{{description}}}{{/vendorExtensions.x-all-required}} - */ -{{/emitJSDoc}} - var exports = function({{#vendorExtensions.x-all-required}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) { - var _this = this; -{{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}} _this = new Array(); - Object.setPrototypeOf(_this, exports); -{{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}} - {{#useInheritance}} - {{#parentModel}} - {{classname}}.call(_this{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}); - {{/parentModel}} - {{^parentModel}} - {{#interfaceModels}} - {{classname}}.call(_this{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}); - {{/interfaceModels}} - {{/parentModel}} - {{/useInheritance}} - {{#vars}} - {{#required}} - {{#defaultValue}} - _this['{{baseName}}'] = {{name}} || {{{defaultValue}}}; - {{/defaultValue}} - {{^defaultValue}} - _this['{{baseName}}'] = {{name}}; - {{/defaultValue}} - {{/required}} - {{/vars}} - {{#parent}} - {{^parentModel}} - return _this; - {{/parentModel}} - {{/parent}} - }; - -{{#emitJSDoc}} - /** - * Constructs a {{classname}} from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> obj Optional instance to populate. - * @return {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> The populated {{classname}} instance. - */ -{{/emitJSDoc}} -{{#vendorExtensions.x-is-primitive}} - exports.constructFromObject = function(data, obj) { - return data; - } -{{/vendorExtensions.x-is-primitive}} -{{^vendorExtensions.x-is-primitive}} - exports.constructFromObject = function(data, obj) { - if (data){{! TODO: support polymorphism: discriminator property on data determines class to instantiate.}} { - obj = obj || new exports(); - {{#parent}} - {{^parentModel}} - ApiClient.constructFromObject(data, obj, '{{vendorExtensions.x-item-type}}'); - {{/parentModel}} - {{/parent}} - {{#useInheritance}} - {{#parentModel}} - {{classname}}.constructFromObject(data, obj); - {{/parentModel}} - {{^parentModel}} - {{#interfaces}} - {{.}}.constructFromObject(data, obj); - {{/interfaces}} - {{/parentModel}} - {{/useInheritance}} - {{#vars}} - if (data.hasOwnProperty('{{baseName}}')) { - obj['{{baseName}}']{{{defaultValueWithParam}}} - } - {{/vars}} - } - return obj; - } -{{/vendorExtensions.x-is-primitive}} -{{#useInheritance}}{{#parentModel}} - exports.prototype = Object.create({{classname}}.prototype); - exports.prototype.constructor = exports; -{{/parentModel}}{{/useInheritance}} -{{#vars}} -{{#emitJSDoc}} - /**{{#description}} - * {{{.}}}{{/description}} - * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} - * @default {{{.}}}{{/defaultValue}} - */ -{{/emitJSDoc}} - exports.prototype['{{baseName}}'] = {{{defaultValue}}}{{^defaultValue}}undefined{{/defaultValue}}; -{{/vars}}{{#useInheritance}}{{#interfaceModels}} - // Implement {{classname}} interface:{{#allVars}} -{{#emitJSDoc}} - /**{{#description}} - * {{{.}}}{{/description}} - * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} - * @default {{{.}}}{{/defaultValue}} - */ -{{/emitJSDoc}} -exports.prototype['{{baseName}}'] = {{{defaultValue}}}{{^defaultValue}}undefined{{/defaultValue}}; -{{/allVars}}{{/interfaceModels}}{{/useInheritance}} -{{#emitModelMethods}}{{#vars}} -{{#emitJSDoc}} - /**{{#description}} - * Returns {{{.}}}{{/description}}{{#minimum}} - * minimum: {{.}}{{/minimum}}{{#maximum}} - * maximum: {{.}}{{/maximum}} - * @return {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> - */ -{{/emitJSDoc}} - exports.prototype.{{getter}} = function() { - return this['{{baseName}}']; - } - -{{#emitJSDoc}} - /**{{#description}} - * Sets {{{.}}}{{/description}} - * @param {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{name}}{{#description}} {{{.}}}{{/description}} - */ -{{/emitJSDoc}} - exports.prototype.{{setter}} = function({{name}}) { - this['{{baseName}}'] = {{name}}; - } - -{{/vars}}{{/emitModelMethods}} -{{#vars}} -{{#isEnum}} -{{^isContainer}} -{{>partial_model_inner_enum}} -{{/isContainer}} -{{/isEnum}} -{{#items.isEnum}} -{{#items}} -{{^isContainer}} -{{>partial_model_inner_enum}} -{{/isContainer}} -{{/items}} -{{/items.isEnum}} -{{/vars}} - - return exports; -{{/model}}{{/models}}})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/partial_model_inner_enum.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_inner_enum.mustache deleted file mode 100644 index a8b981316d1c..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/partial_model_inner_enum.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{#emitJSDoc}} - /** - * Allowed values for the {{baseName}} property. - * @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%> - * @readonly - */ -{{/emitJSDoc}} - exports.{{datatypeWithEnum}} = { - {{#allowableValues}} - {{#enumVars}} -{{#emitJSDoc}} - /** - * value: {{{value}}} - * @const - */ -{{/emitJSDoc}} - "{{name}}": {{{value}}}{{^-last}}, - {{/-last}} - {{/enumVars}} - {{/allowableValues}} - }; diff --git a/modules/openapi-generator/src/main/resources/Javascript/travis.yml b/modules/openapi-generator/src/main/resources/Javascript/travis.yml deleted file mode 100644 index 1b1103e7bd1b..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -cache: npm -node_js: - - "5" - - "5.11" 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 201b4ce97fd1..9beb9dc2a863 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 @@ -24,7 +24,6 @@ org.openapitools.codegen.languages.CSharpNetCoreClientCodegen org.openapitools.codegen.languages.CSharpDotNet2ClientCodegen org.openapitools.codegen.languages.CsharpNetcoreFunctionsServerCodegen org.openapitools.codegen.languages.DartClientCodegen -org.openapitools.codegen.languages.DartDioClientCodegen org.openapitools.codegen.languages.DartDioNextClientCodegen org.openapitools.codegen.languages.EiffelClientCodegen org.openapitools.codegen.languages.ElixirClientCodegen diff --git a/modules/openapi-generator/src/main/resources/android/build.mustache b/modules/openapi-generator/src/main/resources/android/build.mustache index 1a5ba2185eaf..52f3c8861124 100644 --- a/modules/openapi-generator/src/main/resources/android/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/build.mustache @@ -57,20 +57,8 @@ android { {{/androidSdkVersion}} } compileOptions { - {{#supportJava6}} - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 - {{/supportJava6}} - {{^supportJava6}} - {{#java8}} sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 - {{/java8}} - {{^java8}} - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - {{/java8}} - {{/supportJava6}} } // Rename the aar correctly diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache index 86933d07155b..30ceb9619f7c 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache @@ -41,20 +41,8 @@ android { targetSdkVersion 25 } compileOptions { - {{#supportJava6}} - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 - {{/supportJava6}} - {{^supportJava6}} - {{#java8}} sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 - {{/java8}} - {{^java8}} - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - {{/java8}} - {{/supportJava6}} } lintOptions { abortOnError false diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache index d0cf3b56e965..c64ed7054e37 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache @@ -45,13 +45,14 @@ maven-compiler-plugin 3.8.1 - {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} - {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} + 1.8 + 1.8
    + UTF-8 1.5.8 4.5.2 2.6.2 diff --git a/modules/openapi-generator/src/main/resources/android/pom.mustache b/modules/openapi-generator/src/main/resources/android/pom.mustache index d47c761c90af..2c6f72e4cf67 100644 --- a/modules/openapi-generator/src/main/resources/android/pom.mustache +++ b/modules/openapi-generator/src/main/resources/android/pom.mustache @@ -119,8 +119,8 @@ maven-compiler-plugin 3.6.1 - {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} - {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} + 1.8 + 1.8
    diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache index 72755d960eb8..4f89b0f502ad 100644 --- a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache @@ -1,6 +1,7 @@ package {{generatorPackage}}; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.*; import io.swagger.models.properties.*; import java.util.*; @@ -35,18 +36,17 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig /** * Provides an opportunity to inspect and modify operation data before the code is generated. */ - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // to try debugging your code generator: // set a break point on the next line. // then debug the JUnit test called LaunchGeneratorInDebugger - Map results = super.postProcessOperationsWithModels(objs, allModels); + OperationsMap results = super.postProcessOperationsWithModels(objs, allModels); - Map ops = (Map)results.get("operations"); - ArrayList opList = (ArrayList)ops.get("operation"); + OperationMap ops = results.getOperations(); + List opList = ops.getOperation(); // iterate over the operation and perhaps modify something for(CodegenOperation co : opList){ @@ -195,4 +195,4 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig //TODO: check that this logic is safe to escape quotation mark to avoid code injection return input.replace("\"", "\\\""); } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/codegen/kotlin/generatorClass.mustache b/modules/openapi-generator/src/main/resources/codegen/kotlin/generatorClass.mustache index b65939e23f73..17384f2f95d9 100644 --- a/modules/openapi-generator/src/main/resources/codegen/kotlin/generatorClass.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/kotlin/generatorClass.mustache @@ -2,6 +2,7 @@ package {{generatorPackage}} import org.openapitools.codegen.* +import org.openapitools.codegen.model.*; import java.util.* import java.io.File @@ -36,11 +37,11 @@ open class {{generatorClass}}() : DefaultCodegen(), CodegenConfig { * Provides an opportunity to inspect and modify operation data before the code is generated. */ @Suppress("UNCHECKED_CAST") - override fun postProcessOperationsWithModels(objs: Map, allModels: List?): Map { + override fun postProcessOperationsWithModels(objs: OperationsMap, allModels: List?): OperationsMap { val results = super.postProcessOperationsWithModels(objs, allModels) - val ops = results["operations"] as Map - val opList = ops["operation"] as ArrayList + val ops = results.getOperations() + val opList = ops.getOperation() // iterate over the operation and perhaps modify something for (co: CodegenOperation in opList) { @@ -180,4 +181,4 @@ open class {{generatorClass}}() : DefaultCodegen(), CodegenConfig { //TODO: check that this logic is safe to escape quotation mark to avoid code injection return with(input) { replace("\"", "\\\"") } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.h.mustache index 91aae71a1b40..8b2da7dcf643 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.h.mustache @@ -31,15 +31,15 @@ class oauthToken { public: oauthToken(QString token, int expiresIn, QString scope, QString tokenType) : m_token(token), m_scope(scope), m_type(tokenType){ - m_validUntil = time(0) + expiresIn; + m_validUntil = time(nullptr) + expiresIn; } oauthToken(){ - m_validUntil = time(0) - 1; + m_validUntil = time(nullptr) - 1; } QString getToken(){return m_token;}; QString getScope(){return m_scope;}; QString getType(){return m_type;}; - bool isValid(){return time(0) < m_validUntil;}; + bool isValid(){return time(nullptr) < m_validUntil;}; private: QString m_token; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache index ead564144412..c71c4260866a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache @@ -565,7 +565,8 @@ namespace {{packageName}}.Client HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, {{/hasHttpSignatureMethods}} TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/OpenApi/TypeExtensions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/OpenApi/TypeExtensions.mustache new file mode 100644 index 000000000000..df00a93e8c62 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/OpenApi/TypeExtensions.mustache @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; + +namespace {{packageName}}.OpenApi +{ + /// + /// Replacement utilities from Swashbuckle.AspNetCore.SwaggerGen which are not in 5.x + /// + public static class TypeExtensions + { + /// + /// Produce a friendly name for the type which is unique. + /// + /// + /// + public static string FriendlyId(this Type type, bool fullyQualified = false) + { + var typeName = fullyQualified + ? type.FullNameSansTypeParameters().Replace("+", ".") + : type.Name; + + if (type.IsGenericType) + { + var genericArgumentIds = type.GetGenericArguments() + .Select(t => t.FriendlyId(fullyQualified)) + .ToArray(); + + return new StringBuilder(typeName) + .Replace($"`{genericArgumentIds.Count()}", string.Empty) + .Append($"[{string.Join(",", genericArgumentIds).TrimEnd(',')}]") + .ToString(); + } + + return typeName; + } + + /// + /// Determine the fully qualified type name without type parameters. + /// + /// + public static string FullNameSansTypeParameters(this Type type) + { + var fullName = type.FullName; + if (string.IsNullOrEmpty(fullName)) + fullName = type.Name; + var chopIndex = fullName.IndexOf("[[", StringComparison.Ordinal); + return (chopIndex == -1) ? fullName : fullName.Substring(0, chopIndex); + } + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.csproj.mustache new file mode 100644 index 000000000000..54ebdc16166e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.csproj.mustache @@ -0,0 +1,39 @@ + + + {{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}} + {{packageCopyright}} + {{packageAuthors}} + {{targetFramework}} + true + true + {{packageVersion}} + {{azureFunctionsVersion}} +{{#nullableReferenceTypes}} + annotations +{{/nullableReferenceTypes}} +{{#isLibrary}} + Library +{{/isLibrary}} + {{packageName}} + {{packageName}} + {{userSecretsGuid}} + Linux + ..\.. + + + + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.csproj.mustache.bak b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.csproj.mustache.bak new file mode 100644 index 000000000000..ab4ad28ede66 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.csproj.mustache.bak @@ -0,0 +1,36 @@ + + + {{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}} + {{packageCopyright}} + {{packageAuthors}} + {{targetFramework}} + true + true + {{packageVersion}} + {{azureFunctionsVersion}} +{{#nullableReferenceTypes}} + annotations +{{/nullableReferenceTypes}} +{{#isLibrary}} + Library +{{/isLibrary}} + {{packageName}} + {{packageName}} + {{userSecretsGuid}} + Linux + ..\.. + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.nuspec.mustache new file mode 100644 index 000000000000..1d24d3316421 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Project.nuspec.mustache @@ -0,0 +1,20 @@ + + + + $id$ + {{packageVersion}} + {{packageTitle}} + {{packageAuthors}} + {{packageAuthors}} + {{licenseUrl}} + + false + {{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}} + Summary of changes made in this release of the package. + {{packageCopyright}} + {{packageName}} + + diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/README.mustache index b15d2a25bf19..0fda2bdb3be3 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/README.mustache @@ -1,270 +1,28 @@ -# {{packageName}} - the C# library for the {{appName}} +# {{packageName}} - Azure Functions {{azureFunctionsVersion}} Server {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: +## Run -- API version: {{appVersion}} -- SDK version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} - For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} +Linux/OS X: - -## Frameworks supported -{{#netStandard}} -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext -{{/netStandard}} - - -## Dependencies - -{{#useRestSharp}} -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.11.7 or later -{{/useRestSharp}} -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later -{{#useCompareNetObjects}} -- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later -{{/useCompareNetObjects}} -{{#validatable}} -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later -{{/validatable}} - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: ``` -{{#useRestSharp}} -Install-Package RestSharp -{{/useRestSharp}} -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -{{#validatable}} -Install-Package System.ComponentModel.Annotations -{{/validatable}} -{{#useCompareNetObjects}} -Install-Package CompareNETObjects -{{/useCompareNetObjects}} +sh build.sh ``` -{{#useRestSharp}} -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). -NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). +Windows: -{{/useRestSharp}} - -## Installation -{{#netStandard}} -Generate the DLL using your preferred tool (e.g. `dotnet build`) -{{/netStandard}} -{{^netStandard}} -Run the following command to generate the DLL -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` -{{/netStandard}} - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: -```csharp -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; -``` -{{^netStandard}} - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out {{packageName}}.csproj ``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - -{{/netStandard}} - -## Usage - -To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` -```csharp -Configuration c = new Configuration(); -System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/"); -webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; -c.Proxy = webProxy; +build.bat ``` -{{#useHttpClient}} - -### Connections -Each ApiClass (properly the ApiClient inside it) will create an istance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method. - -To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHander (see [here](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net) for details). To use your own HttpClient instance just pass it to the ApiClass constructor. +{{^isLibrary}} +## Run in Docker -```csharp -HttpClientHandler yourHandler = new HttpClientHandler(); -HttpClient yourHttpClient = new HttpClient(yourHandler); -var api = new YourApiClass(yourHttpClient, yourHandler); ``` - -If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory. - -```csharp -HttpClient yourHttpClient = new HttpClient(); -var api = new YourApiClass(yourHttpClient); +cd {{sourceFolder}}/{{packageName}} +docker build -t {{dockerTag}} . +docker run -p 5000:8080 {{dockerTag}} ``` -You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available. - -Here an example of DI setup in a sample web project: - -```csharp -services.AddHttpClient(httpClient => - new PetApi(httpClient)); -``` - -{{/useHttpClient}} - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -{{#useHttpClient}} -using System.Net.Http; -{{/useHttpClient}} -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; - -namespace Example -{ - public class {{operationId}}Example - { - public static void Main() - { -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - Configuration config = new Configuration(); - config.BasePath = "{{{basePath}}}"; - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - config.Username = "YOUR_USERNAME"; - config.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure Bearer token for authorization: {{{name}}} - config.AccessToken = "YOUR_BEARER_TOKEN"; - {{/isBasicBearer}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - config.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - {{#useHttpClient}} - // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes - HttpClient httpClient = new HttpClient(); - HttpClientHandler httpClientHandler = new HttpClientHandler(); - var apiInstance = new {{classname}}(httpClient, config, httpClientHandler); - {{/useHttpClient}} - {{^useHttpClient}} - var apiInstance = new {{classname}}(config); - {{/useHttpClient}} - {{#allParams}} - {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.WriteLine(result);{{/returnType}} - } - catch (ApiException e) - { - Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } -{{/-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 - -{{#modelPackage}} -{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} -{{/modelPackage}} -{{^modelPackage}} -No model defined in this package -{{/modelPackage}} - - -## 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}} -{{#isBasicBasic}}- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}}- **Type**: Bearer Authentication -{{/isBasicBearer}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} +{{/isLibrary}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Solution.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Solution.mustache index 112cc3dc405c..8c6d69ea93da 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Solution.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Solution.mustache @@ -1,27 +1,22 @@ + Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio {{^netStandard}}2012{{/netStandard}}{{#netStandard}}14{{/netStandard}} -VisualStudioVersion = {{^netStandard}}12.0.0.0{{/netStandard}}{{#netStandard}}14.0.25420.1{{/netStandard}} -MinimumVisualStudioVersion = {{^netStandard}}10.0.0.1{{/netStandard}}{{#netStandard}}10.0.40219.1{{/netStandard}} -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2043 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "{{sourceFolder}}\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" EndProject -{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -{{/excludeTests}}Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU - {{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU - {{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU + {{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU + {{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/appsettings.Development.json b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/appsettings.Development.json new file mode 100644 index 000000000000..e203e9407e74 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/appsettings.json b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/appsettings.json new file mode 100644 index 000000000000..def9159a7d94 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/bodyParam.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/bodyParam.mustache new file mode 100644 index 000000000000..02b0fa1d2dea --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/bodyParam.mustache @@ -0,0 +1 @@ +{{#isBodyParam}}[FromBody]{{&dataType}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/build.bat.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/build.bat.mustache new file mode 100644 index 000000000000..e437bccf7d6f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/build.bat.mustache @@ -0,0 +1,9 @@ +:: Generated by: https://openapi-generator.tech +:: + +@echo off + +dotnet restore {{sourceFolder}}\{{packageName}} +dotnet build {{sourceFolder}}\{{packageName}} +echo Now, run the following to start the project: dotnet run -p {{sourceFolder}}\{{packageName}}\{{packageName}}.csproj --launch-profile web. +echo. diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/build.sh.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/build.sh.mustache new file mode 100644 index 000000000000..356d6637be18 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/build.sh.mustache @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# +# Generated by: https://openapi-generator.tech +# + +dotnet restore {{sourceFolder}}/{{packageName}}/ && \ + dotnet build {{sourceFolder}}/{{packageName}}/ && \ + echo "Now, run the following to start the project: func start" diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/controller.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/controller.mustache new file mode 100644 index 000000000000..ba1d43982a7d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/controller.mustache @@ -0,0 +1,88 @@ +{{>partial_header}} +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +{{#operationResultTask}} +using System.Threading.Tasks; +{{/operationResultTask}} +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Http; +{{#useSwashbuckle}} +using Swashbuckle.AspNetCore.Annotations; +using Swashbuckle.AspNetCore.SwaggerGen; +{{/useSwashbuckle}} +{{^isLibrary}} +using Newtonsoft.Json; +{{/isLibrary}} +using {{packageName}}.Attributes; +using {{modelPackage}}; + +namespace {{apiPackage}} +{ {{#operations}} + /// + /// {{description}} + /// {{#description}} + [Description("{{.}}")]{{/description}} + [ApiController] + public {{#classModifier}}{{.}} {{/classModifier}}class {{classname}}Controller : ControllerBase + { {{#operation}} + /// + /// {{summary}} + /// {{#notes}} + /// {{.}}{{/notes}}{{#allParams}} + /// {{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}}{{/allParams}}{{#responses}} + /// {{message}}{{/responses}} + [{{httpMethod}}] + [Route("{{{basePathWithoutHost}}}{{{path}}}")] +{{#authMethods}} +{{#isApiKey}} + [Authorize(Policy = "{{name}}")] +{{/isApiKey}} +{{#isBasicBearer}} + [Authorize{{#scopes}}{{#-first}}(Roles = "{{/-first}}{{scope}}{{^-last}},{{/-last}}{{#-last}}"){{/-last}}{{/scopes}}] +{{/isBasicBearer}} +{{/authMethods}} + {{#vendorExtensions.x-aspnetcore-consumes}} + [Consumes({{&vendorExtensions.x-aspnetcore-consumes}})] + {{/vendorExtensions.x-aspnetcore-consumes}} + [ValidateModelState]{{#useSwashbuckle}} + [SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}} + [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{/responses}}{{/useSwashbuckle}}{{^useSwashbuckle}}{{#responses}}{{#dataType}} + [ProducesResponseType(statusCode: {{code}}, type: typeof({{&dataType}}))]{{/dataType}}{{/responses}}{{/useSwashbuckle}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + public {{operationModifier}} {{#operationResultTask}}{{#operationIsAsync}}async {{/operationIsAsync}}Task<{{/operationResultTask}}IActionResult{{#operationResultTask}}>{{/operationResultTask}} {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{^-last}}{{^isCookieParam}}, {{/isCookieParam}}{{/-last}}{{/allParams}}){{^generateBody}};{{/generateBody}} + {{#generateBody}} + { + {{#cookieParams}} + var {{paramName}} = Request.Cookies["{{paramName}}"]; + {{/cookieParams}} + +{{#responses}} +{{#dataType}} + //TODO: Uncomment the next line to return response {{code}} or use other options such as return this.NotFound(), return this.BadRequest(..), ... + // return StatusCode({{code}}, default({{&dataType}})); +{{/dataType}} +{{^dataType}} + //TODO: Uncomment the next line to return response {{code}} or use other options such as return this.NotFound(), return this.BadRequest(..), ... + // return StatusCode({{code}}); +{{/dataType}} +{{/responses}} +{{#returnType}} + string exampleJson = null; + {{#examples}} + exampleJson = "{{{example}}}"; + {{/examples}} + {{#isListCollection}}{{>listReturn}}{{/isListCollection}}{{^isListCollection}}{{#isMap}}{{>mapReturn}}{{/isMap}}{{^isMap}}{{>objectReturn}}{{/isMap}}{{/isListCollection}} + {{!TODO: defaultResponse, examples, auth, consumes, produces, nickname, externalDocs, imports, security}} + //TODO: Change the data returned + return {{#operationResultTask}}Task.FromResult({{/operationResultTask}}new ObjectResult(example){{#operationResultTask}}){{/operationResultTask}};{{/returnType}}{{^returnType}} + throw new NotImplementedException();{{/returnType}} + } + {{/generateBody}} + {{/operation}} + } +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/enumClass.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/enumClass.mustache new file mode 100644 index 000000000000..cd6595452ae4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/enumClass.mustache @@ -0,0 +1,19 @@ + + /// + /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} + /// + {{#description}} + /// {{{.}}} + {{/description}} + {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}[TypeConverter(typeof(CustomEnumConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>))] + [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} + public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + { + {{#allowableValues}}{{#enumVars}} + /// + /// Enum {{name}} for {{{value}}} + /// + {{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}} + {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}}, + {{/-last}}{{/enumVars}}{{/allowableValues}} + } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/formParam.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/formParam.mustache new file mode 100644 index 000000000000..d22f70b0e260 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/formParam.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{^isBinary}}[FromForm{{^isModel}} (Name = "{{baseName}}"){{/isModel}}]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/function.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/function.mustache new file mode 100644 index 000000000000..95e3a4274cc3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/function.mustache @@ -0,0 +1,35 @@ +using System.IO; +using System.Net; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.WebJobs; +using Microsoft.Azure.WebJobs.Extensions.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; +using Newtonsoft.Json; +using Org.OpenAPITools.Models; + +namespace {{apiPackage}} +{ {{#operations}} + public partial {{#classModifier}}{{classModifier}} {{/classModifier}}class {{classname}} + { {{#operation}} + [FunctionName("{{classname}}_{{operationId}}")] + public async Task> _{{operationId}}([HttpTrigger(AuthorizationLevel.Anonymous, "{{httpMethod}}", Route = "{{{apiBasePath}}}{{{path}}}")]HttpRequest req, ExecutionContext context{{#allParams}}{{#isPathParam}}, {{>pathParam}}{{/isPathParam}}{{/allParams}}){{^generateBody}};{{/generateBody}} + {{#generateBody}} + { + var method = this.GetType().GetMethod("{{operationId}}"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<{{{returnType}}}>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + {{/generateBody}} + {{/operation}} + } +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/function.mustache.bak b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/function.mustache.bak new file mode 100644 index 000000000000..397ba84eb774 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/function.mustache.bak @@ -0,0 +1,33 @@ +using System.IO; +using System.Net; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.WebJobs; +using Microsoft.Azure.WebJobs.Extensions.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; +using Newtonsoft.Json; + +namespace {{apiPackage}} +{ {{#operations}} + public partial {{#classModifier}}{{classModifier}} {{/classModifier}}class {{classname}} + { {{#operation}} + [FunctionName("{{classname}}_{{operationId}}")] + public async Task _{{operationId}}([HttpTrigger(AuthorizationLevel.Anonymous, "{{httpMethod}}", Route = "{{{path}}}")]HttpRequest req, ExecutionContext context{{#allParams}}{{#isPathParam}}, {{>pathParam}}{{/isPathParam}}{{/allParams}}){{^generateBody}};{{/generateBody}} + {{#generateBody}} + { + var method = this.GetType().GetMethod("{{operationId}}"); + + return method != null + ? (await ((Task)method.Invoke(this, new object[] { req, context{{#allParams}}{{#isPathParam}}, {{>paramName}}{{/isPathParam}}{{/allParams}} })).ConfigureAwait(false)) + : new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + {{/generateBody}} + {{/operation}} + } +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/gitignore b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/gitignore new file mode 100644 index 000000000000..1ee53850b84c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/gitignore @@ -0,0 +1,362 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/headerParam.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/headerParam.mustache new file mode 100644 index 000000000000..a742a222236d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/headerParam.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/host.json.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/host.json.mustache new file mode 100644 index 000000000000..beb2e4020b8b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/host.json.mustache @@ -0,0 +1,11 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache index ca187c688d91..776d94518b82 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache @@ -97,6 +97,10 @@ namespace {{packageName}}.Client { return await response.Content.ReadAsByteArrayAsync(); } + else if (type == typeof(FileParameter)) + { + return new FileParameter(await response.Content.ReadAsStreamAsync()); + } // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) if (type == typeof(Stream)) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/listReturn.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/listReturn.mustache new file mode 100644 index 000000000000..9f18d71d04c1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/listReturn.mustache @@ -0,0 +1,4 @@ + + var example = exampleJson != null + ? JsonConvert.DeserializeObject<{{returnContainer}}<{{{returnType}}}>>(exampleJson) + : Enumerable.Empty<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/local.settings.json.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/local.settings.json.mustache new file mode 100644 index 000000000000..4fce9ff39ede --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/local.settings.json.mustache @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "FUNCTIONS_WORKER_RUNTIME": "dotnet" + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/mapReturn.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/mapReturn.mustache new file mode 100644 index 000000000000..94f16e11fdc5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/mapReturn.mustache @@ -0,0 +1,4 @@ + + var example = exampleJson != null + ? JsonConvert.DeserializeObject>(exampleJson) + : new Dictionary<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/model.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/model.mustache index 339a6d2f76b7..eebb50bf87c2 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/model.mustache @@ -1,47 +1,160 @@ {{>partial_header}} - using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; -using System.IO; -using System.Runtime.Serialization; using System.Text; -using System.Text.RegularExpressions; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using {{packageName}}.Converters; {{#models}} {{#model}} -{{#discriminator}} -using JsonSubTypes; -{{/discriminator}} {{/model}} {{/models}} -{{#validatable}} -using System.ComponentModel.DataAnnotations; -{{/validatable}} -using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; -{{#useCompareNetObjects}} -using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; -{{/useCompareNetObjects}} + {{#models}} {{#model}} -{{#oneOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/oneOf}} -{{#aneOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/aneOf}} - -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +namespace {{modelPackage}} +{ {{#isEnum}}{{>enumClass}}{{/isEnum}}{{^isEnum}} + /// + /// {{description}} + /// + [DataContract] + public {{#modelClassModifier}}{{.}} {{/modelClassModifier}}class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}> + { + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} +{{>enumClass}} + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{^items.isEnum}} + {{#isEnum}} + {{^complexType}} +{{>enumClass}} + {{/complexType}} + {{/isEnum}} + {{/items.isEnum}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}}{{#required}} + [Required]{{/required}}{{#pattern}} + [RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}} + [StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} + [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} + [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}} + [Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}} + [DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})] + {{#isEnum}} + public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} + {{/isEnum}} + {{^isEnum}} + public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} + {{/isEnum}} + {{^-last}} + + {{/-last}} + {{/vars}} + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class {{classname}} {\n"); + {{#vars}} + sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); + {{/vars}} + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public {{#parent}}{{^isMap}}{{^isArray}}new {{/isArray}}{{/isMap}}{{/parent}}string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals(({{classname}})obj); + } + + /// + /// Returns true if {{classname}} instances are equal + /// + /// Instance of {{classname}} to be compared + /// Boolean + public bool Equals({{classname}} other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return {{#vars}}{{^isContainer}} + ( + {{name}} == other.{{name}} || + {{^vendorExtensions.x-is-value-type}}{{name}} != null &&{{/vendorExtensions.x-is-value-type}} + {{name}}.Equals(other.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} + ( + {{name}} == other.{{name}} || + {{^vendorExtensions.x-is-value-type}}{{name}} != null && + other.{{name}} != null && + {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(other.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}false{{/vars}}; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + {{#vars}} + {{^vendorExtensions.x-is-value-type}}if ({{name}} != null){{/vendorExtensions.x-is-value-type}} + hashCode = hashCode * 59 + {{name}}.GetHashCode(); + {{/vars}} + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==({{classname}} left, {{classname}} right) + { + return Equals(left, right); + } + + public static bool operator !=({{classname}} left, {{classname}} right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +{{/isEnum}} {{/model}} {{/models}} } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelEnum.mustache index 39bcd2eddc1f..d3709c5bc947 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelEnum.mustache @@ -8,7 +8,9 @@ {{#enumVars}} {{#-first}} {{#isString}} + {{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} {{/isString}} {{/-first}} {{/enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelInnerEnum.mustache index d9e96dccdb3c..d2a6d1ef1ce2 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelInnerEnum.mustache @@ -6,7 +6,9 @@ /// {{description}} {{/description}} {{#isString}} + {{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} {{/isString}} {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/objectReturn.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/objectReturn.mustache new file mode 100644 index 000000000000..b037a14ceba6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/objectReturn.mustache @@ -0,0 +1,4 @@ + + var example = exampleJson != null + ? JsonConvert.DeserializeObject<{{{returnType}}}>(exampleJson) + : default({{{returnType}}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/paramName.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/paramName.mustache new file mode 100644 index 000000000000..1adee60e5f89 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/paramName.mustache @@ -0,0 +1 @@ +{{paramName}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/partial_header.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/partial_header.mustache index 755e937d23b5..408d841df26d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/partial_header.mustache @@ -1,17 +1,13 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - {{#version}} - * The version of the OpenAPI document: {{{version}}} - {{/version}} - {{#infoEmail}} - * Contact: {{{infoEmail}}} - {{/infoEmail}} - * Generated by: https://github.com/openapitools/openapi-generator.git + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} + * Generated by: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/queryParam.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/queryParam.mustache new file mode 100644 index 000000000000..c454950bd147 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/queryParam.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}[FromQuery]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/tags.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/tags.mustache new file mode 100644 index 000000000000..c97df19949e6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/tags.mustache @@ -0,0 +1 @@ +{{!TODO: Need iterable tags object...}}{{#tags}}, Tags = new[] { {{/tags}}"{{#tags}}{{tag}} {{/tags}}"{{#tags}} }{{/tags}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/typeConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/typeConverter.mustache new file mode 100644 index 000000000000..dadf3a0260da --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/typeConverter.mustache @@ -0,0 +1,33 @@ +using System; +using System.ComponentModel; +using System.Globalization; +using Newtonsoft.Json; + +namespace {{packageName}}.Converters +{ + /// + /// Custom string to enum converter + /// + public class CustomEnumConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(string)) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + var s = value as string; + if (string.IsNullOrEmpty(s)) + { + return null; + } + + return JsonConvert.DeserializeObject(@"""" + value.ToString() + @""""); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache index 13d3b8c5f49d..36ef7250b333 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache @@ -427,9 +427,10 @@ namespace {{packageName}}.Client return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -547,9 +548,10 @@ namespace {{packageName}}.Client } {{#supportsAsync}} - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -676,7 +678,7 @@ namespace {{packageName}}.Client public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -691,7 +693,7 @@ namespace {{packageName}}.Client public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -706,7 +708,7 @@ namespace {{packageName}}.Client public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -721,7 +723,7 @@ namespace {{packageName}}.Client public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -736,7 +738,7 @@ namespace {{packageName}}.Client public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -751,7 +753,7 @@ namespace {{packageName}}.Client public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -766,7 +768,7 @@ namespace {{packageName}}.Client public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient {{/supportsAsync}} @@ -783,7 +785,7 @@ namespace {{packageName}}.Client public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -797,7 +799,7 @@ namespace {{packageName}}.Client public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -811,7 +813,7 @@ namespace {{packageName}}.Client public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -825,7 +827,7 @@ namespace {{packageName}}.Client public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -839,7 +841,7 @@ namespace {{packageName}}.Client public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -853,7 +855,7 @@ namespace {{packageName}}.Client public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -867,7 +869,7 @@ namespace {{packageName}}.Client public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache index 6c810f89bc1e..20c1fcf645f9 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache @@ -93,6 +93,13 @@ namespace {{packageName}}.Client /// The servers private IList> _servers; {{/servers.0}} + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + {{#hasHttpSignatureMethods}} /// @@ -158,6 +165,33 @@ namespace {{packageName}}.Client }; {{/-last}} {{/servers}} + OperationServers = new Dictionary>>() + { + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers.0}} + { + "{{{classname}}}.{{{nickname}}}", new List> + { + {{#servers}} + { + new Dictionary + { + {"url", "{{{url}}}"}, + {"description", "{{{description}}}{{^description}}No description provided{{/description}}"} + } + }, + {{/servers}} + } + }, + {{/servers.0}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -418,6 +452,23 @@ namespace {{packageName}}.Client } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -426,7 +477,7 @@ namespace {{packageName}}.Client /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -437,9 +488,49 @@ namespace {{packageName}}.Client /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -447,31 +538,34 @@ namespace {{packageName}}.Client inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -565,7 +659,8 @@ namespace {{packageName}}.Client HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, {{/hasHttpSignatureMethods}} TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache index bf142ffbac1e..f4044f612504 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache @@ -91,6 +91,12 @@ namespace {{packageName}}.Client /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -98,6 +104,14 @@ namespace {{packageName}}.Client /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache index a3f9691b8d27..7eadf26f4ead 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache @@ -45,6 +45,16 @@ namespace {{packageName}}.Client /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache index c4824e8db8a8..54dde461ff1f 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -31,11 +31,12 @@ namespace {{packageName}}.{{apiPackage}} {{/notes}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} + {{/allParams}}/// Index associated with the operation. + /// {{returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); /// /// {{summary}} @@ -45,11 +46,12 @@ namespace {{packageName}}.{{apiPackage}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} + {{/allParams}}/// Index associated with the operation. + /// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); {{/operation}} #endregion Synchronous Operations } @@ -72,12 +74,13 @@ namespace {{packageName}}.{{apiPackage}} {{#allParams}} /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of {{returnType}}{{^returnType}}void{{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// {{summary}} @@ -89,12 +92,13 @@ namespace {{packageName}}.{{apiPackage}} {{#allParams}} /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -233,11 +237,12 @@ namespace {{packageName}}.{{apiPackage}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} + {{/allParams}}/// Index associated with the operation. + /// {{returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -248,11 +253,12 @@ namespace {{packageName}}.{{apiPackage}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} + {{/allParams}}/// Index associated with the operation. + /// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) { {{#allParams}} {{#required}} @@ -390,6 +396,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.Data = {{paramName}}; {{/bodyParam}} + localVarRequestOptions.Operation = "{{classname}}.{{operationId}}"; + localVarRequestOptions.OperationIndex = operationIndex; + {{#authMethods}} // authentication ({{name}}) required {{#isApiKey}} @@ -475,15 +484,16 @@ namespace {{packageName}}.{{apiPackage}} {{#allParams}} /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of {{returnType}}{{^returnType}}void{{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} + {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}} } /// @@ -493,12 +503,13 @@ namespace {{packageName}}.{{apiPackage}} {{#allParams}} /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#allParams}} {{#required}} @@ -614,6 +625,9 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.Data = {{paramName}}; {{/bodyParam}} + localVarRequestOptions.Operation = "{{classname}}.{{operationId}}"; + localVarRequestOptions.OperationIndex = operationIndex; + {{#authMethods}} // authentication ({{name}}) required {{#isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache index 0a7d36f90b28..7777fd09c44a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache @@ -1,7 +1,9 @@ // {{>partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; namespace {{packageName}}.Client diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache index 542a137edf12..25a751ad6bc7 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; namespace {{packageName}}.Client diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache index 4aa977913dc1..1bcf4a841483 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache @@ -1,11 +1,12 @@ // {{>partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Collections.Generic; using System.Net; -using Newtonsoft.Json; namespace {{packageName}}.Client { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache index 17bd5c3658cd..a8a2b910a12c 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Linq; using System.Threading; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache index 5abcc7eb97ea..b6062bfc242a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Linq; using System.Threading; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache index fa3db528f1b9..572565262e56 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache @@ -1,16 +1,20 @@ {{>partial_header}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.IO; using System.Linq; +using System.Net.Http; using System.Text; +using System.Text.Json; using System.Text.RegularExpressions; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} using Polly.Timeout; using Polly.Extensions.Http; using Polly;{{/supportsRetry}} -using System.Net.Http; using {{packageName}}.Api;{{#useCompareNetObjects}} using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} @@ -46,21 +50,48 @@ namespace {{packageName}}.Client public delegate void EventHandler(object sender, T e) where T : EventArgs; /// - /// Custom JSON serializer + /// Returns true when deserialization succeeds. /// - public static Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; set; } = new Newtonsoft.Json.JsonSerializerSettings + /// + /// + /// + /// + /// + public static bool TryDeserialize(string json, JsonSerializerOptions options, {{^netStandard}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/netStandard}}out T{{#nrt}}{{^netStandard}}?{{/netStandard}}{{/nrt}} result) { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = Newtonsoft.Json.ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore, - ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver + try { - NamingStrategy = new Newtonsoft.Json.Serialization.CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } + result = JsonSerializer.Deserialize(json, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, {{^netStandard}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/netStandard}}out T{{#nrt}}{{^netStandard}}?{{/netStandard}}{{/nrt}} result) + { + try + { + result = JsonSerializer.Deserialize(ref reader, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; } - }; + } /// /// Sanitize filename by removing the path @@ -169,7 +200,7 @@ namespace {{packageName}}.Client /// /// The Content-Type array to select from. /// The Content-Type header to use. - public static string SelectHeaderContentType(string[] contentTypes) + public static string{{nrt?}} SelectHeaderContentType(string[] contentTypes) { if (contentTypes.Length == 0) return null; @@ -190,7 +221,7 @@ namespace {{packageName}}.Client /// /// The accepts array to select from. /// The Accept header to use. - public static string SelectHeaderAccept(string[] accepts) + public static string{{nrt?}} SelectHeaderAccept(string[] accepts) { if (accepts.Length == 0) return null; @@ -248,6 +279,25 @@ namespace {{packageName}}.Client /// public const string ISO8601_DATETIME_FORMAT = "o"; + {{^hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder) + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + Add{{apiName}}(services, config); + }); + + return builder; + } + + {{/hasAuthMethods}} /// /// Add the api to your host builder. /// @@ -267,6 +317,19 @@ namespace {{packageName}}.Client return builder; } + {{^hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static void Add{{apiName}}(this IServiceCollection services) + { + HostConfiguration config = new HostConfiguration(services); + Add{{apiName}}(services, config); + } + + {{/hasAuthMethods}} /// /// Add the api to your host builder. /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache index d8dfd3108ccb..e74707baa811 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache @@ -1,11 +1,17 @@ {{>partial_header}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; using {{packageName}}.Api; +using {{packageName}}.Model; namespace {{packageName}}.Client { @@ -15,6 +21,8 @@ namespace {{packageName}}.Client public class HostConfiguration { private readonly IServiceCollection _services; + private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + internal bool HttpClientsAdded { get; private set; } /// @@ -23,8 +31,32 @@ namespace {{packageName}}.Client /// public HostConfiguration(IServiceCollection services) { - _services = services;{{#apiInfo}}{{#apis}} - services.AddSingleton<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} + _services = services; + _jsonOptions.Converters.Add(new JsonStringEnumConverter()); + _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); +{{#models}} +{{#model}} +{{^isEnum}} +{{#allOf}} +{{#-first}} + _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); +{{/-first}} +{{/allOf}} +{{#anyOf}} +{{#-first}} + _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); +{{/-first}} +{{/anyOf}} +{{#oneOf}} +{{#-first}} + _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); +{{/-first}} +{{/oneOf}} +{{/isEnum}} +{{/model}} +{{/models}} + _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions));{{#apiInfo}}{{#apis}} + _services.AddSingleton<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} } /// @@ -60,8 +92,7 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration Add{{apiName}}HttpClients( - Action{{nrt?}} client = null, Action{{nrt?}} builder = null) + public HostConfiguration Add{{apiName}}HttpClients(Action{{nrt?}} client = null, Action{{nrt?}} builder = null) { Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(client, builder); @@ -73,9 +104,9 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { - options(Client.ClientUtils.JsonSerializerSettings); + options(_jsonOptions); return this; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache index 537015a0e7db..29ea235945d2 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache @@ -1,7 +1,9 @@ // {{>partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Collections.Generic; using System.IO; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache index 2322c1e19880..224714027cc0 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Linq; using System.Threading; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache new file mode 100644 index 000000000000..0a0f7540cae3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache @@ -0,0 +1,131 @@ + /// + /// A Json converter for type {{classname}} + /// + public class {{classname}}JsonConverter : JsonConverter<{{classname}}> + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof({{classname}}).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override {{classname}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + {{#composedSchemas.anyOf}} + Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; + bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); + + {{/composedSchemas.anyOf}} + {{#composedSchemas.oneOf}} + Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; + bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); + + {{/composedSchemas.oneOf}} + {{#composedSchemas.allOf}} + {{^isInherited}} + Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; + bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); + + {{/isInherited}} + {{/composedSchemas.allOf}} + {{#allVars}} + {{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = default; + {{/allVars}} + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string{{nrt?}} propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + {{#allVars}} + case "{{baseName}}": + {{#isString}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetString(); + {{/isString}} + {{#isBoolean}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetBoolean(); + {{/isBoolean}} + {{#isDecimal}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDecimal(); + {{/isDecimal}} + {{#isNumeric}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32(); + {{/isNumeric}} + {{#isLong}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt64(); + {{/isLong}} + {{#isDouble}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDouble(); + {{/isDouble}} + {{#isDate}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDateTime(); + {{/isDate}} + {{#isDateTime}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDateTime(); + {{/isDateTime}} + {{^isString}} + {{^isBoolean}} + {{^isDecimal}} + {{^isNumeric}} + {{^isLong}} + {{^isDouble}} + {{^isDate}} + {{^isDateTime}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref reader, options); + {{/isDateTime}} + {{/isDate}} + {{/isDouble}} + {{/isLong}} + {{/isNumeric}} + {{/isDecimal}} + {{/isBoolean}} + {{/isString}} + break; + {{/allVars}} + } + } + } + + {{#composedSchemas.oneOf}} + if ({{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/allVars}}{{/lambda.joinWithComma}}); + + {{#-last}} + throw new JsonException(); + {{/-last}} + {{/composedSchemas.oneOf}} + {{^composedSchemas.oneOf}} + return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/allVars}}{{/lambda.joinWithComma}}); + {{/composedSchemas.oneOf}} + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}, JsonSerializerOptions options) => throw new NotImplementedException(); + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache new file mode 100644 index 000000000000..4b28944a2ae2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache @@ -0,0 +1,29 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System.Text.Json; + +namespace {{packageName}}.Client +{ + /// + /// Provides the JsonSerializerOptions + /// + public class JsonSerializerOptionsProvider + { + /// + /// the JsonSerializerOptions + /// + public JsonSerializerOptions Options { get; } + + /// + /// Instantiates a JsonSerializerOptionsProvider + /// + public JsonSerializerOptionsProvider(JsonSerializerOptions options) + { + Options = options; + } + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache index ace461e7daeb..b5410ea07561 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Linq; using System.Threading; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OpenAPIDateConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OpenAPIDateConverter.mustache new file mode 100644 index 000000000000..144ac7328acc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OpenAPIDateConverter.mustache @@ -0,0 +1,34 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateJsonConverter : JsonConverter + { + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + DateTime.ParseExact(reader.GetString(){{nrt!}}, "yyyy-MM-dd", CultureInfo.InvariantCulture); + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache index a52f377e2025..944c0061f5a5 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache @@ -1,7 +1,9 @@ // {{>partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System;{{^netStandard}} using System.Threading.Channels;{{/netStandard}}{{#netStandard}} using System.Collections.Concurrent; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache index 94a326694654..fd720d1dcea3 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; namespace {{packageName}}.Client diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache index 63c4a0898d25..9d742241daf6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache @@ -1,7 +1,9 @@ // {{partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System.Linq; using System.Collections.Generic; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache index c62f0d1f2c92..cc8bbd72e428 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache @@ -1,7 +1,9 @@ // {{>partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Linq; using System.Collections.Generic; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache index 8a5bc255e33f..bb8621818364 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache @@ -1,7 +1,9 @@ // {{>partial_header}} -{{#nrt}}#nullable enable{{/nrt}} +{{#nrt}} +#nullable enable +{{/nrt}} using System; using System.Collections.Generic; using System.Net; @@ -9,6 +11,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using {{packageName}}.Client; {{#hasImport}} using {{packageName}}.{{modelPackage}}; @@ -36,7 +39,7 @@ namespace {{packageName}}.{{apiPackage}} /// Cancellation Token to cancel the request. /// Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>> Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null); - + /// /// {{summary}} /// @@ -50,7 +53,7 @@ namespace {{packageName}}.{{apiPackage}} /// Cancellation Token to cancel the request. /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}> Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}Async({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null);{{#nrt}} - + /// /// {{summary}} /// @@ -62,9 +65,11 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} /// Cancellation Token to cancel the request. /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}?> - Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null);{{/nrt}}{{^-last}} + Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null); - {{/-last}}{{/operation}} + {{/nrt}}{{^-last}} + {{/-last}} + {{/operation}} } /// @@ -72,6 +77,8 @@ namespace {{packageName}}.{{apiPackage}} /// {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -92,22 +99,22 @@ namespace {{packageName}}.{{apiPackage}} /// A token provider of type /// public TokenProvider ApiKeyProvider { get; }{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; }{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; }{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; }{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - + /// /// A token provider of type /// @@ -117,13 +124,14 @@ namespace {{packageName}}.{{apiPackage}} /// Initializes a new instance of the class. /// /// - public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient{{#hasApiKeyMethods}}, + public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider{{#hasApiKeyMethods}}, TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}}, TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}}, TokenProvider httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}}, TokenProvider oauthTokenProvider{{/hasOAuthMethods}}) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient;{{#hasApiKeyMethods}} ApiKeyProvider = apiKeyProvider;{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} @@ -146,15 +154,16 @@ namespace {{packageName}}.{{apiPackage}} public async Task<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}Async({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) { ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - + {{^nrt}}{{#returnTypeIsPrimitive}}#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' {{/returnTypeIsPrimitive}}{{/nrt}}if (result.Content == null){{^nrt}}{{#returnTypeIsPrimitive}} #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'{{/returnTypeIsPrimitive}}{{/nrt}} throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; - }{{#nrt}} + } + {{#nrt}} /// /// {{summary}} {{notes}} /// @@ -178,8 +187,12 @@ namespace {{packageName}}.{{apiPackage}} return result != null && result.IsSuccessStatusCode ? result.Content : null; - }{{/nrt}}{{^nrt}}{{^returnTypeIsPrimitive}} -{{! Note that this method is a copy paste of above due to NRT complexities }} + } + + {{/nrt}} + {{^nrt}} + {{^returnTypeIsPrimitive}} + {{! Note that this method is a copy paste of above due to NRT complexities }} /// /// {{summary}} {{notes}} /// @@ -204,8 +217,9 @@ namespace {{packageName}}.{{apiPackage}} ? result.Content : null; } - {{/returnTypeIsPrimitive}}{{/nrt}} + {{/returnTypeIsPrimitive}} + {{/nrt}} /// /// {{summary}} {{notes}} /// @@ -223,12 +237,12 @@ namespace {{packageName}}.{{apiPackage}} if ({{paramName}} == null) throw new ArgumentNullException(nameof({{paramName}}));{{/nrt}}{{^nrt}}{{^vendorExtensions.x-csharp-value-type}} - + if ({{paramName}} == null) throw new ArgumentNullException(nameof({{paramName}}));{{/vendorExtensions.x-csharp-value-type}}{{/nrt}}{{/required}}{{/allParams}}{{#hasRequiredParams}} - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + {{/hasRequiredParams}}using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -242,82 +256,81 @@ namespace {{packageName}}.{{apiPackage}} {{/required}}{{/pathParams}}{{#queryParams}}{{#-first}} System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty);{{/-first}}{{/queryParams}}{{^queryParams}}{{#authMethods}}{{#isApiKey}}{{#isKeyInQuery}} - + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty);{{/isKeyInQuery}}{{/isApiKey}}{{/authMethods}}{{/queryParams}}{{#queryParams}}{{#required}}{{#-first}} - {{! all the redundant tags here are to get the spacing just right }} + {{! all the redundant tags here are to get the spacing just right }} {{/-first}}{{/required}}{{/queryParams}}{{#queryParams}}{{#required}}parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{nrt!}}); {{/required}}{{/queryParams}}{{#queryParams}}{{#-first}} {{/-first}}{{/queryParams}}{{#queryParams}}{{^required}}if ({{paramName}} != null) parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{nrt!}}); {{/required}}{{#-last}}uriBuilder.Query = parseQueryString.ToString();{{/-last}}{{/queryParams}}{{#headerParams}}{{#required}} - + request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}));{{/required}}{{^required}} - + if ({{paramName}} != null) request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}));{{/required}}{{/headerParams}}{{#formParams}}{{#-first}} MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams));{{/-first}}{{^isFile}}{{#required}} - + formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}})));{{/required}}{{^required}} if ({{paramName}} != null) formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}})));{{/required}}{{/isFile}}{{#isFile}}{{#required}} - + multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{^required}} - + if ({{paramName}} != null) multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{/isFile}}{{/formParams}}{{#bodyParam}} - - if (({{paramName}} as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject({{paramName}}, ClientUtils.JsonSerializerSettings));{{/bodyParam}}{{#authMethods}}{{#-first}} + + request.Content = ({{paramName}} as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize({{paramName}}, _jsonSerializerOptions));{{/bodyParam}}{{#authMethods}}{{#-first}} List tokens = new List();{{/-first}}{{#isApiKey}} - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey);{{#isKeyInHeader}} - + apiKey.UseInHeader(request, "{{keyParamName}}");{{/isKeyInHeader}}{{#isKeyInQuery}} - + apiKey.UseInQuery(request, uriBuilder, parseQueryString, "{{keyParamName}}"); - + uriBuilder.Query = parseQueryString.ToString();{{/isKeyInQuery}}{{#isKeyInCookie}} - + apiKey.UseInCookie(request, parseQueryString, "{{keyParamName}}"); - + uriBuilder.Query = parseQueryString.ToString();{{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}} - {{! below line must be after any UseInQuery calls, but before using the HttpSignatureToken}} + {{! below line must be after any UseInQuery calls, but before using the HttpSignatureToken}} request.RequestUri = uriBuilder.Uri;{{#authMethods}}{{#isBasicBasic}} BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(basicToken); - + basicToken.UseInHeader(request, "{{keyParamName}}");{{/isBasicBasic}}{{#isBasicBearer}} BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(bearerToken); - + bearerToken.UseInHeader(request, "{{keyParamName}}");{{/isBasicBearer}}{{#isOAuth}} OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, "{{keyParamName}}");{{/isOAuth}}{{#isHttpSignature}} - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -325,29 +338,29 @@ namespace {{packageName}}.{{apiPackage}} string requestBody = await request.Content{{nrt!}}.ReadAsStringAsync({{^netStandard}}{{^netcoreapp3.1}}cancellationToken.GetValueOrDefault(){{/netcoreapp3.1}}{{/netStandard}}).ConfigureAwait(false); signatureToken.UseInHeader(request, requestBody, cancellationToken);{{/isHttpSignature}}{{/authMethods}}{{#consumes}}{{#-first}} - + string[] contentTypes = new string[] { {{/-first}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{#-last}} };{{/-last}}{{/consumes}}{{#consumes}}{{#-first}} - + string{{nrt?}} contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType);{{/-first}}{{/consumes}}{{#produces}}{{#-first}} - + string[] accepts = new string[] { {{/-first}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}{{#produces}}{{#-last}} };{{/-last}}{{/produces}}{{#produces}}{{#-first}} - + string{{nrt?}} accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); {{/-first}}{{/produces}}{{^netStandard}} request.Method = HttpMethod.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}};{{/netStandard}}{{#netStandard}} - request.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}");{{/netStandard}} {{! early standard versions do not have HttpMethod.Patch }} + request.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}");{{/netStandard}}{{! early standard versions do not have HttpMethod.Patch }} using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -370,7 +383,7 @@ namespace {{packageName}}.{{apiPackage}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponse = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings);{{#authMethods}} + apiResponse.Content = JsonSerializer.Deserialize<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponse.RawContent, _jsonSerializerOptions);{{#authMethods}} else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit();{{/authMethods}} @@ -384,7 +397,8 @@ namespace {{packageName}}.{{apiPackage}} Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } + }{{^-last}} + {{/-last}} {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache new file mode 100644 index 000000000000..d6e643a2feb5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache @@ -0,0 +1,49 @@ +// +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +{{#validatable}} +using System.ComponentModel.DataAnnotations; +{{/validatable}} +{{#useCompareNetObjects}} +using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; +{{/useCompareNetObjects}} +{{#models}} +{{#model}} + +namespace {{packageName}}.{{modelPackage}} +{ +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}} + +{{#allOf}} +{{#-first}} +{{>JsonConverter}} +{{/-first}} +{{/allOf}} +{{#anyOf}} +{{#-first}} +{{>JsonConverter}} +{{/-first}} +{{/anyOf}} +{{#oneOf}} +{{#-first}} +{{>JsonConverter}} +{{/-first}} +{{/oneOf}} +{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache index 2ecca5b10e7d..1f18f91bce0d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache @@ -1,15 +1,96 @@ /// /// {{description}}{{^description}}{{classname}}{{/description}} /// - [DataContract(Name = "{{{name}}}")] - {{#discriminator}} - [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] - {{#mappedModels}} - [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] - {{/mappedModels}} - {{/discriminator}} - {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}{{^parentModel}}, IValidatableObject{{/parentModel}}{{/validatable}} { + {{#composedSchemas.oneOf}} + /// + /// Initializes a new instance of the class. + /// + /// + {{#composedSchemas.allOf}} + {{^isInherited}} + /// + {{/isInherited}} + {{/composedSchemas.allOf}} + {{#composedSchemas.anyOf}} + /// + {{/composedSchemas.anyOf}} + {{#allVars}} + /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/allVars}} + public {{classname}}({{#lambda.joinWithComma}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#model.allVars}}{{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{^compulsory}} = default{{/compulsory}}{{/defaultValue}} {{/model.allVars}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}}{{/lambda.joinWithComma}}){{/parent}} + { + {{#allVars}} + {{^isInherited}} + {{#required}} + {{^isNullable}} + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null."); + + {{/isNullable}} + {{/required}} + {{/isInherited}} + {{/allVars}} + {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; + {{#composedSchemas.allOf}} + {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; + {{/composedSchemas.allOf}} + {{#composedSchemas.anyOf}} + {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isInherited}} + {{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + {{/isInherited}} + {{/allVars}} + } + + {{/composedSchemas.oneOf}} + {{^composedSchemas.oneOf}} + /// + /// Initializes a new instance of the class. + /// + {{#composedSchemas.allOf}} + {{^isInherited}} + /// + {{/isInherited}} + {{/composedSchemas.allOf}} + {{#composedSchemas.anyOf}} + /// + {{/composedSchemas.anyOf}} + {{#allVars}} + /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/allVars}} + public {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/composedSchemas.allOf}}{{#composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/composedSchemas.anyOf}}{{#allVars}}{{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{^compulsory}} = default{{/compulsory}}{{/defaultValue}} {{/allVars}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}}{{/lambda.joinWithComma}}){{/parent}} + { + {{#allVars}} + {{^isInherited}} + {{#required}} + {{^isNullable}} + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null."); + + {{/isNullable}} + {{/required}} + {{/isInherited}} + {{/allVars}} + {{#composedSchemas.allOf}} + {{^isInherited}} + {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; + {{/isInherited}} + {{/composedSchemas.allOf}} + {{#composedSchemas.anyOf}} + {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}; + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isInherited}} + {{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + {{/isInherited}} + {{/allVars}} + } + + {{/composedSchemas.oneOf}} {{#vars}} {{#items.isEnum}} {{#items}} @@ -24,257 +105,80 @@ {{/complexType}} {{/isEnum}} {{#isEnum}} - /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}} {{/description}} - {{^conditionalSerialization}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] + [JsonPropertyName("{{baseName}}")] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; set; } - {{#isReadOnly}} + public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + {{/isEnum}} + {{/vars}} + {{#composedSchemas.anyOf}} /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; set; } + public {{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + {{/composedSchemas.anyOf}} + {{#composedSchemas.oneOf}} /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - - {{^isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} - { - get{ return _{{name}};} - set - { - _{{name}} = value; - _flag{{name}} = true; - } - } - private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; - private bool _flag{{name}}; + public {{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return _flag{{name}}; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{/isEnum}} - {{/vars}} - {{#hasRequired}} - {{^hasOnlyReadOnly}} - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - {{^isAdditionalPropertiesTrue}} - protected {{classname}}() { } - {{/isAdditionalPropertiesTrue}} - {{#isAdditionalPropertiesTrue}} - protected {{classname}}() - { - this.AdditionalProperties = new Dictionary(); - } - {{/isAdditionalPropertiesTrue}} - {{/hasOnlyReadOnly}} - {{/hasRequired}} - /// - /// Initializes a new instance of the class. - /// - {{#readWriteVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. - {{/readWriteVars}} - {{#hasOnlyReadOnly}} - [JsonConstructorAttribute] - {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^required}}{{^defaultValue}} = default{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} - { - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{#required}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) { - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); - } - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) { - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); - } - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{^required}} - {{#defaultValue}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // use default value if no "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" provided - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? {{{defaultValue}}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/defaultValue}} - {{^defaultValue}} - {{^conditionalSerialization}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/conditionalSerialization}} - {{#conditionalSerialization}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/conditionalSerialization}} - {{/defaultValue}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - this.AdditionalProperties = new Dictionary(); - {{/isAdditionalPropertiesTrue}} - } - - {{#vars}} + {{/composedSchemas.oneOf}} + {{#composedSchemas.allOf}} {{^isInherited}} - {{^isEnum}} /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}{{/description}} /// {{#description}} /// {{.}}{{/description}} - {{^conditionalSerialization}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{dataType}}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } - {{#isReadOnly}} - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{#isNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{/isNullable}}{{^isNullable}}{{{dataType}}}{{/isNullable}} {{name}} { get; private set; } + {{/isInherited}} + {{/composedSchemas.allOf}} + {{#allVars}} + {{^isInherited}} + {{^isEnum}} /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - {{^isReadOnly}} - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + [JsonPropertyName("{{baseName}}")] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#required}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}}{{/required}}{{^required}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{/required}} {{name}} - { - get{ return _{{name}};} - set - { - _{{name}} = value; - _flag{{name}} = true; - } - } - private {{{dataType}}} _{{name}}; - private bool _flag{{name}}; + public {{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return _flag{{name}}; - } - {{/isReadOnly}} - {{/conditionalSerialization}} {{/isEnum}} {{/isInherited}} - {{/vars}} + {{/allVars}} {{#isAdditionalPropertiesTrue}} + {{^parentModel}} /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + {{/parentModel}} {{/isAdditionalPropertiesTrue}} /// /// Returns the string presentation of the object @@ -291,27 +195,20 @@ sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); {{/vars}} {{#isAdditionalPropertiesTrue}} + {{^parentModel}} sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + {{/parentModel}} {{/isAdditionalPropertiesTrue}} sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object{{nrt?}} input) { {{#useCompareNetObjects}} return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; @@ -326,7 +223,7 @@ /// /// Instance of {{classname}} to be compared /// Boolean - public bool Equals({{classname}} input) + public bool Equals({{classname}}{{nrt?}} input) { {{#useCompareNetObjects}} return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; @@ -354,7 +251,9 @@ {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} {{#isAdditionalPropertiesTrue}} + {{^parentModel}} && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + {{/parentModel}} {{/isAdditionalPropertiesTrue}} {{/useCompareNetObjects}} } @@ -385,104 +284,20 @@ {{/vendorExtensions.x-is-value-type}} {{/vars}} {{#isAdditionalPropertiesTrue}} + {{^parentModel}} if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); } + {{/parentModel}} {{/isAdditionalPropertiesTrue}} return hashCode; } } {{#validatable}} -{{#discriminator}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { -{{/discriminator}} -{{^discriminator}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { -{{/discriminator}} - {{#parent}} - {{^isArray}} - {{^isMap}} - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - {{/isMap}} - {{/isArray}} - {{/parent}} - {{#vars}} - {{#hasValidation}} - {{^isEnum}} - {{#maxLength}} - // {{{name}}} ({{{dataType}}}) maxLength - if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); - } - - {{/maxLength}} - {{#minLength}} - // {{{name}}} ({{{dataType}}}) minLength - if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); - } - - {{/minLength}} - {{#maximum}} - // {{{name}}} ({{{dataType}}}) maximum - if (this.{{{name}}} > ({{{dataType}}}){{maximum}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); - } - - {{/maximum}} - {{#minimum}} - // {{{name}}} ({{{dataType}}}) minimum - if (this.{{{name}}} < ({{{dataType}}}){{minimum}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); - } - - {{/minimum}} - {{#pattern}} - {{^isByteArray}} - // {{{name}}} ({{{dataType}}}) pattern - Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); - if (false == regex{{{name}}}.Match(this.{{{name}}}).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); - } - - {{/isByteArray}} - {{/pattern}} - {{/isEnum}} - {{/hasValidation}} - {{/vars}} - yield break; - } +{{^parentModel}} +{{>validatable}} +{{/parentModel}} {{/validatable}} - } + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache index f24c317a7024..793bcca771d0 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache @@ -97,6 +97,10 @@ namespace {{packageName}}.Client { return await response.Content.ReadAsByteArrayAsync(); } + else if (type == typeof(FileParameter)) + { + return new FileParameter(await response.Content.ReadAsStreamAsync()); + } // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) if (type == typeof(Stream)) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache index f216a9911309..d889a3e1fda6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache @@ -19,7 +19,7 @@ {{#anyOf}} /// /// Initializes a new instance of the class - /// with the class + /// with the class /// /// An instance of {{{.}}}. public {{classname}}({{{.}}} actualInstance) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache index d781952b4e09..c993fc2cc3d6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache @@ -8,7 +8,9 @@ {{#enumVars}} {{#-first}} {{#isString}} + {{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} {{/isString}} {{/-first}} {{/enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache index 3e554c1f9804..2fb5ecc51a89 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache @@ -132,7 +132,8 @@ {{^conditionalSerialization}} {{^vendorExtensions.x-csharp-value-type}} // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) { + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + { throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); } this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; @@ -144,7 +145,8 @@ {{#conditionalSerialization}} {{^vendorExtensions.x-csharp-value-type}} // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) { + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + { throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); } this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; @@ -178,6 +180,10 @@ {{/conditionalSerialization}} {{#conditionalSerialization}} this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + if (this.{{name}} != null) + { + this._flag{{name}} = true; + } {{/conditionalSerialization}} {{/defaultValue}} {{/required}} @@ -397,94 +403,6 @@ } {{#validatable}} -{{#discriminator}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { -{{/discriminator}} -{{^discriminator}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { -{{/discriminator}} - {{#parent}} - {{^isArray}} - {{^isMap}} - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - {{/isMap}} - {{/isArray}} - {{/parent}} - {{#vars}} - {{#hasValidation}} - {{^isEnum}} - {{#maxLength}} - // {{{name}}} ({{{dataType}}}) maxLength - if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); - } - - {{/maxLength}} - {{#minLength}} - // {{{name}}} ({{{dataType}}}) minLength - if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); - } - - {{/minLength}} - {{#maximum}} - // {{{name}}} ({{{dataType}}}) maximum - if (this.{{{name}}} > ({{{dataType}}}){{maximum}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); - } - - {{/maximum}} - {{#minimum}} - // {{{name}}} ({{{dataType}}}) minimum - if (this.{{{name}}} < ({{{dataType}}}){{minimum}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); - } - - {{/minimum}} - {{#pattern}} - {{^isByteArray}} - // {{{name}}} ({{{dataType}}}) pattern - Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); - if (false == regex{{{name}}}.Match(this.{{{name}}}).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); - } - - {{/isByteArray}} - {{/pattern}} - {{/isEnum}} - {{/hasValidation}} - {{/vars}} - yield break; - } +{{>validatable}} {{/validatable}} } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache index 6af921832af4..f879f022dae9 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache @@ -6,7 +6,9 @@ /// {{.}} {{/description}} {{#isString}} + {{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} {{/isString}} {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache index f60d3cf10f38..272b6cf93181 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache @@ -1,3 +1,4 @@ +{{#model}} /// /// {{description}}{{^description}}{{classname}}{{/description}} /// @@ -16,20 +17,22 @@ } {{/isNullable}} - {{#oneOf}} + {{#composedSchemas.oneOf}} + {{^isNull}} /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of {{{.}}}. - public {{classname}}({{{.}}} actualInstance) + /// An instance of {{dataType}}. + public {{classname}}({{{dataType}}} actualInstance) { - this.IsNullable = {{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}; + this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance{{^isNullable}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isNullable}}; + this.ActualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}}; } - {{/oneOf}} + {{/isNull}} + {{/composedSchemas.oneOf}} private Object _actualInstance; @@ -56,18 +59,20 @@ } } } - {{#oneOf}} + {{#composedSchemas.oneOf}} + {{^isNull}} /// - /// Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + /// Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`, /// the InvalidClassException will be thrown /// - /// An instance of {{{.}}} - public {{{.}}} Get{{{.}}}() + /// An instance of {{dataType}} + public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() { - return ({{{.}}})this.ActualInstance; + return ({{{dataType}}})this.ActualInstance; } - {{/oneOf}} + {{/isNull}} + {{/composedSchemas.oneOf}} /// /// Returns the string presentation of the object @@ -272,3 +277,4 @@ return false; } } +{{/model}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache index 58f6faa7f4f1..30c1ceaf2fb5 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache @@ -27,8 +27,10 @@ {{#useCompareNetObjects}} {{/useCompareNetObjects}} + {{^useGenericHost}} + {{/useGenericHost}} {{#useRestSharp}} {{/useRestSharp}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache new file mode 100644 index 000000000000..6322bf599f63 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache @@ -0,0 +1,89 @@ +{{#discriminator}} + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { +{{/discriminator}} +{{^discriminator}} + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { +{{/discriminator}} + {{#parent}} + {{^isArray}} + {{^isMap}} + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + {{/isMap}} + {{/isArray}} + {{/parent}} + {{#vars}} + {{#hasValidation}} + {{^isEnum}} + {{#maxLength}} + // {{{name}}} ({{{dataType}}}) maxLength + if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); + } + + {{/maxLength}} + {{#minLength}} + // {{{name}}} ({{{dataType}}}) minLength + if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); + } + + {{/minLength}} + {{#maximum}} + // {{{name}}} ({{{dataType}}}) maximum + if (this.{{{name}}} > ({{{dataType}}}){{maximum}}) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); + } + + {{/maximum}} + {{#minimum}} + // {{{name}}} ({{{dataType}}}) minimum + if (this.{{{name}}} < ({{{dataType}}}){{minimum}}) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); + } + + {{/minimum}} + {{#pattern}} + {{^isByteArray}} + // {{{name}}} ({{{dataType}}}) pattern + Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); + if (false == regex{{{name}}}.Match(this.{{{name}}}).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); + } + + {{/isByteArray}} + {{/pattern}} + {{/isEnum}} + {{/hasValidation}} + {{/vars}} + yield break; + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index a14135ce4f5f..61f0f76c31c6 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -25,28 +25,28 @@ namespace {{packageName}}.{{apiPackage}} #region Synchronous Operations {{#operation}} /// - /// {{summary}} + /// {{{summary}}} /// /// - /// {{notes}} + /// {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} + {{/allParams}}/// {{{returnType}}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// - /// {{summary}} + /// {{{summary}}} /// /// - /// {{notes}} + /// {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} + {{/allParams}}/// ApiResponse of {{{returnType}}}{{^returnType}}Object(void){{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} @@ -57,15 +57,15 @@ namespace {{packageName}}.{{apiPackage}} #region Asynchronous Operations {{#operation}} /// - /// {{summary}} + /// {{{summary}}} /// /// - /// {{notes}} + /// {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}}/// Cancellation Token to cancel request (optional) - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} + /// Task of {{{returnType}}}{{^returnType}}void{{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} @@ -75,7 +75,7 @@ namespace {{packageName}}.{{apiPackage}} /// {{summary}} /// /// - /// {{notes}} + /// {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} @@ -200,11 +200,11 @@ namespace {{packageName}}.{{apiPackage}} {{#operation}} /// - /// {{summary}} {{notes}} + /// {{{summary}}} {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} + {{/allParams}}/// {{{returnType}}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} @@ -215,11 +215,11 @@ namespace {{packageName}}.{{apiPackage}} } /// - /// {{summary}} {{notes}} + /// {{{summary}}} {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} + {{/allParams}}/// ApiResponse of {{{returnType}}}{{^returnType}}Object(void){{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} @@ -350,12 +350,12 @@ namespace {{packageName}}.{{apiPackage}} {{#supportsAsync}} /// - /// {{summary}} {{notes}} + /// {{{summary}}} {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}}/// Cancellation Token to cancel request (optional) - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} + /// Task of {{{returnType}}}{{^returnType}}void{{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} @@ -367,7 +367,7 @@ namespace {{packageName}}.{{apiPackage}} } /// - /// {{summary}} {{notes}} + /// {{{summary}}} {{{notes}}} /// /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache index ee1d5a1885ae..017e8acaa783 100644 --- a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache @@ -4,7 +4,9 @@ {{#description}} /// {{.}} {{/description}} + {{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache index 91be597da01a..f3e0e9106dc6 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache @@ -4,9 +4,9 @@ {{#description}} /// {{.}} {{/description}} - {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}} + {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] - {{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} + {{/useGenericHost}}{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { {{#allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache index 4187d95bd049..26a9b36bd551 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache @@ -6,7 +6,9 @@ /// {{.}} {{/description}} {{#isString}} + {{^useGenericHost}} [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} {{/isString}} {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { diff --git a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache deleted file mode 100644 index e76a9e8b63a3..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache +++ /dev/null @@ -1,109 +0,0 @@ -# {{pubName}} -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -{{#artifactVersion}} -- Package version: {{.}} -{{/artifactVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Requirements - -Dart 2.7.0 or later OR Flutter 1.12 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}} - -final api = {{classname}}(); -{{#allParams}} -final {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}{{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} - -try { - {{#returnType}}final response = await {{/returnType}}api.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}} - print(response); - {{/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}} -{{/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}}{{#-last}}{{infoEmail}} -{{/-last}}{{/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 deleted file mode 100644 index a611887d3acf..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache +++ /dev/null @@ -1,9 +0,0 @@ -analyzer: - language: - strict-inference: true - strict-raw-types: true - strong-mode: - implicit-dynamic: false - implicit-casts: false - exclude: - - test/*.dart diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache deleted file mode 100644 index 3feee9161932..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ /dev/null @@ -1,145 +0,0 @@ -{{>header}} -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -{{#operations}} -{{#imports}}import '{{.}}'; -{{/imports}} - -class {{classname}} { - - final Dio _dio; - - final Serializers _serializers; - - const {{classname}}(this._dio, this._serializers); - - {{#operation}} - /// {{{summary}}} - /// - /// {{{notes}}} - Future> {{nickname}}({{^hasRequiredParams}}{ {{/hasRequiredParams}}{{#requiredParams}} - {{{dataType}}} {{paramName}},{{#-last}} { {{/-last}}{{/requiredParams}}{{#optionalParams}} - {{{dataType}}} {{paramName}},{{/optionalParams}} - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{{baseName}}}' '}', {{{paramName}}}.toString()){{/pathParams}}, - method: '{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}', - {{#isResponseFile}} - responseType: ResponseType.bytes, - {{/isResponseFile}} - headers: { - {{#httpUserAgent}} - r'User-Agent': r'{{{.}}}', - {{/httpUserAgent}} - {{#headerParams}} - {{^required}}{{^nullable}}if ({{{paramName}}} != null) {{/nullable}}{{/required}}r'{{baseName}}': {{paramName}}, - {{/headerParams}} - ...?headers, - }, - {{#hasQueryParams}} - queryParameters: { - {{#queryParams}} - {{^required}}{{^nullable}}if ({{{paramName}}} != null) {{/nullable}}{{/required}}r'{{baseName}}': {{paramName}}, - {{/queryParams}} - }, - {{/hasQueryParams}} - extra: { - 'secure': >[{{^hasAuthMethods}}],{{/hasAuthMethods}}{{#hasAuthMethods}} - {{#authMethods}}{ - 'type': '{{type}}', - 'name': '{{name}}',{{#isApiKey}} - 'keyName': '{{keyParamName}}', - 'where': '{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}',{{/isApiKey}} - },{{/authMethods}} - ],{{/hasAuthMethods}} - ...?extra, - }, - validateStatus: validateStatus, - contentType: '{{^hasConsumes}}application/json{{/hasConsumes}}{{#hasConsumes}}{{#prioritizedContentTypes}}{{#-first}}{{{mediaType}}}{{/-first}}{{/prioritizedContentTypes}}{{/hasConsumes}}', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - {{#hasFormParams}} - - _bodyData = {{#isMultipart}}FormData.fromMap({{/isMultipart}}{ - {{#formParams}} - {{^required}}{{^nullable}}if ({{{paramName}}} != null) {{/nullable}}{{/required}}r'{{{baseName}}}': {{#isFile}}MultipartFile.fromBytes({{{paramName}}}, filename: r'{{{baseName}}}'){{/isFile}}{{^isFile}}encodeFormParameter(_serializers, {{{paramName}}}, const FullType({{^isContainer}}{{{baseType}}}{{/isContainer}}{{#isContainer}}Built{{#isMap}}Map{{/isMap}}{{#isArray}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isArray}}, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{baseType}}})]{{/isContainer}})){{/isFile}}, - {{/formParams}} - }{{#isMultipart}}){{/isMultipart}}; - {{/hasFormParams}} - {{#bodyParam}} - - {{#isPrimitiveType}} - _bodyData = {{paramName}}; - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{#isContainer}} - const _type = FullType(Built{{#isMap}}Map{{/isMap}}{{#isArray}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isArray}}, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{baseType}}})]); - _bodyData = _serializers.serialize({{paramName}}, specifiedType: _type); - {{/isContainer}} - {{^isContainer}} - const _type = FullType({{{baseType}}}); - _bodyData = _serializers.serialize({{paramName}}, specifiedType: _type); - {{/isContainer}} - {{/isPrimitiveType}} - {{/bodyParam}} - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - {{#returnType}} - - {{#isResponseFile}} - final {{{returnType}}} _responseData = _response.data as {{{returnType}}}; - {{/isResponseFile}} - {{^isResponseFile}} - {{#returnSimpleType}} - {{#returnTypeIsPrimitive}} - final {{{returnType}}} _responseData = _response.data as {{{returnType}}}; - {{/returnTypeIsPrimitive}} - {{^returnTypeIsPrimitive}} - const _responseType = FullType({{{returnType}}}); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as {{{returnType}}}; - {{/returnTypeIsPrimitive}} - {{/returnSimpleType}} - {{^returnSimpleType}} - const _responseType = FullType(Built{{#isArray}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isArray}}{{#isMap}}Map{{/isMap}}, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{returnBaseType}}})]); - final {{{returnType}}} _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as {{{returnType}}}; - {{/returnSimpleType}} - {{/isResponseFile}} - - return Response<{{{returnType}}}>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - );{{/returnType}}{{^returnType}} - return _response;{{/returnType}} - } - - {{/operation}} -} -{{/operations}} 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 deleted file mode 100644 index ff0dd731eebb..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache +++ /dev/null @@ -1,86 +0,0 @@ -# {{pubName}}.api.{{classname}}{{#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#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} -# **{{{operationId}}}** -> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) - -{{{summary}}}{{#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}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{{dataType}}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} - -try { - {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/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}} -{{/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}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/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/api_test.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_test.mustache deleted file mode 100644 index 2ea19b30c81d..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/api_test.mustache +++ /dev/null @@ -1,30 +0,0 @@ -{{>header}} -import 'package:{{pubName}}/api.dart'; -import 'package:{{pubName}}/api/{{classFilename}}.dart'; -import 'package:test/test.dart'; - -{{#operations}} - -/// tests for {{{classname}}} -void main() { - final instance = {{{clientName}}}().get{{{classname}}}(); - - group({{{classname}}}, () { - {{#operation}} - {{#summary}} - // {{{.}}} - // - {{/summary}} - {{#notes}} - // {{{.}}} - // - {{/notes}} - //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async - test('test {{{operationId}}}', () async { - // TODO - }); - - {{/operation}} - }); -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache deleted file mode 100644 index 12cd528d2d74..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache +++ /dev/null @@ -1,25 +0,0 @@ -{{>header}} -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; - -/// Format the given form parameter object into something that Dio can handle. -/// Returns primitive or String. -/// Returns List/Map if the value is BuildList/BuiltMap. -dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { - if (value == null) { - return ''; - } - if (value is String || value is num || value is bool) { - return value; - } - final serialized = serializers.serialize(value, specifiedType: type); - if (serialized is String) { - return serialized; - } - if (value is BuiltList || value is BuiltMap) { - return serialized; - } - return json.encode(serialized); -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache deleted file mode 100644 index 62f2bfc06bcc..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache +++ /dev/null @@ -1,68 +0,0 @@ -{{>header}} -library {{pubName}}.api; - -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; -import 'package:{{pubName}}/serializers.dart'; -import 'package:{{pubName}}/auth/api_key_auth.dart'; -import 'package:{{pubName}}/auth/basic_auth.dart'; -import 'package:{{pubName}}/auth/oauth.dart'; -{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/api/{{classFilename}}.dart'; -{{/apis}}{{/apiInfo}} - -final _defaultInterceptors = [ - OAuthInterceptor(), - BasicAuthInterceptor(), - ApiKeyAuthInterceptor(), -]; - -class {{clientName}} { - - static const String basePath = r'{{{basePath}}}'; - - final Dio dio; - - final Serializers serializers; - - {{clientName}}({ - Dio dio, - Serializers serializers, - String basePathOverride, - List interceptors, - }) : this.serializers = serializers ?? standardSerializers, - this.dio = dio ?? - Dio(BaseOptions( - baseUrl: basePathOverride ?? basePath, - connectTimeout: 5000, - receiveTimeout: 3000, - )) { - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - } - - void setOAuthToken(String name, String token) { - (this.dio.interceptors.firstWhere((element) => element is OAuthInterceptor, orElse: null) as OAuthInterceptor)?.tokens[name] = token; - } - - void setBasicAuth(String name, String username, String password) { - (this.dio.interceptors.firstWhere((element) => element is BasicAuthInterceptor, orElse: null) as BasicAuthInterceptor)?.authInfo[name] = BasicAuthInfo(username, password); - } - - void setApiKey(String name, String apiKey) { - (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor, orElse: null) as ApiKeyAuthInterceptor)?.apiKeys[name] = apiKey; - } - -{{#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}} -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache deleted file mode 100644 index 30d9661692e0..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache +++ /dev/null @@ -1,27 +0,0 @@ -{{>header}} -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - Map apiKeys = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'apiKey'); - for (final info in authInfo) { - final authName = info['name'] as String; - final authKeyName = info['keyName'] as String; - final authWhere = info['where'] as String; - final apiKey = apiKeys[authName]; - if (apiKey != null) { - if (authWhere == 'query') { - options.queryParameters[authKeyName] = apiKey; - } else { - options.headers[authKeyName] = apiKey; - } - } - } - return super.onRequest(options); - } -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache deleted file mode 100644 index d3a11dfa0c0e..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{>header}} -import 'package:dio/dio.dart'; - -abstract class AuthInterceptor extends Interceptor { - /// Get auth information on given route for the given type. - /// Can return an empty list if type is not present on auth data or - /// if route doesn't need authentication. - List> getAuthInfo(RequestOptions route, String type) { - if (route.extra.containsKey('secure')) { - final auth = route.extra['secure'] as List>; - final results = >[]; - for (final info in auth) { - if (info['type'] == type) { - results.add(info); - } - } - return results; - } - return []; - } -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache deleted file mode 100644 index cd5faa2dbdd9..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache +++ /dev/null @@ -1,32 +0,0 @@ -{{>header}} -import 'dart:async'; -import 'dart:convert'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); -} - -class BasicAuthInterceptor extends AuthInterceptor { - Map authInfo = {}; - - @override - Future onRequest(RequestOptions options) { - final metadataAuthInfo = getAuthInfo(options, 'basic'); - for (final info in metadataAuthInfo) { - final authName = info['name'] as String; - final basicAuthInfo = authInfo[authName]; - if (basicAuthInfo != null) { - final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}')); - options.headers['Authorization'] = basicAuth; - break; - } - } - - return super.onRequest(options); - } -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache deleted file mode 100644 index d70e7bb380fe..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{>header}} -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class OAuthInterceptor extends AuthInterceptor { - Map tokens = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'oauth'); - for (final info in authInfo) { - final token = tokens[info['name']]; - if (token != null) { - options.headers['Authorization'] = 'Bearer ${token}'; - break; - } - } - return super.onRequest(options); - } -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache deleted file mode 100644 index f4d2c1e4e76d..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache +++ /dev/null @@ -1,136 +0,0 @@ -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}} - {{! - A field is @nullable in built_value when it is - nullable || (!required && !defaultValue) in OAS - }} - {{#isNullable}} - @nullable - {{/isNullable}} - {{^isNullable}} - {{^required}} - {{^defaultValue}} - @nullable - {{/defaultValue}} - {{/required}} - {{/isNullable}} - @BuiltValueField(wireName: r'{{baseName}}') - {{{datatypeWithEnum}}} get {{name}}; - {{#allowableValues}} - // {{#min}}range from {{{min}}} to {{{max}}}{{/min}}{{^min}}enum {{name}}Enum { {{#values}} {{{.}}}, {{/values}} };{{/min}} - {{/allowableValues}} - -{{/vars}} - {{classname}}._(); - - static void _initializeBuilder({{{classname}}}Builder b) => b{{#vars}}{{#defaultValue}} - ..{{{name}}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/vars}}; - - factory {{classname}}([void updates({{classname}}Builder b)]) = _${{classname}}; - - @BuiltValueSerializer(custom: true) - static Serializer<{{classname}}> get serializer => _${{classname}}Serializer(); -} - -{{! - Generate a custom serializer in order to support combinations of required and nullable. - By default built_value does not serialize null fields. -}} -class _${{classname}}Serializer implements StructuredSerializer<{{classname}}> { - - @override - final Iterable types = const [{{classname}}, _${{classname}}]; - @override - final String wireName = r'{{classname}}'; - - @override - Iterable serialize(Serializers serializers, {{{classname}}} object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - {{#vars}} - {{#required}} - {{! - A required property need to always be part of the serialized output. - When it is nullable, null is serialized, otherwise it is an error if it is null. - }} - result - ..add(r'{{baseName}}') - ..add({{#isNullable}}object.{{{name}}} == null ? null : {{/isNullable}}serializers.serialize(object.{{{name}}}, - specifiedType: {{{vendorExtensions.x-built-value-serializer-type}}})); - {{/required}} - {{^required}} - if (object.{{{name}}} != null) { - {{! Non-required properties are only serialized if not null. }} - result - ..add(r'{{baseName}}') - ..add(serializers.serialize(object.{{{name}}}, - specifiedType: {{{vendorExtensions.x-built-value-serializer-type}}})); - } - {{/required}} - {{/vars}} - return result; - } - - @override - {{classname}} deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = {{classname}}Builder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - {{#vars}} - case r'{{baseName}}': - {{#isContainer}} - result.{{{name}}}.replace(serializers.deserialize(value, - specifiedType: {{{vendorExtensions.x-built-value-serializer-type}}}) as {{{datatypeWithEnum}}}); - {{/isContainer}} - {{#isModel}} - result.{{{name}}}.replace(serializers.deserialize(value, - specifiedType: {{{vendorExtensions.x-built-value-serializer-type}}}) as {{{datatypeWithEnum}}}); - {{/isModel}} - {{^isContainer}} - {{^isModel}} - result.{{{name}}} = serializers.deserialize(value, - specifiedType: {{{vendorExtensions.x-built-value-serializer-type}}}) as {{{datatypeWithEnum}}}; - {{/isModel}} - {{/isContainer}} - break; - {{/vars}} - } - } - return result.build(); - } -} -{{! - Generate an enum for any variables that are declared as inline enums - isEnum is only true for inline variables that are enums. - If an enum is declared as a definition, isEnum is false and the enum is generated from the - enum.mustache template. -}} -{{#vars}} - {{#isEnum}} - {{^isContainer}} - -{{>enum_inline}} - {{/isContainer}} - {{#isContainer}} - {{#mostInnerItems}} - -{{>enum_inline}} - {{/mostInnerItems}} - {{/isContainer}} - {{/isEnum}} -{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache deleted file mode 100644 index 16ab3eeb243b..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part '{{classFilename}}.g.dart'; - -class {{classname}} extends EnumClass { - - {{#allowableValues}} - {{#enumVars}} - {{#description}} - /// {{{.}}} - {{/description}} - @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{#lambda.escapeBuiltValueEnum}}{{{value}}}{{/lambda.escapeBuiltValueEnum}}{{/isInteger}}) - static const {{classname}} {{name}} = _${{name}}; - {{/enumVars}} - {{/allowableValues}} - - static Serializer<{{classname}}> get serializer => _${{#lambda.camelcase}}{{{classname}}}{{/lambda.camelcase}}Serializer; - - const {{classname}}._(String name): super(name); - - static BuiltSet<{{classname}}> get values => _$values; - static {{classname}} valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class {{classname}}Mixin = Object with _${{classname}}Mixin; diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache deleted file mode 100644 index d9432ae28f00..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache +++ /dev/null @@ -1,19 +0,0 @@ -class {{{enumName}}} extends EnumClass { - - {{#allowableValues}} - {{#enumVars}} - {{#description}} - /// {{{.}}} - {{/description}} - @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{#lambda.escapeBuiltValueEnum}}{{{value}}}{{/lambda.escapeBuiltValueEnum}}{{/isInteger}}) - static const {{{enumName}}} {{name}} = _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}_{{name}}; - {{/enumVars}} - {{/allowableValues}} - - static Serializer<{{{enumName}}}> get serializer => _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}Serializer; - - const {{{enumName}}}._(String name): super(name); - - static BuiltSet<{{{enumName}}}> get values => _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}Values; - static {{{enumName}}} valueOf(String name) => _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}ValueOf(name); -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache deleted file mode 100644 index 4298cdcbd1a2..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache +++ /dev/null @@ -1,41 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -# Files and directories created by pub -.dart_tool/ -.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 - -# Don’t commit files and directories created by other development environments. -# For example, if your development environment creates any of the following files, -# consider putting them in a global ignore file: - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/modules/openapi-generator/src/main/resources/dart-dio/header.mustache b/modules/openapi-generator/src/main/resources/dart-dio/header.mustache deleted file mode 100644 index 0601b5331f8e..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/header.mustache +++ /dev/null @@ -1,6 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import diff --git a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache deleted file mode 100644 index 68cfd5e31c68..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache +++ /dev/null @@ -1,52 +0,0 @@ -{{>header}} -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; -import 'package:time_machine/time_machine.dart'; - -class OffsetDateSerializer implements PrimitiveSerializer { - - const OffsetDateSerializer(); - - @override - Iterable get types => BuiltList([OffsetDate]); - - @override - String get wireName => 'OffsetDate'; - - @override - OffsetDate deserialize(Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) { - final local = LocalDate.dateTime(DateTime.parse(serialized as String)); - return OffsetDate(local, Offset(0)); - } - - @override - Object serialize(Serializers serializers, OffsetDate offsetDate, - {FullType specifiedType = FullType.unspecified}) { - return offsetDate.toString('yyyy-MM-dd'); - } -} - -class OffsetDateTimeSerializer implements PrimitiveSerializer { - - const OffsetDateTimeSerializer(); - - @override - Iterable get types => BuiltList([OffsetDateTime]); - - @override - String get wireName => 'OffsetDateTime'; - - @override - OffsetDateTime deserialize(Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) { - final local = LocalDateTime.dateTime(DateTime.parse(serialized as String)); - return OffsetDateTime(local, Offset(0)); - } - - @override - Object serialize(Serializers serializers, OffsetDateTime offsetDateTime, - {FullType specifiedType = FullType.unspecified}) { - return offsetDateTime.toString(); - } -} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache deleted file mode 100644 index 5fdbb1b77c8c..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache +++ /dev/null @@ -1,9 +0,0 @@ -{{>header}} -{{#models}} - {{#model}} - {{#imports}} -import '{{.}}'; - {{/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/model_test.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model_test.mustache deleted file mode 100644 index 9cd8f2a9c970..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/model_test.mustache +++ /dev/null @@ -1,31 +0,0 @@ -{{>header}} -{{#models}} -{{#model}} -import 'package:{{pubName}}/model/{{classFilename}}.dart'; -import 'package:test/test.dart'; - -// tests for {{{classname}}} -void main() { - {{^isEnum}} - {{! Due to required vars without default value we can not create a full instance here }} - final instance = {{{classname}}}Builder(); - // TODO add properties to the builder and call build() - {{/isEnum}} - - group({{{classname}}}, () { - {{#vars}} - {{#description}} - // {{{.}}} - {{/description}} - // {{{dataType}}} {{{name}}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} - test('to test the property `{{{name}}}`', () async { - // TODO - }); - - {{/vars}} - - }); - -} -{{/model}} -{{/models}} 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 deleted file mode 100644 index cb6505fcf4ec..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache +++ /dev/null @@ -1,16 +0,0 @@ -{{#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}} -{{/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 deleted file mode 100644 index 2484e50837a5..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache +++ /dev/null @@ -1,20 +0,0 @@ -name: {{pubName}} -version: {{pubVersion}} -description: {{pubDescription}} -homepage: {{pubHomepage}} - -environment: - sdk: '>=2.7.0 <3.0.0' - -dependencies: - dio: '^3.0.9' - built_value: '>=7.1.0 <8.0.0' - built_collection: '>=4.3.2 <5.0.0' -{{#timeMachine}} - time_machine: '^0.9.12' -{{/timeMachine}} - -dev_dependencies: - built_value_generator: '>=7.1.0 <8.0.0' - build_runner: any - test: '>=1.3.0 <1.16.0' diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache deleted file mode 100644 index 4697d00c3231..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache +++ /dev/null @@ -1,35 +0,0 @@ -{{>header}} -library serializers; - -import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:built_value/serializer.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/standard_json_plugin.dart'; -{{#timeMachine}}import 'package:time_machine/time_machine.dart'; -import 'package:{{pubName}}/local_date_serializer.dart';{{/timeMachine}} -{{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}.dart'; -{{/model}}{{/models}} -part 'serializers.g.dart'; - -@SerializersFor(const [{{#models}}{{#model}} - {{classname}},{{/model}}{{/models}} -]) -Serializers serializers = (_$serializers.toBuilder(){{#apiInfo}}{{#apis}}{{#serializers}} - ..addBuilderFactory( -{{#isArray}} - const FullType(Built{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}, [FullType({{baseType}})]), - () => {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}Builder<{{baseType}}>(), -{{/isArray}} -{{#isMap}} - const FullType(BuiltMap, [FullType(String), FullType({{baseType}})]), - () => MapBuilder(), -{{/isMap}} - ){{/serializers}}{{/apis}}{{/apiInfo}}{{#timeMachine}} - ..add(const OffsetDateSerializer()) - ..add(const OffsetDateTimeSerializer()){{/timeMachine}} - ..add(Iso8601DateTimeSerializer())) - .build(); - -Serializers standardSerializers = - (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index 01663cfd23c2..892cbafd4694 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -1,7 +1,7 @@ {{>header}} import 'dart:async'; -{{#useBuiltValue}}import 'package:built_value/serializer.dart';{{/useBuiltValue}} +{{#includeLibraryTemplate}}api/imports{{/includeLibraryTemplate}} import 'package:dio/dio.dart'; {{#operations}} @@ -11,12 +11,8 @@ import 'package:dio/dio.dart'; class {{classname}} { final Dio _dio; - {{#useBuiltValue}} - final Serializers _serializers; - - {{/useBuiltValue}} - const {{classname}}(this._dio{{#useBuiltValue}}, this._serializers{{/useBuiltValue}}); +{{#includeLibraryTemplate}}api/constructor{{/includeLibraryTemplate}} {{#operation}} /// {{summary}}{{^summary}}{{nickname}}{{/summary}} @@ -88,14 +84,14 @@ class {{classname}} { final _queryParameters = { {{#queryParams}} - {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{baseName}}': {{#useBuiltValue}}{{>serialization/built_value/query_param}}{{/useBuiltValue}}, + {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{baseName}}': {{#includeLibraryTemplate}}api/query_param{{/includeLibraryTemplate}}, {{/queryParams}} };{{/hasQueryParams}}{{#hasBodyOrFormParams}} dynamic _bodyData; try { -{{#useBuiltValue}}{{>serialization/built_value/serialize}}{{/useBuiltValue}} +{{#includeLibraryTemplate}}api/serialize{{/includeLibraryTemplate}} } catch(error, stackTrace) { throw DioError( requestOptions: _options.compose( @@ -122,7 +118,7 @@ class {{classname}} { {{{returnType}}} _responseData; try { -{{#useBuiltValue}}{{>serialization/built_value/deserialize}}{{/useBuiltValue}} +{{#includeLibraryTemplate}}api/deserialize{{/includeLibraryTemplate}} } catch (error, stackTrace) { throw DioError( requestOptions: _response.requestOptions, diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache index 35fabd973d1e..0903a48759e1 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache @@ -1,12 +1,12 @@ {{>header}} import 'package:dio/dio.dart';{{#useBuiltValue}} import 'package:built_value/serializer.dart'; -import 'package:{{pubName}}/src/serializers.dart';{{/useBuiltValue}} -import 'package:{{pubName}}/src/auth/api_key_auth.dart'; -import 'package:{{pubName}}/src/auth/basic_auth.dart'; -import 'package:{{pubName}}/src/auth/bearer_auth.dart'; -import 'package:{{pubName}}/src/auth/oauth.dart'; -{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/src/api/{{classFilename}}.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/serializers.dart';{{/useBuiltValue}} +import 'package:{{pubName}}/{{sourceFolder}}/auth/api_key_auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/basic_auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/bearer_auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/oauth.dart'; +{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/{{sourceFolder}}/{{apiPackage}}/{{classFilename}}.dart'; {{/apis}}{{/apiInfo}} class {{clientName}} { static const String basePath = r'{{{basePath}}}'; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache index 2174d159630b..5d9da99bd5d8 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache @@ -1,7 +1,7 @@ {{>header}} import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class ApiKeyAuthInterceptor extends AuthInterceptor { final Map apiKeys = {}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache index c286274c3a23..c2a4426937da 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class BasicAuthInfo { final String username; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache index 626c7d238d03..b4bce45ca61f 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache @@ -1,6 +1,6 @@ {{>header}} import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class BearerAuthInterceptor extends AuthInterceptor { final Map tokens = {}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache index 4f7b79655af9..e5af801f39be 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache @@ -1,6 +1,6 @@ {{>header}} import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class OAuthInterceptor extends AuthInterceptor { final Map tokens = {}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/class.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/class.mustache index da5ecb735258..228fcf5826d1 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/class.mustache @@ -1 +1 @@ -{{#useBuiltValue}}{{>serialization/built_value/class}}{{/useBuiltValue}} \ No newline at end of file +{{#includeLibraryTemplate}}class{{/includeLibraryTemplate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/enum.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/enum.mustache index 6c20417e3563..a47e780c2b57 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/enum.mustache @@ -1 +1 @@ -{{#useBuiltValue}}{{>serialization/built_value/enum}}{{/useBuiltValue}} \ No newline at end of file +{{#includeLibraryTemplate}}enum{{/includeLibraryTemplate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache index 32f6a54b1a64..1ac711810617 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache @@ -1,12 +1,12 @@ {{>header}} -export 'package:{{pubName}}/src/api.dart'; -export 'package:{{pubName}}/src/auth/api_key_auth.dart'; -export 'package:{{pubName}}/src/auth/basic_auth.dart'; -export 'package:{{pubName}}/src/auth/oauth.dart'; -{{#useBuiltValue}}export 'package:{{pubName}}/src/serializers.dart'; -{{#useDateLibCore}}export 'package:{{pubName}}/src/model/date.dart';{{/useDateLibCore}}{{/useBuiltValue}} +export 'package:{{pubName}}/{{sourceFolder}}/api.dart'; +export 'package:{{pubName}}/{{sourceFolder}}/auth/api_key_auth.dart'; +export 'package:{{pubName}}/{{sourceFolder}}/auth/basic_auth.dart'; +export 'package:{{pubName}}/{{sourceFolder}}/auth/oauth.dart'; +{{#useBuiltValue}}export 'package:{{pubName}}/{{sourceFolder}}/serializers.dart'; +{{#useDateLibCore}}export 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/date.dart';{{/useDateLibCore}}{{/useBuiltValue}} -{{#apiInfo}}{{#apis}}export 'package:{{pubName}}/src/api/{{classFilename}}.dart'; +{{#apiInfo}}{{#apis}}export 'package:{{pubName}}/{{sourceFolder}}/{{apiPackage}}/{{classFilename}}.dart'; {{/apis}}{{/apiInfo}} -{{#models}}{{#model}}export 'package:{{pubName}}/src/model/{{classFilename}}.dart'; +{{#models}}{{#model}}export 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/{{classFilename}}.dart'; {{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache index 6bf879a48973..c7dfb950efa5 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache @@ -21,4 +21,4 @@ dev_dependencies: built_value_generator: '>=8.1.0 <9.0.0' build_runner: any {{/useBuiltValue}} - test: '>=1.16.0 <1.17.0' + test: ^1.16.0 diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/constructor.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/constructor.mustache new file mode 100644 index 000000000000..e823414cc755 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/constructor.mustache @@ -0,0 +1,3 @@ + final Serializers _serializers; + + const {{classname}}(this._dio, this._serializers); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/deserialize.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize.mustache rename to modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/deserialize.mustache diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/imports.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/imports.mustache new file mode 100644 index 000000000000..2f62fbda4267 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/imports.mustache @@ -0,0 +1 @@ +import 'package:built_value/serializer.dart'; \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/query_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/query_param.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/query_param.mustache rename to modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/query_param.mustache diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serialize.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache similarity index 97% rename from modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serialize.mustache rename to modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache index 54d8e99c7579..6c4d370d86e9 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serialize.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache @@ -9,7 +9,7 @@ {{^isMultipart}} _bodyData = { {{#formParams}} - {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{{baseName}}}': {{>serialization/built_value/query_param}}, + {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{{baseName}}}': {{>serialization/built_value/api/query_param}}, {{/formParams}} }; {{/isMultipart}} @@ -27,4 +27,4 @@ {{/isContainer}} _bodyData = {{^required}}{{paramName}} == null ? null : {{/required}}_serializers.serialize({{paramName}}, specifiedType: _type); {{/isPrimitiveType}} - {{/bodyParam}} \ No newline at end of file + {{/bodyParam}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache index fb5ab08aeda0..34767ee5324b 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache @@ -58,7 +58,7 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache index b144bd504958..66fe59788b0f 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache @@ -104,19 +104,24 @@ class _${{classname}}Serializer implements StructuredSerializer<{{classname}}> { {{#isContainer}} result.{{{name}}}.replace(valueDes); {{/isContainer}} + {{^isContainer}} + {{#isEnum}} + result.{{{name}}} = valueDes; + {{/isEnum}} + {{^isEnum}} {{#isModel}} {{#isPrimitiveType}} - {{! These are models that have nee manually marked as primitive via generator param. }} + {{! These are models that have been manually marked as primitive via generator param. }} result.{{{name}}} = valueDes; {{/isPrimitiveType}} {{^isPrimitiveType}} result.{{{name}}}.replace(valueDes); {{/isPrimitiveType}} {{/isModel}} - {{^isContainer}} {{^isModel}} result.{{{name}}} = valueDes; {{/isModel}} + {{/isEnum}} {{/isContainer}} break; {{/vars}} @@ -132,6 +137,7 @@ class _${{classname}}Serializer implements StructuredSerializer<{{classname}}> { enum.mustache template. }} {{#vars}} + {{^isModel}} {{#isEnum}} {{^isContainer}} @@ -144,4 +150,5 @@ class _${{classname}}Serializer implements StructuredSerializer<{{classname}}> { {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} + {{/isModel}} {{/vars}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache index b5f0ed32c22f..dc16805ce628 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache @@ -1,7 +1,7 @@ {{>header}} import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; -import 'package:{{pubName}}/src/model/date.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/date.dart'; class DateSerializer implements PrimitiveSerializer { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache index 0668b2e7b1dc..85332bae74eb 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache @@ -11,7 +11,7 @@ class {{classname}} extends EnumClass { {{#description}} /// {{{.}}} {{/description}} - @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{#isLong}}wireNumber: {{{value}}}{{/isLong}}{{^isInteger}}{{^isLong}}wireName: r{{{value}}}{{/isLong}}{{/isInteger}}) + @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{#isLong}}wireNumber: {{{value}}}{{/isLong}}{{^isInteger}}{{^isLong}}wireName: r{{{value}}}{{/isLong}}{{/isInteger}}{{#enumUnknownDefaultCase}}{{#-last}}, fallback: true{{/-last}}{{/enumUnknownDefaultCase}}) static const {{classname}} {{name}} = _${{name}}; {{/enumVars}} {{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache index c6452b7f6f5f..17763fe7479a 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache @@ -5,7 +5,7 @@ class {{{enumName}}} extends EnumClass { {{#description}} /// {{{.}}} {{/description}} - @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{#isLong}}wireNumber: {{{value}}}{{/isLong}}{{^isInteger}}{{^isLong}}wireName: r{{{value}}}{{/isLong}}{{/isInteger}}) + @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{#isLong}}wireNumber: {{{value}}}{{/isLong}}{{^isInteger}}{{^isLong}}wireName: r{{{value}}}{{/isLong}}{{/isInteger}}{{#enumUnknownDefaultCase}}{{#-last}}, fallback: true{{/-last}}{{/enumUnknownDefaultCase}}) static const {{{enumName}}} {{name}} = _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}_{{name}}; {{/enumVars}} {{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache index c558f153c890..7ef191808eb2 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache @@ -6,11 +6,11 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; {{#useDateLibCore}}import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:{{pubName}}/src/date_serializer.dart'; -import 'package:{{pubName}}/src/model/date.dart';{{/useDateLibCore}} +import 'package:{{pubName}}/{{sourceFolder}}/date_serializer.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/date.dart';{{/useDateLibCore}} {{#useDateLibTimeMachine}}import 'package:time_machine/time_machine.dart'; -import 'package:{{pubName}}/src/offset_date_serializer.dart';{{/useDateLibTimeMachine}} -{{#models}}{{#model}}import 'package:{{pubName}}/src/model/{{classFilename}}.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/offset_date_serializer.dart';{{/useDateLibTimeMachine}} +{{#models}}{{#model}}import 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/{{classFilename}}.dart'; {{/model}}{{/models}}{{#builtValueSerializerImports}}import '{{{.}}}'; {{/builtValueSerializerImports}} diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache index e6a680201fe7..7937e6fabe75 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache @@ -52,7 +52,7 @@ class {{{classname}}} { String toString() => '{{{classname}}}[{{#vars}}{{{name}}}=${{{name}}}{{^-last}}, {{/-last}}{{/vars}}]'; Map toJson() { - final json = {}; + final _json = {}; {{#vars}} {{#isNullable}} if ({{{name}}} != null) { @@ -66,27 +66,27 @@ class {{{classname}}} { {{/isNullable}} {{#isDateTime}} {{#pattern}} - json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' + _json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' ? {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch : {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); {{/pattern}} {{^pattern}} - json[r'{{{baseName}}}'] = {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); + _json[r'{{{baseName}}}'] = {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); {{/pattern}} {{/isDateTime}} {{#isDate}} {{#pattern}} - json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' + _json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' ? {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch : _dateFormatter.format({{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); {{/pattern}} {{^pattern}} - json[r'{{{baseName}}}'] = _dateFormatter.format({{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); + _json[r'{{{baseName}}}'] = _dateFormatter.format({{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); {{/pattern}} {{/isDate}} {{^isDateTime}} {{^isDate}} - json[r'{{{baseName}}}'] = {{{name}}}; + _json[r'{{{baseName}}}'] = {{{name}}}; {{/isDate}} {{/isDateTime}} {{#isNullable}} @@ -100,7 +100,7 @@ class {{{classname}}} { {{/required}} {{/isNullable}} {{/vars}} - return json; + return _json; } /// Returns a new [{{{classname}}}] instance and imports its values from @@ -277,6 +277,7 @@ class {{{classname}}} { }; } {{#vars}} + {{^isModel}} {{#isEnum}} {{^isContainer}} @@ -289,4 +290,5 @@ class {{{classname}}} { {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} + {{/isModel}} {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/go/model_oneof.mustache b/modules/openapi-generator/src/main/resources/go/model_oneof.mustache index dc85c438f100..14bc3ada757e 100644 --- a/modules/openapi-generator/src/main/resources/go/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_oneof.mustache @@ -1,15 +1,15 @@ // {{classname}} - {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} type {{classname}} struct { {{#oneOf}} - {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} *{{{.}}} + {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} *{{{.}}} {{/oneOf}} } {{#oneOf}} // {{{.}}}As{{classname}} is a convenience function that returns {{{.}}} wrapped in {{classname}} -func {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}As{{classname}}(v *{{{.}}}) {{classname}} { +func {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}As{{classname}}(v *{{{.}}}) {{classname}} { return {{classname}}{ - {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}: v, + {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}: v, } } @@ -55,24 +55,24 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { {{^discriminator}} match := 0 {{#oneOf}} - // try to unmarshal data into {{{.}}} - err = json.Unmarshal(data, &dst.{{{.}}}) + // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + err = json.Unmarshal(data, &dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) if err == nil { - json{{{.}}}, _ := json.Marshal(dst.{{{.}}}) + json{{{.}}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) if string(json{{{.}}}) == "{}" { // empty struct - dst.{{{.}}} = nil + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil } else { match++ } } else { - dst.{{{.}}} = nil + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil } {{/oneOf}} if match > 1 { // more than 1 match // reset to nil {{#oneOf}} - dst.{{{.}}} = nil + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil {{/oneOf}} return fmt.Errorf("Data matches more than one schema in oneOf({{classname}})") @@ -86,24 +86,24 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { {{^useOneOfDiscriminatorLookup}} match := 0 {{#oneOf}} - // try to unmarshal data into {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} - err = newStrictDecoder(data).Decode(&dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) + // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + err = newStrictDecoder(data).Decode(&dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) if err == nil { - json{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}, _ := json.Marshal(dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) - if string(json{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) == "{}" { // empty struct - dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil + json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if string(json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) == "{}" { // empty struct + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil } else { match++ } } else { - dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil } {{/oneOf}} if match > 1 { // more than 1 match // reset to nil {{#oneOf}} - dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil {{/oneOf}} return fmt.Errorf("Data matches more than one schema in oneOf({{classname}})") @@ -118,8 +118,8 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src {{classname}}) MarshalJSON() ([]byte, error) { {{#oneOf}} - if src.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} != nil { - return json.Marshal(&src.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) + if src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { + return json.Marshal(&src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) } {{/oneOf}} @@ -132,8 +132,8 @@ func (obj *{{classname}}) GetActualInstance() (interface{}) { return nil } {{#oneOf}} - if obj.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} != nil { - return obj.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} + if obj.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { + return obj.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} } {{/oneOf}} diff --git a/modules/openapi-generator/src/main/resources/haskell-servant/stack.mustache b/modules/openapi-generator/src/main/resources/haskell-servant/stack.mustache index df636e059180..1f1821220e22 100644 --- a/modules/openapi-generator/src/main/resources/haskell-servant/stack.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-servant/stack.mustache @@ -1,12 +1,8 @@ -resolver: lts-13.20 -extra-deps: -- servant-0.16 -- servant-server-0.16 -- servant-client-0.16 -- servant-client-core-0.16 +resolver: lts-19.2 +extra-deps: [] packages: - '.' nix: enable: false packages: - - zlib \ No newline at end of file + - zlib diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache index d7c006cc40c1..35b78586303d 100644 --- a/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache @@ -38,6 +38,7 @@ Do not edit the class manually. + UTF-8 2.6.2 3.14.0 @@ -190,4 +191,4 @@ Do not edit the class manually. - \ No newline at end of file + diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache index 871eb59dfe04..4884925ee568 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache @@ -52,9 +52,9 @@ public interface {{classname}} { {{/externalDocs}} */ @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") - {{#vendorExtensions.x-contentType}} - @Produces(value={"{{vendorExtensions.x-contentType}}"}) - {{/vendorExtensions.x-contentType}} + {{#vendorExtensions.x-content-type}} + @Produces(value={"{{vendorExtensions.x-content-type}}"}) + {{/vendorExtensions.x-content-type}} @Consumes(value={"{{vendorExtensions.x-accepts}}"}) {{!auth methods}} {{#configureAuth}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache index 92170fc6dbb3..b05c3db3fa00 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache @@ -3,9 +3,9 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} | {{/operation}}{{/operations}} ## Creating {{classname}} @@ -49,9 +49,9 @@ More information can be found inside [Inversion of Control guide section](https: {{notes}}{{/notes}} {{#allParams}}{{#-last}}### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}`{{dataType}}`{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}`{{dataType}}`{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional parameter]{{/required}}{{#defaultValue}} [default to `{{defaultValue}}`]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}`{{{.}}}`{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}`{{dataType}}`{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}`{{dataType}}`{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional parameter]{{/required}}{{#defaultValue}} [default to `{{defaultValue}}`]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}`{{{.}}}`{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}}{{/-last}}{{/allParams}} {{#returnType}}### Return type diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/type.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/type.mustache index e8a56ad01d8a..96d45a0c0cc8 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/type.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/type.mustache @@ -1 +1,7 @@ -{{!normal type}}{{^isDate}}{{^isDateTime}}{{{dataType}}}{{/isDateTime}}{{/isDate}}{{!date-time}}{{#isDateTime}}@Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") {{{dataType}}}{{/isDateTime}}{{!date}}{{#isDate}}@Format("yyyy-MM-dd") {{{dataType}}}{{/isDate}} \ No newline at end of file +{{! +default type +}}{{^isDate}}{{^isDateTime}}{{{dataType}}}{{/isDateTime}}{{/isDate}}{{! +date-time +}}{{#isDateTime}}@Format("{{{datetimeFormat}}}") {{{dataType}}}{{/isDateTime}}{{! +date +}}{{#isDate}}@Format("{{{dateFormat}}}") {{{dataType}}}{{/isDate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache index bf1768a17c2d..e51e6ead1527 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache @@ -16,6 +16,7 @@ jar 1.8 + UTF-8 {{{micronautVersion}}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache index ecf4809f9e3f..6c7dde3d9ea3 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache @@ -5,8 +5,8 @@ validate all pojos and enums nullable & nonnull }}{{#required}}{{#isNullable}} @Nullable {{/isNullable}}{{^isNullable}} @NotNull -{{/isNullable}}{{/required}}{{^required}} @Nullable -{{/required}}{{! +{{/isNullable}}{{/required}}{{^required}}{{^useOptional}} @Nullable +{{/useOptional}}{{/required}}{{! pattern }}{{#pattern}}{{^isByteArray}} @Pattern(regexp="{{{pattern}}}") {{/isByteArray}}{{/pattern}}{{! diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache index 6421884f47d3..30e167e737ca 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache @@ -19,8 +19,8 @@ {{/isContainer}} {{/withXml}} {{#isDateTime}} - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "{{{datetimeFormat}}}") {{/isDateTime}} {{#isDate}} - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "{{{dateFormat}}}") {{/isDate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache index f3119818d387..b016c0bcbb18 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache @@ -7,6 +7,9 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; {{/useReflectionEqualsHashCode}} import java.util.Objects; import java.util.Arrays; +{{#useOptional}} +import java.util.Optional; +{{/useOptional}} {{#imports}} import {{import}}; {{/imports}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache index 8711f3f6dc76..254dfff365ff 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache @@ -17,7 +17,10 @@ {{/additionalModelTypeAnnotations}} {{>common/generatedAnnotation}}{{#discriminator}}{{>common/model/typeInfoAnnotation}}{{/discriminator}}{{>common/model/xmlAnnotation}}{{#useBeanValidation}} @Introspected -{{/useBeanValidation}}{{! +{{/useBeanValidation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}}{{! Declare the class with extends and implements }}public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} @@ -57,6 +60,9 @@ Declare the class with extends and implements {{/isContainer}} {{/isXmlAttribute}} {{/withXml}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); @@ -180,7 +186,7 @@ Declare the class with extends and implements {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} {{#jackson}} -{{>common/model/jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{{datatypeWithEnum}}} {{getter}}() { +{{>common/model/jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{#useOptional}}{{^required}}Optional<{{/required}}{{/useOptional}}{{{datatypeWithEnum}}}{{#useOptional}}{{^required}}>{{/required}}{{/useOptional}} {{getter}}() { {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isReadOnly}} {{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} if ({{name}} == null) { @@ -190,7 +196,17 @@ Declare the class with extends and implements return {{name}}.orElse(null); {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#useOptional}} + {{#required}} return {{name}}; + {{/required}} + {{^required}} + return Optional.ofNullable({{name}}); + {{/required}} + {{/useOptional}} + {{^useOptional}} + return {{name}}; + {{/useOptional}} {{/vendorExtensions.x-is-jackson-optional-nullable}} } diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache index 63eb42ea5001..c833321ebfa7 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache @@ -1,6 +1,10 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) +@JsonIgnoreProperties( + value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) {{#discriminator.mappedModels}} {{#-first}} @JsonSubTypes({ @@ -10,7 +14,4 @@ }) {{/-last}} {{/discriminator.mappedModels}} -{{#isClassnameSanitized}} -@JsonTypeName("{{name}}") -{{/isClassnameSanitized}} {{/jackson}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache index f1affde0c26e..c7329dde14f0 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache @@ -92,12 +92,7 @@ public {{#generateControllerAsAbstract}}abstract {{/generateControllerAsAbstract {{/consumes.0}} {{!security annotations}} {{#useAuth}} - {{#hasAuthMethods}} - @Secured(SecurityRule.IS_AUTHENTICATED) - {{/hasAuthMethods}} - {{^hasAuthMethods}} - @Secured(SecurityRule.IS_ANONYMOUS) - {{/hasAuthMethods}} + @Secured({{openbrace}}{{#vendorExtensions.x-roles}}{{{.}}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-roles}}{{closebrace}}) {{/useAuth}} {{!the method definition}} public {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{nickname}}{{#generateControllerAsAbstract}}Api{{/generateControllerAsAbstract}}({{#allParams}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache index 4d51aec1c95a..96d45a0c0cc8 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache @@ -2,6 +2,6 @@ default type }}{{^isDate}}{{^isDateTime}}{{{dataType}}}{{/isDateTime}}{{/isDate}}{{! date-time -}}{{#isDateTime}}@Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") {{{dataType}}}{{/isDateTime}}{{! +}}{{#isDateTime}}@Format("{{{datetimeFormat}}}") {{{dataType}}}{{/isDateTime}}{{! date -}}{{#isDate}}@Format("yyyy-MM-dd") {{{dataType}}}{{/isDate}} \ No newline at end of file +}}{{#isDate}}@Format("{{{dateFormat}}}") {{{dataType}}}{{/isDate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache index 44c0730cb991..63768f40f5a4 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache @@ -136,9 +136,9 @@ class {{classname}}Spec extends Specification { {{!Create the request with body and uri}} MutableHttpRequest request = HttpRequest.{{httpMethod}}{{#vendorExtensions.methodAllowsBody}}{{#bodyParam}}(uri, body){{/bodyParam}}{{#isMultipart}}{{^formParams}}(uri, body){{/formParams}}{{/isMultipart}}{{#formParams.0}}(uri, form){{/formParams.0}}{{^bodyParam}}{{^isMultipart}}{{^formParams}}(uri, null){{/formParams}}{{/isMultipart}}{{/bodyParam}}{{/vendorExtensions.methodAllowsBody}}{{^vendorExtensions.methodAllowsBody}}(uri){{/vendorExtensions.methodAllowsBody}} {{!Fill in all the request parameters}} - {{#vendorExtensions.x-contentType}} - .contentType('{{vendorExtensions.x-contentType}}') - {{/vendorExtensions.x-contentType}} + {{#vendorExtensions.x-content-type}} + .contentType('{{vendorExtensions.x-content-type}}') + {{/vendorExtensions.x-content-type}} {{#vendorExtensions.x-accepts}} .accept('{{vendorExtensions.x-accepts}}') {{/vendorExtensions.x-accepts}} diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache index 790e8635b500..743698ea9f53 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache @@ -3,7 +3,7 @@ */{{#description}} @ApiModel(description = "{{{.}}}"){{/description}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}} {{#isEnum}} {{^isContainer}} diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache index 3bde01d71129..98bf33dea0e4 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache @@ -83,7 +83,7 @@ - {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} + 1.8 ${java.version} ${java.version} 4.0.4 diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache index 853bd61f06db..97a2c15f0ca9 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache @@ -50,16 +50,16 @@ public interface {{classname}} { {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) - {{#implicitHeaders}} + {{#implicitHeadersParams.0}} @ApiImplicitParams({ - {{#headerParams}}{{>implicitHeader}}{{/headerParams}} + {{#implicitHeadersParams}}{{>implicitHeader}}{{/implicitHeadersParams}} }) - {{/implicitHeaders}} + {{/implicitHeadersParams.0}} @RequestMapping( method = RequestMethod.{{httpMethod}}, value = "{{{path}}}"{{#singleContentTypes}}, produces = "{{{vendorExtensions.x-accepts}}}", - consumes = "{{{vendorExtensions.x-contentType}}}"{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, + consumes = "{{{vendorExtensions.x-content-type}}}"{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, produces = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}}, consumes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}} ) diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/implicitHeader.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/implicitHeader.mustache index cda039e4ccb2..314574114912 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/implicitHeader.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/implicitHeader.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required=true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required=true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache index 31d7d3002749..6609c81a3cef 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache @@ -4,7 +4,7 @@ @ApiModel(description = "{{{.}}}"){{/description}} {{#useBeanValidation}}@Validated{{/useBeanValidation}} {{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#serializableModel}} private static final long serialVersionUID = 1L; diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache index 95e66a258da0..9f8e20868210 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache @@ -1,6 +1,6 @@ {{#description}}@ApiModel(description = "{{{.}}}"){{/description}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} -public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/PartConfig.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/PartConfig.kt.mustache new file mode 100644 index 000000000000..f70c18eff465 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/PartConfig.kt.mustache @@ -0,0 +1,11 @@ +package {{packageName}}.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +{{#nonPublicApi}}internal {{/nonPublicApi}}data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache index 1616e309ff1a..6f67117e6cdb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache @@ -38,6 +38,7 @@ import {{packageName}}.infrastructure.ClientError import {{packageName}}.infrastructure.ServerException import {{packageName}}.infrastructure.ServerError import {{packageName}}.infrastructure.MultiValueMap +import {{packageName}}.infrastructure.PartConfig import {{packageName}}.infrastructure.RequestConfig import {{packageName}}.infrastructure.RequestMethod import {{packageName}}.infrastructure.ResponseType @@ -169,7 +170,7 @@ import {{packageName}}.infrastructure.toMultiValue {{/isDeprecated}} val localVariableConfig = {{operationId}}RequestConfig({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) - return{{^doNotUseRxAndCoroutines}}{{#useCoroutines}}@withContext{{/useCoroutines}}{{/doNotUseRxAndCoroutines}} request<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map{{/hasFormParams}}{{/hasBodyParam}}, {{{returnType}}}{{^returnType}}Unit{{/returnType}}>( + return{{^doNotUseRxAndCoroutines}}{{#useCoroutines}}@withContext{{/useCoroutines}}{{/doNotUseRxAndCoroutines}} request<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map>{{/hasFormParams}}{{/hasBodyParam}}, {{{returnType}}}{{^returnType}}Unit{{/returnType}}>( localVariableConfig ) } @@ -183,8 +184,14 @@ import {{packageName}}.infrastructure.toMultiValue {{#isDeprecated}} @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} - fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map{{/hasFormParams}}{{/hasBodyParam}}> { - val localVariableBody = {{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}null{{/hasFormParams}}{{#hasFormParams}}mapOf({{#formParams}}"{{{baseName}}}" to {{{paramName}}}{{^-last}}, {{/-last}}{{/formParams}}){{/hasFormParams}}{{/hasBodyParam}} + fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map>{{/hasFormParams}}{{/hasBodyParam}}> { + val localVariableBody = {{#hasBodyParam}}{{! + }}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{! + }}{{^hasFormParams}}null{{/hasFormParams}}{{! + }}{{#hasFormParams}}mapOf({{#formParams}} + "{{{baseName}}}" to PartConfig(body = {{{paramName}}}, headers = mutableMapOf({{#contentType}}"Content-Type" to "{{contentType}}"{{/contentType}})),{{! + }}{{/formParams}}){{/hasFormParams}}{{! + }}{{/hasBodyParam}} val localVariableQuery: MultiValueMap = {{^hasQueryParams}}mutableMapOf() {{/hasQueryParams}}{{#hasQueryParams}}mutableMapOf>() .apply { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache index 39495761e5a9..a4079e73dcb9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache @@ -25,6 +25,9 @@ import okhttp3.MediaType.Companion.toMediaTypeOrNull {{/jvm-okhttp4}} import okhttp3.Request import okhttp3.Headers +{{#jvm-okhttp4}} +import okhttp3.Headers.Companion.toHeaders +{{/jvm-okhttp4}} import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -111,78 +114,62 @@ import com.squareup.moshi.adapter return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): 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 == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.{{#jvm-okhttp3}}of{{/jvm-okhttp3}}{{#jvm-okhttp4}}headersOf{{/jvm-okhttp4}}( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - {{#jvm-okhttp3}} - val fileMediaType = MediaType.parse(guessContentTypeFromFile(value)) - addPart(partHeaders, RequestBody.create(fileMediaType, value)) - {{/jvm-okhttp3}} - {{#jvm-okhttp4}} - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - {{/jvm-okhttp4}} - } else { - val partHeaders = Headers.{{#jvm-okhttp3}}of{{/jvm-okhttp3}}{{#jvm-okhttp4}}headersOf{{/jvm-okhttp4}}( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - {{#jvm-okhttp3}} - RequestBody.create(null, parameterToString(value)) - {{/jvm-okhttp3}} - {{#jvm-okhttp4}} - parameterToString(value).toRequestBody(null) - {{/jvm-okhttp4}} - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart({{#jvm-okhttp3}}Headers.of(headers){{/jvm-okhttp3}}{{#jvm-okhttp4}}headers.toHeaders(){{/jvm-okhttp4}}, + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + {{#jvm-okhttp3}} + content is File -> RequestBody.create(MediaType.parse(mediaType ?: guessContentTypeFromFile(content)), content) + {{/jvm-okhttp3}} + {{#jvm-okhttp4}} + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) + {{/jvm-okhttp4}} mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> {{#jvm-okhttp3}} if (content == null) { EMPTY_REQUEST } else { RequestBody.create( {{#moshi}} - MediaType.parse(mediaType), Serializer.moshi.adapter(T::class.java).toJson(content) + MediaType.parse(mediaType ?: JsonMediaType), Serializer.moshi.adapter(T::class.java).toJson(content) {{/moshi}} {{#gson}} - MediaType.parse(mediaType), Serializer.gson.toJson(content, T::class.java) + MediaType.parse(mediaType ?: JsonMediaType), Serializer.gson.toJson(content, T::class.java) {{/gson}} {{#jackson}} - MediaType.parse(mediaType), Serializer.jacksonObjectMapper.writeValueAsString(content) + MediaType.parse(mediaType ?: JsonMediaType), Serializer.jacksonObjectMapper.writeValueAsString(content) {{/jackson}} {{#kotlinx_serialization}} - MediaType.parse(mediaType), Serializer.jvmJson.encodeToString(content) + MediaType.parse(mediaType ?: JsonMediaType), Serializer.jvmJson.encodeToString(content) {{/kotlinx_serialization}} ) } @@ -203,9 +190,7 @@ import com.squareup.moshi.adapter {{#kotlinx_serialization}} Serializer.jvmJson.encodeToString(content) {{/kotlinx_serialization}} - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } {{/jvm-okhttp4}} mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") @@ -220,13 +205,10 @@ import com.squareup.moshi.adapter if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile {{^supportAndroidApiLevel25AndBelow}} + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.{{packageName}}", null).toFile() {{/supportAndroidApiLevel25AndBelow}} {{#supportAndroidApiLevel25AndBelow}} @@ -238,14 +220,19 @@ import com.squareup.moshi.adapter } {{/supportAndroidApiLevel25AndBelow}} f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - {{#moshi}}Serializer.moshi.adapter().fromJson(bodyContent){{/moshi}}{{#gson}}Serializer.gson.fromJson(bodyContent, (object: TypeToken(){}).getType()){{/gson}}{{#jackson}}Serializer.jacksonObjectMapper.readValue(bodyContent, object: TypeReference() {}){{/jackson}}{{#kotlinx_serialization}}Serializer.jvmJson.decodeFromString(bodyContent){{/kotlinx_serialization}} + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + {{#moshi}}Serializer.moshi.adapter().fromJson(bodyContent){{/moshi}}{{! + }}{{#gson}}Serializer.gson.fromJson(bodyContent, (object: TypeToken(){}).getType()){{/gson}}{{! + }}{{#jackson}}Serializer.jacksonObjectMapper.readValue(bodyContent, object: TypeReference() {}){{/jackson}}{{! + }}{{#kotlinx_serialization}}Serializer.jvmJson.decodeFromString(bodyContent){{/kotlinx_serialization}} else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/pom.mustache index 215539ec151f..179205c3fece 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/pom.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/pom.mustache @@ -5,6 +5,9 @@ {{artifactVersion}} {{appName}} pom + + UTF-8 + diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache index 2d716bd7fdfd..bc64887f70fc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache @@ -11,8 +11,6 @@ import io.swagger.annotations.* {{/useSwaggerAnnotations}} import java.io.InputStream -import java.util.Map -import java.util.List {{#useBeanValidation}}import javax.validation.constraints.* import javax.validation.Valid{{/useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index eb4e64ac3578..1df7886bf2d9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -68,7 +68,7 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v method = [RequestMethod.{{httpMethod}}], value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"]{{#singleContentTypes}}{{#hasProduces}}, produces = "{{{vendorExtensions.x-accepts}}}"{{/hasProduces}}{{#hasConsumes}}, - consumes = "{{{vendorExtensions.x-contentType}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, + consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}]{{/hasProduces}}{{#hasConsumes}}, consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}]{{/hasConsumes}}{{/singleContentTypes}} ) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache index 365a1fd579dd..484dca9ca281 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache @@ -76,7 +76,7 @@ interface {{classname}} { method = [RequestMethod.{{httpMethod}}], value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"]{{#singleContentTypes}}{{#hasProduces}}, produces = "{{{vendorExtensions.x-accepts}}}"{{/hasProduces}}{{#hasConsumes}}, - consumes = "{{{vendorExtensions.x-contentType}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, + consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}]{{/hasProduces}}{{#hasConsumes}}, consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}]{{/hasConsumes}}{{/singleContentTypes}} ) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache index a74c26927bc9..7c11199c5793 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache @@ -6,6 +6,7 @@ {{artifactId}} {{artifactVersion}} + UTF-8 1.3.30 1.2.0 1.3.5 diff --git a/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache b/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache index 0fcaf62df3d3..b17fcfd64c2d 100644 --- a/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache +++ b/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache @@ -6,9 +6,9 @@ All URIs are relative to *{{{basePath}}}* -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}}{{^summary}}{{{notes}}}{{/summary}} +| Class | Method | HTTP request | Description | +|------------ | ------------- | ------------- | -------------| +{{#apiInfo}}{{#apis}}{{#operations}}| {{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}}{{^summary}}{{{notes}}}{{/summary}} | {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache b/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache index 6b8a59ea8578..a68f20834250 100644 --- a/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache +++ b/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache @@ -3,9 +3,9 @@ All URIs are relative to *{{basePath}}* -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}}{{/operations}} {{#operations}} @@ -20,9 +20,9 @@ Method | HTTP request | Description ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**](../{{modelPackage}}/{{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +|Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**](../{{modelPackage}}/{{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/markdown-documentation/model.mustache b/modules/openapi-generator/src/main/resources/markdown-documentation/model.mustache index bffd1508f62c..496588b8104a 100644 --- a/modules/openapi-generator/src/main/resources/markdown-documentation/model.mustache +++ b/modules/openapi-generator/src/main/resources/markdown-documentation/model.mustache @@ -3,14 +3,14 @@ # {{{classname}}} ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +| 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}}{{#readOnly}}[readonly] {{/readOnly}}{{#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}}{{#readOnly}}[readonly] {{/readOnly}}{{#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/openapi-yaml/README.md b/modules/openapi-generator/src/main/resources/openapi-yaml/README.md index 6b0f68482016..613c6d787e6f 100644 --- a/modules/openapi-generator/src/main/resources/openapi-yaml/README.md +++ b/modules/openapi-generator/src/main/resources/openapi-yaml/README.md @@ -1,2 +1,2 @@ # OpenAPI YAML -This is a OpenAPI YAML built by the [openapi-generator](https://github.com/openapitools/openapi-genreator) project. \ No newline at end of file +This is a OpenAPI YAML built by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/openapi/README.md b/modules/openapi-generator/src/main/resources/openapi/README.md index 6c6352fdaef6..8bbce067a4de 100644 --- a/modules/openapi-generator/src/main/resources/openapi/README.md +++ b/modules/openapi-generator/src/main/resources/openapi/README.md @@ -1,2 +1,2 @@ # OpenAPI JSON -This is a OpenAPI JSON built by the [openapi-generator](https://github.com/openapitools/openapi-genreator) project. \ No newline at end of file +This is a OpenAPI JSON built by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess b/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess index 57c2185f0e4a..9769646408a9 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess @@ -1,10 +1,38 @@ +Options All -Indexes + + +order allow,deny +deny from all + + - SetEnv APP_ENV 'production' + SetEnv APP_ENV 'production' - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^ index.php [QSA,L] + RewriteEngine On + + # Redirect to HTTPS + # RewriteEngine On + # RewriteCond %{HTTPS} off + # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + + # Some hosts may require you to use the `RewriteBase` directive. + # Determine the RewriteBase automatically and set it as environment variable. + # If you are using Apache aliases to do mass virtual hosting or installed the + # project in a subdirectory, the base path will be prepended to allow proper + # resolution of the index.php file and to redirect to the correct URI. It will + # work in environments without path prefix as well, providing a safe, one-size + # fits all solution. But as you do not need it in this case, you can comment + # the following 2 lines to eliminate the overhead. + RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ + RewriteRule ^(.*) - [E=BASE:%1] + + # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the + # absolute physical path to the directory that contains this htaccess file. + # RewriteBase / + + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [QSA,L] \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache index dcd719301231..9cf862d4b16f 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache @@ -115,6 +115,27 @@ Switch your app environment to development in `public/.htaccess` file: ``` +## Mock Server +Since this feature should be used for development only, change environment to `development` and send additional HTTP header `X-{{invokerPackage}}-Mock: ping` with any request to get mocked response. +CURL example: +```console +curl --request GET \ + --url 'http://localhost:8888/v2/pet/findByStatus?status=available' \ + --header 'accept: application/json' \ + --header 'X-{{invokerPackage}}-Mock: ping' +[{"id":-8738629417578509312,"category":{"id":-4162503862215270400,"name":"Lorem ipsum dol"},"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem i","photoUrls":["Lor"],"tags":[{"id":-3506202845849391104,"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectet"}],"status":"pending"}] +``` + +Used packages: +* [Openapi Data Mocker](https://github.com/ybelenko/openapi-data-mocker) - first implementation of OAS3 fake data generator. +* [Openapi Data Mocker Server Middleware](https://github.com/ybelenko/openapi-data-mocker-server-middleware) - PSR-15 HTTP server middleware. +* [Openapi Data Mocker Interfaces](https://github.com/ybelenko/openapi-data-mocker-interfaces) - package with mocking interfaces. + +## Logging + +Build contains pre-configured [`monolog/monolog`](https://github.com/Seldaek/monolog) package. Make sure that `logs` folder is writable. +Add required log handlers/processors/formatters in `{{srcBasePath}}/App/RegisterDependencies.php`. + {{#generateApiDocs}} ## API Endpoints diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache index 6d8d0bcbac28..f6e55be7860d 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache @@ -17,6 +17,8 @@ {{#isZendDiactoros}} "laminas/laminas-diactoros": "^2.3.0", {{/isZendDiactoros}} + "monolog/monolog": "^2.4", + "neomerx/cors-psr7": "^2.0", {{#isNyholmPsr7}} "nyholm/psr7": "^1.3.0", "nyholm/psr7-server": "^0.4.1", @@ -26,7 +28,7 @@ "slim/psr7": "^1.1.0", {{/isSlimPsr7}} "ybelenko/openapi-data-mocker": "^1.0", - "ybelenko/openapi-data-mocker-server-middleware": "^1.0" + "ybelenko/openapi-data-mocker-server-middleware": "^1.2" }, "require-dev": { "overtrue/phplint": "^2.0.2", diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache index 425880521605..8d908593ab47 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache @@ -20,11 +20,41 @@ ini_set("display_errors", 1); return [ 'mode' => 'development', - // slim framework settings + // Returns a detailed HTML page with error details and + // a stack trace. Should be disabled in production. 'slim.displayErrorDetails' => true, + + // Whether to display errors on the internal PHP log or not. 'slim.logErrors' => false, + + // If true, display full errors with message and stack trace on the PHP log. + // If false, display only "Slim Application Error" on the PHP log. + // Doesn't do anything when 'logErrors' is false. 'slim.logErrorDetails' => false, + // CORS settings + // @see https://github.com/neomerx/cors-psr7/blob/master/src/Strategies/Settings.php + 'cors.settings' => [ + isset($_SERVER['HTTPS']) ? 'https' : 'http', // serverOriginScheme + $_SERVER['SERVER_NAME'], // serverOriginHost + null, // serverOriginPort + false, // isPreFlightCanBeCached + 0, // preFlightCacheMaxAge + false, // isForceAddMethods + false, // isForceAddHeaders + true, // isUseCredentials + true, // areAllOriginsAllowed + [], // allowedOrigins + true, // areAllMethodsAllowed + [], // allowedLcMethods + 'GET, POST, PUT, PATCH, DELETE', // allowedMethodsList + true, // areAllHeadersAllowed + [], // allowedLcHeaders + 'authorization, content-type, x-requested-with', // allowedHeadersList + '', // exposedHeadersList + true, // isCheckHost + ], + // PDO 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', 'pdo.username' => 'root', @@ -32,4 +62,43 @@ return [ 'pdo.options' => [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, ], + + // mocker + // OBVIOUSLY MUST NOT BE USED for production + // @see https://github.com/ybelenko/openapi-data-mocker-server-middleware + 'mocker.getMockStatusCodeCallback' => function () { + return function (\Psr\Http\Message\ServerRequestInterface $request, array $responses) { + // check if client clearly asks for mocked response + $pingHeader = 'X-{{invokerPackage}}-Mock'; + $pingHeaderCode = 'X-{{invokerPackage}}-Mock-Code'; + if ( + $request->hasHeader($pingHeader) + && $request->getHeader($pingHeader)[0] === 'ping' + ) { + $responses = (array) $responses; + $requestedResponseCode = ($request->hasHeader($pingHeaderCode)) ? $request->getHeader($pingHeaderCode)[0] : 'default'; + if (array_key_exists($requestedResponseCode, $responses)) { + return $requestedResponseCode; + } + + // return first response key + reset($responses); + return key($responses); + } + + return false; + }; + }, + 'mocker.afterCallback' => function () { + return function (\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response) { + // mark mocked response to distinguish real and fake responses + return $response->withHeader('X-{{invokerPackage}}-Mock', 'pong'); + }; + }, + + // logger + 'logger.name' => 'App', + 'logger.path' => \realpath(__DIR__ . '/../../logs') . '/app.log', + 'logger.level' => 100, // equals DEBUG level + 'logger.options' => [], ]; diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache index d6853fbcf538..31695e49a052 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache @@ -20,11 +20,41 @@ ini_set('display_errors', '0'); return [ 'mode' => 'production', - // slim framework settings + // Returns a detailed HTML page with error details and + // a stack trace. Should be disabled in production. 'slim.displayErrorDetails' => false, + + // Whether to display errors on the internal PHP log or not. 'slim.logErrors' => true, + + // If true, display full errors with message and stack trace on the PHP log. + // If false, display only "Slim Application Error" on the PHP log. + // Doesn't do anything when 'logErrors' is false. 'slim.logErrorDetails' => true, + // CORS settings + // https://github.com/neomerx/cors-psr7/blob/master/src/Strategies/Settings.php + 'cors.settings' => [ + isset($_SERVER['HTTPS']) ? 'https' : 'http', // serverOriginScheme + $_SERVER['SERVER_NAME'], // serverOriginHost + null, // serverOriginPort + true, // isPreFlightCanBeCached + 86400, // preFlightCacheMaxAge + false, // isForceAddMethods + false, // isForceAddHeaders + true, // isUseCredentials + false, // areAllOriginsAllowed + [], // allowedOrigins + false, // areAllMethodsAllowed + [], // allowedLcMethods + '', // allowedMethodsList + false, // areAllHeadersAllowed + [], // allowedLcHeaders + '', // allowedHeadersList + '', // exposedHeadersList + true, // isCheckHost + ], + // PDO 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', 'pdo.username' => 'root', @@ -32,4 +62,10 @@ return [ 'pdo.options' => [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, ], + + // logger + 'logger.name' => 'App', + 'logger.path' => \realpath(__DIR__ . '/../../logs') . '/app.log', + 'logger.level' => 300, // equals WARNING level + 'logger.options' => [], ]; diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache new file mode 100644 index 000000000000..5abe0b407f27 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache @@ -0,0 +1,50 @@ +# GitHub Action for Slim Framework +{{! based on example from link https://github.com/shivammathur/setup-php/blob/master/examples/slim-framework.yml }} +{{! Since GitHub actions config contains variables with double braces }} +{{! may conflict with mustache declarations, switch to different tags then }} +{{=<% %>=}} +name: Testing Slim Framework +on: [push, pull_request] +jobs: + build: + strategy: + matrix: + operating-system: [ubuntu-latest, windows-latest, macos-latest] + php-versions: ['7.4', '8.0', '8.1'] + runs-on: ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + # Docs: https://github.com/shivammathur/setup-php + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, simplexml, dom + coverage: xdebug + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + # Use composer.json for key, if composer.lock is not committed. + # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --no-progress --prefer-dist --optimize-autoloader + + - name: Check PHP syntax + run: vendor/bin/phplint ./ --exclude=vendor + + - name: Test with PHPUnit + run: vendor/bin/phpunit --coverage-text + + - name: Check coding style + run: vendor/bin/phpcs diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore b/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore index 27433d90949e..931a98c71bd1 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore @@ -22,3 +22,7 @@ composer.phar !/config/.htaccess !/config/dev/default.inc.php !/config/prod/default.inc.php + +# Logs folder +/logs/**/*.* +!/logs/.htaccess diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache index ead7d817f87c..18f2574b24ba 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache @@ -14,8 +14,10 @@ use DI\ContainerBuilder; use {{appPackage}}\RegisterDependencies; use {{appPackage}}\RegisterRoutes; use {{appPackage}}\RegisterMiddlewares; +use {{appPackage}}\ResponseEmitter; +use Neomerx\Cors\Contracts\AnalyzerInterface; use Slim\Factory\ServerRequestCreatorFactory; -use Slim\ResponseEmitter; +use Slim\Middleware\ErrorMiddleware; {{/apiInfo}} // Instantiate PHP-DI ContainerBuilder @@ -66,7 +68,15 @@ $routes($app); $serverRequestCreator = ServerRequestCreatorFactory::create(); $request = $serverRequestCreator->createServerRequestFromGlobals(); +// Get error middleware from container +// also anti-pattern, of course we know +$errorMiddleware = $container->get(ErrorMiddleware::class); + // Run App & Emit Response $response = $app->handle($request); -$responseEmitter = new ResponseEmitter(); +$responseEmitter = (new ResponseEmitter()) + ->setRequest($request) + ->setErrorMiddleware($errorMiddleware) + ->setAnalyzer($container->get(AnalyzerInterface::class)); + $responseEmitter->emit($response); diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/phpcs.xml.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/phpcs.xml.mustache index 024e5f3371f2..44ae4b6552b1 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/phpcs.xml.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/phpcs.xml.mustache @@ -8,6 +8,9 @@ ./vendor + + ./logs + diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache index 0f48fb9de1cc..b1a9d3fa7dcd 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache @@ -41,9 +41,16 @@ final class RegisterDependencies // Slim error middleware // @see https://www.slimframework.com/docs/v4/middleware/error-handling.html \Slim\Middleware\ErrorMiddleware::class => \DI\autowire() - ->constructorParameter('displayErrorDetails', \DI\get('slim.displayErrorDetails', false)) - ->constructorParameter('logErrors', \DI\get('slim.logErrors', true)) - ->constructorParameter('logErrorDetails', \DI\get('slim.logErrorDetails', true)), + ->constructorParameter('displayErrorDetails', \DI\get('slim.displayErrorDetails')) + ->constructorParameter('logErrors', \DI\get('slim.logErrors')) + ->constructorParameter('logErrorDetails', \DI\get('slim.logErrorDetails')) + ->constructorParameter('logger', \DI\get(\Psr\Log\LoggerInterface::class)), + + // CORS + \Neomerx\Cors\Contracts\AnalysisStrategyInterface::class => \DI\create(\Neomerx\Cors\Strategies\Settings::class) + ->method('setData', \DI\get('cors.settings')), + + \Neomerx\Cors\Contracts\AnalyzerInterface::class => \DI\factory([\Neomerx\Cors\Analyzer::class, 'instance']), // PDO class for database managing \PDO::class => \DI\create() @@ -51,8 +58,44 @@ final class RegisterDependencies \DI\get('pdo.dsn'), \DI\get('pdo.username'), \DI\get('pdo.password'), - \DI\get('pdo.options', null) + \DI\get('pdo.options') ), + + // DataMocker + // @see https://github.com/ybelenko/openapi-data-mocker-server-middleware + \OpenAPIServer\Mock\OpenApiDataMockerInterface::class => \DI\create(\OpenAPIServer\Mock\OpenApiDataMocker::class) + ->method('setModelsNamespace', '{{modelPackage}}\\'), + + \OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory::class => \DI\autowire() + ->constructorParameter('getMockStatusCodeCallback', \DI\get('mocker.getMockStatusCodeCallback')) + ->constructorParameter('afterCallback', \DI\get('mocker.afterCallback')), + + // Monolog Logger + \Psr\Log\LoggerInterface::class => \DI\factory(function (string $mode, string $name, string $path, $level, array $options = []) { + $logger = new \Monolog\Logger($name); + + $handlers = []; + // stream logger as default handler across all environments + // somebody might not need it during development + $handlers[] = new \Monolog\Handler\StreamHandler($path, $level); + + if ($mode === 'development') { + // add dev handlers if necessary + // @see https://github.com/Seldaek/monolog/blob/f2f66cd480df5f165391ff9b6332700d467b25ac/doc/02-handlers-formatters-processors.md#logging-in-development + } elseif ($mode === 'production') { + // add prod handlers + // @see https://github.com/Seldaek/monolog/blob/f2f66cd480df5f165391ff9b6332700d467b25ac/doc/02-handlers-formatters-processors.md#send-alerts-and-emails + // handlers which doesn't make sense during development + // Slack, Sentry, Swift or native mailer + } + + return $logger->setHandlers($handlers); + }) + ->parameter('mode', \DI\get('mode')) + ->parameter('name', \DI\get('logger.name')) + ->parameter('path', \DI\get('logger.path')) + ->parameter('level', \DI\get('logger.level')) + ->parameter('options', \DI\get('logger.options')), ]); } } diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache index b027ebc46e71..8b1cbf98adae 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache @@ -11,6 +11,8 @@ declare(strict_types=1); */{{#apiInfo}} namespace {{appPackage}}; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; use Slim\Exception\HttpNotImplementedException; /** @@ -109,8 +111,23 @@ class RegisterRoutes */ public function __invoke(\Slim\App $app): void { + $app->options('/{routes:.*}', function (ServerRequestInterface $request, ResponseInterface $response) { + // CORS Pre-Flight OPTIONS Request Handler + return $response; + }); + + // create mock middleware factory + /** @var \Psr\Container\ContainerInterface */ + $container = $app->getContainer(); + /** @var \OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory|null */ + $mockMiddlewareFactory = null; + if ($container->has(\OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory::class)) { + // I know, anti-pattern. Don't retrieve dependency directly from container + $mockMiddlewareFactory = $container->get(\OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory::class); + } + foreach ($this->operations as $operation) { - $callback = function ($request) use ($operation) { + $callback = function (ServerRequestInterface $request) use ($operation) { $message = "How about extending {$operation['classname']} by {$operation['apiPackage']}\\{$operation['userClassname']} class implementing {$operation['operationId']} as a {$operation['httpMethod']} method?"; throw new HttpNotImplementedException($request, $message); }; @@ -122,6 +139,13 @@ class RegisterRoutes $callback = ["\\{$operation['apiPackage']}\\{$operation['userClassname']}", $operation['operationId']]; } + if ($mockMiddlewareFactory) { + $mockSchemaResponses = array_map(function ($item) { + return json_decode($item['jsonSchema'], true); + }, $operation['responses']); + $middlewares[] = $mockMiddlewareFactory->create($mockSchemaResponses); + } + $route = $app->map( [$operation['httpMethod']], "{$operation['basePathWithoutHost']}{$operation['path']}", diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/response_emitter.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/response_emitter.mustache new file mode 100644 index 000000000000..ba6c985cc96f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/response_emitter.mustache @@ -0,0 +1,130 @@ +licenseInfo}} + +declare(strict_types=1); + +/** + * NOTE: This class is auto generated by the openapi generator program. + * https://github.com/openapitools/openapi-generator + * Do not edit the class manually. + */{{#apiInfo}} +namespace {{appPackage}}; +{{/apiInfo}} + +use Neomerx\Cors\Contracts\AnalysisResultInterface; +use Neomerx\Cors\Contracts\AnalyzerInterface; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\RequestInterface; +use Slim\Exception\HttpBadRequestException; +use Slim\Middleware\ErrorMiddleware; +use Slim\ResponseEmitter as SlimResponseEmitter; + +/** + * Custom response emitter to support lazy CORS. + * @see https://github.com/slimphp/Slim-Skeleton/blob/037cfa2b6885301fc32a5b18a00a251a534aac81/src/Application/ResponseEmitter/ResponseEmitter.php + */ +class ResponseEmitter extends SlimResponseEmitter +{ + /** + * @var RequestInterface + */ + protected $request; + + /** + * @var ErrorMiddleware + */ + protected $errorMiddleware; + + /** + * @var AnalyzerInterface + */ + protected $analyzer; + + /** + * Set request. + * @param RequestInterface $request + * @return ResponseEmitter + */ + public function setRequest(RequestInterface $request): ResponseEmitter + { + $this->request = $request; + return $this; + } + + /** + * Set error middleware. + * @param ErrorMiddleware $errorMiddleware + * @return ResponseEmitter + */ + public function setErrorMiddleware(ErrorMiddleware $errorMiddleware): ResponseEmitter + { + $this->errorMiddleware = $errorMiddleware; + return $this; + } + + /** + * Set CORS request analyzer. + * @param AnalyzerInterface $analyzer + * @return ResponseEmitter + */ + public function setAnalyzer(AnalyzerInterface $analyzer): ResponseEmitter + { + $this->analyzer = $analyzer; + return $this; + } + + /** + * Send the response the client + * + * @param ResponseInterface $response + * @return void + */ + public function emit(ResponseInterface $response): void + { + // slightly modified CORS handler from package documentation example + // @see https://github.com/neomerx/cors-psr7#sample-usage + $cors = $this->analyzer->analyze($this->request); + $errorMsg = null; + + switch ($cors->getRequestType()) { + case AnalysisResultInterface::ERR_NO_HOST_HEADER: + $errorMsg = 'CORS no host header in request'; + break; + case AnalysisResultInterface::ERR_ORIGIN_NOT_ALLOWED: + $errorMsg = 'CORS request origin is not allowed'; + break; + case AnalysisResultInterface::ERR_METHOD_NOT_SUPPORTED: + $errorMsg = 'CORS requested method is not supported'; + break; + case AnalysisResultInterface::ERR_HEADERS_NOT_SUPPORTED: + $errorMsg = 'CORS requested header is not allowed'; + break; + case AnalysisResultInterface::TYPE_REQUEST_OUT_OF_CORS_SCOPE: + // do nothing + break; + case AnalysisResultInterface::TYPE_PRE_FLIGHT_REQUEST: + default: + // actual CORS request + $corsHeaders = $cors->getResponseHeaders(); + + // add CORS headers to Response $response + foreach ($corsHeaders as $name => $value) { + $response = $response->withHeader($name, $value); + } + } + + if (!empty($errorMsg)) { + $exception = new HttpBadRequestException($this->request, sprintf('%s.', $errorMsg)); + $exception->setTitle(\sprintf('%d %s', $exception->getCode(), $errorMsg)); + $exception->setDescription($exception->getMessage()); + $response = $this->errorMiddleware->handleException($this->request, $exception); + } + + if (ob_get_contents()) { + ob_clean(); + } + + parent::emit($response); + } +} diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 61b146fd9d92..3fbeb24abc44 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -149,22 +149,61 @@ class ObjectSerializer } /** - * Take value and turn it into a string suitable for inclusion in - * the query, by imploding comma-separated if it's an object. - * If it's a string, pass through unchanged. It will be url-encoded - * later. + * Take query parameter properties and turn it into an array suitable for + * native http_build_query or GuzzleHttp\Psr7\Query::build. * - * @param string[]|string|\DateTime $object an object to be serialized to a string + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType eg. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option * - * @return string the serialized object + * @return array */ - public static function toQueryValue($object) - { - if (is_array($object)) { - return implode(',', $object); - } else { - return self::toString($object); + public static function toQueryValue( + $value, + string $paramName, + string $openApiType = 'string', + string $style = 'form', + bool $explode = true + ): array { + // return empty string + if (empty($value)) return ["{$paramName}" => '']; + + $query = []; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + + // since \GuzzleHttp\Psr7\Query::build fails with nested arrays + // need to flatten array first + $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { + if (!is_array($arr)) return $arr; + + foreach ($arr as $k => $v) { + $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + + if (is_array($v)) { + $flattenArray($v, $prop, $result); + } else { + if ($style !== 'deepObject' && !$explode) { + // push key itself + $result[] = $prop; + } + $result[$prop] = $v; + } + } + return $result; + }; + + $value = $flattenArray($value, $paramName); + + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { + return $value; } + + // handle style in serializeCollection + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + + return $query; } /** @@ -221,7 +260,7 @@ class ObjectSerializer } elseif (is_bool($value)) { return $value ? 'true' : 'false'; } else { - return $value; + return (string) $value; } } @@ -403,4 +442,24 @@ class ObjectSerializer return $instance; } } + + /** + * Native `http_build_query` wrapper. + * @see https://www.php.net/manual/en/function.http-build-query + * + * @param array|object $data May be an array or object containing properties. + * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. + * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. + * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. + * + * @return string + */ + public static function buildQuery( + $data, + string $numeric_prefix = '', + ?string $arg_separator = null, + int $encoding_type = \PHP_QUERY_RFC3986 + ): string { + return \GuzzleHttp\Psr7\Query::build($data, $encoding_type); + } } diff --git a/modules/openapi-generator/src/main/resources/php/README.mustache b/modules/openapi-generator/src/main/resources/php/README.mustache index dada97d670ca..7560a358dd23 100644 --- a/modules/openapi-generator/src/main/resources/php/README.mustache +++ b/modules/openapi-generator/src/main/resources/php/README.mustache @@ -13,7 +13,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}). ### Requirements PHP 7.3 and later. -Should also work with PHP 8.0 but has not been tested. +Should also work with PHP 8.0 or 8.1 but has not been tested. ### Composer diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index f9c5c041fbb3..baea050cb314 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -233,6 +233,9 @@ use {{invokerPackage}}\ObjectSerializer; $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('{{dataType}}' !== 'string') { + $content = json_decode($content); + } } return [ @@ -251,6 +254,9 @@ use {{invokerPackage}}\ObjectSerializer; $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -375,6 +381,9 @@ use {{invokerPackage}}\ObjectSerializer; $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -497,31 +506,13 @@ use {{invokerPackage}}\ObjectSerializer; {{#queryParams}} // query params - {{#isExplode}} - if (${{paramName}} !== null) { - {{#style}} - if('form' === '{{style}}' && is_array(${{paramName}})) { - foreach(${{paramName}} as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['{{baseName}}'] = ${{paramName}}; - } - {{/style}} - {{^style}} - $queryParams['{{baseName}}'] = ${{paramName}}; - {{/style}} - } - {{/isExplode}} - {{^isExplode}} - if (is_array(${{paramName}})) { - ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{style}}{{^style}}{{collectionFormat}}{{/style}}', true); - } - if (${{paramName}} !== null) { - $queryParams['{{baseName}}'] = ${{paramName}}; - } - {{/isExplode}} + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + ${{paramName}}, + '{{baseName}}', // param base name + '{{#schema}}{{openApiType}}{{/schema}}', // openApiType + '{{style}}', // style + {{#isExplode}}true{{/isExplode}}{{^isExplode}}false{{/isExplode}} // explode + ) ?? []); {{/queryParams}} {{#headerParams}} @@ -615,7 +606,7 @@ use {{invokerPackage}}\ObjectSerializer; } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -668,7 +659,7 @@ use {{invokerPackage}}\ObjectSerializer; $operationHost = $operationHosts[$this->hostIndex]; {{/servers.0}} - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( '{{httpMethod}}', {{^servers.0}}$this->config->getHost(){{/servers.0}}{{#servers.0}}$operationHost{{/servers.0}} . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/modules/openapi-generator/src/main/resources/php/model_generic.mustache b/modules/openapi-generator/src/main/resources/php/model_generic.mustache index a56a82181e65..03eeb2c16f46 100644 --- a/modules/openapi-generator/src/main/resources/php/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_generic.mustache @@ -371,7 +371,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -383,6 +383,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -396,7 +397,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -412,7 +413,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -424,6 +425,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/modules/openapi-generator/src/main/resources/powershell/model.mustache b/modules/openapi-generator/src/main/resources/powershell/model.mustache index a4b90baee9f4..9b81320e23ce 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model.mustache @@ -1,6 +1,11 @@ {{> partial_header}} {{#models}} {{#model}} +{{#isEnum}} +{{>model_enum}} +{{/isEnum}} +{{^isEnum}} {{#oneOf}}{{#-first}}{{>model_oneof}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>model_anyof}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>model_simple}}{{/anyOf}}{{/oneOf}} +{{/isEnum}} {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/powershell/model_enum.mustache b/modules/openapi-generator/src/main/resources/powershell/model_enum.mustache new file mode 100644 index 000000000000..067e039808cc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/powershell/model_enum.mustache @@ -0,0 +1,18 @@ +<# +.SYNOPSIS + +{{{summary}}}{{^summary}}Enum {{{classname}}}.{{/summary}} + +.DESCRIPTION + +{{{description}}}{{^description}}No description available.{{/description}} +#> + +enum {{{classname}}} { + {{#allowableValues}} + {{#enumVars}} + # enum value: {{{value}}} + {{{name}}} + {{/enumVars}} + {{/allowableValues}} +} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars index 5c57735164b4..4a6dd287ea7e 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars @@ -88,7 +88,7 @@ Class | Method | HTTP request | Description ## Author -{{#with apiInfo}}{{#each apis}}{{#unless hasMore}}{{infoEmail}} +{{#with apiInfo}}{{#each apis}}{{#unless hasMore}}{{#if infoEmail}}{{infoEmail}}{{/if}} {{/unless}}{{/each}}{{/with}} ## Notes for Large OpenAPI documents diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__api_endpoints.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__api_endpoints.handlebars new file mode 100644 index 000000000000..2bb5d7837bb2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__api_endpoints.handlebars @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from {{packageName}}.api.{{apiModuleName}} import {{classname}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars index 06fb33610b2a..16dfd5cd690b 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars @@ -10,7 +10,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from {{packagename}}.{{apiPackage}}.{{classFilename}} import {{classname}} +# from {{packageName}}.{{apiPackage}}.{{classFilename}} import {{classname}} # # or import this package, but before doing it, use: # diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars index efcd907513d4..b72a961ed102 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars @@ -673,6 +673,7 @@ class Encoding: self.allow_reserved = allow_reserved +@dataclass class MediaType: """ Used to store request and response body schema information @@ -682,14 +683,8 @@ class MediaType: The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded. """ - - def __init__( - self, - schema: typing.Type[Schema], - encoding: typing.Optional[typing.Dict[str, Encoding]] = None, - ): - self.schema = schema - self.encoding = encoding + schema: typing.Optional[typing.Type[Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None @dataclass @@ -719,7 +714,20 @@ class ApiResponseWithoutDeserialization(ApiResponse): headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset -class OpenApiResponse: +class JSONDetector: + @staticmethod + def content_type_is_json(content_type: str) -> bool: + """ + for when content_type strings also include charset info like: + application/json; charset=UTF-8 + """ + content_type_piece = content_type.split(';')[0] + if content_type_piece == 'application/json': + return True + return False + + +class OpenApiResponse(JSONDetector): def __init__( self, response_cls: typing.Type[ApiResponse] = ApiResponse, @@ -734,8 +742,8 @@ class OpenApiResponse: @staticmethod def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - decoded_data = response.data.decode("utf-8") - return json.loads(decoded_data) + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) @staticmethod def __file_name_from_content_disposition(content_disposition: typing.Optional[str]) -> typing.Optional[str]: @@ -795,8 +803,28 @@ class OpenApiResponse: content_type = response.getheader('content-type') deserialized_body = unset streamed = response.supports_chunked_reads() + + deserialized_headers = unset + if self.headers is not None: + # TODO add header deserialiation here + pass + if self.content is not None: - if content_type == 'application/json': + if content_type not in self.content: + raise ApiValueError( + f'Invalid content_type={content_type} returned for response with ' + 'status_code={str(response.status)}' + ) + body_schema = self.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return self.response_cls( + response=response, + headers=deserialized_headers, + body=unset + ) + + if self.content_type_is_json(content_type): body_data = self.__deserialize_json(response) elif content_type == 'application/octet-stream': body_data = self.__deserialize_application_octet_stream(response) @@ -805,16 +833,11 @@ class OpenApiResponse: content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = self.content[content_type].schema deserialized_body = body_schema._from_openapi_data( body_data, _configuration=configuration) elif streamed: response.release_conn() - deserialized_headers = unset - if self.headers is not None: - deserialized_headers = unset - return self.response_cls( response=response, headers=deserialized_headers, @@ -1245,7 +1268,7 @@ class SerializedRequestBody(typing.TypedDict, total=False): fields: typing.Tuple[typing.Union[RequestField, tuple[str, str]], ...] -class RequestBody(StyleFormSerializer): +class RequestBody(StyleFormSerializer, JSONDetector): """ A request body parameter content: content_type to MediaType Schema info @@ -1382,7 +1405,7 @@ class RequestBody(StyleFormSerializer): cast_in_data = media_type.schema(in_data) # TODO check for and use encoding if it exists # and content_type is multipart or application/x-www-form-urlencoded - if content_type == 'application/json': + if self.content_type_is_json(content_type): return self.__serialize_json(cast_in_data) elif content_type == 'text/plain': return self.__serialize_text_plain(cast_in_data) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars index 6e74b8abb831..01790e064336 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars @@ -13,7 +13,7 @@ Method | HTTP request | Description # **{{{operationId}}}** > {{#if returnType}}{{{returnType}}} {{/if}}{{{operationId}}}({{#each requiredParams}}{{#unless defaultValue}}{{paramName}}{{#if hasMore}}, {{/if}}{{/unless}}{{/each}}) -{{{summary}}}{{#if notes}} +{{#if summary}}{{{summary}}}{{/if}}{{#if notes}} {{{notes}}}{{/if}} @@ -159,9 +159,9 @@ Code | Class | Description n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned {{#each responses}} {{#if isDefault}} -default | ApiResponseForDefault | {{message}} {{description}} +default | ApiResponseForDefault | {{message}} {{else}} -{{code}} | ApiResponseFor{{code}} | {{message}} {{description}} +{{code}} | ApiResponseFor{{code}} | {{message}} {{/if}} {{/each}} {{#each responses}} @@ -175,7 +175,7 @@ default | ApiResponseForDefault | {{message}} {{description}} Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | {{#unless content}}Unset{{else}}typing.Union[{{#each content}}{{this.schema.baseName}}, {{/each}}]{{/unless}} | {{#unless content}}body was not defined{{/unless}} | +body | {{#unless content}}Unset{{else}}typing.Union[{{#each content}}{{#if this.schema}}{{this.schema.baseName}}{{else}}Unset{{/if}}, {{/each}}]{{/unless}} | {{#unless content}}body was not defined{{/unless}} | headers | {{#unless responseHeaders}}Unset{{else}}ResponseHeadersFor{{code}}{{/unless}} | {{#unless responseHeaders}}headers were not defined{{/unless}} | {{#each content}} {{#with this.schema}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars index 0698320ad88d..ffed97b72b52 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars @@ -3,7 +3,7 @@ {{#if complexType}} Type | Description | Notes ------------- | ------------- | ------------- -[**{{dataType}}**]({{complexType}}.md) | {{description}} | {{#if isReadOnly}}[readonly] {{/if}} +[**{{dataType}}**]({{complexType}}.md) | {{#if description}}{{description}}{{/if}} | {{#if isReadOnly}}[readonly] {{/if}} {{else}} {{> schema_doc }} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars index c0a0dc7dcc27..8837fa9515df 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars @@ -559,13 +559,13 @@ conf = {{{packageName}}}.Configuration( {{#each servers}} { 'url': "{{{url}}}", - 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + 'description': "{{#unless description}}No description provided{{else}}{{{description}}}{{/unless}}", {{#each variables}} {{#if @first}} 'variables': { {{/if}} '{{{name}}}': { - 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + 'description': "{{#unless description}}No description provided{{else}}{{{description}}}{{/unless}}", 'default_value': "{{{defaultValue}}}", {{#each enumValues}} {{#if @first}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars index f6de978e4781..bb060d0799aa 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars @@ -182,8 +182,8 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara request_body_{{paramName}} = api_client.RequestBody( content={ {{#each content}} - '{{@key}}': api_client.MediaType( - schema={{this.schema.baseName}}), + '{{{@key}}}': api_client.MediaType({{#if this.schema}} + schema={{this.schema.baseName}}{{/if}}), {{/each}} }, {{#if required}} @@ -208,13 +208,13 @@ _servers = ( {{/if}} { 'url': "{{{url}}}", - 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + 'description': "{{#unless description}}No description provided{{else}}{{{description}}}{{/unless}}", {{#each variables}} {{#if @first}} 'variables': { {{/if}} '{{{name}}}': { - 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + 'description': "{{#unless description}}No description provided{{else}}{{{description}}}{{/unless}}", 'default_value': "{{{defaultValue}}}", {{#each enumValues}} {{#if @first}} @@ -285,7 +285,11 @@ class ApiResponseFor{{code}}(api_client.ApiResponse): {{#and responseHeaders content}} body: typing.Union[ {{#each content}} +{{#if this.schema}} {{this.schema.baseName}}, +{{else}} + Unset, +{{/if}} {{/each}} ] headers: ResponseHeadersFor{{code}} @@ -297,7 +301,11 @@ class ApiResponseFor{{code}}(api_client.ApiResponse): {{else}} body: typing.Union[ {{#each content}} +{{#if this.schema}} {{this.schema.baseName}}, +{{else}} + Unset, +{{/if}} {{/each}} ] headers: Unset = unset @@ -323,8 +331,8 @@ _response_for_{{code}} = api_client.OpenApiResponse( {{#if @first}} content={ {{/if}} - '{{@key}}': api_client.MediaType( - schema={{this.schema.baseName}}), + '{{{@key}}}': api_client.MediaType({{#if this.schema}} + schema={{this.schema.baseName}}{{/if}}), {{#if @last}} }, {{/if}} @@ -351,7 +359,7 @@ _status_code_to_response = { {{#if @first}} _all_accept_content_types = ( {{/if}} - '{{this.mediaType}}', + '{{{this.mediaType}}}', {{#if @last}} ) {{/if}} @@ -382,7 +390,7 @@ class {{operationIdCamelCase}}(api_client.Api): {{#with bodyParam}} {{#each content}} {{#if @first}} - content_type: str = '{{@key}}', + content_type: str = '{{{@key}}}', {{/if}} {{/each}} {{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars index 6aef3311b6e3..17a77ff9f363 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars @@ -39,6 +39,16 @@ def _composed_schemas(cls): {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = AnyTypeSchema {{/if}} {{/each}} +{{#with not}} +{{#unless complexType}} +{{#unless isAnyType}} + {{> model_templates/schema }} +{{/unless}} +{{/unless}} +{{#if isAnyType}} + {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = AnyTypeSchema +{{/if}} +{{/with}} {{/with}} return { 'allOf': [ @@ -46,41 +56,54 @@ def _composed_schemas(cls): {{#each allOf}} {{#if complexType}} {{complexType}}, +{{else}} + {{#if nameInSnakeCase}} + {{name}}, + {{else}} + {{baseName}}, + {{/if}} {{/if}} -{{#unless complexType}} - {{#if nameInSnakeCase}}{{name}}{{/if}}{{#unless nameInSnakeCase}}{{baseName}}{{/unless}}, -{{/unless}} {{/each}} ], 'oneOf': [ {{#each oneOf}} {{#if complexType}} {{complexType}}, +{{else}} + {{#if nameInSnakeCase}} + {{name}}, + {{else}} + {{baseName}}, + {{/if}} {{/if}} -{{#unless complexType}} -{{#if isAnyType}} - AnyTypeSchema, -{{/if}} -{{#unless isAnyType}} - {{#if nameInSnakeCase}}{{name}}{{/if}}{{#unless nameInSnakeCase}}{{baseName}}{{/unless}}, -{{/unless}} -{{/unless}} {{/each}} ], 'anyOf': [ {{#each anyOf}} {{#if complexType}} {{complexType}}, +{{else}} + {{#if nameInSnakeCase}} + {{name}}, + {{else}} + {{baseName}}, + {{/if}} {{/if}} -{{#unless complexType}} -{{#if isAnyType}} - AnyTypeSchema, -{{/if}} -{{#unless isAnyType}} - {{#if nameInSnakeCase}}{{name}}{{/if}}{{#unless nameInSnakeCase}}{{baseName}}{{/unless}}, -{{/unless}} -{{/unless}} {{/each}} -{{/with}} ], + 'not': +{{#with not}} +{{#if complexType}} + {{complexType}} +{{else}} + {{#if nameInSnakeCase}} + {{name}} + {{else}} + {{baseName}} + {{/if}} +{{/if}} +{{else}} + None +{{/with}} +{{/with}} } diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars index 5cbc68dc173e..923fac7f6f59 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars @@ -11,6 +11,6 @@ def NONE(cls): @classmethod @property def {{name}}(cls): - return cls._enum_by_value[{{{value}}}]({{{value}}}) + return cls({{{value}}}) {{/each}} {{/with}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars index cf2d2d433837..f44c8ff5b402 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars @@ -14,6 +14,7 @@ from {{packageName}}.schemas import ( # noqa: F401 Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -35,6 +36,7 @@ from {{packageName}}.schemas import ( # noqa: F401 Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars index 24f52cac6ca5..b25c72756483 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars @@ -1 +1 @@ -{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isDecimal}}Decimal{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}} +{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if getIsUuid}}UUID{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isDecimal}}Decimal{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars index 87fe3d0b3244..98271f43460a 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars @@ -28,6 +28,9 @@ Float32{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} {{#isDouble}} Float64{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} {{/isDouble}} +{{#if getIsUuid}} +UUID{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} {{#if isDate}} Date{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} {{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars index 556d2cbb5f95..5fe246825e59 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- {{#each vars}} -**{{baseName}}** | {{#unless complexType}}**{{dataType}}**{{/unless}}{{#if complexType}}[**{{dataType}}**]({{complexType}}.md){{/if}} | {{description}} | {{#unless required}}[optional] {{/unless}}{{#if isReadOnly}}[readonly] {{/if}}{{#if defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/if}} +**{{baseName}}** | {{#unless complexType}}**{{dataType}}**{{/unless}}{{#if complexType}}[**{{dataType}}**]({{complexType}}.md){{/if}} | {{#if description}}{{description}}{{/if}} | {{#unless required}}[optional] {{/unless}}{{#if isReadOnly}}[readonly] {{/if}}{{#if defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/if}} {{/each}} {{#with additionalProperties}} **any string name** | **{{dataType}}** | any string name can be used but the value must be the correct type | [optional] @@ -23,9 +23,9 @@ typing.Union[dict, frozendict, str, date, datetime, int, float, bool, Decimal, N typing.Union[{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isDate}}date, {{/if}}{{#if isDataTime}}datetime, {{/if}}{{#or isLong isShort isUnboundedInteger}}int, {{/or}}{{#or isFloat isDouble}}float, {{/or}}{{#if isNumber}}Decimal, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isNull}}None, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isBinary}}bytes{{/if}}] | | {{#with allowableValues}}{{#if defaultValue}}, {{/if}} must be one of [{{#each enumVars}}{{{value}}}, {{/each}}]{{/with}} {{else}} {{#if isArray}} -{{#unless arrayModelType}}**{{dataType}}**{{/unless}}{{#if arrayModelType}}[**{{dataType}}**]({{arrayModelType}}.md){{/if}} | {{description}} | {{#if defaultValue}}{{#if hasRequired}} if omitted the server will use the default value of {{/if}}{{#unless hasRequired}}defaults to {{/unless}}{{{defaultValue}}}{{/if}} +{{#unless arrayModelType}}**{{dataType}}**{{/unless}}{{#if arrayModelType}}[**{{dataType}}**]({{arrayModelType}}.md){{/if}} | {{#if description}}{{description}}{{/if}} | {{#if defaultValue}}{{#if hasRequired}} if omitted the server will use the default value of {{/if}}{{#unless hasRequired}}defaults to {{/unless}}{{{defaultValue}}}{{/if}} {{else}} -{{#unless arrayModelType}}**{{dataType}}**{{/unless}} | {{description}} | {{#if defaultValue}}{{#if hasRequired}} if omitted the server will use the default value of {{/if}}{{#unless hasRequired}}defaults to {{/unless}}{{{defaultValue}}}{{/if}}{{#with allowableValues}}{{#if defaultValue}}, {{/if}} must be one of [{{#each enumVars}}{{{value}}}, {{/each}}]{{/with}} +{{#unless arrayModelType}}**{{dataType}}**{{/unless}} | {{#if description}}{{description}}{{/if}} | {{#if defaultValue}}{{#if hasRequired}} if omitted the server will use the default value of {{/if}}{{#unless hasRequired}}defaults to {{/unless}}{{{defaultValue}}}{{/if}}{{#with allowableValues}}{{#if defaultValue}}, {{/if}} must be one of [{{#each enumVars}}{{{value}}}, {{/each}}]{{/with}} {{/if}} {{/if}} {{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars index 3ebfd802cc2b..ecfaae2e66c8 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars @@ -2,9 +2,8 @@ {{>partial_header}} -from collections import defaultdict, abc +from collections import defaultdict from datetime import date, datetime, timedelta # noqa: F401 -from dataclasses import dataclass import functools import decimal import io @@ -12,6 +11,7 @@ import os import re import tempfile import typing +import uuid from dateutil.parser.isoparser import isoparser, _takes_ascii from frozendict import frozendict @@ -469,7 +469,6 @@ class Singleton: Enums and singletons are the same The same instance is returned for a given key of (cls, arg) """ - # TODO use bidict to store this so boolean enums can move through it in reverse to get their own arg value? _instances = {} def __new__(cls, *args, **kwargs): @@ -487,7 +486,13 @@ class Singleton: return cls._instances[key] def __repr__(self): - return '({}, {})'.format(self.__class__.__name__, self) + if isinstance(self, NoneClass): + return f'<{self.__class__.__name__}: None>' + elif isinstance(self, BoolClass): + if (self.__class__, True) in self._instances: + return f'<{self.__class__.__name__}: True>' + return f'<{self.__class__.__name__}: False>' + return f'<{self.__class__.__name__}: {super().__repr__()}>' class NoneClass(Singleton): @@ -553,6 +558,40 @@ class StrBase: def as_decimal(self) -> decimal.Decimal: raise Exception('not implemented') + @property + def as_uuid(self) -> uuid.UUID: + raise Exception('not implemented') + + +class UUIDBase(StrBase): + @property + @functools.cache + def as_uuid(self) -> uuid.UUID: + return uuid.UUID(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + uuid.UUID(arg) + return True + except ValueError: + raise ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate( + cls, + arg, + validation_metadata: typing.Optional[ValidationMetadata] = None, + ): + """ + UUIDBase _validate + """ + cls._validate_format(arg, validation_metadata=validation_metadata) + return super()._validate(arg, validation_metadata=validation_metadata) + class CustomIsoparser(isoparser): @@ -1350,6 +1389,7 @@ class Schema: # Use case: value is None, True, False, or an enum value value = arg for key in path[1:]: + # if path is bigger than one, get the value that mfg_cls validated value = value[key] if hasattr(mfg_cls, '_enum_by_value'): mfg_cls = mfg_cls._enum_by_value[value] @@ -1516,6 +1556,11 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal return arg.isoformat() # ApiTypeError will be thrown later by _validate_type return arg + elif isinstance(arg, uuid.UUID): + if not from_server: + return str(arg) + # ApiTypeError will be thrown later by _validate_type + return arg elif isinstance(arg, decimal.Decimal): return arg elif isinstance(arg, bytes): @@ -1534,19 +1579,19 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal class ComposedBase(Discriminable): @classmethod - def __get_allof_classes(cls, *args, validation_metadata: ValidationMetadata): + def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): path_to_schemas = defaultdict(set) for allof_cls in cls._composed_schemas['allOf']: if allof_cls in validation_metadata.base_classes: continue - other_path_to_schemas = allof_cls._validate(*args, validation_metadata=validation_metadata) + other_path_to_schemas = allof_cls._validate(arg, validation_metadata=validation_metadata) update(path_to_schemas, other_path_to_schemas) return path_to_schemas @classmethod def __get_oneof_class( cls, - *args, + arg, discriminated_cls, validation_metadata: ValidationMetadata, path_to_schemas: typing.Dict[typing.Tuple, typing.Set[typing.Type[Schema]]] @@ -1560,13 +1605,13 @@ class ComposedBase(Discriminable): if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: oneof_classes.append(oneof_cls) continue - if isinstance(args[0], oneof_cls): + if isinstance(arg, oneof_cls): # passed in instance is the correct type chosen_oneof_cls = oneof_cls oneof_classes.append(oneof_cls) continue try: - path_to_schemas = oneof_cls._validate(*args, validation_metadata=validation_metadata) + path_to_schemas = oneof_cls._validate(arg, validation_metadata=validation_metadata) new_base_classes = validation_metadata.base_classes except (ApiValueError, ApiTypeError) as ex: if discriminated_cls is not None and oneof_cls is discriminated_cls: @@ -1589,7 +1634,7 @@ class ComposedBase(Discriminable): @classmethod def __get_anyof_classes( cls, - *args, + arg, discriminated_cls, validation_metadata: ValidationMetadata ): @@ -1600,14 +1645,14 @@ class ComposedBase(Discriminable): for anyof_cls in cls._composed_schemas['anyOf']: if anyof_cls in validation_metadata.base_classes: continue - if isinstance(args[0], anyof_cls): + if isinstance(arg, anyof_cls): # passed in instance is the correct type chosen_anyof_cls = anyof_cls anyof_classes.append(anyof_cls) continue try: - other_path_to_schemas = anyof_cls._validate(*args, validation_metadata=validation_metadata) + other_path_to_schemas = anyof_cls._validate(arg, validation_metadata=validation_metadata) except (ApiValueError, ApiTypeError) as ex: if discriminated_cls is not None and anyof_cls is discriminated_cls: raise ex @@ -1704,6 +1749,21 @@ class ComposedBase(Discriminable): validation_metadata=updated_vm ) update(path_to_schemas, other_path_to_schemas) + not_cls = cls._composed_schemas['not'] + if not_cls: + other_path_to_schemas = None + try: + other_path_to_schemas = not_cls._validate(arg, validation_metadata=updated_vm) + except (ApiValueError, ApiTypeError): + pass + if other_path_to_schemas: + raise ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_cls.__name__, + ) + ) if discriminated_cls is not None: # TODO use an exception from this package here @@ -1912,7 +1972,13 @@ class StrSchema( def _from_openapi_data(cls, arg: typing.Union[str], _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super()._from_openapi_data(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[str, date, datetime], **kwargs: typing.Union[ValidationMetadata]): + def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class UUIDSchema(UUIDBase, StrSchema): + + def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]): return super().__new__(cls, arg, **kwargs) @@ -2007,6 +2073,7 @@ class BinarySchema( ], 'anyOf': [ ], + 'not': None } def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: typing.Union[ValidationMetadata]): diff --git a/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars index 7045d259412f..5633db861aa6 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars @@ -37,7 +37,7 @@ setup( description="{{appName}}", author="{{#if infoName}}{{infoName}}{{/if}}{{#unless infoName}}OpenAPI Generator community{{/unless}}", author_email="{{#if infoEmail}}{{infoEmail}}{{/if}}{{#unless infoEmail}}team@openapitools.org{{/unless}}", - url="{{packageUrl}}", + url="{{#if packageUrl}}{{packageUrl}}{{/if}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], python_requires="{{{generatorLanguageVersion}}}", install_requires=REQUIRES, diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api.mustache index cea2c7c66396..6b4aaf19f62f 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api.mustache @@ -161,8 +161,7 @@ class {{classname}}(object): {{^isNullable}} {{#required}} # verify the required parameter '{{paramName}}' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('{{paramName}}') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `{{paramName}}` when calling `{{operationId}}`") # noqa: E501 {{/required}} {{/isNullable}} @@ -217,7 +216,7 @@ class {{classname}}(object): query_params = [] {{#queryParams}} - if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] is not None: # noqa: E501 + if local_var_params.get('{{paramName}}') is not None: # noqa: E501 query_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{#isArray}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isArray}} # noqa: E501 {{/queryParams}} diff --git a/modules/openapi-generator/src/main/resources/python/README_common.mustache b/modules/openapi-generator/src/main/resources/python/README_common.mustache index 614a9d0c62ed..e9eca9c5f6c7 100644 --- a/modules/openapi-generator/src/main/resources/python/README_common.mustache +++ b/modules/openapi-generator/src/main/resources/python/README_common.mustache @@ -19,7 +19,8 @@ from {{apiPackage}} import {{classFilename}} with {{{packageName}}}.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = {{classFilename}}.{{{classname}}}(api_client) - {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{#allParams}} + {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} try: diff --git a/modules/openapi-generator/src/main/resources/python/__init__apis.mustache b/modules/openapi-generator/src/main/resources/python/__init__apis.mustache index 927bb6d52c43..76449d186a67 100644 --- a/modules/openapi-generator/src/main/resources/python/__init__apis.mustache +++ b/modules/openapi-generator/src/main/resources/python/__init__apis.mustache @@ -9,7 +9,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from {{packagename}}.api.{{classFilename}} import {{classname}} +# from {{packageName}}.api.{{classFilename}} import {{classname}} # # or import this package, but before doing it, use: # diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 3406400b4b57..a9021cff5aa1 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -280,6 +280,10 @@ class {{classname}}(object): _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -311,6 +315,7 @@ class {{classname}}(object): kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) {{#requiredParams}} kwargs['{{paramName}}'] = \ {{paramName}} 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 15c95fabb04e..890e813beee4 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -130,7 +130,8 @@ class ApiClient(object): _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -180,7 +181,8 @@ class ApiClient(object): # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -362,7 +364,8 @@ class ApiClient(object): _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -410,6 +413,10 @@ class ApiClient(object): :param _check_type: boolean describing if the data back from the server should have its type checked. :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -424,7 +431,7 @@ class ApiClient(object): response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -437,7 +444,7 @@ class ApiClient(object): collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -609,7 +616,7 @@ class ApiClient(object): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -619,33 +626,43 @@ class ApiClient(object): :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] {{#hasHttpSignatureMethods}} - else: - # The HTTP signature scheme requires multiple HTTP headers - # that are calculated dynamically. - signing_info = self.configuration.signing_info - auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, queries) - headers.update(auth_headers) + else: + # The HTTP signature scheme requires multiple HTTP headers + # that are calculated dynamically. + signing_info = self.configuration.signing_info + auth_headers = signing_info.get_http_signature_headers( + resource_path, method, headers, body, queries) + headers.update(auth_headers) {{/hasHttpSignatureMethods}} - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -695,7 +712,8 @@ class Endpoint(object): '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -710,7 +728,8 @@ class Endpoint(object): '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -885,4 +904,5 @@ class Endpoint(object): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/modules/openapi-generator/src/main/resources/python/exceptions.mustache b/modules/openapi-generator/src/main/resources/python/exceptions.mustache index 046dcd9a5a22..7e6eec13889e 100644 --- a/modules/openapi-generator/src/main/resources/python/exceptions.mustache +++ b/modules/openapi-generator/src/main/resources/python/exceptions.mustache @@ -104,7 +104,7 @@ class ApiException(OpenApiException): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/invalid_pos_args.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/invalid_pos_args.mustache index 143d50c8250c..d7fa949f7b79 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/invalid_pos_args.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/invalid_pos_args.mustache @@ -1,9 +1,13 @@ if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) \ No newline at end of file + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache index ba03dbc63f3f..3b6993094bdc 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache @@ -1,6 +1,11 @@ @classmethod @convert_js_args_to_python_args + {{#initRequiredVars}} + def _from_openapi_data(cls{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}, *args, **kwargs): # noqa: E501 + {{/initRequiredVars}} + {{^initRequiredVars}} def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + {{/initRequiredVars}} """{{classname}} - a model defined in OpenAPI Keyword Args: @@ -47,6 +52,14 @@ '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } + {{#initRequiredVars}} + required_args = { +{{#requiredVars}} + '{{name}}': {{name}}, +{{/requiredVars}} + } + kwargs.update(required_args) + {{/initRequiredVars}} composed_info = validate_get_composed_info( constant_args, kwargs, self) self._composed_instances = composed_info[0] diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache index 68c70c629dbd..9a5f24abf894 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache @@ -32,7 +32,7 @@ {{/defaultValue}} {{/requiredVars}} _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache index ba7991e4d07e..b0d4c5c7bd59 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache @@ -11,7 +11,12 @@ ]) @convert_js_args_to_python_args + {{#initRequiredVars}} + def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}, *args, **kwargs): # noqa: E501 + {{/initRequiredVars}} + {{^initRequiredVars}} def __init__(self, *args, **kwargs): # noqa: E501 + {{/initRequiredVars}} """{{classname}} - a model defined in OpenAPI Keyword Args: @@ -60,6 +65,14 @@ '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } + {{#initRequiredVars}} + required_args = { +{{#requiredVars}} + '{{name}}': {{name}}, +{{/requiredVars}} + } + kwargs.update(required_args) + {{/initRequiredVars}} composed_info = validate_get_composed_info( constant_args, kwargs, self) self._composed_instances = composed_info[0] diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/methods_shared.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/methods_shared.mustache index eddad2533afb..5ffef97f6b63 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/methods_shared.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/methods_shared.mustache @@ -19,7 +19,7 @@ if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ diff --git a/modules/openapi-generator/src/main/resources/python/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/model_utils.mustache index 0e8ad8be5db7..cea872c6cbf4 100644 --- a/modules/openapi-generator/src/main/resources/python/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_utils.mustache @@ -8,6 +8,7 @@ import os import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -1082,7 +1083,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -1247,7 +1254,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + if (configuration + or (input_class_simple == dict + and not dict in valid_classes)): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index 1212a35d473c..f50cdd59d9da 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -19,12 +19,30 @@ module {{moduleName}} {{#notes}} # {{{.}}} {{/notes}} -{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} -{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters -{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] - def {{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) - {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts) +{{#vendorExtensions.x-group-parameters}} + # @param [Hash] opts the parameters +{{#allParams}} +{{#required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required) +{{/required}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#required}} + # @param {{paramName}} [{{{dataType}}}] {{description}} +{{/required}} +{{/allParams}} + # @param [Hash] opts the optional parameters +{{/vendorExtensions.x-group-parameters}} +{{#allParams}} +{{^required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/required}} +{{/allParams}} + # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] + def {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {}) + {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts) {{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}} end @@ -34,14 +52,42 @@ module {{moduleName}} {{#notes}} # {{.}} {{/notes}} -{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} -{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters -{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}} -{{/required}}{{/allParams}} # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers - def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) +{{#vendorExtensions.x-group-parameters}} + # @param [Hash] opts the parameters +{{#allParams}} +{{#required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required) +{{/required}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#required}} + # @param {{paramName}} [{{{dataType}}}] {{description}} +{{/required}} +{{/allParams}} + # @param [Hash] opts the optional parameters +{{/vendorExtensions.x-group-parameters}} +{{#allParams}} +{{^required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/required}} +{{/allParams}} + # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers + def {{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...' end + {{#vendorExtensions.x-group-parameters}} + # unbox the parameters from the hash + {{#allParams}} + {{^isNullable}} + {{#required}} + {{{paramName}}} = opts[:'{{{paramName}}}'] + {{/required}} + {{/isNullable}} + {{/allParams}} + {{/vendorExtensions.x-group-parameters}} {{#allParams}} {{^isNullable}} {{#required}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache index 7e0568b95d79..31e2cf3abec5 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache @@ -12,6 +12,7 @@ require 'typhoeus' {{/isFaraday}} {{#isFaraday}} require 'faraday' +require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') {{/isFaraday}} module {{moduleName}} @@ -71,23 +72,30 @@ module {{moduleName}} {{/isFaraday}} {{#isFaraday}} if return_type == 'File' - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) + if @config.return_binary_data == true + # return byte stream + encoding = body.encoding + return @stream.join.force_encoding(encoding) else - prefix = 'download-' + # return file instead of binary data + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = body.encoding + @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + @tempfile.write(@stream.join.force_encoding(encoding)) + @tempfile.close + @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + return @tempfile end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = body.encoding - @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile.write(@stream.join.force_encoding(encoding)) - @tempfile.close - @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - return @tempfile end {{/isFaraday}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache index 4eed519e144a..5d8e8d04e711 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache @@ -3,43 +3,24 @@ # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: # the data deserialized from response body (could be nil), response status code and response headers. def call_api(http_method, path, opts = {}) - ssl_options = { - :ca_file => @config.ssl_ca_file, - :verify => @config.ssl_verify, - :verify_mode => @config.ssl_verify_mode, - :client_cert => @config.ssl_client_cert, - :client_key => @config.ssl_client_key - } - - connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn| - conn.proxy = config.proxy if config.proxy - conn.request(:basic_auth, config.username, config.password) - @config.configure_middleware(conn) - if opts[:header_params]["Content-Type"] == "multipart/form-data" - conn.request :multipart - conn.request :url_encoded - end - conn.adapter(Faraday.default_adapter) - end - begin - response = connection.public_send(http_method.to_sym.downcase) do |req| + response = connection(opts).public_send(http_method.to_sym.downcase) do |req| build_request(http_method, path, req, opts) end - if @config.debugging - @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" end unless response.success? if response.status == 0 # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) + fail ApiError.new(code: 0, + message: response.return_message) else - fail ApiError.new(:code => response.status, - :response_headers => response.headers, - :response_body => response.body), + fail ApiError.new(code: response.status, + response_headers: response.headers, + response_body: response.body), response.reason_phrase end end @@ -76,21 +57,21 @@ if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - if @config.debugging - @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request.headers = header_params request.body = req_body # Overload default options only if provided - request.options.params_encoding = @config.params_encoding if @config.params_encoding - request.options.timeout = @config.timeout if @config.timeout - request.options.verbose = @config.debugging if @config.debugging + request.options.params_encoder = config.params_encoder if config.params_encoder + request.options.timeout = config.timeout if config.timeout + request.options.verbose = config.debugging if config.debugging request.url url request.params = query_params - download_file(request) if opts[:return_type] == 'File' + download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' request end @@ -134,3 +115,47 @@ @stream << chunk end end + + def connection(opts) + opts[:header_params]['Content-Type'] == 'multipart/form-data' ? connection_multipart : connection_regular + end + + def connection_multipart + @connection_multipart ||= build_connection do |conn| + conn.request :multipart + conn.request :url_encoded + end + end + + def connection_regular + @connection_regular ||= build_connection + end + + def build_connection + Faraday.new(url: config.base_url, ssl: ssl_options) do |conn| + basic_auth(conn) + config.configure_middleware(conn) + yield(conn) if block_given? + conn.adapter(Faraday.default_adapter) + end + end + + def ssl_options + { + ca_file: config.ssl_ca_file, + verify: config.ssl_verify, + verify_mode: config.ssl_verify_mode, + client_cert: config.ssl_client_cert, + client_key: config.ssl_client_key + } + end + + def basic_auth(conn) + if config.username && config.password + if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') + conn.request(:authorization, :basic, config.username, config.password) + else + conn.request(:basic_auth, config.username, config.password) + end + end + end diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client_typhoeus_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_typhoeus_partial.mustache index e0c9e7cc1d65..7b961b400d8f 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client_typhoeus_partial.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client_typhoeus_partial.mustache @@ -49,6 +49,7 @@ header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true {{#hasAuthMethods}} update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -67,7 +68,8 @@ :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache index 57e3a2a26a22..acb2750d5259 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache @@ -17,7 +17,7 @@ All URIs are relative to *{{basePath}}* ## {{operationId}} -> {{#returnType}}{{#returnTypeIsPrimitive}}{{returnType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}<{{{returnType}}}>{{/returnTypeIsPrimitive}} {{/returnType}}{{operationId}}{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}} +> {{#returnType}}{{#returnTypeIsPrimitive}}{{returnType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}<{{{returnType}}}>{{/returnTypeIsPrimitive}} {{/returnType}}{{operationId}}{{#hasParams}}({{^vendorExtensions.x-group-parameters}}{{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}opts{{/vendorExtensions.x-group-parameters}}){{/hasParams}} {{{summary}}}{{#notes}} @@ -46,6 +46,7 @@ require '{{{gemName}}}' {{/hasAuthMethods}} api_instance = {{{moduleName}}}::{{{classname}}}.new +{{^vendorExtensions.x-group-parameters}} {{#requiredParams}} {{{paramName}}} = {{{vendorExtensions.x-ruby-example}}} # {{{dataType}}} | {{{description}}} {{/requiredParams}} @@ -58,10 +59,23 @@ opts = { } {{/-last}} {{/optionalParams}} +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +{{#hasParams}} +opts = { +{{#requiredParams}} + {{{paramName}}}: {{{vendorExtensions.x-ruby-example}}}, # {{{dataType}}} | {{{description}}} (required) +{{/requiredParams}} +{{#optionalParams}} + {{{paramName}}}: {{{vendorExtensions.x-ruby-example}}}, # {{{dataType}}} | {{{description}}} +{{/optionalParams}} +} +{{/hasParams}} +{{/vendorExtensions.x-group-parameters}} begin {{#summary}}# {{{.}}}{{/summary}} - {{#returnType}}result = {{/returnType}}api_instance.{{{operationId}}}{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}} + {{#returnType}}result = {{/returnType}}api_instance.{{{operationId}}}{{#hasParams}}({{^vendorExtensions.x-group-parameters}}{{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}opts{{/vendorExtensions.x-group-parameters}}){{/hasParams}} {{#returnType}} p result {{/returnType}} @@ -74,12 +88,12 @@ end This returns an Array which contains the response data{{^returnType}} (`nil` in this case){{/returnType}}, status code and headers. -> {{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Integer, Hash)> {{operationId}}_with_http_info{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}} +> {{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Integer, Hash)> {{operationId}}_with_http_info{{#hasParams}}({{^vendorExtensions.x-group-parameters}}{{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}opts{{/vendorExtensions.x-group-parameters}}){{/hasParams}} ```ruby begin {{#summary}}# {{{.}}}{{/summary}} - data, status_code, headers = api_instance.{{{operationId}}}_with_http_info{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}} + data, status_code, headers = api_instance.{{{operationId}}}_with_http_info{{#hasParams}}({{^vendorExtensions.x-group-parameters}}{{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}opts{{/vendorExtensions.x-group-parameters}}){{/hasParams}} p status_code # => 2xx p headers # => { ... } p data # => {{#returnType}}{{#returnTypeIsPrimitive}}{{returnType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}<{{{returnType}}}>{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}nil{{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/base_object.mustache b/modules/openapi-generator/src/main/resources/ruby-client/base_object.mustache index 00a8e35b88f7..4a8a88e8750b 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/base_object.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/base_object.mustache @@ -13,6 +13,7 @@ {{#parent}} super(attributes) {{/parent}} + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache index efd628c53900..46319a3cdb9a 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache @@ -84,17 +84,11 @@ module {{moduleName}} attr_accessor :client_side_validation {{^isFaraday}} -{{> configuration_tls_typhoeus_partial}} +{{> configuration_typhoeus_partial}} {{/isFaraday}} {{#isFaraday}} -{{> configuration_tls_faraday_partial}} +{{> configuration_faraday_partial}} {{/isFaraday}} - # Set this to customize parameters encoding of array parameter with multi collectionFormat. - # Default to nil. - # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 - attr_accessor :params_encoding attr_accessor :inject_format @@ -121,14 +115,17 @@ module {{moduleName}} @request_middlewares = [] @response_middlewares = [] @timeout = 60 + # return data as binary instead of file + @return_binary_data = false + @params_encoder = nil {{/isFaraday}} {{^isFaraday}} @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil {{/isFaraday}} @debugging = false @inject_format = false diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration_faraday_partial.mustache new file mode 100644 index 000000000000..83cbf9657479 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration_faraday_partial.mustache @@ -0,0 +1,40 @@ + ### TLS/SSL setting + # Set this to false to skip verifying SSL certificate when calling API from https server. + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :ssl_verify + + ### TLS/SSL setting + # Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html) + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + attr_accessor :ssl_verify_mode + + ### TLS/SSL setting + # Set this to customize the certificate file to verify the peer. + # + # @return [String] the path to the certificate file + attr_accessor :ssl_ca_file + + ### TLS/SSL setting + # Client certificate file (for client certificate) + attr_accessor :ssl_client_cert + + ### TLS/SSL setting + # Client private key file (for client certificate) + attr_accessor :ssl_client_key + + ### Proxy setting + # HTTP Proxy settings + attr_accessor :proxy + + # Set this to customize parameters encoder of array parameter. + # Default to nil. Faraday uses NestedParamsEncoder when nil. + # + # @see The params_encoder option of Faraday. Related source code: + # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders + attr_accessor :params_encoder diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration_tls_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration_tls_faraday_partial.mustache deleted file mode 100644 index 598186a7f930..000000000000 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration_tls_faraday_partial.mustache +++ /dev/null @@ -1,33 +0,0 @@ - ### TLS/SSL setting - # Set this to false to skip verifying SSL certificate when calling API from https server. - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :ssl_verify - - ### TLS/SSL setting - # Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html) - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - attr_accessor :ssl_verify_mode - - ### TLS/SSL setting - # Set this to customize the certificate file to verify the peer. - # - # @return [String] the path to the certificate file - attr_accessor :ssl_ca_file - - ### TLS/SSL setting - # Client certificate file (for client certificate) - attr_accessor :ssl_client_cert - - ### TLS/SSL setting - # Client private key file (for client certificate) - attr_accessor :ssl_client_key - - ### Proxy setting - # HTTP Proxy settings - attr_accessor :proxy diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration_tls_typhoeus_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration_tls_typhoeus_partial.mustache deleted file mode 100644 index b75954c254a9..000000000000 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration_tls_typhoeus_partial.mustache +++ /dev/null @@ -1,34 +0,0 @@ - ### TLS/SSL setting - # Set this to false to skip verifying SSL certificate when calling API from https server. - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :verify_ssl - - ### TLS/SSL setting - # Set this to false to skip verifying SSL host name - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :verify_ssl_host - - ### TLS/SSL setting - # Set this to customize the certificate file to verify the peer. - # - # @return [String] the path to the certificate file - # - # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code: - # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145 - attr_accessor :ssl_ca_cert - - ### TLS/SSL setting - # Client certificate file (for client certificate) - attr_accessor :cert_file - - ### TLS/SSL setting - # Client private key file (for client certificate) - attr_accessor :key_file diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration_typhoeus_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration_typhoeus_partial.mustache new file mode 100644 index 000000000000..b117e2030bce --- /dev/null +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration_typhoeus_partial.mustache @@ -0,0 +1,41 @@ + ### TLS/SSL setting + # Set this to false to skip verifying SSL certificate when calling API from https server. + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :verify_ssl + + ### TLS/SSL setting + # Set this to false to skip verifying SSL host name + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :verify_ssl_host + + ### TLS/SSL setting + # Set this to customize the certificate file to verify the peer. + # + # @return [String] the path to the certificate file + # + # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code: + # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145 + attr_accessor :ssl_ca_cert + + ### TLS/SSL setting + # Client certificate file (for client certificate) + attr_accessor :cert_file + + ### TLS/SSL setting + # Client private key file (for client certificate) + attr_accessor :key_file + + # Set this to customize parameters encoding of array parameter with multi collectionFormat. + # Default to nil. + # + # @see The params_encoding option of Ethon. Related source code: + # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 + attr_accessor :params_encoding diff --git a/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache index ea84291d48c4..4d5da109fb0a 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache @@ -20,7 +20,8 @@ Gem::Specification.new do |s| s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.4{{/gemRequiredRubyVersion}}" {{#isFaraday}} - s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1' + s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' + s.add_runtime_dependency 'faraday-multipart' {{/isFaraday}} {{^isFaraday}} s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache index a771f5c4090f..fba4aeda686b 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -61,10 +61,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -72,7 +72,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -96,7 +96,7 @@ uuid = {version = "0.8", features = ["serde", "v4"]} {{/apiUsesUuid}} # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} {{#apiUsesMultipartRelated}} mime_multipart = {version = "0.5", optional = true} hyper_0_10 = {package = "hyper", version = "0.10", default-features = false, optional=true} @@ -124,12 +124,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/modules/openapi-generator/src/main/resources/rust-server/client-callbacks.mustache b/modules/openapi-generator/src/main/resources/rust-server/client-callbacks.mustache index dbc63930c2d0..bafd04b1b771 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/client-callbacks.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/client-callbacks.mustache @@ -47,7 +47,7 @@ use crate::{{{operationId}}}Response; /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { {{#apiInfo}} @@ -58,7 +58,7 @@ impl RequestParser for ApiRequestParser { {{#urls}} {{#requests}} // {{{operationId}}} - {{{httpMethod}}} {{{path}}} - &hyper::Method::{{{vendorExtensions.x-http-method}}} if path.matched(paths::ID_{{{vendorExtensions.x-path-id}}}) => Ok("{{{operationId}}}"), + &hyper::Method::{{{vendorExtensions.x-http-method}}} if path.matched(paths::ID_{{{vendorExtensions.x-path-id}}}) => Some("{{{operationId}}}"), {{/requests}} {{/urls}} {{/callbacks}} @@ -66,7 +66,7 @@ impl RequestParser for ApiRequestParser { {{/operations}} {{/apis}} {{/apiInfo}} - _ => Err(()), + _ => None, } } } diff --git a/modules/openapi-generator/src/main/resources/rust-server/client-operation.mustache b/modules/openapi-generator/src/main/resources/rust-server/client-operation.mustache index a4720abcc518..768e846eb9db 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/client-operation.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/client-operation.mustache @@ -418,7 +418,7 @@ let body = response.into_body(); {{#dataType}} let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; {{#vendorExtensions}} {{#x-produces-bytes}} @@ -434,7 +434,9 @@ .map_err(|e| ApiError(format!("Response body did not match the schema: {}", e)))?; {{/x-produces-xml}} {{#x-produces-json}} - let body = serde_json::from_str::<{{{dataType}}}>(body)?; + let body = serde_json::from_str::<{{{dataType}}}>(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; {{/x-produces-json}} {{#x-produces-plain-text}} let body = body.to_string(); @@ -477,7 +479,7 @@ let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache b/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache index ce006321f6e5..960449f04375 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use {{{externCrateName}}}::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { diff --git a/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache b/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache index a7f6a9e4ecec..a96a4fa976cd 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache @@ -15,5 +15,5 @@ { let context = context.clone(); info!("{{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}({{#allParams}}{{#vendorExtensions}}{{{x-format-string}}}{{/vendorExtensions}}{{^-last}}, {{/-last}}{{/allParams}}) - X-Span-ID: {:?}"{{#allParams}}, {{{paramName}}}{{/allParams}}, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-callbacks.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-callbacks.mustache index 51ae0fcadd9b..2c95e530895d 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-callbacks.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-callbacks.mustache @@ -100,7 +100,7 @@ impl Client; +type HttpsConnector = hyper_tls::HttpsConnector; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] type HttpsConnector = hyper_openssl::HttpsConnector; diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache index 609db38999e1..d38f3b5b3dae 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache @@ -26,7 +26,7 @@ pub mod callbacks; /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { {{#apiInfo}} @@ -34,12 +34,12 @@ impl RequestParser for ApiRequestParser { {{#operations}} {{#operation}} // {{{operationId}}} - {{{httpMethod}}} {{{path}}} - &hyper::Method::{{{vendorExtensions.x-http-method}}} if path.matched(paths::ID_{{{vendorExtensions.x-path-id}}}) => Ok("{{{operationId}}}"), + &hyper::Method::{{{vendorExtensions.x-http-method}}} if path.matched(paths::ID_{{{vendorExtensions.x-path-id}}}) => Some("{{{operationId}}}"), {{/operation}} {{/operations}} {{/apis}} {{/apiInfo}} - _ => Err(()), + _ => None, } } } diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-operation.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-operation.mustache index cbb812e4f26d..0560d72e7dbe 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-operation.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-operation.mustache @@ -209,7 +209,7 @@ // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { {{#vendorExtensions}} @@ -279,7 +279,7 @@ // Form Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw(); + let result = body.into_raw(); match result.await { Ok(body) => { use std::io::Read; @@ -368,7 +368,7 @@ // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw(); + let result = body.into_raw(); match result.await { Ok(body) => { let mut unused_elements: Vec = vec![]; diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache index 485b707dfd30..6ce43458d06a 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache @@ -65,13 +65,70 @@ libraryDependencies += "{{{groupId}}}" % "{{{artifactId}}}" % "{{{artifactVersio ## Getting Started +Please follow the [installation](#installation) instruction and execute the following Java code: + +```scala +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +import {{invokerPackage}}._ +import {{modelPackage}}._ +import {{{package}}}.{{{classname}}} + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object {{{classname}}}Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher{{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + implicit val {{{name}}}: BasicCredentials = BasicCredentials("YOUR USERNAME", "YOUR PASSWORD"){{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + implicit val {{{name}}}: BearerToken = BearerToken("BEARER TOKEN"){{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + implicit val {{{name}}}: ApiKeyValue = ApiKeyValue("YOUR API KEY"){{/isApiKey}} + {{/authMethods}} + {{/hasAuthMethods}} + + // Create invoker to execute requests + val apiInvoker = ApiInvoker() + val apiInstance = {{{classname}}}("{{{basePath}}}"){{#allParams}} + val {{{paramName}}}: {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} + {{/allParams}} + + val request = apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(org.openapitools.client.core.ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}"){{#returnType}} + System.out.println(s"Response body: $content"){{/returnType}} + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}") + exception.printStackTrace(); + } + +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + ## Documentation for API Endpoints All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/api_doc.mustache new file mode 100644 index 000000000000..29a1e7985df5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/api_doc.mustache @@ -0,0 +1,114 @@ +# {{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +> {{operationId}}({{#hasParams}}{{operationId}}Request{{/hasParams}}): ApiRequest[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}] + +{{summary}}{{#notes}} + +{{.}}{{/notes}} + +### Example + +```scala +// Import classes: +{{#imports}} +import {{import}} +{{/imports}} +import {{invokerPackage}}._ +import {{invokerPackage}}.CollectionFormats._ +import {{invokerPackage}}.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + implicit val {{{name}}}: BasicCredentials = BasicCredentials("YOUR USERNAME", "YOUR PASSWORD"){{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + implicit val {{{name}}}: BearerToken = BearerToken("BEARER TOKEN"){{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + implicit val {{{name}}}: ApiKeyValue = ApiKeyValue("YOUR API KEY"){{/isApiKey}} + {{/authMethods}} + {{/hasAuthMethods}} + + val apiInvoker = ApiInvoker() + val apiInstance = {{{classname}}}("{{{basePath}}}"){{#allParams}} + val {{{paramName}}}: {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} + {{/allParams}} + + val request = apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}"){{#returnType}} + System.out.println(s"Response body: $content"){{/returnType}} + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}") + exception.printStackTrace(); + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{/allParams}} + +### Return type + +{{#returnType}}ApiRequest[{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}]{{/returnType}} +{{^returnType}}ApiRequest[Unit] (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}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
    {{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache index 68280bd9a36b..25ec73e8d5e1 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache @@ -1 +1 @@ -"{{baseName}}", {{#isContainer}}ArrayValues({{{paramName}}}{{#collectionFormat}}, {{collectionFormat.toUpperCase}}{{/collectionFormat}}){{/isContainer}}{{^isContainer}}{{{paramName}}}{{/isContainer}} \ No newline at end of file +"{{baseName}}", {{#isContainer}}ArrayValues({{{paramName}}}{{#collectionFormat}}, {{collectionFormat.toUpperCase}}{{/collectionFormat}}){{/isContainer}}{{^isContainer}}{{{paramName}}}{{/isContainer}}.toString \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache index 7890f0113397..dc69d0c0b451 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Models.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache @@ -35,14 +35,14 @@ extension CaseIterableDefaultsLast { /// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) /// or not encoded (`.encodeNothing`). Intended for request payloads. -public enum NullEncodable: Hashable { +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum NullEncodable: Hashable { case encodeNothing case encodeNull case encodeValue(Wrapped) } extension NullEncodable: Codable where Wrapped: Codable { - public init(from decoder: Decoder) throws { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() if let value = try? container.decode(Wrapped.self) { self = .encodeValue(value) @@ -53,7 +53,7 @@ extension NullEncodable: Codable where Wrapped: Codable { } } - public func encode(to encoder: Encoder) throws { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { case .encodeNothing: return diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache index e235cd372001..ab55655f3b08 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ private var credentialStore = SynchronizedDictionary() May be overridden by a subclass if you want to control the URLSession configuration. */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLSession() -> URLSession { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ private var credentialStore = SynchronizedDictionary() May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index dee0ffaf3a4c..4a07877991ad 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -123,8 +123,7 @@ export class {{classname}} { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString(){{^isDateTime}}.substr(0, 10)){{/isDateTime}}; + httpParams = httpParams.append(key, (value as Date).toISOString(){{^isDateTime}}.substr(0, 10){{/isDateTime}}); } else { throw Error("key may not be null if value is Date"); } diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache index 37be6a77b98e..fdf4deea5f53 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache @@ -18,6 +18,6 @@ }, "devDependencies": { "tslint": "^3.15.1", - "typescript": "^2.4 || ^3.0" + "typescript": "^4.0" } } diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache index 06da8db77a66..6444507b8ebe 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache @@ -5,7 +5,7 @@ */ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#additionalPropertiesType}} - [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; + [key: string]: {{{additionalPropertiesType}}}{{^additionalPropertiesIsAnyType}}{{#hasVars}} | any{{/hasVars}}{{/additionalPropertiesIsAnyType}}; {{/additionalPropertiesType}} {{#vars}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index 8fb030634644..128715ed059b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -18,11 +18,11 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.21.4" + "axios": "^0.26.1" }, "devDependencies": { "@types/node": "^12.11.5", - "typescript": "^3.6.4" + "typescript": "^4.0" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig": { 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 a34af7338dcc..b5d8ec3638f1 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -365,10 +365,11 @@ export class {{classname}} extends runtime.BaseAPI { {{#operation}} {{#allParams}} {{#isEnum}} +{{#stringEnums}} /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum {{operationIdCamelCase}}{{enumName}} { {{#allowableValues}} {{#enumVars}} @@ -376,6 +377,20 @@ export enum {{operationIdCamelCase}}{{enumName}} { {{/enumVars}} {{/allowableValues}} } +{{/stringEnums}} +{{^stringEnums}} +/** + * @export + */ +export const {{operationIdCamelCase}}{{enumName}} = { +{{#allowableValues}} + {{#enumVars}} + {{{name}}}: {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} +{{/allowableValues}} +} as const; +export type {{operationIdCamelCase}}{{enumName}} = typeof {{operationIdCamelCase}}{{enumName}}[keyof typeof {{operationIdCamelCase}}{{enumName}}]; +{{/stringEnums}} {{/isEnum}} {{/allParams}} {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnumInterfaces.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnumInterfaces.mustache index 1679554d3583..5e5ea85ca30c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnumInterfaces.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnumInterfaces.mustache @@ -1,3 +1,4 @@ +{{#stringEnums}} /** * {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}} * @export @@ -9,4 +10,18 @@ export enum {{classname}} { {{{name}}} = {{{value}}}{{^-last}},{{/-last}} {{/enumVars}} {{/allowableValues}} -} \ No newline at end of file +} +{{/stringEnums}}{{^stringEnums}} +/** + * {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}} + * @export + */ +export const {{classname}} = { +{{#allowableValues}} +{{#enumVars}} + {{{name}}}: {{{value}}}{{^-last}},{{/-last}} +{{/enumVars}} +{{/allowableValues}} +} as const; +export type {{classname}} = typeof {{classname}}[keyof typeof {{classname}}]; +{{/stringEnums}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache index f75eb0a0c5f4..d669ea3ee91c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache @@ -22,6 +22,7 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#vars}} {{#isEnum}} +{{#stringEnums}} /** * @export * @enum {string} @@ -32,4 +33,18 @@ export enum {{classname}}{{enumName}} { {{{name}}} = {{{value}}}{{^-last}},{{/-last}} {{/enumVars}} {{/allowableValues}} -}{{/isEnum}}{{/vars}}{{/hasEnums}} \ No newline at end of file +} +{{/stringEnums}}{{^stringEnums}} +/** + * @export + */ +export const {{classname}}{{enumName}} = { +{{#allowableValues}} + {{#enumVars}} + {{{name}}}: {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} +{{/allowableValues}} +} as const; +export type {{classname}}{{enumName}} = typeof {{classname}}{{enumName}}[keyof typeof {{classname}}{{enumName}}]; +{{/stringEnums}} +{{/isEnum}}{{/vars}}{{/hasEnums}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache index c082bbf39828..3242ad7e236d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache @@ -9,10 +9,13 @@ {{^packageAsSourceOnlyLibrary}} "main": "./dist/index.js", "typings": "./dist/index.d.ts", +{{#supportsES6}} + "module": "./dist/esm/index.js", + "sideEffects": false, +{{/supportsES6}} "scripts": { - "build": "tsc"{{^sagasAndRecords}}, - "prepare": "npm run build" -{{/sagasAndRecords}} + "build": "tsc{{#supportsES6}} && tsc -p tsconfig.esm.json{{/supportsES6}}"{{^sagasAndRecords}}, + "prepare": "npm run build"{{/sagasAndRecords}} }, {{/packageAsSourceOnlyLibrary}} "devDependencies": { @@ -23,7 +26,7 @@ "redux-ts-simple": "^3.2.0", "reselect": "^4.0.0", {{/sagasAndRecords}} - "typescript": "^{{#typescriptThreePlus}}3.9.5{{/typescriptThreePlus}}{{^typescriptThreePlus}}2.4{{/typescriptThreePlus}}" + "typescript": "^4.0" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig": { 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 b9029f5fb0fa..04626ace9afa 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -4,6 +4,77 @@ export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -13,7 +84,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -39,7 +110,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -103,6 +174,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -117,72 +195,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = {{#typescriptThreePlus}}WindowOrWorkerGlobalScope{{/typescriptThreePlus}}{{^typescriptThreePlus}}GlobalFetch{{/typescriptThreePlus}}['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; @@ -204,10 +217,12 @@ export interface RequestOpts { body?: HTTPBody; } +{{^withoutRuntimeChecks}} export function exists(json: any, key: string) { const value = json[key]; return value !== null && value !== undefined; } +{{/withoutRuntimeChecks}} export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) @@ -231,12 +246,14 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } +{{^withoutRuntimeChecks}} export function mapValues(data: any, fn: (item: any) => any) { return Object.keys(data).reduce( (acc, key) => ({ ...acc, [key]: fn(data[key]) }), {} ); } +{{/withoutRuntimeChecks}} export function canConsumeForm(consumes: Consume[]): boolean { for (const consume of consumes) { diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.esm.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.esm.mustache new file mode 100644 index 000000000000..2c0331cce040 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.esm.mustache @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache index cba64d11771c..13bd8b9cd510 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache @@ -15,7 +15,7 @@ }, "devDependencies": { "@types/jquery": "^3.1", - "typescript": "^2.4" + "typescript": "^4.0" }{{#npmRepository}}, "publishConfig": { "registry": "{{npmRepository}}" diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache index 55bd81ca901c..210ebafb4a96 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache @@ -46,7 +46,7 @@ "ts-node": "8.3.0", "tsconfig-paths": "3.8.0", "tslint": "5.18.0", - "typescript": "3.5.3", + "typescript": "^4.0", "wait-on": "^3.2.0" }, "jest": { diff --git a/modules/openapi-generator/src/main/resources/typescript-node/package.mustache b/modules/openapi-generator/src/main/resources/typescript-node/package.mustache index 3679a80fadd9..47b53f66c91c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/package.mustache @@ -15,13 +15,13 @@ "dependencies": { "bluebird": "^3.5.0", "request": "^2.81.0", - "@types/bluebird": "3.5.33", - "@types/request": "*", "rewire": "^3.0.2" }, "devDependencies": { - "typescript": "^2.4.2", - "@types/node": "8.10.34" + "@types/bluebird": "^3.5.33", + "@types/node": "^12", + "@types/request": "^2.48.8", + "typescript": "^4.0" }{{#npmRepository}}, "publishConfig": { "registry": "{{npmRepository}}" diff --git a/modules/openapi-generator/src/main/resources/typescript-redux-query/package.mustache b/modules/openapi-generator/src/main/resources/typescript-redux-query/package.mustache index 3e42f9a4f668..b0fdd30a34e1 100644 --- a/modules/openapi-generator/src/main/resources/typescript-redux-query/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-redux-query/package.mustache @@ -13,7 +13,7 @@ "redux-query": "^3.2.0" }, "devDependencies": { - "typescript": "^3.0" + "typescript": "^4.0" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig": { diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 0ca805593105..8b1adeb71556 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -4,14 +4,14 @@ import {Configuration} from '../configuration{{extensionForDeno}}'; import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http{{extensionForDeno}}'; {{#platforms}} {{#node}} -import * as FormData from "form-data"; +import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data"; import { URLSearchParams } from 'url'; {{/node}} {{/platforms}} import {ObjectSerializer} from '../models/ObjectSerializer{{extensionForDeno}}'; import {ApiException} from './exception{{extensionForDeno}}'; import {canConsumeForm, isCodeInRange} from '../util{{extensionForDeno}}'; -import {SecurityAuthentication} from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth{{extensionForDeno}}'; {{#useInversify}} import { injectable } from "inversify"; diff --git a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache index 09ff0ca2bb9a..20db6609fc98 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -1,8 +1,8 @@ -// typings for btoa are incorrect {{#platforms}} {{#node}} +// typings for btoa are incorrect //@ts-ignore -import * as btoa from "btoa"; +import {{^supportsES6}}* as{{/supportsES6}} btoa from "btoa"; {{/node}} {{/platforms}} import { RequestContext } from "../http/http{{extensionForDeno}}"; diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index 2f66d4b8996e..52fdb8754f21 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -1,7 +1,7 @@ {{#platforms}} {{#node}} // TODO: evaluate if we can easily get rid of this library -import * as FormData from "form-data"; +import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data"; import { URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; @@ -9,9 +9,7 @@ import * as https from 'https'; {{/platforms}} {{#platforms}} {{^deno}} -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import {{^supportsES6}}* as{{/supportsES6}} URLParse from "url-parse"; {{/deno}} {{/platforms}} import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; diff --git a/modules/openapi-generator/src/main/resources/typescript/index.mustache b/modules/openapi-generator/src/main/resources/typescript/index.mustache index b19f7f9348a9..24fe1285226e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/index.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/index.mustache @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration{{extensionForDeno}}" export{{#platforms}}{{#deno}} type{{/deno}}{{/platforms}} { Configuration } from "./configuration{{extensionForDeno}}" export * from "./apis/exception{{extensionForDeno}}"; export * from "./servers{{extensionForDeno}}"; +export { RequiredError } from "./apis/baseapi{{extensionForDeno}}"; {{#useRxJS}} export { Middleware } from './middleware{{extensionForDeno}}'; diff --git a/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache index b5c84fc43ca3..d1ba83e6946b 100644 --- a/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache @@ -169,7 +169,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index 807989026b14..a307fa9aa983 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -11,6 +11,16 @@ ], "license": "Unlicense", "main": "./dist/index.js", + {{#supportsES6}} + "type": "module", + "module": "./dist/index.js", + {{/supportsES6}} + {{^supportsES6}} + "type": "commonjs", + {{/supportsES6}} + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -51,7 +61,8 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig":{ diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index 011a217eb063..b7aa518c46e4 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -2,8 +2,13 @@ "compilerOptions": { "strict": true, /* Basic Options */ - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", - "module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}", + {{#supportsES6}} + "target": "es6", + "esModuleInterop": true, + {{/supportsES6}} + {{^supportsES6}} + "target": "es5", + {{/supportsES6}} "moduleResolution": "node", "declaration": true, 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 7aec2aad6b0d..c9c354643b92 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 @@ -36,6 +36,8 @@ import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.templating.mustache.CamelCaseLambda; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.templating.mustache.LowercaseLambda; @@ -44,6 +46,7 @@ import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.SemVer; import org.testng.Assert; +import org.testng.annotations.Ignore; import org.testng.annotations.Test; import java.io.File; @@ -447,7 +450,7 @@ public void testAdditionalPropertiesV3SpecDisallowAdditionalPropertiesIfNotPrese // extended with any undeclared properties. Schema addProps = ModelUtils.getAdditionalProperties(openAPI, componentSchema); Assert.assertNotNull(addProps); - Assert.assertTrue(addProps instanceof ObjectSchema); + Assert.assertEquals(addProps, new Schema()); CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", componentSchema); Assert.assertNotNull(cm.getAdditionalProperties()); @@ -492,7 +495,7 @@ public void testAdditionalPropertiesV3SpecDisallowAdditionalPropertiesIfNotPrese Assert.assertNull(map_with_undeclared_properties_anytype_1_sc.getAdditionalProperties()); addProps = ModelUtils.getAdditionalProperties(openAPI, map_with_undeclared_properties_anytype_1_sc); Assert.assertNotNull(addProps); - Assert.assertTrue(addProps instanceof ObjectSchema); + Assert.assertEquals(addProps, new Schema()); Assert.assertNotNull(map_with_undeclared_properties_anytype_1_cp.getAdditionalProperties()); // map_with_undeclared_properties_anytype_2 @@ -502,7 +505,7 @@ public void testAdditionalPropertiesV3SpecDisallowAdditionalPropertiesIfNotPrese Assert.assertNull(map_with_undeclared_properties_anytype_2_sc.getAdditionalProperties()); addProps = ModelUtils.getAdditionalProperties(openAPI, map_with_undeclared_properties_anytype_2_sc); Assert.assertNotNull(addProps); - Assert.assertTrue(addProps instanceof ObjectSchema); + Assert.assertEquals(addProps, new Schema()); Assert.assertNotNull(map_with_undeclared_properties_anytype_2_cp.getAdditionalProperties()); // map_with_undeclared_properties_anytype_3 @@ -515,7 +518,7 @@ public void testAdditionalPropertiesV3SpecDisallowAdditionalPropertiesIfNotPrese Assert.assertEquals(map_with_undeclared_properties_anytype_3_sc.getAdditionalProperties(), Boolean.TRUE); addProps = ModelUtils.getAdditionalProperties(openAPI, map_with_undeclared_properties_anytype_3_sc); Assert.assertNotNull(addProps); - Assert.assertTrue(addProps instanceof ObjectSchema); + Assert.assertEquals(addProps, new Schema()); Assert.assertNotNull(map_with_undeclared_properties_anytype_3_cp.getAdditionalProperties()); // empty_map @@ -776,8 +779,8 @@ public void updateCodegenPropertyEnumWithoutPrefixRemoved() { @Test public void postProcessModelsEnumWithPrefixRemoved() { final DefaultCodegen codegen = new DefaultCodegen(); - Map objs = codegenModel(Arrays.asList("animal_dog", "animal_cat")); - CodegenModel cm = (CodegenModel) ((Map) ((List) objs.get("models")).get(0)).get("model"); + ModelsMap objs = codegenModel(Arrays.asList("animal_dog", "animal_cat")); + CodegenModel cm = objs.getModels().get(0).getModel(); codegen.postProcessModelsEnum(objs); @@ -795,8 +798,8 @@ public void postProcessModelsEnumWithPrefixRemoved() { public void postProcessModelsEnumWithoutPrefixRemoved() { final DefaultCodegen codegen = new DefaultCodegen(); codegen.setRemoveEnumValuePrefix(false); - Map objs = codegenModel(Arrays.asList("animal_dog", "animal_cat")); - CodegenModel cm = (CodegenModel) ((Map) ((List) objs.get("models")).get(0)).get("model"); + ModelsMap objs = codegenModel(Arrays.asList("animal_dog", "animal_cat")); + CodegenModel cm = objs.getModels().get(0).getModel(); codegen.postProcessModelsEnum(objs); @@ -813,8 +816,8 @@ public void postProcessModelsEnumWithoutPrefixRemoved() { @Test public void postProcessModelsEnumWithExtension() { final DefaultCodegen codegen = new DefaultCodegen(); - Map objs = codegenModelWithXEnumVarName(); - CodegenModel cm = (CodegenModel) ((Map) ((List) objs.get("models")).get(0)).get("model"); + ModelsMap objs = codegenModelWithXEnumVarName(); + CodegenModel cm = objs.getModels().get(0).getModel(); codegen.postProcessModelsEnum(objs); @@ -1514,10 +1517,9 @@ private void verifyMyPetsDiscriminator(CodegenDiscriminator discriminator) { assertEquals(discriminator, test); } - public CodegenModel getModel(List allModels, String modelName) { - for (Object obj: allModels) { - HashMap hm = (HashMap) obj; - CodegenModel cm = (CodegenModel) hm.get("model"); + public CodegenModel getModel(List allModels, String modelName) { + for (ModelMap obj: allModels) { + CodegenModel cm = obj.getModel(); if (modelName.equals(cm.name)) { return cm; } @@ -1546,7 +1548,7 @@ public void verifyXDiscriminatorValue() { // because children are assigned in config.updateAllModels which is invoked in generator.generateModels List files = new ArrayList<>(); List filteredSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI); - List allModels = new ArrayList<>(); + List allModels = new ArrayList<>(); generator.generateModels(files, allModels, filteredSchemas); // check that the model's children contain the x-discriminator-values @@ -2017,18 +2019,17 @@ private CodegenProperty codegenPropertyWithXEnumVarName(List values, Lis return var; } - private Map codegenModel(List values) { + private ModelsMap codegenModel(List values) { final CodegenModel cm = new CodegenModel(); cm.isEnum = true; final HashMap allowableValues = new HashMap<>(); allowableValues.put("values", values); cm.setAllowableValues(allowableValues); cm.dataType = "String"; - Map objs = Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm))); - return objs; + return TestUtils.createCodegenModelWrapper(cm); } - private Map codegenModelWithXEnumVarName() { + private ModelsMap codegenModelWithXEnumVarName() { final CodegenModel cm = new CodegenModel(); cm.isEnum = true; final HashMap allowableValues = new HashMap<>(); @@ -2042,8 +2043,7 @@ private Map codegenModelWithXEnumVarName() { extensions.put("x-enum-descriptions", descriptions); cm.setVendorExtensions(extensions); cm.setVars(Collections.emptyList()); - Map objs = Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm))); - return objs; + return TestUtils.createCodegenModelWrapper(cm); } @Test @@ -2371,7 +2371,9 @@ public void testUseOneOfInterfaces() { ); // for the array schema, assert that a oneOf interface was added to schema map Schema items = ((ArraySchema) openAPI.getComponents().getSchemas().get("CustomOneOfArraySchema")).getItems(); - Assert.assertEquals(items.getExtensions().get("x-one-of-name"), "CustomOneOfArraySchemaOneOf"); + Assert.assertEquals(items.get$ref(), "#/components/schemas/CustomOneOfArraySchema_inner"); + Schema innerItem = openAPI.getComponents().getSchemas().get("CustomOneOfArraySchema_inner"); + Assert.assertEquals(innerItem.getExtensions().get("x-one-of-name"), "CustomOneOfArraySchemaInner"); } @Test @@ -2770,6 +2772,26 @@ public void testAdditionalPropertiesPresentInResponses() { } } + @Test + public void testAdditionalPropertiesAnyType() { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_9282.yaml"); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + CodegenProperty anyTypeSchema = codegen.fromProperty("", new Schema()); + + Schema sc; + CodegenModel cm; + + sc = openAPI.getComponents().getSchemas().get("AdditionalPropertiesTrue"); + cm = codegen.fromModel("AdditionalPropertiesTrue", sc); + assertEquals(cm.getVars().get(0).additionalProperties, anyTypeSchema); + + sc = openAPI.getComponents().getSchemas().get("AdditionalPropertiesAnyType"); + cm = codegen.fromModel("AdditionalPropertiesAnyType", sc); + assertEquals(cm.getVars().get(0).additionalProperties, anyTypeSchema); + } + @Test public void testIsXPresence() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_7651.yaml"); @@ -3220,14 +3242,18 @@ public void testHasVarsInProperty() { String modelName; modelName = "ArrayWithObjectWithPropsInItems"; - sc = openAPI.getComponents().getSchemas().get(modelName); + ArraySchema as = (ArraySchema) openAPI.getComponents().getSchemas().get(modelName); + assertEquals("#/components/schemas/ArrayWithObjectWithPropsInItems_inner", as.getItems().get$ref()); + sc = openAPI.getComponents().getSchemas().get("ArrayWithObjectWithPropsInItems_inner"); cm = codegen.fromModel(modelName, sc); - assertTrue(cm.getItems().getHasVars()); + assertTrue(cm.getHasVars()); modelName = "ObjectWithObjectWithPropsInAdditionalProperties"; - sc = openAPI.getComponents().getSchemas().get(modelName); + MapSchema ms = (MapSchema) openAPI.getComponents().getSchemas().get(modelName); + assertEquals("#/components/schemas/ArrayWithObjectWithPropsInItems_inner", as.getItems().get$ref()); + sc = openAPI.getComponents().getSchemas().get("ArrayWithObjectWithPropsInItems_inner"); cm = codegen.fromModel(modelName, sc); - assertTrue(cm.getAdditionalProperties().getHasVars()); + assertTrue(cm.getHasVars()); } @Test @@ -3666,6 +3692,7 @@ public void testRemoveOperationIdPrefix() { } @Test + @Ignore public void testComposedPropertyTypes() { DefaultCodegen codegen = new DefaultCodegen(); final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml"); @@ -3674,6 +3701,8 @@ public void testComposedPropertyTypes() { modelName = "ObjectWithComposedProperties"; CodegenModel m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + /* TODO inline allOf schema are created as separate models and the following assumptions that + the properties are non-model are no longer valid and need to be revised assertTrue(m.vars.get(0).getIsMap()); assertTrue(m.vars.get(1).getIsNumber()); assertTrue(m.vars.get(2).getIsUnboundedInteger()); @@ -3682,6 +3711,7 @@ public void testComposedPropertyTypes() { assertTrue(m.vars.get(5).getIsArray()); assertTrue(m.vars.get(6).getIsNull()); assertTrue(m.vars.get(7).getIsAnyType()); + */ } @Test @@ -4053,11 +4083,16 @@ public void testResponseContentAndHeader() { CodegenResponse cr = co.responses.get(0); List responseHeaders = cr.getResponseHeaders(); - assertEquals(1, responseHeaders.size()); - CodegenParameter header = responseHeaders.get(0); - assertEquals("X-Rate-Limit", header.baseName); - assertTrue(header.isUnboundedInteger); - assertEquals(header.getSchema().baseName, "X-Rate-Limit"); + assertEquals(2, responseHeaders.size()); + CodegenParameter header1 = responseHeaders.get(0); + assertEquals("X-Rate-Limit", header1.baseName); + assertTrue(header1.isUnboundedInteger); + assertEquals(header1.getSchema().baseName, "X-Rate-Limit"); + + CodegenParameter header2 = responseHeaders.get(1); + assertEquals("X-Rate-Limit-Ref", header2.baseName); + assertTrue(header2.isUnboundedInteger); + assertEquals(header2.getSchema().baseName, "X-Rate-Limit-Ref"); content = cr.getContent(); assertEquals(content.keySet(), new HashSet<>(Arrays.asList("application/json", "text/plain"))); @@ -4090,4 +4125,4 @@ public void testResponseContentAndHeader() { assertEquals(cp.baseName, "SchemaFor201ResponseBodyTextPlain"); assertTrue(cp.isString); } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java index c66f51825b93..778d1d889bb0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java @@ -13,6 +13,8 @@ import io.swagger.v3.oas.models.responses.ApiResponses; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; @@ -459,7 +461,7 @@ public void testBuiltinLibraryTemplates() throws IOException { List files = generator.opts(clientOptInput).generate(); - Assert.assertEquals(files.size(), 26); + Assert.assertEquals(files.size(), 27); // Generator should report a library templated file as a generated file TestUtils.ensureContainsFile(files, output, "src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt"); @@ -501,7 +503,7 @@ public void testBuiltinNonLibraryTemplates() throws IOException { List files = generator.opts(clientOptInput).generate(); - Assert.assertEquals(files.size(), 26); + Assert.assertEquals(files.size(), 27); // Generator should report README.md as a generated file TestUtils.ensureContainsFile(files, output, "README.md"); @@ -566,7 +568,7 @@ public void testCustomLibraryTemplates() throws IOException { List files = generator.opts(clientOptInput).generate(); - Assert.assertEquals(files.size(), 26); + Assert.assertEquals(files.size(), 27); // Generator should report a library templated file as a generated file TestUtils.ensureContainsFile(files, output, "src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt"); @@ -620,7 +622,7 @@ public void testCustomNonLibraryTemplates() throws IOException { List files = generator.opts(clientOptInput).generate(); - Assert.assertEquals(files.size(), 26); + Assert.assertEquals(files.size(), 27); // Generator should report README.md as a generated file TestUtils.ensureContainsFile(files, output, "README.md"); @@ -651,9 +653,9 @@ public void testHandlesTrailingSlashInServers() { List files = new ArrayList<>(); List filteredSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI); - List allModels = new ArrayList<>(); + List allModels = new ArrayList<>(); generator.generateModels(files, allModels, filteredSchemas); - List allOperations = new ArrayList<>(); + List allOperations = new ArrayList<>(); generator.generateApis(files, allOperations, allModels); Map bundle = generator.buildSupportFileBundle(allOperations, allModels); @@ -677,9 +679,9 @@ public void testHandlesRelativeUrlsInServers() { List files = new ArrayList<>(); List filteredSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI); - List allModels = new ArrayList<>(); + List allModels = new ArrayList<>(); generator.generateModels(files, allModels, filteredSchemas); - List allOperations = new ArrayList<>(); + List allOperations = new ArrayList<>(); generator.generateApis(files, allOperations, allModels); Map bundle = generator.buildSupportFileBundle(allOperations, allModels); @@ -759,7 +761,7 @@ public void testRecursionBug4650() { List files = new ArrayList<>(); List filteredSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI); - List allModels = new ArrayList<>(); + List allModels = new ArrayList<>(); // The bug causes a StackOverflowError when calling generateModels generator.generateModels(files, allModels, filteredSchemas); // all fine, we have passed 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 fb0109d84f43..3ac23d849eff 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 @@ -340,9 +340,10 @@ public void resolveInlineArraySchemaWithTitle() { assertTrue(openAPI.getComponents().getSchemas().get("Users") instanceof ArraySchema); ArraySchema users = (ArraySchema) openAPI.getComponents().getSchemas().get("Users"); - assertTrue(users.getItems() instanceof ObjectSchema); + assertTrue(users.getItems() instanceof Schema); + assertEquals("#/components/schemas/User", users.getItems().get$ref()); - ObjectSchema user = (ObjectSchema) users.getItems(); + ObjectSchema user = (ObjectSchema) openAPI.getComponents().getSchemas().get("User"); assertEquals("User", user.getTitle()); assertTrue(user.getProperties().get("street") instanceof StringSchema); assertTrue(user.getProperties().get("city") instanceof StringSchema); @@ -753,16 +754,16 @@ public void arbitraryObjectModelWithArrayInlineWithoutTitle() { assertTrue(openAPI.getComponents().getSchemas().get("ArbitraryObjectModelWithArrayInlineWithoutTitle") instanceof ArraySchema); ArraySchema schema = (ArraySchema) openAPI.getComponents().getSchemas().get("ArbitraryObjectModelWithArrayInlineWithoutTitle"); - assertTrue(schema.getItems() instanceof ObjectSchema); + assertTrue(schema.getItems() instanceof Schema); + assertEquals(schema.getItems().get$ref(), "#/components/schemas/ArbitraryObjectModelWithArrayInlineWithoutTitle_inner"); - ObjectSchema items = (ObjectSchema) schema.getItems(); + ObjectSchema items = (ObjectSchema) openAPI.getComponents().getSchemas().get("ArbitraryObjectModelWithArrayInlineWithoutTitle_inner"); assertTrue(items.getProperties().get("arbitrary_object_model_with_array_inline_without_title") instanceof ObjectSchema); ObjectSchema itemsProperty = (ObjectSchema) items.getProperties().get("arbitrary_object_model_with_array_inline_without_title"); assertNull(itemsProperty.getProperties()); } - private void checkComposedChildren(OpenAPI openAPI, List children, String key) { assertNotNull(children); Schema inlined = children.get(0); @@ -897,10 +898,10 @@ public void arbitraryObjectModelWithArrayInlineWithTitle() { assertTrue(openAPI.getComponents().getSchemas().get("ArbitraryObjectModelWithArrayInlineWithTitle") instanceof ArraySchema); ArraySchema schema = (ArraySchema) openAPI.getComponents().getSchemas().get("ArbitraryObjectModelWithArrayInlineWithTitle"); - assertTrue(schema.getItems() instanceof ObjectSchema); + assertTrue(schema.getItems() instanceof Schema); + assertEquals(schema.getItems().get$ref(), "#/components/schemas/ArbitraryObjectModelWithArrayInlineWithTitleInner"); - ObjectSchema items = (ObjectSchema) schema.getItems(); - // TODO: Fix the model as referenced schema which named with the title value + ObjectSchema items = (ObjectSchema) openAPI.getComponents().getSchemas().get("ArbitraryObjectModelWithArrayInlineWithTitleInner"); assertEquals("ArbitraryObjectModelWithArrayInlineWithTitleInner", items.getTitle()); assertTrue(items.getProperties().get("arbitrary_object_model_with_array_inline_with_title") instanceof ObjectSchema); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java index 35de2c3ce210..9b53ebe6266a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java @@ -20,6 +20,9 @@ import org.apache.commons.io.IOUtils; import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile; +import org.openapitools.codegen.java.assertions.JavaFileAssert; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.openrewrite.maven.internal.RawPom; import org.testng.Assert; @@ -31,11 +34,14 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; +import com.google.common.collect.ImmutableMap; + public class TestUtils { /** @@ -237,4 +243,109 @@ public static void assertFileNotExists(Path path) { assertTrue(true); } } + + public static void assertExtraAnnotationFiles(String baseOutputPath) { + + JavaFileAssert.assertThat(java.nio.file.Paths.get(baseOutputPath + "/EmployeeEntity.java")) + .assertTypeAnnotations() + .containsWithName("javax.persistence.Entity") + .containsWithNameAndAttributes("javax.persistence.Table", ImmutableMap.of("name", "\"employees\"")) + .toType() + .hasProperty("assignments") + .assertPropertyAnnotations() + .containsWithNameAndAttributes("javax.persistence.OneToMany", ImmutableMap.of("mappedBy", "\"employee\"")) + .toProperty() + .toType(); + + JavaFileAssert.assertThat(java.nio.file.Paths.get(baseOutputPath + "/Employee.java")) + .assertTypeAnnotations() + .containsWithName("javax.persistence.MappedSuperclass") + .toType() + .hasProperty("id") + .assertPropertyAnnotations() + .containsWithName("javax.persistence.Id") + .toProperty() + .toType() + .hasProperty("email") + .assertPropertyAnnotations() + .containsWithName("org.hibernate.annotations.Formula") + .toProperty() + .toType() + .hasProperty("hasAcceptedTerms") + .assertPropertyAnnotations() + .containsWithName("javax.persistence.Transient") + .toProperty() + .toType(); + + JavaFileAssert.assertThat(java.nio.file.Paths.get(baseOutputPath + "/SurveyGroupEntity.java")) + .assertTypeAnnotations() + .containsWithName("javax.persistence.Entity") + .containsWithNameAndAttributes("javax.persistence.Table", ImmutableMap.of("name", "\"survey_groups\"")) + .toType() + .hasProperty("assignments") + .assertPropertyAnnotations() + .containsWithName("javax.persistence.OneToMany") + .containsWithNameAndAttributes("javax.persistence.JoinColumn", ImmutableMap.of("name", "\"survey_group_id\"")) + .toProperty() + .toType() + .hasProperty("disabled") + .assertPropertyAnnotations() + .containsWithNameAndAttributes("javax.persistence.Column", ImmutableMap.of("nullable", "false")) + .toProperty() + .toType(); + + JavaFileAssert.assertThat(java.nio.file.Paths.get(baseOutputPath + "/SurveyGroup.java")) + .assertTypeAnnotations() + .containsWithName("javax.persistence.MappedSuperclass") + .containsWithName("javax.persistence.EntityListeners") + .toType() + .hasProperty("id") + .assertPropertyAnnotations() + .containsWithName("javax.persistence.Id") + .containsWithNameAndAttributes("javax.persistence.GeneratedValue", ImmutableMap.of("generator", "\"UUID\"")) + .containsWithNameAndAttributes("org.hibernate.annotations.GenericGenerator", ImmutableMap.of("name", "\"UUID\"","strategy", "\"org.hibernate.id.UUIDGenerator\"")) + .containsWithNameAndAttributes("javax.persistence.Column", ImmutableMap.of("name", "\"id\"","updatable", "false","nullable", "false")) + .toProperty() + .toType() + .hasProperty("createdDate") + .assertPropertyAnnotations() + .containsWithName("org.springframework.data.annotation.CreatedDate") + .toProperty() + .toType() + .hasProperty("createdBy") + .assertPropertyAnnotations() + .containsWithName("org.springframework.data.annotation.CreatedBy") + .toProperty() + .toType() + .hasProperty("modifiedDate") + .assertPropertyAnnotations() + .containsWithName("org.springframework.data.annotation.LastModifiedDate") + .toProperty() + .toType() + .hasProperty("modifiedBy") + .assertPropertyAnnotations() + .containsWithName("org.springframework.data.annotation.LastModifiedBy") + .toProperty() + .toType() + .hasProperty("opportunityId") + .assertPropertyAnnotations() + .containsWithNameAndAttributes("javax.persistence.Column", ImmutableMap.of("unique", "true")) + .toProperty() + .toType() + .hasProperty("submissionStatus") + .assertPropertyAnnotations() + .containsWithName("javax.persistence.Transient") + .toProperty() + .toType(); + } + + public static ModelsMap createCodegenModelWrapper(CodegenModel cm) { + ModelsMap objs = new ModelsMap(); + List modelMaps = new ArrayList<>(); + ModelMap modelMap = new ModelMap(); + modelMap.setModel(cm); + modelMaps.add(modelMap); + objs.setModels(modelMaps); + return objs; + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp-netcore-functions/CsharpNetcoreFunctionsServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp-netcore-functions/CsharpNetcoreFunctionsServerCodegenTest.java index a62b73e7fae3..0160f52d987b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp-netcore-functions/CsharpNetcoreFunctionsServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp-netcore-functions/CsharpNetcoreFunctionsServerCodegenTest.java @@ -27,11 +27,11 @@ public void testToEnumVarName() throws Exception { final CsharpNetcoreFunctionsServerCodegen codegen = new CsharpNetcoreFunctionsServerCodegen(); codegen.processOpts(); - Assert.assertEquals(codegen.toEnumVarName("FooBar", "string"), "FooBar"); - Assert.assertEquals(codegen.toEnumVarName("fooBar", "string"), "FooBar"); - Assert.assertEquals(codegen.toEnumVarName("foo-bar", "string"), "FooBar"); - Assert.assertEquals(codegen.toEnumVarName("foo_bar", "string"), "FooBar"); - Assert.assertEquals(codegen.toEnumVarName("foo bar", "string"), "FooBar"); + Assert.assertEquals(codegen.toEnumVarName("FooBar", "string"), "FooBarEnum"); + Assert.assertEquals(codegen.toEnumVarName("fooBar", "string"), "FooBarEnum"); + Assert.assertEquals(codegen.toEnumVarName("foo-bar", "string"), "FooBarEnum"); + Assert.assertEquals(codegen.toEnumVarName("foo_bar", "string"), "FooBarEnum"); + Assert.assertEquals(codegen.toEnumVarName("foo bar", "string"), "FooBarEnum"); // The below cases do not work currently, camelize doesn't support uppercase // Assert.assertEquals(codegen.toEnumVarName("FOO-BAR", "string"), "FooBar"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java index 5d76dbcac8e5..03848b4f802b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java @@ -17,12 +17,13 @@ package org.openapitools.codegen.dart; +import static org.openapitools.codegen.TestUtils.createCodegenModelWrapper; + import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.*; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.DartClientCodegen; -import org.openapitools.codegen.languages.DartDioClientCodegen; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -460,7 +461,7 @@ public void testEnumValues() { OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); - codegen.postProcessModels(Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm)))); + codegen.postProcessModels(createCodegenModelWrapper(cm)); final CodegenProperty property1 = cm.vars.get(0); Assert.assertEquals(property1.baseName, "testStringEnum"); @@ -523,7 +524,7 @@ public void testXEnumValuesExtension() { OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); - codegen.postProcessModels(Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm)))); + codegen.postProcessModels(createCodegenModelWrapper(cm)); final CodegenProperty property1 = cm.vars.get(0); Assert.assertEquals(property1.baseName, "testIntEnum"); @@ -563,29 +564,4 @@ public void dateTest() { Assert.assertEquals(op.returnType, "DateTime"); Assert.assertEquals(op.bodyParam.dataType, "DateTime"); } - - @Test(description = "correctly generate date/datetime default values, currently null") - public void dateDefaultValues() { - final DateSchema date = new DateSchema(); - date.setDefault("2021-01-01"); - final DateTimeSchema dateTime = new DateTimeSchema(); - dateTime.setDefault("2021-01-01T14:00:00Z"); - final Schema model = new Schema() - .description("a sample model") - .addProperties("date", date) - .addProperties("dateTime", dateTime) - .addProperties("mapNoDefault", new MapSchema()); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - final CodegenProperty dateDefault = cm.vars.get(0); - Assert.assertEquals(dateDefault.name, "date"); - Assert.assertNull(dateDefault.defaultValue); - - final CodegenProperty dateTimeDefault = cm.vars.get(1); - Assert.assertEquals(dateTimeDefault.name, "dateTime"); - Assert.assertNull(dateTimeDefault.defaultValue); - } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java deleted file mode 100644 index c395fba38d4a..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.dart.dio; - -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.languages.DartDioClientCodegen; -import org.testng.Assert; -import org.testng.annotations.Test; - -public class DartDioClientCodegenTest { - - @Test - public void testInitialConfigValues() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE); - Assert.assertTrue(codegen.isHideGenerationTimestamp()); - } - - @Test - public void testSettersForConfigValues() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - codegen.setHideGenerationTimestamp(false); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); - Assert.assertFalse(codegen.isHideGenerationTimestamp()); - } - - @Test - public void testAdditionalPropertiesPutForConfigValues() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, false); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); - Assert.assertFalse(codegen.isHideGenerationTimestamp()); - } - - @Test - public void testKeywords() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - - List reservedWordsList = new ArrayList(); - try { - BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("src/main/resources/dart/dart-keywords.txt"), StandardCharsets.UTF_8)); - while(reader.ready()) { reservedWordsList.add(reader.readLine()); } - reader.close(); - } catch (Exception e) { - String errorString = String.format(Locale.ROOT, "Error reading dart keywords: %s", e); - Assert.fail(errorString, e); - } - - Assert.assertTrue(reservedWordsList.size() > 20); - Assert.assertEquals(codegen.reservedWords().size(), reservedWordsList.size()); - for(String keyword : reservedWordsList) { - // reserved words are stored in lowercase - Assert.assertTrue(codegen.reservedWords().contains(keyword.toLowerCase(Locale.ROOT)), String.format(Locale.ROOT, "%s, part of %s, was not found in %s", keyword, reservedWordsList, codegen.reservedWords().toString())); - } - } - -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java deleted file mode 100644 index 9008b713bb00..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.dart.dio; - -import org.openapitools.codegen.AbstractOptionsTest; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.languages.DartDioClientCodegen; -import org.openapitools.codegen.options.DartDioClientOptionsProvider; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -public class DartDioClientOptionsTest extends AbstractOptionsTest { - private DartDioClientCodegen clientCodegen = mock(DartDioClientCodegen.class, mockSettings); - - public DartDioClientOptionsTest() { - super(new DartDioClientOptionsProvider()); - } - - @Override - protected CodegenConfig getCodegenConfig() { - return clientCodegen; - } - - @SuppressWarnings("unused") - @Override - protected void verifyOptions() { - verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(DartDioClientOptionsProvider.SORT_PARAMS_VALUE)); - verify(clientCodegen).setPubLibrary(DartDioClientOptionsProvider.PUB_LIBRARY_VALUE); - verify(clientCodegen).setPubName(DartDioClientOptionsProvider.PUB_NAME_VALUE); - verify(clientCodegen).setPubVersion(DartDioClientOptionsProvider.PUB_VERSION_VALUE); - verify(clientCodegen).setPubDescription(DartDioClientOptionsProvider.PUB_DESCRIPTION_VALUE); - //verify(clientCodegen).setPubAuthor(DartDioClientOptionsProvider.PUB_AUTHOR_VALUE); - //verify(clientCodegen).setPubAuthorEmail(DartDioClientOptionsProvider.PUB_AUTHOR_EMAIL_VALUE); - //verify(clientCodegen).setPubHomepage(DartDioClientOptionsProvider.PUB_HOMEPAGE_VALUE); - verify(clientCodegen).setSourceFolder(DartDioClientOptionsProvider.SOURCE_FOLDER_VALUE); - verify(clientCodegen).setUseEnumExtension(Boolean.parseBoolean(DartDioClientOptionsProvider.USE_ENUM_EXTENSION)); - verify(clientCodegen).setDateLibrary(DartDioClientOptionsProvider.DATE_LIBRARY); - verify(clientCodegen).setNullableFields(Boolean.parseBoolean(DartDioClientOptionsProvider.NULLABLE_FIELDS)); - verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(DartDioClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE)); - } -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java deleted file mode 100644 index d645046b2dfe..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.dart.dio; - -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.ArraySchema; -import io.swagger.v3.oas.models.media.DateSchema; -import io.swagger.v3.oas.models.media.DateTimeSchema; -import io.swagger.v3.oas.models.media.IntegerSchema; -import io.swagger.v3.oas.models.media.MapSchema; -import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.media.StringSchema; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.DefaultCodegen; -import org.openapitools.codegen.TestUtils; -import org.openapitools.codegen.languages.DartDioClientCodegen; -import org.testng.Assert; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -@SuppressWarnings("static-method") -public class DartDioModelTest { - - @Test(description = "convert a simple php model") - public void simpleModelTest() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("id", new IntegerSchema()) - .addProperties("name", new StringSchema()) - .addProperties("createdAt", new DateTimeSchema()) - .addRequiredItem("id") - .addRequiredItem("name"); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 3); - // {{imports}} is not used in template - //Assert.assertEquals(cm.imports.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "int"); - Assert.assertEquals(property1.name, "id"); - Assert.assertNull(property1.defaultValue); - Assert.assertEquals(property1.baseType, "int"); - Assert.assertTrue(property1.required); - Assert.assertTrue(property1.isPrimitiveType); - Assert.assertFalse(property1.isContainer); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "name"); - Assert.assertEquals(property2.dataType, "String"); - Assert.assertEquals(property2.name, "name"); - Assert.assertNull(property2.defaultValue); - Assert.assertEquals(property2.baseType, "String"); - Assert.assertTrue(property2.required); - Assert.assertTrue(property2.isPrimitiveType); - Assert.assertFalse(property2.isContainer); - - final CodegenProperty property3 = cm.vars.get(2); - Assert.assertEquals(property3.baseName, "createdAt"); - Assert.assertEquals(property3.complexType, "DateTime"); - Assert.assertEquals(property3.dataType, "DateTime"); - Assert.assertEquals(property3.name, "createdAt"); - Assert.assertNull(property3.defaultValue); - Assert.assertEquals(property3.baseType, "DateTime"); - Assert.assertFalse(property3.required); - Assert.assertFalse(property3.isContainer); - } - - @Test(description = "convert a simple dart-dit model with datelibrary") - public void simpleModelWithTimeMachineTest() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("id", new IntegerSchema()) - .addProperties("name", new StringSchema()) - .addProperties("createdAt", new DateTimeSchema()) - .addProperties("birthDate", new DateSchema()) - .addRequiredItem("id") - .addRequiredItem("name"); - - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - codegen.additionalProperties().put(DartDioClientCodegen.DATE_LIBRARY, "timemachine"); - codegen.setDateLibrary("timemachine"); - codegen.processOpts(); - - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 4); - // {{imports}} is not used in template - //Assert.assertEquals(cm.imports.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "int"); - Assert.assertEquals(property1.name, "id"); - Assert.assertNull(property1.defaultValue); - Assert.assertEquals(property1.baseType, "int"); - Assert.assertTrue(property1.required); - Assert.assertTrue(property1.isPrimitiveType); - Assert.assertFalse(property1.isContainer); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "name"); - Assert.assertEquals(property2.dataType, "String"); - Assert.assertEquals(property2.name, "name"); - Assert.assertNull(property2.defaultValue); - Assert.assertEquals(property2.baseType, "String"); - Assert.assertTrue(property2.required); - Assert.assertTrue(property2.isPrimitiveType); - Assert.assertFalse(property2.isContainer); - - final CodegenProperty property3 = cm.vars.get(2); - Assert.assertEquals(property3.baseName, "createdAt"); - Assert.assertEquals(property3.complexType, "OffsetDateTime"); - Assert.assertEquals(property3.dataType, "OffsetDateTime"); - Assert.assertEquals(property3.name, "createdAt"); - Assert.assertNull(property3.defaultValue); - Assert.assertEquals(property3.baseType, "OffsetDateTime"); - Assert.assertFalse(property3.required); - Assert.assertFalse(property3.isContainer); - - final CodegenProperty property4 = cm.vars.get(3); - Assert.assertEquals(property4.baseName, "birthDate"); - Assert.assertEquals(property4.complexType, "OffsetDate"); - Assert.assertEquals(property4.dataType, "OffsetDate"); - Assert.assertEquals(property4.name, "birthDate"); - Assert.assertNull(property4.defaultValue); - Assert.assertEquals(property4.baseType, "OffsetDate"); - Assert.assertFalse(property4.required); - Assert.assertFalse(property4.isContainer); - } - - @Test(description = "convert a model with list property") - public void listPropertyTest() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("id", new IntegerSchema()) - .addProperties("urls", new ArraySchema() - .items(new StringSchema())) - .addRequiredItem("id"); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 2); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "int"); - Assert.assertEquals(property1.name, "id"); - Assert.assertNull(property1.defaultValue); - Assert.assertEquals(property1.baseType, "int"); - Assert.assertTrue(property1.required); - Assert.assertTrue(property1.isPrimitiveType); - Assert.assertFalse(property1.isContainer); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "urls"); - Assert.assertEquals(property2.dataType, "BuiltList"); - Assert.assertEquals(property2.name, "urls"); - Assert.assertEquals(property2.baseType, "BuiltList"); - Assert.assertEquals(property2.containerType, "array"); - Assert.assertFalse(property2.required); - Assert.assertTrue(property2.isPrimitiveType); - Assert.assertTrue(property2.isContainer); - } - - @Test(description = "convert a model with set property") - public void setPropertyTest() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("id", new IntegerSchema()) - .addProperties("urls", new ArraySchema().items(new StringSchema()).uniqueItems(true)) - .addRequiredItem("id"); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 2); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "int"); - Assert.assertEquals(property1.name, "id"); - Assert.assertNull(property1.defaultValue); - Assert.assertEquals(property1.baseType, "int"); - Assert.assertTrue(property1.required); - Assert.assertTrue(property1.isPrimitiveType); - Assert.assertFalse(property1.isContainer); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "urls"); - Assert.assertEquals(property2.dataType, "BuiltSet"); - Assert.assertEquals(property2.name, "urls"); - Assert.assertEquals(property2.baseType, "BuiltSet"); - Assert.assertEquals(property2.containerType, "set"); - Assert.assertFalse(property2.required); - Assert.assertTrue(property2.isPrimitiveType); - Assert.assertTrue(property2.isContainer); - } - - @Test(description = "convert a model with a map property") - public void mapPropertyTest() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("translations", new MapSchema() - .additionalProperties(new StringSchema())) - .addRequiredItem("id"); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "translations"); - Assert.assertEquals(property1.dataType, "BuiltMap"); - Assert.assertEquals(property1.name, "translations"); - Assert.assertEquals(property1.baseType, "BuiltMap"); - Assert.assertEquals(property1.containerType, "map"); - Assert.assertFalse(property1.required); - Assert.assertTrue(property1.isContainer); - Assert.assertTrue(property1.isPrimitiveType); - } - - @Test(description = "convert a model with complex property") - public void complexPropertyTest() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("children", new Schema().$ref("#/definitions/Children")); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "children"); - Assert.assertEquals(property1.dataType, "Children"); - Assert.assertEquals(property1.name, "children"); - Assert.assertEquals(property1.baseType, "Children"); - Assert.assertFalse(property1.required); - Assert.assertFalse(property1.isContainer); - } - - @Test(description = "convert a model with complex list property") - public void complexListProperty() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("children", new ArraySchema() - .items(new Schema().$ref("#/definitions/Children"))); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "children"); - Assert.assertEquals(property1.dataType, "BuiltList"); - Assert.assertEquals(property1.name, "children"); - Assert.assertEquals(property1.baseType, "BuiltList"); - Assert.assertEquals(property1.containerType, "array"); - Assert.assertFalse(property1.required); - Assert.assertTrue(property1.isContainer); - } - - @Test(description = "convert a model with complex map property") - public void complexMapSchema() { - final Schema model = new Schema() - .description("a sample model") - .addProperties("children", new MapSchema() - .additionalProperties(new Schema().$ref("#/definitions/Children"))); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 1); - // {{imports}} is not used in template - //Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "children"); - Assert.assertEquals(property1.complexType, "Children"); - Assert.assertEquals(property1.dataType, "BuiltMap"); - Assert.assertEquals(property1.name, "children"); - Assert.assertEquals(property1.baseType, "BuiltMap"); - Assert.assertEquals(property1.containerType, "map"); - Assert.assertFalse(property1.required); - Assert.assertTrue(property1.isContainer); - } - - @Test(description = "convert an array model") - public void arrayModelTest() { - final Schema model = new ArraySchema() - .items(new Schema().$ref("#/definitions/Children")) - .description("an array model"); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(model.getDescription(), "an array model"); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertTrue(cm.isArray); - Assert.assertEquals(cm.description, "an array model"); - Assert.assertEquals(cm.vars.size(), 0); - } - - @Test(description = "convert a map model") - public void mapModelTest() { - final Schema model = new Schema() - .description("a map model") - .additionalProperties(new Schema().$ref("#/definitions/Children")); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a map model"); - Assert.assertEquals(cm.vars.size(), 0); - } - - @DataProvider(name = "modelNames") - public static Object[][] modelNames() { - return new Object[][] { - {"EnumClass", "TestModelEnumClass"}, - {"JsonObject", "TestModelJsonObject"} - }; - } - - @Test(dataProvider = "modelNames", description = "correctly prefix reserved model names") - public void modelNameTest(String name, String expectedName) { - OpenAPI openAPI = TestUtils.createOpenAPI(); - final Schema model = new Schema(); - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - codegen.setOpenAPI(openAPI); - codegen.typeMapping().put("EnumClass", "TestModelEnumClass"); - codegen.typeMapping().put("JsonObject", "TestModelJsonObject"); - final CodegenModel cm = codegen.fromModel(name, model); - - Assert.assertEquals(cm.name, name); - Assert.assertEquals(cm.classname, expectedName); - } - - @DataProvider(name = "modelNamesTimemachine") - public static Object[][] modelNamesTimemachine() { - return new Object[][] { - {"EnumClass", "TestModelEnumClass"}, - {"JsonObject", "TestModelJsonObject"}, - {"OffsetDate", "TestModelOffsetDate"}, - }; - } - - @Test(dataProvider = "modelNamesTimemachine", description = "correctly prefix reserved model names") - public void modelNameTestTimemachine(String name, String expectedName) { - OpenAPI openAPI = TestUtils.createOpenAPI(); - final Schema model = new Schema(); - final DartDioClientCodegen codegen = new DartDioClientCodegen(); - codegen.setDateLibrary("timemachine"); - codegen.processOpts(); - codegen.typeMapping().put("EnumClass", "TestModelEnumClass"); - codegen.typeMapping().put("JsonObject", "TestModelJsonObject"); - codegen.typeMapping().put("OffsetDate", "TestModelOffsetDate"); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel(name, model); - - Assert.assertEquals(cm.name, name); - Assert.assertEquals(cm.classname, expectedName); - } - - @Test(description = "correctly generate collection default values") - public void collectionDefaultValues() { - final ArraySchema array = new ArraySchema(); - array.setDefault("[]"); - final Schema model = new Schema() - .description("a sample model") - .addProperties("arrayNoDefault", new ArraySchema()) - .addProperties("arrayEmptyDefault", array) - .addProperties("mapNoDefault", new MapSchema()); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - final CodegenProperty arrayNoDefault = cm.vars.get(0); - Assert.assertEquals(arrayNoDefault.name, "arrayNoDefault"); - Assert.assertNull(arrayNoDefault.defaultValue); - - final CodegenProperty arrayEmptyDefault = cm.vars.get(1); - Assert.assertEquals(arrayEmptyDefault.name, "arrayEmptyDefault"); - Assert.assertEquals(arrayEmptyDefault.defaultValue, "ListBuilder()"); - - final CodegenProperty mapNoDefault = cm.vars.get(2); - Assert.assertEquals(mapNoDefault.name, "mapNoDefault"); - Assert.assertNull(mapNoDefault.defaultValue); - } - - @Test(description = "correctly generate date/datetime default values, currently null") - public void dateDefaultValues() { - final DateSchema date = new DateSchema(); - date.setDefault("2021-01-01"); - final DateTimeSchema dateTime = new DateTimeSchema(); - dateTime.setDefault("2021-01-01T14:00:00Z"); - final Schema model = new Schema() - .description("a sample model") - .addProperties("date", date) - .addProperties("dateTime", dateTime) - .addProperties("mapNoDefault", new MapSchema()); - final DefaultCodegen codegen = new DartDioClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - final CodegenProperty dateDefault = cm.vars.get(0); - Assert.assertEquals(dateDefault.name, "date"); - Assert.assertNull(dateDefault.defaultValue); - - final CodegenProperty dateTimeDefault = cm.vars.get(1); - Assert.assertEquals(dateTimeDefault.name, "dateTime"); - Assert.assertNull(dateTimeDefault.defaultValue); - } -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java index 1d0e81d23608..3b574fcafa42 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java @@ -17,7 +17,6 @@ package org.openapitools.codegen.dart.dio; import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.languages.DartDioClientCodegen; import org.openapitools.codegen.languages.DartDioNextClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -25,7 +24,6 @@ import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; @@ -44,7 +42,7 @@ public void testInitialConfigValues() throws Exception { @Test public void testSettersForConfigValues() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); + final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); codegen.setHideGenerationTimestamp(false); codegen.processOpts(); @@ -54,7 +52,7 @@ public void testSettersForConfigValues() throws Exception { @Test public void testAdditionalPropertiesPutForConfigValues() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); + final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, false); codegen.processOpts(); @@ -63,10 +61,10 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception { } @Test - public void testKeywords() throws Exception { - final DartDioClientCodegen codegen = new DartDioClientCodegen(); + public void testKeywords() { + final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); - List reservedWordsList = new ArrayList(); + List reservedWordsList = new ArrayList<>(); try { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("src/main/resources/dart/dart-keywords.txt"), StandardCharsets.UTF_8)); while(reader.ready()) { reservedWordsList.add(reader.readLine()); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/fsharp/FSharpServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/fsharp/FSharpServerCodegenTest.java index c53b804c8521..a62bb0013c4c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/fsharp/FSharpServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/fsharp/FSharpServerCodegenTest.java @@ -15,12 +15,15 @@ */ package org.openapitools.codegen.fsharp; +import static org.openapitools.codegen.TestUtils.createCodegenModelWrapper; + import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.languages.AbstractFSharpCodegen; import org.openapitools.codegen.languages.FsharpGiraffeServerCodegen; +import org.openapitools.codegen.model.ModelsMap; import org.testng.Assert; import org.testng.annotations.Test; -import java.util.Collections; + import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -34,33 +37,33 @@ public void testModelsAreSortedAccordingToDependencyOrder() throws Exception { final AbstractFSharpCodegen codegen = new P_AbstractFSharpCodegen(); final CodegenModel wheel = new CodegenModel(); - wheel.setImports(new HashSet(Arrays.asList())); + wheel.setImports(new HashSet<>(Arrays.asList())); wheel.setClassname("wheel"); final CodegenModel bike = new CodegenModel(); - bike.setImports(new HashSet(Arrays.asList("wheel"))); + bike.setImports(new HashSet<>(Arrays.asList("wheel"))); bike.setClassname("bike"); final CodegenModel parent = new CodegenModel(); - parent.setImports(new HashSet(Arrays.asList("bike", "car"))); + parent.setImports(new HashSet<>(Arrays.asList("bike", "car"))); parent.setClassname("parent"); final CodegenModel car = new CodegenModel(); - car.setImports(new HashSet(Arrays.asList("wheel"))); + car.setImports(new HashSet<>(Arrays.asList("wheel"))); car.setClassname("car"); final CodegenModel child = new CodegenModel(); - child.setImports(new HashSet(Arrays.asList("car", "bike", "parent"))); + child.setImports(new HashSet<>(Arrays.asList("car", "bike", "parent"))); child.setClassname("child"); - Map models = new HashMap(); - models.put("parent", Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", parent)))); - models.put("child", Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", child)))); - models.put("car", Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", car)))); - models.put("bike", Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", bike)))); - models.put("wheel", Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", wheel)))); + Map models = new HashMap<>(); + models.put("parent", createCodegenModelWrapper(parent)); + models.put("child", createCodegenModelWrapper(child)); + models.put("car", createCodegenModelWrapper(car)); + models.put("bike", createCodegenModelWrapper(bike)); + models.put("wheel", createCodegenModelWrapper(wheel)); - Map sorted = codegen.postProcessDependencyOrders(models); + Map sorted = codegen.postProcessDependencyOrders(models); Object[] keys = sorted.keySet().toArray(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/AbstractGoCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/AbstractGoCodegenTest.java index 4bb8762268df..c232ff4d8eaa 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/AbstractGoCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/AbstractGoCodegenTest.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.IntegerSchema; import io.swagger.v3.oas.models.media.MapSchema; +import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; @@ -90,6 +91,13 @@ public void getTypeDeclarationTest() { ModelUtils.setGenerateAliasAsModel(true); defaultValue = codegen.getTypeDeclaration(schema); Assert.assertEquals(defaultValue, "map[string]NestedArray"); + + // Create object schema with additionalProperties set to true + schema = new ObjectSchema().additionalProperties(Boolean.TRUE); + + ModelUtils.setGenerateAliasAsModel(false); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "map[string]interface{}"); } private static class P_AbstractGoCodegen extends AbstractGoCodegen { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java index ca5271746d47..78926a0cc41d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java @@ -19,13 +19,25 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; + import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.languages.GoClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; +import org.testng.annotations.Ignore; + public class GoClientCodegenTest { @@ -109,4 +121,62 @@ public void testFilenames() throws Exception { Assert.assertEquals(codegen.toApiFilename("Animal Farm Test"), "api_animal_farm_test_"); } + @Test + public void testPrimitiveTypeInOneOf() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("go") + .setInputSpec("src/test/resources/3_0/oneOf_primitive.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + System.out.println(files); + files.forEach(File::deleteOnExit); + + Path modelFile = Paths.get(output + "/model_example.go"); + TestUtils.assertFileContains(modelFile, "Child *Child"); + TestUtils.assertFileContains(modelFile, "Int32 *int32"); + TestUtils.assertFileContains(modelFile, "dst.Int32"); + TestUtils.assertFileNotContains(modelFile, "int32 *int32"); + TestUtils.assertFileNotContains(modelFile, "dst.int32"); + } + + @Test + public void testNullableComposition() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("go") + .setInputSpec("src/test/resources/3_0/allOf_nullable.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + TestUtils.assertFileContains(Paths.get(output + "/model_example.go"), "Child NullableChild"); + } + + @Test + public void testMultipleRequiredPropertiesHasSameOneOfObject() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("go") + .setInputSpec("src/test/resources/3_0/petstore-multiple-required-properties-has-same-oneOf-object.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + System.out.println(files); + files.forEach(File::deleteOnExit); + + Path docFile = Paths.get(output + "/docs/PetApi.md"); + TestUtils.assertFileContains(docFile, "openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}, openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}, openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}"); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaCXFClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaCXFClientCodegenTest.java index abe7aee34117..b2e7cf66993c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaCXFClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaCXFClientCodegenTest.java @@ -29,6 +29,8 @@ import org.openapitools.codegen.languages.features.GzipTestFeatures; import org.openapitools.codegen.languages.features.LoggingTestFeatures; import org.openapitools.codegen.languages.features.UseGenericResponseFeatures; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.testng.Assert; import org.testng.annotations.Test; @@ -52,9 +54,12 @@ public void responseWithoutContent() throws Exception { final JavaCXFClientCodegen codegen = new JavaCXFClientCodegen(); final CodegenOperation co = codegen.fromOperation("getAllPets", "GET", operation, null); - Map objs = new HashMap<>(); - objs.put("operations", Collections.singletonMap("operation", Collections.singletonList(co))); - objs.put("imports", Collections.emptyList()); + OperationMap operationMap = new OperationMap(); + operationMap.setOperation(co); + + OperationsMap objs = new OperationsMap(); + objs.setOperation(operationMap); + objs.setImports(Collections.emptyList()); codegen.postProcessOperationsWithModels(objs, Collections.emptyList()); Assert.assertEquals(co.responses.size(), 2); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index ce1e65289122..f3c64cfd172f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -20,6 +20,7 @@ import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.File; import java.io.IOException; @@ -37,6 +38,7 @@ import java.util.Locale; import java.util.Map; import java.util.Optional; +import java.util.function.Function; import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -53,8 +55,13 @@ import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.AbstractJavaCodegen; import org.openapitools.codegen.languages.JavaClientCodegen; +import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.languages.features.CXFServerFeatures; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.testng.Assert; import org.testng.annotations.Ignore; import org.testng.annotations.Test; @@ -131,10 +138,13 @@ public void testParametersAreCorrectlyOrderedWhenUsingRetrofit() { CodegenParameter pathParam1 = createPathParam("pathParam1"); CodegenParameter pathParam2 = createPathParam("pathParam2"); - codegenOperation.allParams = Arrays.asList(queryParamRequired, pathParam1, pathParam2, queryParamOptional); - Map operations = ImmutableMap.of("operation", Arrays.asList(codegenOperation)); + codegenOperation.allParams.addAll(Arrays.asList(queryParamRequired, pathParam1, pathParam2, queryParamOptional)); + OperationMap operations = new OperationMap(); + operations.setOperation(codegenOperation); - Map objs = ImmutableMap.of("operations", operations, "imports", new ArrayList>()); + OperationsMap objs = new OperationsMap(); + objs.setOperation(operations); + objs.setImports(new ArrayList<>()); javaClientCodegen.postProcessOperationsWithModels(objs, Collections.emptyList()); @@ -1309,4 +1319,254 @@ public void testNativeClientExplodedQueryParamObject() throws IOException { "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxWaitSecs\", queryObject.getMaxWaitSecs()));" ); } + + @Test + public void testExtraAnnotationsNative() throws IOException { + testExtraAnnotations(JavaClientCodegen.NATIVE); + } + + @Test + public void testExtraAnnotationsJersey1() throws IOException { + testExtraAnnotations(JavaClientCodegen.JERSEY1); + } + + @Test + public void testExtraAnnotationsJersey2() throws IOException { + testExtraAnnotations(JavaClientCodegen.JERSEY2); + } + + @Test + public void testExtraAnnotationsMicroprofile() throws IOException { + testExtraAnnotations(JavaClientCodegen.MICROPROFILE); + } + + @Test + public void testExtraAnnotationsOKHttpGSON() throws IOException { + testExtraAnnotations(JavaClientCodegen.OKHTTP_GSON); + } + + @Test + public void testExtraAnnotationsVertx() throws IOException { + testExtraAnnotations(JavaClientCodegen.VERTX); + } + + @Test + public void testExtraAnnotationsFeign() throws IOException { + testExtraAnnotations(JavaClientCodegen.FEIGN); + } + + @Test + public void testExtraAnnotationsRetrofit2() throws IOException { + testExtraAnnotations(JavaClientCodegen.RETROFIT_2); + } + + @Test + public void testExtraAnnotationsRestTemplate() throws IOException { + testExtraAnnotations(JavaClientCodegen.RESTTEMPLATE); + } + + @Test + public void testExtraAnnotationsWebClient() throws IOException { + testExtraAnnotations(JavaClientCodegen.WEBCLIENT); + } + + @Test + public void testExtraAnnotationsRestEasy() throws IOException { + testExtraAnnotations(JavaClientCodegen.RESTEASY); + } + + @Test + public void testExtraAnnotationsGoogleApiClient() throws IOException { + testExtraAnnotations(JavaClientCodegen.GOOGLE_API_CLIENT); + } + + @Test + public void testExtraAnnotationsRestAssured() throws IOException { + testExtraAnnotations(JavaClientCodegen.REST_ASSURED); + } + + @Test + public void testExtraAnnotationsApache() throws IOException { + testExtraAnnotations(JavaClientCodegen.APACHE); + } + + @Test + public void testDefaultMicroprofileRestClientVersion() throws Exception { + File output = Files.createTempDirectory("test").toFile(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.MICROPROFILE) + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + + TestUtils.ensureContainsFile(files, output, "pom.xml"); + + validateJavaSourceFiles(files); + + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "2.0"); + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "1.2.1"); + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "1.8"); + TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), + "import javax."); + + output.deleteOnExit(); + } + + @Test + public void testMicroprofileRestClientVersion_1_4_1() throws Exception { + Map properties = new HashMap<>(); + properties.put(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "1.4.1"); + + File output = Files.createTempDirectory("test").toFile(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setAdditionalProperties(properties) + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.MICROPROFILE) + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + + TestUtils.ensureContainsFile(files, output, "pom.xml"); + + validateJavaSourceFiles(files); + + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "1.4.1"); + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "1.2.1"); + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "1.8"); + TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), + "import javax."); + + output.deleteOnExit(); + } + + @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Version incorrectVersion of MicroProfile Rest Client is not supported or incorrect. Supported versions are 1.4.1, 2.0, 3.0") + public void testMicroprofileRestClientIncorrectVersion() throws Exception { + Map properties = new HashMap<>(); + properties.put(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "incorrectVersion"); + + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setAdditionalProperties(properties) + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.MICROPROFILE) + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(clientOptInput).generate(); + fail("Expected an exception that did not occur"); + } + + @Test + public void testMicroprofileRestClientVersion_3_0() throws Exception { + Map properties = new HashMap<>(); + properties.put(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "3.0"); + + File output = Files.createTempDirectory("test").toFile(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setAdditionalProperties(properties) + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.MICROPROFILE) + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + + TestUtils.ensureContainsFile(files, output, "pom.xml"); + + validateJavaSourceFiles(files); + + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "3.0"); + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "3.0.4"); + TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), + "11"); + TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), + "import jakarta."); + + output.deleteOnExit(); + } + + public void testExtraAnnotations(String library) throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + Map properties = new HashMap<>(); + properties.put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(library) + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/issue_11772.yml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + generator.opts(clientOptInput).generate(); + + TestUtils.assertExtraAnnotationFiles(outputPath + "/src/main/java/org/openapitools/client/model"); + + } + + /** + * See https://github.com/OpenAPITools/openapi-generator/issues/11340 + */ + @Test + public void testReferencedHeader2() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + Map additionalProperties = new HashMap<>(); + additionalProperties.put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); + final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("java") + .setAdditionalProperties(additionalProperties) + .setInputSpec("src/test/resources/3_0/issue-11340.yaml") + .setOutputDir(output.getAbsolutePath() + .replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + + Map files = generator.opts(clientOptInput).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("DefaultApi.java")) + .assertMethod("operationWithHttpInfo") + .hasParameter("requestBody") + .assertParameterAnnotations() + .containsWithName("NotNull") + .toParameter().toMethod() + .hasParameter("xNonNullHeaderParameter") + .assertParameterAnnotations() + .containsWithName("NotNull"); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java index 615fdbf1ec42..05b53d5fa09e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java @@ -1,16 +1,22 @@ package org.openapitools.codegen.java.assertions; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; import org.assertj.core.api.ListAssert; +import org.assertj.core.util.CanIgnoreReturnValue; import com.github.javaparser.ast.expr.AnnotationExpr; -import com.github.javaparser.ast.expr.MemberValuePair; +import com.github.javaparser.ast.expr.MarkerAnnotationExpr; +import com.github.javaparser.ast.expr.NormalAnnotationExpr; +import com.github.javaparser.ast.expr.SingleMemberAnnotationExpr; import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName; +import com.google.common.collect.ImmutableMap; +@CanIgnoreReturnValue public abstract class AbstractAnnotationAssert> extends ListAssert { protected AbstractAnnotationAssert(final List annotationExpr) { @@ -37,10 +43,19 @@ public ACTUAL containsWithNameAndAttributes(final String name, final Map expectedAttributesToContains) { - final Map actualAttributes = annotation.getChildNodes().stream() - .filter(MemberValuePair.class::isInstance) - .map(MemberValuePair.class::cast) - .collect(Collectors.toMap(NodeWithSimpleName::getNameAsString, pair -> pair.getValue().toString())); + final Map actualAttributes; + if (annotation instanceof SingleMemberAnnotationExpr) { + actualAttributes = ImmutableMap.of( + "value", ((SingleMemberAnnotationExpr) annotation).getMemberValue().toString() + ); + } else if (annotation instanceof NormalAnnotationExpr) { + actualAttributes = ((NormalAnnotationExpr) annotation).getPairs().stream() + .collect(Collectors.toMap(NodeWithSimpleName::getNameAsString, pair -> pair.getValue().toString())); + } else if (annotation instanceof MarkerAnnotationExpr) { + actualAttributes = new HashMap<>(); + } else { + throw new IllegalArgumentException("Unexpected annotation expression type for: " + annotation); + } return expectedAttributesToContains.entrySet().stream() .allMatch(expected -> Objects.equals(actualAttributes.get(expected.getKey()), expected.getValue())); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java index 629a86a71b7d..3189c4086637 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java @@ -1,13 +1,16 @@ package org.openapitools.codegen.java.assertions; +import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.util.Arrays; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.Assertions; +import org.assertj.core.util.CanIgnoreReturnValue; import com.github.javaparser.StaticJavaParser; import com.github.javaparser.ast.CompilationUnit; @@ -15,6 +18,7 @@ import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.nodeTypes.NodeWithName; +@CanIgnoreReturnValue public class JavaFileAssert extends AbstractAssert { private JavaFileAssert(final CompilationUnit actual) { @@ -33,6 +37,14 @@ public static JavaFileAssert assertThat(final Path path) { } } + public static JavaFileAssert assertThat(final File file) { + try { + return new JavaFileAssert(StaticJavaParser.parse(file)); + } catch (IOException e) { + throw new RuntimeException("Exception while reading file: " + file, e); + } + } + public MethodAssert assertMethod(final String methodName, final String... paramTypes) { List methods = paramTypes.length == 0 ? actual.getType(0).getMethodsByName(methodName) @@ -71,6 +83,20 @@ public JavaFileAssert printFileContent() { return this; } + public JavaFileAssert fileContains(final String... lines) { + final String actualBody = actual.getTokenRange() + .orElseThrow(() -> new IllegalStateException("Empty file")) + .toString(); + Assertions.assertThat(actualBody) + .withFailMessage( + "File should contains lines\n====\n%s\n====\nbut actually was\n====\n%s\n====", + Arrays.stream(lines).collect(Collectors.joining(System.lineSeparator())), actualBody + ) + .contains(lines); + + return this; + } + public TypeAnnotationAssert assertTypeAnnotations() { return new TypeAnnotationAssert(this, actual.getType(0).getAnnotations()); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAnnotationAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAnnotationAssert.java index 60fc9d6f8fd0..5667e29a4dcb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAnnotationAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAnnotationAssert.java @@ -2,8 +2,11 @@ import java.util.List; +import org.assertj.core.util.CanIgnoreReturnValue; + import com.github.javaparser.ast.expr.AnnotationExpr; +@CanIgnoreReturnValue public class MethodAnnotationAssert extends AbstractAnnotationAssert { private final MethodAssert methodAssert; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAssert.java index 61ef3bdd6a20..37ab7d6028d9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/MethodAssert.java @@ -1,23 +1,31 @@ package org.openapitools.codegen.java.assertions; +import java.util.Arrays; import java.util.Optional; +import java.util.stream.Collectors; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.Assertions; +import org.assertj.core.util.CanIgnoreReturnValue; +import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.body.Parameter; +import com.github.javaparser.ast.nodeTypes.NodeWithName; +@CanIgnoreReturnValue public class MethodAssert extends AbstractAssert { private final JavaFileAssert fileAssert; + private final String methodSignature; MethodAssert(final JavaFileAssert fileAssert, final MethodDeclaration methodDeclaration) { super(methodDeclaration, MethodAssert.class); this.fileAssert = fileAssert; + this.methodSignature = methodDeclaration.getDeclarationAsString(); } - public JavaFileAssert and() { + public JavaFileAssert toFileAssert() { return fileAssert; } @@ -34,9 +42,83 @@ public MethodAssert hasReturnType(final String returnType) { public ParameterAssert hasParameter(final String paramName) { final Optional parameter = actual.getParameterByName(paramName); Assertions.assertThat(parameter) - .withFailMessage("Method %s should have parameter %s, but it doesn't", actual.getNameAsString(), paramName) + .withFailMessage("Method %s should have parameter %s, but it doesn't", methodSignature, paramName) .isPresent(); return new ParameterAssert(this, parameter.get()); } + public MethodAssert doesNotHaveParameter(final String paramName) { + Assertions.assertThat(actual.getParameterByName(paramName)) + .withFailMessage("Method %s shouldn't have parameter %s, but it does", methodSignature, paramName) + .isEmpty(); + return this; + } + + public MethodAssert bodyContainsLines(final String... lines) { + Assertions.assertThat(isWithImplementation()) + .withFailMessage("Method %s is abstract", methodSignature) + .isTrue(); + final String actualBody = actual.getTokenRange() + .orElseThrow(() -> new IllegalStateException("Not-abstract method doesn't have body")) + .toString(); + Assertions.assertThat(actualBody) + .withFailMessage( + "Method's %s body should contains lines\n====\n%s\n====\nbut actually was\n====\n%s\n====", + methodSignature, Arrays.stream(lines).collect(Collectors.joining(System.lineSeparator())), actualBody + ) + .contains(lines); + + return this; + } + + public MethodAssert doesNotHaveImplementation() { + Assertions.assertThat(isWithImplementation()) + .withFailMessage("Method %s should be abstract", methodSignature) + .isFalse(); + return this; + } + + public MethodAssert doesNotHaveComment() { + Assertions.assertThat(actual.getJavadocComment()) + .withFailMessage("Method %s shouldn't contains comment, but it does", methodSignature) + .isEmpty(); + return this; + } + + public MethodAssert commentContainsLines(final String... lines) { + Assertions.assertThat(actual.getJavadocComment()) + .withFailMessage("Method %s should contains comment, but it doesn't", methodSignature) + .isPresent(); + final String actualComment = actual.getJavadocComment().get().getContent(); + Assertions.assertThat(actualComment) + .withFailMessage( + "Method's %s comment should contains lines\n====\n%s\n====\nbut actually was\n====%s\n====", + methodSignature, Arrays.stream(lines).collect(Collectors.joining(System.lineSeparator())), actualComment + ) + .contains(lines); + + return this; + } + + public MethodAssert noneOfParameterHasAnnotation(final String annotationName) { + actual.getParameters() + .forEach( + param -> Assertions.assertThat(param.getAnnotations()) + .withFailMessage("Parameter %s contains annotation %s while it shouldn't", param.getNameAsString(), annotationName) + .extracting(NodeWithName::getNameAsString) + .doesNotContain(annotationName) + ); + + return this; + } + + private boolean isWithImplementation() { + final boolean isInterface = actual.getParentNode() + .filter(ClassOrInterfaceDeclaration.class::isInstance) + .map(ClassOrInterfaceDeclaration.class::cast) + .map(ClassOrInterfaceDeclaration::isInterface) + .orElse(false); + return !(actual.isAbstract() || (isInterface && !actual.isDefault())); + } + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAnnotationAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAnnotationAssert.java index 7348d34f04c9..184943bd4dac 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAnnotationAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAnnotationAssert.java @@ -2,8 +2,11 @@ import java.util.List; +import org.assertj.core.util.CanIgnoreReturnValue; + import com.github.javaparser.ast.expr.AnnotationExpr; +@CanIgnoreReturnValue public class ParameterAnnotationAssert extends AbstractAnnotationAssert { private final ParameterAssert parameterAssert; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAssert.java index 6fe73ce5899d..a6a4a732cc96 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/ParameterAssert.java @@ -2,9 +2,11 @@ import org.assertj.core.api.Assertions; import org.assertj.core.api.ObjectAssert; +import org.assertj.core.util.CanIgnoreReturnValue; import com.github.javaparser.ast.body.Parameter; +@CanIgnoreReturnValue public class ParameterAssert extends ObjectAssert { private final MethodAssert methodAssert; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAnnotationAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAnnotationAssert.java index 3db06d49aed5..92636a907300 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAnnotationAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAnnotationAssert.java @@ -2,8 +2,11 @@ import java.util.List; +import org.assertj.core.util.CanIgnoreReturnValue; + import com.github.javaparser.ast.expr.AnnotationExpr; +@CanIgnoreReturnValue public class PropertyAnnotationAssert extends AbstractAnnotationAssert { private final PropertyAssert propertyAssert; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java index 476b530f4b2a..9cf733a05a82 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java @@ -2,10 +2,11 @@ import org.assertj.core.api.Assertions; import org.assertj.core.api.ObjectAssert; +import org.assertj.core.util.CanIgnoreReturnValue; import com.github.javaparser.ast.body.FieldDeclaration; -import com.github.javaparser.ast.body.Parameter; +@CanIgnoreReturnValue public class PropertyAssert extends ObjectAssert { private final JavaFileAssert javaFileAssert; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/TypeAnnotationAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/TypeAnnotationAssert.java index 286474fa29ef..f8418510049e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/TypeAnnotationAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/TypeAnnotationAssert.java @@ -2,8 +2,11 @@ import java.util.List; +import org.assertj.core.util.CanIgnoreReturnValue; + import com.github.javaparser.ast.expr.AnnotationExpr; +@CanIgnoreReturnValue public class TypeAnnotationAssert extends AbstractAnnotationAssert { private final JavaFileAssert fileAssert; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/AbstractJavaJAXRSServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/AbstractJavaJAXRSServerCodegenTest.java index bd10d0beffc1..e1c3d5f710ab 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/AbstractJavaJAXRSServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/AbstractJavaJAXRSServerCodegenTest.java @@ -23,6 +23,8 @@ import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.testng.Assert; import org.testng.annotations.Test; @@ -108,11 +110,11 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception { @Test public void testCommonPath() { final AbstractJavaJAXRSServerCodegen codegen = new P_AbstractJavaJAXRSServerCodegen(); - Map objs = new HashMap<>(); - Map> opMap = new HashMap<>(); + OperationsMap objs = new OperationsMap(); + OperationMap opMap = new OperationMap(); List operations = new ArrayList<>(); - objs.put("operations", opMap); - opMap.put("operation", operations); + objs.setOperation(opMap); + opMap.setOperation(operations); operations.add(getCo("/")); codegen.postProcessOperationsWithModels(objs, Collections.emptyList()); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFCDIServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFCDIServerCodegenTest.java index 9882ac0de0a7..6dc31e2bd489 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFCDIServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFCDIServerCodegenTest.java @@ -1,7 +1,24 @@ package org.openapitools.codegen.java.jaxrs; +import java.io.File; +import java.nio.file.Files; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen; +import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import com.google.common.collect.ImmutableMap; + +import io.swagger.parser.OpenAPIParser; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.parser.core.models.ParseOptions; public class JavaJAXRSCXFCDIServerCodegenTest extends JavaJaxrsBaseTest { @@ -9,4 +26,76 @@ public class JavaJAXRSCXFCDIServerCodegenTest extends JavaJaxrsBaseTest { public void beforeMethod() { codegen = new JavaJAXRSCXFCDIServerCodegen(); } + + @Test + public void testHandleDefaultValue_issue8535() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_8535.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("TestHeadersApi.java")) + .assertMethod("headersTest") + .hasParameter("headerNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("headerString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"true\"")); + + JavaFileAssert.assertThat(files.get("TestQueryParamsApi.java")) + .assertMethod("queryParamsTest") + .hasParameter("queryNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("queryString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"true\"")); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java index 1c3f712d1919..543861eadd53 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java @@ -4,7 +4,10 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.parser.core.models.ParseOptions; + +import org.assertj.core.api.Assertions; import org.openapitools.codegen.*; +import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.AbstractJavaCodegen; import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen; import org.openapitools.codegen.languages.JavaCXFExtServerCodegen; @@ -13,14 +16,9 @@ import org.testng.annotations.Test; import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; -import java.nio.file.Path; import java.nio.file.Paths; -import java.util.List; import java.util.Map; -import java.util.regex.Pattern; import static org.testng.Assert.*; @@ -184,33 +182,6 @@ public void beforeMethod() { codegen = new JavaCXFExtServerCodegenTester(); } - private void checkFile(Path path, boolean fileShouldExist, String... regexes) { - if (!fileShouldExist) { - assertFalse(path.toFile().exists()); - return; - } - - assertTrue(path.toFile().exists()); - - String contents = null; - try { - contents = new String(Files.readAllBytes(path), StandardCharsets.UTF_8); - } catch (IOException e) { - fail("Unable to evaluate file contents"); - } - - for (String regex : regexes) - assertTrue(Pattern.compile(regex).matcher(contents).find()); - } - - @SuppressWarnings("unchecked") - private List getOperationsList(Map templateData) { - assertTrue(templateData.get("operations") instanceof Map); - Map operations = (Map) templateData.get("operations"); - assertTrue(operations.get("operation") instanceof List); - return (List) operations.get("operation"); - } - @Test public void testAdditionalPropertiesPutForConfigValues() throws Exception { JavaCXFExtServerCodegenTester testerCodegen = (JavaCXFExtServerCodegenTester) this.codegen; @@ -379,29 +350,25 @@ public void testGenerateOperationBodyWithCodedTestData() throws Exception { DefaultGenerator generator = new DefaultGenerator(); generator.opts(input).generate(); - String reGetPetById = "(?s)(?m)public Pet getPetById\\(Long petId\\) \\{" // split - + ".*" // split - + "Pet response = new Pet\\(\\);" // split - + ".*" // split - + "return response;\\s+" // split - + "\\}"; // split - checkFile(Paths.get(outputPath + "/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java"), true, - reGetPetById); - - String reFindPetsByStatusTest = "(?s)(?m)public void findPetsByStatusTest\\(\\) throws Exception \\{\\s+" - + ".*" // split - + "List status = new ArrayList<>\\(\\);" // split - + ".*" // split - + "List response = api\\.findPetsByStatus\\(status\\);" // split - + ".*" // split - + "validate\\(response\\);\\s+" // split - + "\\}"; - checkFile(Paths.get(outputPath + "/src/test/java/org/openapitools/api/PetApiTest.java"), true, - reFindPetsByStatusTest); - - checkFile(Paths.get(outputPath + "/src/main/resources/test-data.json"), false); - - checkFile(Paths.get(outputPath + "/test-data-control.json"), false); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java")) + .assertMethod("getPetById") + .bodyContainsLines( + "Pet response = new Pet();", + "return response;" + ); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/test/java/org/openapitools/api/PetApiTest.java")) + .assertMethod("findPetsByStatusTest") + .bodyContainsLines( + "List status = new ArrayList<>();", + "// List response = api.findPetsByStatus(status);", + "// validate(response);" + ); + + Assertions.assertThat(Paths.get(outputPath + "/src/main/resources/test-data.json")) + .doesNotExist(); + Assertions.assertThat(Paths.get(outputPath + "/test-data-control.json")) + .doesNotExist(); } @Test @@ -424,28 +391,34 @@ public void testGenerateOperationBodyWithJsonTestData() throws Exception { DefaultGenerator generator = new DefaultGenerator(); generator.opts(input).generate(); - String reInitCache = "(?s)(?m)\\{\\s+" + "try \\{\\s+" - + "File cacheFile = new File\\(System\\.getProperty\\(\"jaxrs\\.test\\.server\\.json\",\\s+\"(.+)\"\\)\\);\\s+" - + "cache = JsonCache\\.Factory\\.instance\\.get\\(\"test-data\"\\)\\.load\\(cacheFile\\)\\.child\\(\"/org\\.openapitools\\.api/PetApi\"\\);"; - String reGetPetById = "(?s)(?m)public Pet getPetById\\(Long petId\\) \\{.*" // split - + "try \\{\\s*" // split - + "Pet response = cache\\.getObject\\(\"/getPetById/response\", Pet\\.class\\);"; - checkFile(Paths.get(outputPath + "/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java"), true, - reInitCache, reGetPetById); - - reInitCache = "(?s)(?m)public static void beforeClass\\(\\) throws Exception \\{\\s+" - + "File cacheFile = new File\\(System\\.getProperty\\(\"jaxrs\\.test\\.client\\.json\",\\s+" - + "\".*src(?:\\\\\\\\|/)main(?:\\\\\\\\|/)resources(?:\\\\\\\\|/)test-data\\.json\"\\)\\);\\s+" - + "cache = JsonCache\\.Factory\\.instance.get\\(\"test-data\"\\)\\.load\\(cacheFile\\)" - + "\\.child\\(\"/org\\.openapitools\\.api/PetApi\"\\);"; - String reAddPetTest = "public void addPetTest\\(\\) throws Exception \\{\\s+" - + "Pet pet = cache\\.getObject\\(\"/addPet/pet\", Pet\\.class\\);"; - checkFile(Paths.get(outputPath + "/src/test/java/org/openapitools/api/PetApiTest.java"), true, reInitCache, - reAddPetTest); - - checkFile(Paths.get(outputPath + "/src/main/resources/test-data.json"), true); - - checkFile(Paths.get(outputPath + "/test-data-control.json"), true); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java")) + .fileContains( + "File cacheFile = new File(System.getProperty(\"jaxrs.test.server.json\"", + "cache = JsonCache.Factory.instance.get(\"test-data\").load(cacheFile).child(\"/org.openapitools.api/PetApi\");" + ) + .assertMethod("getPetById") + .bodyContainsLines( + "Pet response = cache.getObject(\"/getPetById/response\", Pet.class);" + ); + + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/test/java/org/openapitools/api/PetApiTest.java")) + .assertMethod("beforeClass") + .bodyContainsLines( + "File cacheFile = new File(System.getProperty(\"jaxrs.test.client.json\",", + "cache = JsonCache.Factory.instance.get(\"test-data\").load(cacheFile).child(\"/org.openapitools.api/PetApi\");", + "validator = Validation.buildDefaultValidatorFactory().getValidator();" + ) + .toFileAssert() + .assertMethod("addPetTest") + .bodyContainsLines( + "Pet pet = cache.getObject(\"/addPet/pet\", Pet.class);" + ); + + Assertions.assertThat(Paths.get(outputPath + "/src/main/resources/test-data.json")) + .exists(); + Assertions.assertThat(Paths.get(outputPath + "/test-data-control.json")) + .exists(); } @Test diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java index 681f6360c9cd..920d2b6a039a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java @@ -8,6 +8,7 @@ import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.*; import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen; import org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen; import org.openapitools.codegen.languages.features.CXFServerFeatures; @@ -23,6 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; @@ -32,6 +35,8 @@ import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.SUPPORT_ASYNC; import static org.testng.Assert.assertTrue; +import com.google.common.collect.ImmutableMap; + /** * Unit-Test for {@link org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen}. * @@ -610,4 +615,76 @@ public void generateDeepObjectArrayWithPattern() throws IOException { TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/model/Options.java"); TestUtils.assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/model/Options.java"), "List< @Pattern(regexp=\"^[A-Z].*\")String> getA()"); } + + @Test + public void testHandleDefaultValue_issue8535() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_8535.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("TestHeadersApi.java")) + .assertMethod("headersTest") + .hasParameter("headerNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("headerString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"true\"")); + + JavaFileAssert.assertThat(files.get("TestQueryParamsApi.java")) + .assertMethod("queryParamsTest") + .hasParameter("queryNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("queryString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"true\"")); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java index 40080ec4384f..342e88b316cb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java @@ -6,6 +6,7 @@ import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.MockDefaultGenerator; import org.openapitools.codegen.TestUtils; @@ -271,4 +272,32 @@ private List getOperationsList(Map templateDat Assert.assertTrue(operations.get("operation") instanceof List); return (List) operations.get("operation"); } + + @Test + public void testExtraAnnotations() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/issue_11772.yml"); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + generator.opts(input).generate(); + + TestUtils.assertExtraAnnotationFiles(outputPath + "/src/gen/java/org/openapitools/model"); + + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsResteasyServerCodegenModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsResteasyServerCodegenModelTest.java index 9b2670665bad..2d075457c9d5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsResteasyServerCodegenModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsResteasyServerCodegenModelTest.java @@ -1,14 +1,21 @@ package org.openapitools.codegen.java.jaxrs; +import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.MapSchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.parser.core.models.ParseOptions; + +import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.JavaResteasyServerCodegen; +import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -16,6 +23,14 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; +import java.io.File; +import java.nio.file.Files; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +import com.google.common.collect.ImmutableMap; + public class JavaJaxrsResteasyServerCodegenModelTest extends JavaJaxrsBaseTest { @BeforeMethod @@ -60,4 +75,76 @@ public void testDefaultValuesFixed() { Assert.assertEquals(floatParam.defaultValue, floatVal); Assert.assertEquals(doubleParam.defaultValue, doubleVal); } + + @Test + public void testHandleDefaultValue_issue8535() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_8535.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("TestHeadersApi.java")) + .assertMethod("headersTest") + .hasParameter("headerNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("headerString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"true\"")); + + JavaFileAssert.assertThat(files.get("TestQueryParamsApi.java")) + .assertMethod("queryParamsTest") + .hasParameter("queryNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("queryString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DefaultValue", ImmutableMap.of("value", "\"true\"")); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java index df50cfcace3c..1596c572867e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java @@ -1,6 +1,7 @@ package org.openapitools.codegen.java.jaxrs; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; @@ -12,6 +13,7 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.JavaJerseyServerCodegen; import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.openapitools.codegen.DefaultGenerator; @@ -29,6 +31,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.function.Function; import java.util.stream.Collectors; public class JavaJerseyServerCodegenTest extends JavaJaxrsBaseTest { @@ -169,4 +172,76 @@ public void testMultipartJerseyServer(final String jerseyLibrary, final String d } } + @Test + public void testHandleDefaultValue_issue8535() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_8535.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("TestHeadersApi.java")) + .assertMethod("headersTest") + .hasParameter("headerNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("headerString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"true\"")); + + JavaFileAssert.assertThat(files.get("TestQueryParamsApi.java")) + .assertMethod("queryParamsTest") + .hasParameter("queryNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("queryString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("defaultValue", "\"true\"")); + } + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java index d10d250aabc3..f172729162d9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java @@ -5,6 +5,8 @@ import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.JavaMicronautAbstractCodegen; import org.openapitools.codegen.languages.JavaMicronautServerCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -13,6 +15,8 @@ import static org.testng.Assert.assertEquals; public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { + protected static String ROLES_EXTENSION_TEST_PATH = "src/test/resources/3_0/micronaut/roles-extension-test.yaml"; + @Test public void clientOptsUnicity() { JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); @@ -192,4 +196,45 @@ public void doNotGenerateRequiredPropertiesInConstructor() { assertFileContains(modelPath + "Order.java", "public Order()"); assertFileNotContainsRegex(modelPath + "Order.java", "public Order\\([^)]+\\)"); } + + @Test + public void testExtraAnnotations() throws Exception { + + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + String outputPath = generateFiles(codegen, "src/test/resources/3_0/issue_11772.yml", CodegenConstants.MODELS); + + TestUtils.assertExtraAnnotationFiles(outputPath + "/src/main/java/org/openapitools/model"); + + } + + @Test + public void doNotGenerateAuthRolesWithExtensionWhenNotUseAuth() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_USE_AUTH, false); + String outputPath = generateFiles(codegen, ROLES_EXTENSION_TEST_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); + + String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; + assertFileNotContains(controllerPath + "BooksController.java", "@Secured"); + assertFileNotContains(controllerPath + "UsersController.java", "@Secured"); + assertFileNotContains(controllerPath + "ReviewsController.java", "@Secured"); + } + + @Test + public void generateAuthRolesWithExtension() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_USE_AUTH, true); + String outputPath = generateFiles(codegen, ROLES_EXTENSION_TEST_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); + + String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; + assertFileContainsRegex(controllerPath + "BooksController.java", "IS_ANONYMOUS[^;]{0,100}bookSearchGet"); + assertFileContainsRegex(controllerPath + "BooksController.java", "@Secured\\(\\{\"admin\"\\}\\)[^;]{0,100}createBook"); + assertFileContainsRegex(controllerPath + "BooksController.java", "IS_ANONYMOUS[^;]{0,100}getBook"); + assertFileContainsRegex(controllerPath + "BooksController.java", "IS_AUTHENTICATED[^;]{0,100}reserveBook"); + + assertFileContainsRegex(controllerPath + "ReviewsController.java", "IS_AUTHENTICATED[^;]{0,100}bookSendReviewPost"); + assertFileContainsRegex(controllerPath + "ReviewsController.java", "IS_ANONYMOUS[^;]{0,100}bookViewReviewsGet"); + + assertFileContainsRegex(controllerPath + "UsersController.java", "IS_ANONYMOUS[^;]{0,100}getUserProfile"); + assertFileContainsRegex(controllerPath + "UsersController.java", "IS_AUTHENTICATED[^;]{0,100}updateProfile"); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/play/JavaPlayFrameworkCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/play/JavaPlayFrameworkCodegenTest.java index bb090fe291a1..06d602f8f77f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/play/JavaPlayFrameworkCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/play/JavaPlayFrameworkCodegenTest.java @@ -17,11 +17,21 @@ package org.openapitools.codegen.java.play; +import io.swagger.parser.OpenAPIParser; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.parser.core.models.ParseOptions; + +import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.JavaPlayFrameworkCodegen; import org.testng.Assert; import org.testng.annotations.Test; +import java.io.File; +import java.nio.file.Files; + public class JavaPlayFrameworkCodegenTest { @Test @@ -93,4 +103,34 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception { Assert.assertEquals(codegen.getConfigPackage(), "xyz.yyyyy.cccc.config"); Assert.assertEquals(codegen.additionalProperties().get(JavaPlayFrameworkCodegen.CONFIG_PACKAGE), "xyz.yyyyy.cccc.config"); } + + @Test + public void testExtraAnnotations() throws Exception { + + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_11772.yml", null, new ParseOptions()).getOpenAPI(); + + JavaPlayFrameworkCodegen codegen = new JavaPlayFrameworkCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + generator.opts(input).generate(); + + TestUtils.assertExtraAnnotationFiles(outputPath + "/app/apimodels"); + + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index e7f1067145fd..de2b775456bd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -21,6 +21,7 @@ import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.assertFileNotContains; import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; +import static org.openapitools.codegen.languages.SpringCodegen.SPRING_BOOT; import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DOCUMENTATION_PROVIDER; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; @@ -39,7 +40,10 @@ import java.util.List; import java.util.Map; import java.util.function.Consumer; +import java.util.function.Function; import java.util.stream.Collectors; + +import org.assertj.core.api.Assertions; import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.ClientOptInput; @@ -51,6 +55,7 @@ import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.AbstractJavaCodegen; import org.openapitools.codegen.languages.SpringCodegen; import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; @@ -127,11 +132,10 @@ public void doAnnotateDatesOnModelParameters() throws IOException { .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("required", "false", "value", "\"limit\"")) .toParameter() .toMethod() - .hasParameter("animalParams").withType("AnimalParams"); - - // todo: to remove - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), - "AnimalParams"); + .hasParameter("animalParams").withType("AnimalParams") + .toMethod() + .commentContainsLines("GET /zebras", "@param limit (optional)") + .bodyContainsLines("return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)"); JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java")) .hasImports("org.springframework.format.annotation.DateTimeFormat") @@ -142,15 +146,11 @@ public void doAnnotateDatesOnModelParameters() throws IOException { .toType() .hasProperty("lastSeen").withType("OffsetDateTime") .assertPropertyAnnotations() - .containsWithNameAndAttributes("DateTimeFormat", ImmutableMap.of("iso", "DateTimeFormat.ISO.DATE_TIME")); - - // todo: to remove - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java"), - "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)", "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)"); - - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java"), - "import org.springframework.format.annotation.DateTimeFormat;" - ); + .containsWithNameAndAttributes("DateTimeFormat", ImmutableMap.of("iso", "DateTimeFormat.ISO.DATE_TIME")) + .toProperty().toType() + .assertMethod("born", "LocalDate") + .bodyContainsLines("this.born = born") + .doesNotHaveComment(); } @Test @@ -179,9 +179,22 @@ public void doGenerateCookieParams() throws IOException { generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java"), "@CookieValue"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), "@CookieValue"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/BirdsApi.java"), "@CookieValue"); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java")) + .assertMethod("getElephants", "String", "BigDecimal") + .hasParameter("userToken") + .assertParameterAnnotations() + .containsWithNameAndAttributes("CookieValue", ImmutableMap.of("name", "\"userToken\"")); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java")) + .assertMethod("getZebras", "String") + .hasParameter("userToken") + .assertParameterAnnotations() + .containsWithNameAndAttributes("CookieValue", ImmutableMap.of("name", "\"userToken\"")); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/BirdsApi.java")) + .assertMethod("getBirds", "BigDecimal") + .doesNotHaveParameter("userToken") + .noneOfParameterHasAnnotation("CookieValue"); } @Test @@ -276,22 +289,19 @@ public void generateFormatForDateAndDateTimeQueryParam() throws IOException { generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); generator.opts(input).generate(); - assertFileContains( - Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java"), - "import org.springframework.format.annotation.DateTimeFormat;" - ); - assertFileContains( - Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java"), - "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)" - ); - assertFileContains( - Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), - "import org.springframework.format.annotation.DateTimeFormat;" - ); - assertFileContains( - Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), - "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)" - ); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java")) + .hasImports("org.springframework.format.annotation.DateTimeFormat") + .assertMethod("getElephants", "LocalDate") + .hasParameter("startDate") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DateTimeFormat", ImmutableMap.of("iso", "DateTimeFormat.ISO.DATE")); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java")) + .hasImports("org.springframework.format.annotation.DateTimeFormat") + .assertMethod("getZebras", "OffsetDateTime") + .hasParameter("startDateTime") + .assertParameterAnnotations() + .containsWithNameAndAttributes("DateTimeFormat", ImmutableMap.of("iso", "DateTimeFormat.ISO.DATE_TIME")); } @Test @@ -339,9 +349,15 @@ public void shouldGenerateRequestParamForRefParams_3248_Regression() throws IOEx generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java"), - "@RequestParam(value = \"format\"", - "@RequestParam(value = \"query\""); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java")) + .assertMethod("exampleApiGet", "String", "Format") + .hasParameter("query") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("value", "\"query\"")) + .toParameter().toMethod() + .hasParameter("format") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("value", "\"format\"")); } @Test @@ -371,8 +387,12 @@ public void shouldGenerateRequestParamForRefParams_3248_RegressionDates() throws generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java"), - "@RequestParam(value = \"start\""); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java")) + .assertMethod("exampleApiGet", "OffsetDateTime") + .hasParameter("start") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("value", "\"start\"")) + .containsWithNameAndAttributes("DateTimeFormat", ImmutableMap.of("iso", "DateTimeFormat.ISO.DATE_TIME")); } @Test @@ -496,6 +516,12 @@ public void testDoGenerateRequestBodyRequiredAttribute_3134_Regression() throws generator.opts(input).generate(); + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java")) + .assertMethod("exampleApiPost", "InlineObject") + .hasParameter("inlineObject") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestBody", ImmutableMap.of("required", "false")); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java"), "@RequestBody(required = false"); } @@ -536,14 +562,17 @@ public void testMultipartBoot() throws IOException { final Map files = generateFiles(codegen, "src/test/resources/3_0/form-multipart-binary-array.yaml"); // Check that the delegate handles the array - final File multipartArrayApiDelegate = files.get("MultipartArrayApiDelegate.java"); - assertFileContains(multipartArrayApiDelegate.toPath(), "List files"); + JavaFileAssert.assertThat(files.get("MultipartArrayApiDelegate.java")) + .assertMethod("multipartArray", "List") + .hasParameter("files").withType("List"); // Check that the api handles the array - final File multipartArrayApi = files.get("MultipartArrayApi.java"); - assertFileContains(multipartArrayApi.toPath(), "List files", - "@ApiParam(value = \"Many files\")", - "@RequestPart(value = \"files\", required = false)"); + JavaFileAssert.assertThat(files.get("MultipartArrayApi.java")) + .assertMethod("multipartArray", "List") + .hasParameter("files").withType("List") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"Many files\"")) + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"files\"", "required", "false")); // UPDATE: the following test has been ignored due to https://github.com/OpenAPITools/openapi-generator/pull/11081/ // We will contact the contributor of the following test to see if the fix will break their use cases and @@ -553,17 +582,29 @@ public void testMultipartBoot() throws IOException { // assertFileContains(multipartSingleApiDelegate.toPath(), "MultipartFile file"); // Check that the api handles the single file - final File multipartSingleApi = files.get("MultipartSingleApi.java"); - assertFileContains(multipartSingleApi.toPath(), "MultipartFile file", - "@ApiParam(value = \"One file\")", - "@RequestPart(value = \"file\", required = false)"); + JavaFileAssert.assertThat(files.get("MultipartSingleApi.java")) + .assertMethod("multipartSingle", "MultipartFile") + .hasParameter("file").withType("MultipartFile") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"One file\"")) + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"file\"", "required", "false")); // Check that api validates mixed multipart request - final File multipartMixedApi = files.get("MultipartMixedApi.java"); - assertFileContains(multipartMixedApi.toPath(), "MultipartFile file", - "@Valid @RequestParam(value = \"status\", required = true)", - "@RequestPart(value = \"file\", required = true)", - "@Valid @RequestParam(value = \"marker\", required = false)"); + JavaFileAssert.assertThat(files.get("MultipartMixedApi.java")) + .assertMethod("multipartMixed", "MultipartMixedStatus", "MultipartFile", "MultipartMixedMarker") + .hasParameter("status").withType("MultipartMixedStatus") + .assertParameterAnnotations() + .containsWithName("Valid") + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"\"")) + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("value", "\"status\"", "required", "true")) + .toParameter().toMethod() + .hasParameter("file").withType("MultipartFile") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"file\"", "required", "true")) + .toParameter().toMethod() + .hasParameter("marker").withType("MultipartMixedMarker") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("value", "\"marker\"", "required", "false")); } // Helper function, intended to reduce boilerplate @@ -908,6 +949,87 @@ public void shouldNotAddNotNullOnReadOnlyAttributes() throws IOException { } + @Test + public void oneOf_5381() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_5381.yaml", null, new ParseOptions()).getOpenAPI(); + + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.setUseOneOfInterfaces(true); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + codegen.setHateoas(true); + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + //generator.setGeneratorPropertyDefault(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false"); + + codegen.setUseOneOfInterfaces(true); + codegen.setLegacyDiscriminatorBehavior(false); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + + generator.opts(input).generate(); + + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/Foo.java"), "public class Foo implements FooRefOrValue"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/FooRef.java"), "public class FooRef implements FooRefOrValue"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/FooRefOrValue.java"), "public interface FooRefOrValue"); + } + + @Test + public void oneOf_allOf() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml", null, new ParseOptions()).getOpenAPI(); + + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.setUseOneOfInterfaces(true); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + codegen.setHateoas(true); + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); +// generator.setGeneratorPropertyDefault(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false"); + + codegen.setUseOneOfInterfaces(true); + codegen.setLegacyDiscriminatorBehavior(false); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + + generator.opts(input).generate(); + + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/Foo.java"), "public class Foo extends Entity implements FooRefOrValue"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/FooRef.java"), "public class FooRef extends EntityRef implements FooRefOrValue"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/FooRefOrValue.java"), "public interface FooRefOrValue"); + // previous bugs + assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/BarRef.java"), "atTypesuper.hashCode"); + assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/BarRef.java"), "private String atBaseType"); + // imports for inherited properties + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/PizzaSpeziale.java"), "import java.math.BigDecimal"); + } + @Test public void testTypeMappings() { final SpringCodegen codegen = new SpringCodegen(); @@ -1015,4 +1137,232 @@ public void testIssue11323() throws IOException { assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/Address.java"), "@JsonValue", "import com.fasterxml.jackson.annotation.JsonValue;"); } + + @Test + public void shouldPurAdditionalModelTypesOverAllModels() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SpringCodegen.ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "@path.Annotation(param1 = \"test1\", param2 = 3);@path.Annotation2;@custom.Annotation"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + generator.opts(input).generate(); + + File[] generatedModels = new File(outputPath + "/src/main/java/org/openapitools/model").listFiles(); + Assertions.assertThat(generatedModels).isNotEmpty(); + + for (File modelPath : generatedModels) { + JavaFileAssert.assertThat(modelPath) + .assertTypeAnnotations() + .containsWithName("custom.Annotation") + .containsWithName("path.Annotation2") + .containsWithNameAndAttributes("path.Annotation", ImmutableMap.of("param1", "\"test1\"", "param2", "3")); + } + } + + @Test + public void testHandleDefaultValue_issue8535() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_8535.yaml", null, new ParseOptions()).getOpenAPI(); + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("TestHeadersApi.java")) + .assertMethod("headersTest") + .hasParameter("headerNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestHeader", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("headerString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestHeader", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestHeader", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestHeader", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestHeader", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("headerBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestHeader", ImmutableMap.of("defaultValue", "\"true\"")); + + JavaFileAssert.assertThat(files.get("TestQueryParamsApi.java")) + .assertMethod("queryParamsTest") + .hasParameter("queryNumber").withType("BigDecimal") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"11.2\"")) + .toParameter().toMethod() + .hasParameter("queryString").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"qwerty\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotes").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryStringQuotesWrapped").withType("String") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"qwerty\\\"with quotes\\\" test\"")) + .toParameter().toMethod() + .hasParameter("queryBoolean").withType("Boolean") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"true\"")); + } + + @Test + public void testExtraAnnotations() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_11772.yml", null, new ParseOptions()).getOpenAPI(); + + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + generator.opts(input).generate(); + + TestUtils.assertExtraAnnotationFiles(outputPath + "/src/main/java/org/openapitools/model"); + + } + + @Test + public void testResponseWithArray_issue11897() throws Exception { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_11897.yaml", null, new ParseOptions()).getOpenAPI(); + SpringCodegen codegen = new SpringCodegen(); + codegen.setLibrary(SPRING_BOOT); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); + codegen.additionalProperties().put(SpringCodegen.USE_TAGS, "true"); + codegen.additionalProperties().put(SpringCodegen.INTERFACE_ONLY, "true"); + codegen.additionalProperties().put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true"); + codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "true"); + codegen.additionalProperties().put(SpringCodegen.SPRING_CONTROLLER, "true"); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, "jackson"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("MetadataApi.java")) + .assertMethod("getWithArrayOfObjects").hasReturnType("ResponseEntity>") + .toFileAssert() + .assertMethod("getWithArrayOfString").hasReturnType("ResponseEntity>") + .toFileAssert() + .assertMethod("getWithSetOfObjects").hasReturnType("ResponseEntity>") + .toFileAssert() + .assertMethod("getWithSetOfStrings").hasReturnType("ResponseEntity>") + .toFileAssert() + .assertMethod("getWithMapOfObjects").hasReturnType("ResponseEntity>") + .toFileAssert() + .assertMethod("getWithMapOfStrings").hasReturnType("ResponseEntity>"); + } + + @Test + public void shouldSetDefaultValueForMultipleArrayItems() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_11957.yaml", null, new ParseOptions()).getOpenAPI(); + SpringCodegen codegen = new SpringCodegen(); + codegen.setLibrary(SPRING_BOOT); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); + codegen.additionalProperties().put(SpringCodegen.USE_TAGS, "true"); + codegen.additionalProperties().put(SpringCodegen.INTERFACE_ONLY, "true"); + codegen.additionalProperties().put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true"); + codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "true"); + codegen.additionalProperties().put(SpringCodegen.SPRING_CONTROLLER, "true"); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, "jackson"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("SearchApi.java")) + .assertMethod("defaultList") + .hasParameter("orderBy") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"updatedAt:DESC,createdAt:DESC\"")) + .toParameter().toMethod().toFileAssert() + .assertMethod("defaultSet") + .hasParameter("orderBy") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"updatedAt:DESC,createdAt:DESC\"")) + .toParameter().toMethod().toFileAssert() + .assertMethod("emptyDefaultList") + .hasParameter("orderBy") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"\"")) + .toParameter().toMethod().toFileAssert() + .assertMethod("emptyDefaultSet") + .hasParameter("orderBy") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestParam", ImmutableMap.of("defaultValue", "\"\"")); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java index 1a27e46dbf23..d72e170b004b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java @@ -16,12 +16,12 @@ import org.testng.annotations.Test; import java.io.File; -import java.util.Collections; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; import static org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.*; +import static org.openapitools.codegen.TestUtils.createCodegenModelWrapper; import static org.testng.Assert.*; public class AbstractKotlinCodegenTest { @@ -265,7 +265,7 @@ public void testEnumPropertyWithDefaultValue() { Assert.assertEquals(codegen.getTypeDeclaration("MyResponse"), "MyResponse"); // We need to postProcess the model for enums to be processed - codegen.postProcessModels(Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm1)))); + codegen.postProcessModels(createCodegenModelWrapper(cm1)); // Assert the enum default value is properly generated CodegenProperty cp1 = cm1.vars.get(0); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ktorm/KtormSchemaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ktorm/KtormSchemaCodegenTest.java index f8285da45c32..e62f1a7b565d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ktorm/KtormSchemaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ktorm/KtormSchemaCodegenTest.java @@ -16,6 +16,8 @@ package org.openapitools.codegen.ktorm; +import static org.openapitools.codegen.TestUtils.createCodegenModelWrapper; + import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.TestUtils; @@ -27,23 +29,10 @@ import io.swagger.v3.oas.models.media.*; import io.swagger.v3.parser.util.SchemaTypeUtil; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; import java.util.Map; public class KtormSchemaCodegenTest { - private Map toObjs(CodegenModel cm) { - Map objs = new HashMap(); - List models = new ArrayList(); - Map model = new HashMap<>(); - model.put("model", cm); - models.add(model); - objs.put("models", models); - return objs; - } - private CodegenModel getModel(Schema schema, String pkName, Boolean surrogateKey) { final KtormSchemaCodegen codegen = new KtormSchemaCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); @@ -51,7 +40,7 @@ private CodegenModel getModel(Schema schema, String pkName, Boolean surrogateKey codegen.setPrimaryKeyConvention(pkName); codegen.setOpenAPI(openAPI); CodegenModel cm = codegen.fromModel("sample", schema); - codegen.postProcessModels(toObjs(cm)); + codegen.postProcessModels(createCodegenModelWrapper(cm)); return cm; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java deleted file mode 100644 index e974ddd8494c..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.options; - -import com.google.common.collect.ImmutableMap; - -import java.util.Map; - -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.languages.DartDioClientCodegen; - -public class DartDioClientOptionsProvider implements OptionsProvider { - public static final String SORT_PARAMS_VALUE = "true"; - public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; - public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; - public static final String PUB_LIBRARY_VALUE = "openapi.api"; - public static final String PUB_NAME_VALUE = "openapi"; - public static final String PUB_VERSION_VALUE = "1.0.0-SNAPSHOT"; - public static final String PUB_DESCRIPTION_VALUE = "OpenAPI API client dart-dio"; - public static final String SOURCE_FOLDER_VALUE = "src"; - public static final String USE_ENUM_EXTENSION = "true"; - public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; - public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; - public static final String DATE_LIBRARY = "core"; - public static final String NULLABLE_FIELDS = "true"; - public static final String PUB_AUTHOR_VALUE = "Author"; - public static final String PUB_AUTHOR_EMAIL_VALUE = "author@homepage"; - public static final String PUB_HOMEPAGE_VALUE = "Homepage"; - public static final String ENUM_UNKNOWN_DEFAULT_CASE_VALUE = "false"; - - @Override - public String getLanguage() { - return "dart-dio"; - } - - @Override - public Map createOptions() { - ImmutableMap.Builder builder = new ImmutableMap.Builder(); - return builder.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE) - .put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, SORT_MODEL_PROPERTIES_VALUE) - .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) - .put(DartDioClientCodegen.PUB_LIBRARY, PUB_LIBRARY_VALUE) - .put(DartDioClientCodegen.PUB_NAME, PUB_NAME_VALUE) - .put(DartDioClientCodegen.PUB_VERSION, PUB_VERSION_VALUE) - .put(DartDioClientCodegen.PUB_DESCRIPTION, PUB_DESCRIPTION_VALUE) - .put(DartDioClientCodegen.PUB_AUTHOR, PUB_AUTHOR_VALUE) - .put(DartDioClientCodegen.PUB_AUTHOR_EMAIL, PUB_AUTHOR_EMAIL_VALUE) - .put(DartDioClientCodegen.PUB_HOMEPAGE, PUB_HOMEPAGE_VALUE) - .put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE) - .put(DartDioClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION) - .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) - .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) - .put(DartDioClientCodegen.DATE_LIBRARY, DATE_LIBRARY) - .put(DartDioClientCodegen.NULLABLE_FIELDS, NULLABLE_FIELDS) - .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") - .put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, ENUM_UNKNOWN_DEFAULT_CASE_VALUE) - .build(); - } - - @Override - public boolean isServer() { - return false; - } -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java index fc7d74074dd8..dd11b886a9a6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java @@ -32,6 +32,7 @@ public class PythonClientOptionsProvider implements OptionsProvider { public static final String RECURSION_LIMIT = "1200"; public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "false"; public static final String PYTHON_ATTR_NONE_IF_UNSET = "false"; + public static final String INIT_REQUIRED_VARS = "false"; @Override public String getLanguage() { @@ -52,6 +53,7 @@ public Map createOptions() { .put(PythonClientCodegen.USE_NOSE, USE_NOSE_VALUE) .put(PythonClientCodegen.RECURSION_LIMIT, RECURSION_LIMIT) .put(PythonClientCodegen.PYTHON_ATTR_NONE_IF_UNSET, PYTHON_ATTR_NONE_IF_UNSET) + .put(CodegenConstants.INIT_REQUIRED_VARS, INIT_REQUIRED_VARS) .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 5c2fb91f7255..3e2cbff7f4e1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -39,10 +39,10 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider { private static final String NPM_REPOSITORY = "https://registry.npmjs.org"; public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; - public static final String TYPESCRIPT_THREE_PLUS = "true"; public static final String WITHOUT_RUNTIME_CHECKS = "true"; public static final String SAGAS_AND_RECORDS = "false"; public static final String ENUM_UNKNOWN_DEFAULT_CASE_VALUE = "false"; + public static final String STRING_ENUMS = "false"; @Override public String getLanguage() { @@ -68,7 +68,6 @@ public Map createOptions() { .put(TypeScriptFetchClientCodegen.WITH_INTERFACES, Boolean.FALSE.toString()) .put(TypeScriptFetchClientCodegen.USE_SINGLE_REQUEST_PARAMETER, Boolean.FALSE.toString()) .put(TypeScriptFetchClientCodegen.PREFIX_PARAMETER_INTERFACES, Boolean.FALSE.toString()) - .put(TypeScriptFetchClientCodegen.TYPESCRIPT_THREE_PLUS, TYPESCRIPT_THREE_PLUS) .put(TypeScriptFetchClientCodegen.WITHOUT_RUNTIME_CHECKS, WITHOUT_RUNTIME_CHECKS) .put(TypeScriptFetchClientCodegen.SAGAS_AND_RECORDS, SAGAS_AND_RECORDS) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) @@ -76,6 +75,7 @@ public Map createOptions() { .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, ENUM_UNKNOWN_DEFAULT_CASE_VALUE) + .put(TypeScriptFetchClientCodegen.STRING_ENUMS, STRING_ENUMS) .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java index ea7ef67bfcf9..5f7c52e54208 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java @@ -32,7 +32,6 @@ import org.testng.annotations.Test; import java.util.Arrays; -import java.util.Collections; import java.util.HashMap; public class AbstractPhpCodegenTest { @@ -160,7 +159,7 @@ public void testEnumPropertyWithDefaultValue() { Assert.assertEquals(codegen.getTypeDeclaration("MyResponse"), "\\php\\Model\\MyResponse"); // We need to postProcess the model for enums to be processed - codegen.postProcessModels(Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm1)))); + codegen.postProcessModels(TestUtils.createCodegenModelWrapper(cm1)); // Assert the enum default value is properly generated CodegenProperty cp1 = cm1.vars.get(0); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/plantuml/PlantumlDocumentationCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/plantuml/PlantumlDocumentationCodegenTest.java index ff4b4648b849..6e96ae888d13 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/plantuml/PlantumlDocumentationCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/plantuml/PlantumlDocumentationCodegenTest.java @@ -6,6 +6,8 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.PlantumlDocumentationCodegen; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.testng.Assert; import org.testng.annotations.Test; @@ -234,11 +236,11 @@ public void sharedIdenticalInlineAllOfTest() { } private Map createObjectsMapFor(CodegenModel... codegenModels) { - List> modelsList = new ArrayList(); + List modelsList = new ArrayList<>(); for (CodegenModel codegenModel: codegenModels) { - Map modelMap = new HashMap<>(); - modelMap.put("model", codegenModel); + ModelMap modelMap = new ModelMap(); + modelMap.setModel(codegenModel); modelsList.add(modelMap); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java index 2bbfdaca1dcc..248708643765 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java @@ -40,6 +40,7 @@ import org.openapitools.codegen.languages.PythonExperimentalClientCodegen; import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @SuppressWarnings("static-method") @@ -519,4 +520,33 @@ public void testRecursiveExampleValueWithCycle() throws Exception { Assert.assertEquals(exampleValue.trim(), expectedValue.trim()); } + @DataProvider + public Object[][] testToModelData() { + return new Object[][] { + new Object[] {"", "", "foo", "Foo"}, + new Object[] {"Abc", "", "foo", "AbcFoo"}, + new Object[] {"", "Abc", "foo", "FooAbc"}, + new Object[] {"Abc", "Xyz", "foo", "AbcFooXyz"}, + + new Object[] {"", "", "1", "Model1"}, + new Object[] {"Abc", "", "1", "Abc1"}, + new Object[] {"", "Abc", "1", "Model1Abc"}, + new Object[] {"Abc", "Xyz", "1", "Abc1Xyz"}, + + new Object[] {"", "", "and", "ModelAnd"}, + new Object[] {"Abc", "", "and", "AbcAnd"}, + new Object[] {"", "Abc", "and", "AndAbc"}, + new Object[] {"Abc", "Xyz", "and", "AbcAndXyz"}, + }; + } + + @Test(dataProvider = "testToModelData") + public void testToModel(String prefix, String suffix, String input, String want) { + PythonClientCodegen codegen = new PythonClientCodegen(); + codegen.setModelNamePrefix(prefix); + codegen.setModelNameSuffix(suffix); + Assert.assertEquals(codegen.toModelName(input), want); + } + + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java index 6df13d473eb9..08bc443e3347 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java @@ -24,6 +24,9 @@ import org.apache.commons.io.FileUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.RubyClientCodegen; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.testng.Assert; import org.testng.annotations.Test; @@ -159,14 +162,17 @@ public void bodyParameterTest() { final Operation p = openAPI.getPaths().get(path).getPost(); Schema schema = openAPI.getComponents().getSchemas().get("Pet"); CodegenModel model = codegen.fromModel("Pet", schema); - Map modelMap = new HashMap<>(); - modelMap.put("model", model); + ModelMap modelMap = new ModelMap(); + modelMap.setModel(model); final CodegenOperation op = codegen.fromOperation(path, "post", p, null); - Map operations = ImmutableMap.of("operation", Collections.singletonList(op)); - Map objs = ImmutableMap.of("operations", operations, "imports", new ArrayList>()); + OperationMap operations = new OperationMap(); + operations.setOperation(op); + OperationsMap objs = new OperationsMap(); + objs.setOperation(operations); + objs.setImports(new ArrayList<>()); objs = codegen.postProcessOperationsWithModels(objs, Collections.singletonList(modelMap)); - CodegenOperation postProcessedOp = ((List) ((Map) objs.get("operations")).get("operation")).get(0); + CodegenOperation postProcessedOp = objs.getOperations().getOperation().get(0); Assert.assertEquals(postProcessedOp.bodyParams.size(), 1); CodegenParameter bp = postProcessedOp.bodyParams.get(0); Assert.assertEquals(bp.vendorExtensions.get("x-ruby-example"), "OnlinePetstore::Pet.new({name: 'doggie', photo_urls: ['photo_urls_example']})"); @@ -627,10 +633,13 @@ public void exampleStringFromExampleParameterOAS2Test() { final Operation p = openAPI.getPaths().get(path).getDelete(); final CodegenOperation op = codegen.fromOperation(path, "delete", p, null); - Map operations = ImmutableMap.of("operation", Collections.singletonList(op)); - Map objs = ImmutableMap.of("operations", operations, "imports", new ArrayList>()); + OperationMap operations = new OperationMap(); + operations.setOperation(op); + OperationsMap objs = new OperationsMap(); + objs.setOperation(operations); + objs.setImports(new ArrayList<>()); objs = codegen.postProcessOperationsWithModels(objs, Collections.emptyList()); - CodegenOperation postProcessedOp = ((List) ((Map) objs.get("operations")).get("operation")).get(0); + CodegenOperation postProcessedOp = objs.getOperations().getOperation().get(0); CodegenParameter pp = postProcessedOp.pathParams.get(0); Assert.assertEquals(pp.vendorExtensions.get("x-ruby-example"), "'orderid123'"); @@ -647,10 +656,13 @@ public void exampleStringFromXExampleParameterOAS3Test() { final Operation p = openAPI.getPaths().get(path).getDelete(); final CodegenOperation op = codegen.fromOperation(path, "delete", p, null); - Map operations = ImmutableMap.of("operation", Collections.singletonList(op)); - Map objs = ImmutableMap.of("operations", operations, "imports", new ArrayList>()); + OperationMap operations = new OperationMap(); + operations.setOperation(op); + OperationsMap objs = new OperationsMap(); + objs.setOperation(operations); + objs.setImports(new ArrayList<>()); objs = codegen.postProcessOperationsWithModels(objs, Collections.emptyList()); - CodegenOperation postProcessedOp = ((List) ((Map) objs.get("operations")).get("operation")).get(0); + CodegenOperation postProcessedOp = objs.getOperations().getOperation().get(0); CodegenParameter pp = postProcessedOp.pathParams.get(0); Assert.assertEquals(pp.vendorExtensions.get("x-ruby-example"), "'orderid123'"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/AbstractScalaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/AbstractScalaCodegenTest.java index ce62184a0d3f..b320251de3d0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/AbstractScalaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/AbstractScalaCodegenTest.java @@ -1,9 +1,16 @@ package org.openapitools.codegen.scala; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.MapSchema; import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; + import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.languages.AbstractScalaCodegen; +import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; @@ -99,19 +106,28 @@ public void checkScalaTypeImportMapping() { } @Test - void checkScalaTypeDeclaration() { - - final AbstractScalaCodegen codegen = new P_AbstractScalaCodegen(); - + void checkTypeDeclarationWithByteString() { Schema byteArraySchema = new ObjectSchema(); byteArraySchema.setType("string"); byteArraySchema.setFormat("byte"); byteArraySchema.setDescription("Schema with byte string"); - Assert.assertEquals(codegen.getTypeDeclaration(byteArraySchema), "Array[Byte]", + Assert.assertEquals(fakeScalaCodegen.getTypeDeclaration(byteArraySchema), "Array[Byte]", "OpenApi File type represented as byte string should be represented as Array[Byte] scala type"); - } - + @Test + void checkTypeDeclarationWithStringToArrayModelMapping() { + // Create an alias to an array schema + final Schema nestedArraySchema = new ArraySchema().items(new StringSchema()); + // Create a map schema with additionalProperties type set to array alias + final Schema mapSchema = new MapSchema().additionalProperties(new Schema().$ref("#/components/schemas/NestedArray")); + fakeScalaCodegen.setOpenAPI(new OpenAPI().components(new Components().addSchemas("NestedArray", nestedArraySchema))); + + ModelUtils.setGenerateAliasAsModel(false); + Assert.assertEquals(fakeScalaCodegen.getTypeDeclaration(mapSchema), "Map[String, List[String]]"); + + ModelUtils.setGenerateAliasAsModel(true); + Assert.assertEquals(fakeScalaCodegen.getTypeDeclaration(mapSchema), "Map[String, NestedArray]"); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java index 4304e092bb16..8c9941ce0318 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java @@ -467,6 +467,7 @@ public void mainPackageTest() throws Exception { generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.API_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "true"); Generator gen = generator.opts(clientOptInput); @@ -504,6 +505,7 @@ public void overridePackagesTest() throws Exception { generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.API_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "true"); Generator gen = generator.opts(clientOptInput); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java index 55d068f46cd1..4d3913862e8a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java @@ -11,6 +11,7 @@ import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; import java.util.HashMap; @@ -45,7 +46,7 @@ private Generator getGenerator(CodegenConfigurator config) { private void checkAPIFile(List files, String apiFileName) throws IOException { File apiFile = files.stream().filter(file->file.getName().contains(apiFileName)).findFirst().get(); - String apiFileContent = FileUtils.readFileToString(apiFile); + String apiFileContent = FileUtils.readFileToString(apiFile, StandardCharsets.UTF_8); Assert.assertTrue(!apiFileContent.contains("import { OrganizationWrapper | PersonWrapper }")); Assert.assertEquals(StringUtils.countMatches(apiFileContent,"import { PersonWrapper }"),1); Assert.assertEquals(StringUtils.countMatches(apiFileContent,"import { OrganizationWrapper }"),1); @@ -65,7 +66,7 @@ public void oldImportsStillPresentTest() throws IOException { config.setGeneratorName("typescript-angular"); final List files = getGenerator(config).generate(); File pets = files.stream().filter(file->file.getName().contains("pet.ts")).findFirst().get(); - String apiFileContent = FileUtils.readFileToString(pets); + String apiFileContent = FileUtils.readFileToString(pets, StandardCharsets.UTF_8); Assert.assertTrue(apiFileContent.contains("import { Category }")); Assert.assertTrue(apiFileContent.contains("import { Tag }")); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java index f6b0678a4147..379c2865a4ea 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java @@ -3,12 +3,14 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.*; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptFetchClientCodegen; import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; +import static org.assertj.core.api.Assertions.assertThat; public class TypeScriptFetchClientCodegenTest { @Test @@ -102,4 +104,33 @@ public void getTypeDeclarationTest() { Assert.assertEquals(codegen.getTypeDeclaration(parentSchema), "{ [key: string]: Child; }"); } + @Test + public void containsESMTSConfigFileInCaseOfES6AndNPM() { + TypeScriptFetchClientCodegen codegen = new TypeScriptFetchClientCodegen(); + + codegen.additionalProperties().put("npmName", "@openapi/typescript-fetch-petstore"); + codegen.additionalProperties().put("snapshot", false); + codegen.additionalProperties().put("npmVersion", "1.0.0-SNAPSHOT"); + codegen.setSupportsES6(true); + + codegen.processOpts(); + + assertThat(codegen.supportingFiles()).contains(new SupportingFile("tsconfig.mustache", "", "tsconfig.json")); + assertThat(codegen.supportingFiles()).contains(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json")); + } + + @Test + public void doesNotContainESMTSConfigFileInCaseOfES5AndNPM() { + TypeScriptFetchClientCodegen codegen = new TypeScriptFetchClientCodegen(); + + codegen.additionalProperties().put("npmName", "@openapi/typescript-fetch-petstore"); + codegen.additionalProperties().put("snapshot", false); + codegen.additionalProperties().put("npmVersion", "1.0.0-SNAPSHOT"); + codegen.setSupportsES6(false); + + codegen.processOpts(); + + assertThat(codegen.supportingFiles()).contains(new SupportingFile("tsconfig.mustache", "", "tsconfig.json")); + assertThat(codegen.supportingFiles()).doesNotContain(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json")); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientOptionsTest.java index afd91bd47253..6d3f50e7be00 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientOptionsTest.java @@ -45,9 +45,9 @@ protected void verifyOptions() { verify(clientCodegen).setParamNaming(TypeScriptFetchClientOptionsProvider.PARAM_NAMING_VALUE); verify(clientCodegen).setSupportsES6(TypeScriptFetchClientOptionsProvider.SUPPORTS_ES6_VALUE); verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)); - verify(clientCodegen).setTypescriptThreePlus(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.TYPESCRIPT_THREE_PLUS)); verify(clientCodegen).setWithoutRuntimeChecks(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.WITHOUT_RUNTIME_CHECKS)); verify(clientCodegen).setSagasAndRecords(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.SAGAS_AND_RECORDS)); verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(TypeScriptFetchClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE)); + verify(clientCodegen).setStringEnums(Boolean.parseBoolean(TypeScriptFetchClientOptionsProvider.STRING_ENUMS)); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java index d48db3981e4a..dacc57d2f708 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java @@ -1,8 +1,16 @@ package org.openapitools.codegen.typescript.typescriptnode; import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; +import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptNodeClientCodegen; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; +import org.openapitools.codegen.model.OperationsMap; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -139,39 +147,115 @@ public void mappedApiImportTest() { @Test(description = "correctly produces imports without import mapping") public void postProcessOperationsWithModelsTestWithoutImportMapping() { final String importName = "../model/pet"; - Map operations = createPostProcessOperationsMapWithImportName(importName); + OperationsMap operations = createPostProcessOperationsMapWithImportName(importName); codegen.postProcessOperationsWithModels(operations, Collections.emptyList()); - List> extractedImports = (List>) operations.get("imports"); + List> extractedImports = operations.getImports(); Assert.assertEquals(extractedImports.get(0).get("filename"), importName); } @Test(description = "correctly produces imports with import mapping") public void postProcessOperationsWithModelsTestWithImportMapping() { final String importName = "@namespace/dir/category"; - Map operations = createPostProcessOperationsMapWithImportName(importName); + OperationsMap operations = createPostProcessOperationsMapWithImportName(importName); codegen.postProcessOperationsWithModels(operations, Collections.emptyList()); - List> extractedImports = (List>) operations.get("imports"); + List> extractedImports = operations.getImports(); Assert.assertEquals(extractedImports.get(0).get("filename"), importName); } - private Map createPostProcessOperationsMapWithImportName(String importName) { - Map operations = new HashMap() {{ - put("operation", Collections.emptyList()); - put("classname", "Pet"); - }}; + @Test(description = "correctly produces imports with model name suffix") + public void postProcessOperationsWithModelsTestWithModelNameSuffix() { + final OpenAPI openAPI = TestUtils.createOpenAPI(); + final Schema rootSchema = new ObjectSchema() + .addProperties("child", new Schema().$ref("Child")); + final Schema childSchema = new ObjectSchema() + .addProperties("key", new StringSchema()); + + openAPI.getComponents() + .addSchemas("Root", rootSchema) + .addSchemas("Child", childSchema); + + final TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); + codegen.setModelNameSuffix("Suffix"); + + final HashMap allModels = createParameterForPostProcessAllModels( + codegen.fromModel("Root", rootSchema), + codegen.fromModel("Child", childSchema) + ); + final Map results = codegen.postProcessAllModels(allModels); + final List rootModelMaps = results.get("Root") + .getModels(); + final List> tsImports = (List>) rootModelMaps.get(0) + .get("tsImports"); + + Assert.assertEquals(tsImports.size(), 1); + Assert.assertEquals(tsImports.get(0).get("filename"), "./childSuffix"); + } + + @Test(description = "correctly produces imports with model name prefix") + public void postProcessOperationsWithModelsTestWithModelNamePrefix() { + final OpenAPI openAPI = TestUtils.createOpenAPI(); + final Schema rootSchema = new ObjectSchema() + .addProperties("child", new Schema().$ref("Child")); + final Schema childSchema = new ObjectSchema() + .addProperties("key", new StringSchema()); + + openAPI.getComponents() + .addSchemas("Root", rootSchema) + .addSchemas("Child", childSchema); + + final TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); + codegen.setModelNamePrefix("Prefix"); + + final HashMap allModels = createParameterForPostProcessAllModels( + codegen.fromModel("Root", rootSchema), + codegen.fromModel("Child", childSchema) + ); + final Map results = codegen.postProcessAllModels(allModels); + final List rootModelMaps = results.get("Root") + .getModels(); + final List> tsImports = (List>) rootModelMaps.get(0) + .get("tsImports"); + + Assert.assertEquals(tsImports.size(), 1); + Assert.assertEquals(tsImports.get(0).get("filename"), "./prefixChild"); + } - Map importList = new HashMap() {{ + private OperationsMap createPostProcessOperationsMapWithImportName(String importName) { + OperationMap operations = new OperationMap(); + operations.setClassname("Pet"); + operations.setOperation(new ArrayList<>()); + + Map importList = new HashMap() {{ put("import", importName); put("classname", "Pet"); }}; - List> imports = new ArrayList<>(); + List> imports = new ArrayList<>(); imports.add(importList); - return new HashMap() {{ - put("operations", operations); - put("imports", imports); + + OperationsMap operationsMap = new OperationsMap(); + operationsMap.setImports(imports); + operationsMap.setOperation(operations); + return operationsMap; + } + + private HashMap createParameterForPostProcessAllModels(CodegenModel root, CodegenModel child) { + final ModelsMap rootModelsMap = new ModelsMap(); + final ModelMap rootModelMap = new ModelMap(); + rootModelMap.setModel(root); + rootModelsMap.setModels(Collections.singletonList(rootModelMap)); + rootModelsMap.setImports(Collections.singletonList(Collections.singletonMap("import", "../model/Child"))); + + final ModelsMap childModelsMap = new ModelsMap(); + final ModelMap childModelMap = new ModelMap(); + childModelMap.setModel(child); + childModelsMap.setModels(Collections.singletonList(childModelMap)); + + return new HashMap() {{ + put("Child", childModelsMap); + put("Root", rootModelsMap); }}; } } diff --git a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml index 097ae6768bb7..0fd88cfd5ae3 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml @@ -2122,3 +2122,63 @@ definitions: properties: lovesRocks: type: boolean + Triangle: + allOf: + - $ref: '#/definitions/Polygon' + - type: object + properties: + type: + enum: + - 'Triangle' + x-enum-as-string: true + default: 'Triangle' + type: string + sides: + type: integer + area: + type: string + Square: + allOf: + - $ref: '#/definitions/Polygon' + - type: object + properties: + type: + enum: + - 'Square' + x-enum-as-string: true + default: 'Square' + type: string + sides: + type: integer + area: + type: string + Polygon: + allOf: + - $ref: '#/definitions/Shape' + - type: object + required: + - type + properties: + type: + enum: + - 'Triangle' + - 'Square' + x-enum-as-string: true + type: string + sides: + type: integer + area: + type: string + Shape: + type: object + required: + - type + properties: + type: + enum: + - 'Triangle' + - 'Square' + x-enum-as-string: true + type: string + area: + type: string \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/allOf.yaml b/modules/openapi-generator/src/test/resources/3_0/allOf.yaml index 4d781cb871a3..d11e7a877d64 100644 --- a/modules/openapi-generator/src/test/resources/3_0/allOf.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/allOf.yaml @@ -52,6 +52,9 @@ components: $ref: "#/components/schemas/Child" Child: description: A representation of a child + properties: + boosterSeat: + type: boolean allOf: - type: object properties: diff --git a/modules/openapi-generator/src/test/resources/3_0/allOf_nullable.yaml b/modules/openapi-generator/src/test/resources/3_0/allOf_nullable.yaml new file mode 100644 index 000000000000..5b201d7833f1 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/allOf_nullable.yaml @@ -0,0 +1,33 @@ +openapi: 3.0.1 +info: + version: 1.0.0 + title: Example + license: + name: MIT +servers: + - url: http://api.example.xyz/v1 +paths: + /example: + get: + operationId: list + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Example" +components: + schemas: + Child: + type: object + properties: + name: + type: string + Example: + type: object + properties: + child: + nullable: true + allOf: + - $ref: '#/components/schemas/Child' diff --git a/modules/openapi-generator/src/test/resources/3_0/content-data.yaml b/modules/openapi-generator/src/test/resources/3_0/content-data.yaml index 6296747be8a2..ae3966447538 100644 --- a/modules/openapi-generator/src/test/resources/3_0/content-data.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/content-data.yaml @@ -38,6 +38,8 @@ paths: description: "The number of allowed requests in the current period" schema: type: integer + X-Rate-Limit-Ref: + $ref: '#/components/headers/X-Rate-Limit' content: application/json: schema: @@ -97,6 +99,11 @@ paths: 200: description: OK components: + headers: + X-Rate-Limit: + description: "The number of allowed requests in the current period" + schema: + type: integer schemas: stringWithMinLength: type: string diff --git a/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml new file mode 100644 index 000000000000..7a2627ee86fc --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml @@ -0,0 +1,692 @@ +openapi: 3.0.0 +info: + description: This is a sample server Petstore server. For this sample, you can use the + api key `special-key` to test the authorization filters. + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: "" + operationId: addPet + requestBody: + $ref: "#/components/requestBodies/Pet" + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + put: + tags: + - pet + summary: Update an existing pet + description: "" + 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 + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + "200": + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + "200": + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + deprecated: true + "/pet/{petId}": + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: successful operation + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid ID supplied + "404": + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: "" + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + delete: + tags: + - pet + summary: Deletes a pet + description: "" + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + "/pet/{petId}/uploadImage": + post: + tags: + - pet + summary: uploads an image + description: "" + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + responses: + "200": + description: successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponse" + security: + - petstore_auth: + - write:pets + - read:pets + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: "" + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + description: order placed for purchasing the pet + required: true + responses: + "200": + description: successful operation + content: + application/xml: + schema: + $ref: "#/components/schemas/Order" + application/json: + schema: + $ref: "#/components/schemas/Order" + "400": + description: Invalid Order + "/store/order/{orderId}": + get: + tags: + - store + summary: Find purchase order by ID + description: For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + "200": + description: successful operation + content: + application/xml: + schema: + $ref: "#/components/schemas/Order" + application/json: + schema: + $ref: "#/components/schemas/Order" + "400": + description: Invalid ID supplied + "404": + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + "400": + description: Invalid ID supplied + "404": + description: Order not found + /user: + post: + tags: + - user + summary: Create user + 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 + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: "" + operationId: createUsersWithArrayInput + requestBody: + $ref: "#/components/requestBodies/UserArray" + responses: + default: + description: successful operation + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: "" + operationId: createUsersWithListInput + requestBody: + $ref: "#/components/requestBodies/UserArray" + responses: + default: + description: successful operation + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: "" + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + "200": + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + "400": + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: "" + operationId: logoutUser + responses: + default: + description: successful operation + "/user/{username}": + get: + tags: + - user + summary: Get user by user name + description: "" + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + "200": + description: successful operation + content: + application/xml: + schema: + $ref: "#/components/schemas/User" + application/json: + schema: + $ref: "#/components/schemas/User" + "400": + description: Invalid username supplied + "404": + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + 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 + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + "400": + description: Invalid username supplied + "404": + description: User not found +servers: + - url: http://petstore.swagger.io/v2 +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + description: List of user object + 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 + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + api_key: + type: apiKey + name: api_key + in: header + schemas: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: "#/components/schemas/Category" + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: "#/components/schemas/Tag" + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml new file mode 100644 index 000000000000..8e46b9e9344e --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -0,0 +1,2156 @@ +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: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '405': + description: Invalid input + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + default: '2010-02-01T10:20:10.11111+01:00' + example: '2020-02-02T20:20:20.22222Z' + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Someting wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + responses: + '200': + description: Output number + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + responses: + '200': + description: Output string + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + responses: + '200': + description: Output boolean + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + responses: + '200': + description: Output composite + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request much reference a schema named + `File`. + operationId: testBodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/test-query-parameters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + /fake/array-of-enums: + get: + tags: + - fake + summary: Array of Enums + operationId: getArrayOfEnums + responses: + 200: + description: Got named array of enums + content: + application/json: + schema: + $ref: '#/components/schemas/ArrayOfEnums' +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' + - url: https://127.0.0.1/no_variable + description: The local server without variables +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + examples: + simple-list: + summary: Simple list example + description: Should not get into code examples + value: + - username: foo + - username: bar + 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 + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + # Test the 'HTTP signature' security scheme. + # Each HTTP request is cryptographically signed as specified + # in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + example: '2020-02-02T20:20:20.000222Z' + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + objectWithNoDeclaredProps: + type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + description: test code generation for objects + Value must be a map of strings to values. It cannot be the 'null' value. + objectWithNoDeclaredPropsNullable: + type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + description: test code generation for nullable objects. + Value must be a map of strings to values or the 'null' value. + nullable: true + anyTypeProp: + description: test code generation for any type + Here the 'type' attribute is not specified, which means the value can be anything, + including the null value, string, number, boolean, array or object. + See https://github.com/OAI/OpenAPI-Specification/issues/1389 + # TODO: this should be supported, currently there are some issues in the code generation. + #anyTypeExceptNullProp: + # description: any type except 'null' + # Here the 'type' attribute is not specified, which means the value can be anything, + # including the null value, string, number, boolean, array or object. + # not: + # type: 'null' + anyTypePropNullable: + description: test code generation for any type + Here the 'type' attribute is not specified, which means the value can be anything, + including the null value, string, number, boolean, array or object. + The 'nullable' attribute does not change the allowed values. + nullable: true + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + 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' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Address' + - type: object + properties: + declawed: + type: boolean + Address: + type: object + additionalProperties: + type: integer + Animal: + type: object + discriminator: + propertyName: className + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + multipleOf: 2 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + multipleOf: 32.5 + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + decimal: + type: string + format: number + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + example: '2020-02-02' + dateTime: + type: string + format: date-time + example: '2007-12-03T10:15:30+01:00' + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_integer_only: + type: integer + enum: + - 2 + - -2 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + anytype_1: {} + map_with_undeclared_properties_anytype_1: + type: object + map_with_undeclared_properties_anytype_2: + type: object + properties: {} + map_with_undeclared_properties_anytype_3: + type: object + additionalProperties: true + empty_map: + type: object + description: an object with no declared properties and no undeclared + properties, hence it's an empty map. + additionalProperties: false + map_with_undeclared_properties_string: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + 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 + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + OuterEnum: + nullable: true + type: string + enum: + - placed + - approved + - delivered + OuterEnumInteger: + type: integer + enum: + - 0 + - 1 + - 2 + OuterEnumDefaultValue: + type: string + enum: + - placed + - approved + - delivered + default: placed + OuterEnumIntegerDefaultValue: + type: integer + enum: + - 0 + - 1 + - 2 + default: 0 + OuterComposite: + type: object + properties: + my_number: + $ref: '#/components/schemas/OuterNumber' + my_string: + $ref: '#/components/schemas/OuterString' + my_boolean: + $ref: '#/components/schemas/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + _special_model.name_: + properties: + '$special[property.name]': + type: integer + format: int64 + '_special_model.name_': + type: string + xml: + name: '$special[model.name]' + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + fruit: + properties: + color: + type: string + oneOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + # Below additionalProperties is set to false to validate the use + # case when a composed schema has additionalProperties set to false. + additionalProperties: false + apple: + type: object + properties: + cultivar: + type: string + pattern: ^[a-zA-Z\s]*$ + origin: + type: string + pattern: /^[A-Z\s]*$/i + nullable: true + banana: + type: object + properties: + lengthCm: + type: number + mammal: + oneOf: + - $ref: '#/components/schemas/whale' + - $ref: '#/components/schemas/zebra' + - $ref: '#/components/schemas/Pig' + discriminator: + propertyName: className + whale: + type: object + properties: + hasBaleen: + type: boolean + hasTeeth: + type: boolean + className: + type: string + required: + - className + zebra: + type: object + properties: + type: + type: string + enum: + - plains + - mountain + - grevys + className: + type: string + required: + - className + additionalProperties: true + Pig: + oneOf: + - $ref: '#/components/schemas/BasquePig' + - $ref: '#/components/schemas/DanishPig' + discriminator: + propertyName: className + BasquePig: + type: object + properties: + className: + type: string + required: + - className + DanishPig: + type: object + properties: + className: + type: string + required: + - className + gmFruit: + properties: + color: + type: string + anyOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + additionalProperties: false + fruitReq: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/appleReq' + - $ref: '#/components/schemas/bananaReq' + additionalProperties: false + appleReq: + type: object + properties: + cultivar: + type: string + mealy: + type: boolean + required: + - cultivar + additionalProperties: false + bananaReq: + type: object + properties: + lengthCm: + type: number + sweet: + type: boolean + required: + - lengthCm + additionalProperties: false + # go-experimental is unable to make Triangle and Quadrilateral models + # correctly https://github.com/OpenAPITools/openapi-generator/issues/6149 + Drawing: + type: object + properties: + mainShape: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value cannot be null. + $ref: '#/components/schemas/Shape' + shapeOrNull: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value may be null because ShapeOrNull has 'null' + # type as a child schema of 'oneOf'. + $ref: '#/components/schemas/ShapeOrNull' + nullableShape: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value may be null because NullableShape has the + # 'nullable: true' attribute. For this specific scenario this is exactly the + # same thing as 'shapeOrNull'. + $ref: '#/components/schemas/NullableShape' + shapes: + type: array + items: + $ref: '#/components/schemas/Shape' + additionalProperties: + # Here the additional properties are specified using a referenced schema. + # This is just to validate the generated code works when using $ref + # under 'additionalProperties'. + $ref: '#/components/schemas/fruit' + Shape: + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + ShapeOrNull: + description: The value may be a shape or the 'null' value. + This is introduced in OAS schema >= 3.1. + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + NullableShape: + description: The value may be a shape or the 'null' value. + The 'nullable' attribute was introduced in OAS schema >= 3.0 + and has been deprecated in OAS schema >= 3.1. + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + nullable: true + ShapeInterface: + properties: + shapeType: + type: string + required: + - shapeType + TriangleInterface: + properties: + triangleType: + type: string + required: + - triangleType + Triangle: + oneOf: + - $ref: '#/components/schemas/EquilateralTriangle' + - $ref: '#/components/schemas/IsoscelesTriangle' + - $ref: '#/components/schemas/ScaleneTriangle' + discriminator: + propertyName: triangleType + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + EquilateralTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + IsoscelesTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + additionalProperties: false + ScaleneTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + QuadrilateralInterface: + properties: + quadrilateralType: + type: string + required: + - quadrilateralType + Quadrilateral: + oneOf: + - $ref: '#/components/schemas/SimpleQuadrilateral' + - $ref: '#/components/schemas/ComplexQuadrilateral' + discriminator: + propertyName: quadrilateralType + SimpleQuadrilateral: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/QuadrilateralInterface' + ComplexQuadrilateral: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/QuadrilateralInterface' + GrandparentAnimal: + type: object + required: + - pet_type + properties: + pet_type: + type: string + discriminator: + propertyName: pet_type + ParentPet: + type: object + allOf: + - $ref: '#/components/schemas/GrandparentAnimal' + ChildCat: + allOf: + - $ref: '#/components/schemas/ParentPet' + - type: object + properties: + name: + type: string + pet_type: + x-enum-as-string: true + type: string + enum: + - ChildCat + default: ChildCat + ArrayOfEnums: + type: array + items: + $ref: '#/components/schemas/OuterEnum' + DateTimeTest: + type: string + default: '2010-01-01T10:10:10.000111+01:00' + example: '2010-01-01T10:10:10.000111+01:00' + format: date-time + DeprecatedObject: + type: object + deprecated: true + properties: + name: + type: string + ObjectWithDeprecatedFields: + type: object + properties: + uuid: + type: string + id: + type: number + deprecated: true + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + type: array + deprecated: true + items: + $ref: '#/components/schemas/Bar' + PolymorphicProperty: + oneOf: + - type: boolean + - type: string + - type: object + - type: array + items: + $ref: '#/components/schemas/StringArrayItem' + StringArrayItem: + type: string + format: string diff --git a/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml new file mode 100644 index 000000000000..674afde01d57 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -0,0 +1,1988 @@ +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: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + 4XX: + description: client error + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + 404: + description: not found + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '405': + description: Invalid input + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Someting wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + responses: + '200': + description: Output number + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + responses: + '200': + description: Output string + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + responses: + '200': + description: Output boolean + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + responses: + '200': + description: Output composite + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request much reference a schema named + `File`. + operationId: testBodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/test-query-parameters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: Success + /fake/test-unique-parameters: + put: + tags: + - fake + description: To test unique items in header and query parameters + operationId: testUniqueItemsHeaderAndQueryParameterCollectionFormat + parameters: + - name: queryUnique + in: query + required: true + schema: + type: array + uniqueItems: true + items: + type: string + - name: headerUnique + in: header + required: true + schema: + type: array + uniqueItems: true + items: + type: string + responses: + "200": + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' + - url: https://127.0.0.1/no_variable + description: The local server without variables +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + 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 + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + # Test the 'HTTP signature' security scheme. + # Each HTTP request is cryptographically signed as specified + # in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + arbitraryObject: + type: object + description: test code generation for objects + Value must be a map of strings to values. It cannot be the 'null' value. + arbitraryNullableObject: + type: object + description: test code generation for nullable objects. + Value must be a map of strings to values or the 'null' value. + nullable: true + arbitraryTypeValue: + description: test code generation for any type + Value can be any type - string, number, boolean, array or object. + arbitraryNullableTypeValue: + description: test code generation for any type + Value can be any type - string, number, boolean, array, object or + the 'null' value. + nullable: true + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + deprecated: true + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + 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' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Address' + - type: object + properties: + declawed: + type: boolean + Address: + type: object + additionalProperties: + type: integer + Animal: + type: object + discriminator: + propertyName: className + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + dateTime: + type: string + format: date-time + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + 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 + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + OuterEnum: + nullable: true + type: string + enum: + - placed + - approved + - delivered + OuterEnumInteger: + type: integer + enum: + - 0 + - 1 + - 2 + OuterEnumDefaultValue: + type: string + enum: + - placed + - approved + - delivered + default: placed + OuterEnumIntegerDefaultValue: + type: integer + enum: + - 0 + - 1 + - 2 + default: 0 + OuterComposite: + type: object + properties: + my_number: + $ref: '#/components/schemas/OuterNumber' + my_string: + $ref: '#/components/schemas/OuterString' + my_boolean: + $ref: '#/components/schemas/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + _special_model.name_: + properties: + '$special[property.name]': + type: integer + format: int64 + xml: + name: '$special[model.name]' + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + default: false + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + fruit: + properties: + color: + type: string + oneOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + apple: + type: object + properties: + cultivar: + type: string + banana: + type: object + additionalProperties: true + properties: + lengthCm: + type: number + mammal: + oneOf: + - $ref: '#/components/schemas/whale' + - $ref: '#/components/schemas/zebra' + discriminator: + propertyName: className + mapping: + whale: '#/components/schemas/whale' + zebra: '#/components/schemas/zebra' + whale: + type: object + properties: + hasBaleen: + type: boolean + hasTeeth: + type: boolean + className: + type: string + required: + - className + zebra: + type: object + properties: + type: + type: string + enum: + - plains + - mountain + - grevys + className: + type: string + required: + - className + gmFruit: + properties: + color: + type: string + anyOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + fruitReq: + oneOf: + - $ref: '#/components/schemas/appleReq' + - $ref: '#/components/schemas/bananaReq' + appleReq: + type: object + properties: + cultivar: + type: string + mealy: + type: boolean + required: + - cultivar + bananaReq: + type: object + properties: + lengthCm: + type: number + sweet: + type: boolean + required: + - lengthCm + ReadOnlyWithDefault: + type: object + properties: + prop1: + type: string + readOnly: true + prop2: + type: string + readOnly: true + default: 'defaultProp2' + prop3: + type: string + default: 'defaultProp3' + boolProp1: + default: false + type: boolean + readOnly: true + boolProp2: + type: boolean + default: true + intProp1: + type: number + default: 100 + readOnly: true + intProp2: + type: number + default: 120 + NullableAllOfChild: + type: object + properties: + name: + type: string + NullableAllOf: + type: object + properties: + child: + nullable: true + allOf: + - $ref: '#/components/schemas/NullableAllOfChild' + OneOfPrimitiveType: + oneOf: + - $ref: '#/components/schemas/OneOfPrimitiveTypeChild' + - type: integer + format: int32 + - $ref: '#/components/schemas/OneOfArrayOfString' + OneOfPrimitiveTypeChild: + type: object + properties: + name: + type: string + OneOfArrayOfString: + type: array + items: + type: string diff --git a/modules/openapi-generator/src/test/resources/3_0/issue-11340.yaml b/modules/openapi-generator/src/test/resources/3_0/issue-11340.yaml new file mode 100644 index 000000000000..167a82b12c22 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue-11340.yaml @@ -0,0 +1,28 @@ +openapi: "3.0.3" +info: + title: Issue 11340 - Bean Validation Breaks Generated Java Code + version: "1.0.2" + description: With Bean Validation @NotNull and type of parameter must be separated by space. +paths: + /configuration: + put: + operationId: operation + description: Operation with required header and required request body + parameters: + - in: header + name: x-non-null-header-parameter + schema: + type: string + required: true + requestBody: + required: true + content: + application/json: + schema: + type: object + minProperties: 1 + additionalProperties: + type: object + responses: + '200': + description: OK diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml b/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml new file mode 100644 index 000000000000..98737ae11f86 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml @@ -0,0 +1,279 @@ +openapi: 3.0.0 +info: + title: Extra Annotation Test + version: 1.0.0 +tags: + - name: employee + - name: surveyGroup + - name: skills + - name: surveySubmission + - name: userProfile +servers: + - url: "http://localhost:8080" +paths: + /employee: + get: + tags: + - employee + parameters: + - name: filterBy + description: Field by which to filter results. + in: query + schema: + type: string + example: name + - name: filter + description: String to filter on, query string + in: query + schema: + type: string + example: Frank + - name: sortBy + description: Field by which to sort + in: query + schema: + type: string + - name: sortOrder + description: Sort Order + in: query + schema: + type: string + enum: + - ASC + - DESC + - name: offset + description: Page offset + schema: + type: integer + format: int32 + in: query + - name: maxResults + description: Maximum number of results to return, defaults to 20 + schema: + type: integer + format: int32 + example: 20 + in: query + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Employee" + description: A list resource collection of Employees. + operationId: getEmployees + summary: List all employees. +components: + schemas: + EmployeeEntity: + type: object + x-class-extra-annotation: |- + @javax.persistence.Entity + @javax.persistence.Table( + name = "employees", + uniqueConstraints = { + @javax.persistence.UniqueConstraint(columnNames = {"email"}) + } + ) + allOf: + - $ref: "#/components/schemas/Employee" + properties: + assignments: + description: Projects for which the employee has been assigned to a SurveyGroup + items: + $ref: "#/components/schemas/EmployeeAssignment" + type: array + x-field-extra-annotation: |- + @javax.persistence.OneToMany(mappedBy = "employee") + Employee: + type: object + x-class-extra-annotation: |- + @javax.persistence.MappedSuperclass + properties: + id: + description: Employee's ID + type: string + example: jsmith@openapi.com + x-field-extra-annotation: |- + @javax.persistence.Id + name: + description: Name of the employee. + type: string + example: John Smith + email: + description: The email address of the employee. + type: string + example: jsmith@openapi.com + x-field-extra-annotation: |- + @org.hibernate.annotations.Formula("CONCAT(id, '@openapi.com')") + role: + description: "The role of the employee. For example, consultant, PM, TSM, etc." + type: string + example: Consultant + hasAcceptedTerms: + description: Whether the employee has accepted the terms of the usage agreement. + type: boolean + example: false + x-field-extra-annotation: |- + @javax.persistence.Transient + dateTermsAccepted: + description: The date the employee accepted the terms of the usage agreement. + type: string + format: date + example: "2021-02-09" + termsVersionNumber: + description: The version number of terms of the usage agreement. + type: number + format: float + example: 1.0 + SurveyGroupEntity: + required: + - opportunityId + - projectName + - projectCreatorId + type: object + allOf: + - $ref: "#/components/schemas/SurveyGroup" + x-class-extra-annotation: |- + @javax.persistence.Entity + @javax.persistence.Table(name = "survey_groups") + properties: + assignments: + type: array + x-field-extra-annotation: |- + @javax.persistence.OneToMany + @javax.persistence.JoinColumn(name = "survey_group_id") + items: + $ref: "#/components/schemas/EmployeeAssignment" + disabled: + description: A flag indicating if this Survey Group is disabled + type: boolean + x-field-extra-annotation: |- + @javax.persistence.Column(nullable = false) + default: false + example: false + SurveyGroup: + required: + - opportunityId + - projectName + - projectCreatorId + - tsmId + type: object + x-class-extra-annotation: |- + @javax.persistence.MappedSuperclass + @javax.persistence.EntityListeners(org.springframework.data.jpa.domain.support.AuditingEntityListener.class) + properties: + id: + description: A GUID that uniquely identifies the SurveyGroup. + type: string + format: uuid + example: f1ad7649-eb70-4499-9c82-a63fe2c6dc71 + x-field-extra-annotation: |- + @javax.persistence.Id + @javax.persistence.GeneratedValue(generator = "UUID") + @org.hibernate.annotations.GenericGenerator(name = "UUID", strategy = + "org.hibernate.id.UUIDGenerator") + @javax.persistence.Column(name = "id", updatable = false, nullable = + false) + createdDate: + description: The date the project was created. + type: string + format: date-time + readOnly: true + example: "2020-01-29" + x-field-extra-annotation: |- + @org.springframework.data.annotation.CreatedDate + createdBy: + description: The employee id (Kerberos) of the user that created the project. + type: string + example: janedoe + x-field-extra-annotation: |- + @org.springframework.data.annotation.CreatedBy + modifiedDate: + description: The date the project was last modified + type: string + format: date-time + readOnly: true + example: "2020-01-29" + x-field-extra-annotation: |- + @org.springframework.data.annotation.LastModifiedDate + modifiedBy: + description: The employee id (Kerberos) of the user that last modifed the project. + type: string + example: janedoe + x-field-extra-annotation: |- + @org.springframework.data.annotation.LastModifiedBy + opportunityId: + description: The ID of the Opportunity from PSA. + type: string + example: 3456NAS + x-field-extra-annotation: |- + @javax.persistence.Column(unique = true) + projectName: + description: The name of the project. + type: string + example: NASA App Modernization + projectCreatorId: + description: The email address of the creator of the project. + type: string + example: janedoe@openapi.com + submissionStatus: + x-field-extra-annotation: |- + @javax.persistence.Transient + description: Returns a status of "Complete" or "Incomplete" + type: string + example: Complete + enum: + - Complete + - Incomplete + EmployeeAssignment: + type: object + x-class-extra-annotation: |- + @javax.persistence.Entity + @javax.persistence.Table( + name = "employee_assignments", + uniqueConstraints={ + @javax.persistence.UniqueConstraint(columnNames={"employee_id", "survey_group_id"}) + }) + properties: + id: + description: A GUID that uniquely identifies the project. + type: string + format: uuid + example: f9238beb-9649-4983-9059-4f0ee372d56e + x-field-extra-annotation: |- + @javax.persistence.Id + @javax.persistence.GeneratedValue(generator = "UUID") + @org.hibernate.annotations.GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator") + @javax.persistence.Column(name = "id", updatable = false, nullable = false) + employee: + allOf: + - $ref: "#/components/schemas/EmployeeEntity" + type: object + x-field-extra-annotation: |- + @javax.persistence.ManyToOne(cascade = javax.persistence.CascadeType.REMOVE) + @javax.persistence.JoinColumn(name = "employee_id", nullable=false) + surveyGroup: + description: The unique ID of the SurveyGroup associated with the opportunity. + type: object + x-field-extra-annotation: |- + @javax.persistence.ManyToOne + @javax.persistence.JoinColumn(name = "survey_group_id", nullable=false) + allOf: + - $ref: "#/components/schemas/SurveyGroupEntity" + startDate: + description: The date the employee started the project. + type: string + format: date-time + example: "2020-01-29" + endDate: + description: The employee's end date on the project. + type: string + format: date-time + example: "2020-01-29" + billableRole: + description: Role that the employee is billed for on the project.. + type: string + example: Consultant diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml new file mode 100644 index 000000000000..192c958f7245 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml @@ -0,0 +1,134 @@ +openapi: 3.0.1 +info: + title: ByRefOrValue + description: > + This tests for a oneOf interface representation + version: 0.0.1 +servers: + - url: "http://localhost:8080" +tags: + - name: Foo +paths: + /foo: + get: + tags: + - Foo + summary: GET all Foos + operationId: getAllFoos + responses: + '200': + $ref: '#/components/responses/200FooArray' + post: + tags: + - Foo + summary: Create a Foo + operationId: createFoo + requestBody: + $ref: '#/components/requestBodies/Foo' + responses: + '201': + $ref: '#/components/responses/201Foo' + +components: + schemas: + Entity: + type: object + allOf: + - "$ref": "#/components/schemas/Addressable" + - "$ref": "#/components/schemas/Extensible" + + EntityRef: + description: Entity reference schema to be use for all entityRef class. + type: object + properties: + name: + type: string + description: Name of the related entity. + '@referredType': + type: string + description: The actual type of the target instance when needed for disambiguation. + allOf: + - $ref: '#/components/schemas/Addressable' + - "$ref": "#/components/schemas/Extensible" + + + Addressable: + type: object + properties: + href: + type: string + description: Hyperlink reference + id: + type: string + description: unique identifier + description: Base schema for adressable entities + Extensible: + type: object + properties: + "@schemaLocation": + type: string + description: A URI to a JSON-Schema file that defines additional attributes + and relationships + "@baseType": + type: string + description: When sub-classing, this defines the super-class + "@type": + type: string + description: When sub-classing, this defines the sub-class Extensible name + required: + - '@type' + + FooRefOrValue: + type: object + oneOf: + - $ref: "#/components/schemas/Foo" + - $ref: "#/components/schemas/FooRef" + discriminator: + propertyName: "@type" + mapping: + Foo: "#/components/schemas/Foo" + FooRef: "#/components/schemas/FooRef" + + Foo: + type: object + properties: + fooPropA: + type: string + fooPropB: + type: string + allOf: + - $ref: '#/components/schemas/Entity' + + FooRef: + type: object + properties: + foorefPropA: + type: string + allOf: + - $ref: '#/components/schemas/EntityRef' + + requestBodies: + Foo: + description: The Foo to be created + content: + application/json;charset=utf-8: + schema: + $ref: '#/components/schemas/Foo' + responses: + '204': + description: Deleted + content: { } + 201Foo: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/FooRefOrValue' + 200FooArray: + description: Success + content: + application/json;charset=utf-8: + schema: + type: array + items: + $ref: '#/components/schemas/FooRefOrValue' \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_9282.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_9282.yaml new file mode 100644 index 000000000000..f3d9f38c778d --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_9282.yaml @@ -0,0 +1,18 @@ +openapi: 3.0.0 +components: + schemas: + AdditionalPropertiesTrue: + description: additionalProperties set to true + type: object + properties: + child: + type: object + additionalProperties: true + + AdditionalPropertiesAnyType: + description: additionalProperties set to any type explicitly + type: object + properties: + child: + type: object + additionalProperties: {} diff --git a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml index 3ae78d049cea..5a1f2c2c0813 100644 --- a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml @@ -2182,3 +2182,26 @@ components: - sold xml: name: Pet + ArrayOfInlineAllOf: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + example: doggie + array_allof_dog_property: + type: array + items: + allOf: + - type: object + properties: + breed: + type: string + - type: object + properties: + color: + type: string diff --git a/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml new file mode 100644 index 000000000000..772d09dd0b64 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml @@ -0,0 +1,1910 @@ +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: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '200': + description: Successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + x-webclient-blocking: true + responses: + '200': + description: Successful operation + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + x-webclient-blocking: true + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + x-webclient-blocking: true + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + x-webclient-blocking: true + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Successful operation + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + - name: enum_query_model_array + in: query + schema: + type: array + items: + $ref: '#/components/schemas/EnumClass' + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Someting wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + responses: + '200': + description: Output number + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + /fake/property/enum-int: + post: + tags: + - fake + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + responses: + '200': + description: Output enum (int) + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + responses: + '200': + description: Output string + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + responses: + '200': + description: Output boolean + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + responses: + '200': + description: Output composite + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request must reference a schema named + `File`. + operationId: testBodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/body-with-binary: + put: + tags: + - fake + description: >- + For this test, the body has to be a binary file. + operationId: testBodyWithBinary + responses: + '200': + description: Success + requestBody: + content: + image/png: + schema: + type: string + nullable: true + format: binary + description: image to upload + required: true + /fake/test-query-parameters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + style: pipeDelimited + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + - name: language + in: query + required: false + schema: + type: object + additionalProperties: + type: string + format: string + - name: allowEmpty + in: query + required: true + allowEmptyValue: true + schema: + type: string + responses: + "200": + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + /fake/http-signature-test: + get: + tags: + - fake + summary: test http signature authentication + operationId: fake-http-signature-test + parameters: + - name: query_1 + in: query + description: query parameter + required: optional + schema: + type: string + - name: header_1 + in: header + description: header parameter + required: optional + schema: + type: string + security: + - http_signature_test: [] + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 200: + description: The instance started successfully +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' + - url: https://127.0.0.1/no_varaible + description: The local server without variables +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + 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 + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + uniqueItems: true + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + 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' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + declawed: + type: boolean + Animal: + type: object + discriminator: + propertyName: className + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + decimal: + type: string + format: number + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + dateTime: + type: string + format: date-time + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + 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 + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + minItems: 0 + maxItems: 3 + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + OuterEnum: + nullable: true + type: string + enum: + - placed + - approved + - delivered + OuterEnumInteger: + type: integer + enum: + - 0 + - 1 + - 2 + example: 2 + OuterEnumDefaultValue: + type: string + enum: + - placed + - approved + - delivered + default: placed + OuterEnumIntegerDefaultValue: + type: integer + enum: + - 0 + - 1 + - 2 + default: 0 + OuterComposite: + type: object + properties: + my_number: + $ref: '#/components/schemas/OuterNumber' + my_string: + $ref: '#/components/schemas/OuterString' + my_boolean: + $ref: '#/components/schemas/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + _special_model.name_: + properties: + '$special[property.name]': + type: integer + format: int64 + xml: + name: '$special[model.name]' + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + OuterObjectWithEnumProperty: + type: object + example: + value: 2 + required: + - value + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + DeprecatedObject: + type: object + deprecated: true + properties: + name: + type: string + ObjectWithDeprecatedFields: + type: object + properties: + uuid: + type: string + id: + type: number + deprecated: true + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + type: array + deprecated: true + items: + $ref: '#/components/schemas/Bar' diff --git a/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml b/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml new file mode 100644 index 000000000000..1fa23eb9f626 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml @@ -0,0 +1,165 @@ +openapi: 3.0.0 +info: + description: This is a test api description + version: 1.0.0 + title: Library + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - {name: books, description: Everything about books} + - {name: users, description: Everyting about users} + - {name: reviews, description: Everything related to book reviews} +paths: + /book/{bookName}: + get: + tags: [books] + summary: Get a book by name + operationId: getBook + parameters: + - {name: bookName, in: path, required: true, schema: {type: string}} + responses: + '200': + description: success + content: + application/json: + schema: { $ref: "#/components/schemas/Book" } + x-roles: ["isAnonymous()"] + post: + tags: [books] + summary: Create a new book + operationId: createBook + parameters: + - {name: bookName, in: path, required: true, schema: {type: string}} + requestBody: + content: + application/json: { schema: { $ref: "#/components/schemas/Book" } } + responses: + '200': + description: success + x-roles: ["admin"] + /book/search: + get: + tags: [books] + summary: Search for a book + parameters: + - {name: bookName, in: query, required: false, schema: {type: string, example: "Book 2"}} + - {name: ISBN, in: query, required: false, schema: {type: string, pattern: "[0-9]{13}", example: "0123456789123"}} + - {name: published, in: query, required: false, schema: {type: string, format: date}} + - {name: minNumPages, in: query, required: false, schema: {type: integer, format: int32, minimum: 1, maximum: 1000}} + - {name: minReadTime, in: query, required: false, schema: {type: number, format: float, minimum: 1, example: 5.7}} + - {name: description, in: query, required: false, schema: {type: string, minLength: 4, nullable: true}} + - {name: preferences, in: cookie, required: false, schema: {type: string}} + - {name: geoLocation, in: header, required: false, schema: {type: string}} + responses: + '200': + description: success + content: + application/json: + { schema: { type: array, items: { $ref: "#/components/schemas/Book" } } } + /book/availability/{bookName}: + get: + tags: [books] + summary: Check book availability + operationId: isBookAvailable + parameters: + - { name: bookName, in: path, required: true, schema: { type: string, example: "Book 1" } } + responses: + '200': + description: success + content: + text/plain: + schema: { $ref: "#/components/schemas/BookAvailability" } + /book/reserve/{bookName}: + get: + tags: [books] + summary: Reserve book for self + operationId: reserveBook + parameters: + - { name: bookName, in: path, required: true, schema: { type: string, example: "Book 2" } } + responses: + '200': + description: success + x-roles: ["isAuthorized()"] + /user/{userName}: + get: + tags: [users] + summary: View user profile + operationId: getUserProfile + parameters: + - {name: userName, in: path, required: true, schema: {type: string, pattern: "[0-9a-zA-Z ]+"}} + responses: + '200': + description: success + content: + application/json: { schema: { $ref: "#/components/schemas/User" } } + /user: + post: + tags: [users] + summary: Update your own profile + operationId: updateProfile + requestBody: + content: + '*/*': { schema: { $ref: "#/components/schemas/User"} } + responses: + '200': + description: success + x-roles: ["isAuthorized()"] + /book/viewReviews: + get: + tags: [reviews] + summary: Get all reviews for a book + parameters: + - { name: bookName, in: query, required: true, schema: { type: string, nullable: false } } + responses: + '200': + description: success + content: + application/json: { schema: { type: array, items: { $ref: "#/content/schemas/Review" } } } + /book/sendReview: + post: + tags: [reviews] + summary: Send a review to a book + parameters: + - {name: bookName, in: query, required: true, schema: { type: string, nullable: false } } + requestBody: + content: + application/x-www-form-urlencoded: + schema: {$ref: "#/components/schemas/Review"} + responses: + '200': + description: success + x-roles: ["isAuthorized()"] +components: + schemas: + Book: + title: Book + description: book instance + type: object + properties: + name: {type: string} + availability: {$ref: "#/components/schemas/BookAvailability"} + pages: {type: integer, format: int32, minimum: 1} + author: {type: string, pattern: "[a-zA-z ]+"} + readTime: {type: number, format: float, minimum: 0, exclusiveMinimum: true} + required: ["name", "availability"] + default: + name: "Bob's Adventures" + availability: "available" + BookAvailability: + type: string + enum: ["available", "not available", "reserved"] + default: "not available" + Review: + type: object + properties: + rating: {type: integer, minimum: 1, maximum: 5, default: 2} + description: {type: string, maxLength: 200} + required: [rating] + User: + type: object + properties: + username: { type: string, minLength: 2, nullable: false } + name: { type: string, minLength: 1 } + description: { type: string, nullable: true } + required: ["username", "name"] diff --git a/modules/openapi-generator/src/test/resources/3_0/oneOf_primitive.yaml b/modules/openapi-generator/src/test/resources/3_0/oneOf_primitive.yaml new file mode 100644 index 000000000000..9f60dbe79d2e --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/oneOf_primitive.yaml @@ -0,0 +1,31 @@ +openapi: 3.0.1 +info: + version: 1.0.0 + title: Example + license: + name: MIT +servers: + - url: http://api.example.xyz/v1 +paths: + /example: + get: + operationId: list + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Example" +components: + schemas: + Child: + type: object + properties: + name: + type: string + Example: + oneOf: + - $ref: '#/components/schemas/Child' + - type: integer + format: int32 diff --git a/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml b/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml new file mode 100644 index 000000000000..dc916b1ee21e --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml @@ -0,0 +1,206 @@ +openapi: 3.0.1 +info: + title: ByRefOrValue + description: > + This tests for a oneOf interface representation + version: 0.0.1 +servers: + - url: "http://localhost:8080" +tags: + - name: Foo + - name: Bar +paths: + /foo: + get: + tags: + - Foo + summary: GET all Foos + operationId: getAllFoos + responses: + '200': + $ref: '#/components/responses/200FooArray' + post: + tags: + - Foo + summary: Create a Foo + operationId: createFoo + requestBody: + $ref: '#/components/requestBodies/Foo' + responses: + '201': + $ref: '#/components/responses/201Foo' + /bar: + post: + tags: + - Bar + summary: Create a Bar + operationId: createBar + requestBody: + required: true + content: + 'application/json': + schema: + $ref: '#/components/schemas/Bar_Create' + responses: + 200: + description: Bar created + content: + 'application/json': + schema: + $ref: '#/components/schemas/Bar' + +components: + schemas: + Addressable: + type: object + properties: + href: + type: string + description: Hyperlink reference + id: + type: string + description: unique identifier + description: Base schema for adressable entities + Extensible: + type: object + properties: + "@schemaLocation": + type: string + description: A URI to a JSON-Schema file that defines additional attributes + and relationships + "@baseType": + type: string + description: When sub-classing, this defines the super-class + "@type": + type: string + description: When sub-classing, this defines the sub-class Extensible name + required: + - '@type' + Entity: + type: object + discriminator: + propertyName: '@type' + allOf: + - "$ref": "#/components/schemas/Addressable" + - "$ref": "#/components/schemas/Extensible" + EntityRef: + type: object + discriminator: + propertyName: '@type' + description: Entity reference schema to be use for all entityRef class. + properties: + name: + type: string + description: Name of the related entity. + '@referredType': + type: string + description: The actual type of the target instance when needed for disambiguation. + allOf: + - $ref: '#/components/schemas/Addressable' + - "$ref": "#/components/schemas/Extensible" + FooRefOrValue: + type: object + oneOf: + - $ref: "#/components/schemas/Foo" + - $ref: "#/components/schemas/FooRef" + discriminator: + propertyName: "@type" + Foo: + type: object + properties: + fooPropA: + type: string + fooPropB: + type: string + allOf: + - $ref: '#/components/schemas/Entity' + FooRef: + type: object + properties: + foorefPropA: + type: string + allOf: + - $ref: '#/components/schemas/EntityRef' + BarRef: + type: object + allOf: + - $ref: '#/components/schemas/EntityRef' + Bar_Create: + type: object + properties: + barPropA: + type: string + fooPropB: + type: string + foo: + $ref: '#/components/schemas/FooRefOrValue' + allOf: + - $ref: '#/components/schemas/Entity' + Bar: + type: object + required: + - id + properties: + id: + type: string + barPropA: + type: string + fooPropB: + type: string + foo: + $ref: '#/components/schemas/FooRefOrValue' + allOf: + - $ref: '#/components/schemas/Entity' + BarRefOrValue: + type: object + oneOf: + - $ref: "#/components/schemas/Bar" + - $ref: "#/components/schemas/BarRef" + Pizza: + type: object + properties: + pizzaSize: + type: number + allOf: + - $ref: '#/components/schemas/Entity' + Pasta: + type: object + properties: + vendor: + type: string + allOf: + - $ref: '#/components/schemas/Entity' + PizzaSpeziale: + type: object + properties: + toppings: + type: string + allOf: + - $ref: '#/components/schemas/Pizza' + + requestBodies: + Foo: + description: The Foo to be created + content: + application/json;charset=utf-8: + schema: + $ref: '#/components/schemas/Foo' + + responses: + '204': + description: Deleted + content: { } + 201Foo: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/FooRefOrValue' + 200FooArray: + description: Success + content: + application/json;charset=utf-8: + schema: + type: array + items: + $ref: '#/components/schemas/FooRefOrValue' \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-multiple-required-properties-has-same-oneOf-object.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-multiple-required-properties-has-same-oneOf-object.yaml new file mode 100644 index 000000000000..ce6d4b5bce71 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-multiple-required-properties-has-same-oneOf-object.yaml @@ -0,0 +1,65 @@ +openapi: 3.0.1 +info: + title: My title + description: API under test + version: 1.0.7 +servers: + - url: https://localhost:9999/root +paths: + /pet_preference: + post: + operationId: postPreference + tags: + - pet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/petPreference' + responses: + 201: + description: OK +components: + schemas: + dog: + type: object + required: + - attr + properties: + attr: + type: string + enum: + - DOG + cat: + type: object + required: + - attr + properties: + attr: + type: string + enum: + - CAT + + pet: + oneOf: + - $ref: '#/components/schemas/dog' + - $ref: '#/components/schemas/cat' + discriminator: + propertyName: attr + mapping: + DOG: '#/components/schemas/dog' + CAT: '#/components/schemas/cat' + + petPreference: + type: object + required: + - pet1 + - pet2 + - pet3 + properties: + pet1: + $ref: '#/components/schemas/pet' + pet2: + $ref: '#/components/schemas/pet' + pet3: + $ref: '#/components/schemas/pet' diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 80e6ff8e9de4..4a0777e930d0 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -56,6 +56,7 @@ paths: summary: Update an existing pet description: '' operationId: updatePet + x-webclient-blocking: true responses: '200': description: Successful operation @@ -78,6 +79,7 @@ paths: summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus + x-webclient-blocking: true parameters: - name: status in: query @@ -124,6 +126,7 @@ paths: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags + x-webclient-blocking: true parameters: - name: tags in: query @@ -166,6 +169,7 @@ paths: summary: Find pet by ID description: Returns a single pet operationId: getPetById + x-webclient-blocking: true parameters: - name: petId in: path @@ -656,6 +660,12 @@ paths: enum: - 1.1 - -1.2 + - name: enum_query_model_array + in: query + schema: + type: array + items: + $ref: '#/components/schemas/EnumClass' responses: '400': description: Invalid request @@ -1898,3 +1908,17 @@ components: deprecated: true items: $ref: '#/components/schemas/Bar' + AllOfWithSingleRef: + type: object + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + SingleRefType: + type: string + title: SingleRefType + enum: + - admin + - user diff --git a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml new file mode 100644 index 000000000000..22c23b279c62 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -0,0 +1,2185 @@ +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: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '405': + description: Invalid input + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + x-powershell-method-name: Remove-Pet + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + default: '2010-02-01T10:20:10.11111+01:00' + example: '2020-02-02T20:20:20.22222Z' + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Someting wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + responses: + '200': + description: Output number + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + responses: + '200': + description: Output string + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + responses: + '200': + description: Output boolean + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + responses: + '200': + description: Output composite + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request much reference a schema named + `File`. + operationId: testBodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/test-query-parameters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + /fake/array-of-enums: + get: + tags: + - fake + summary: Array of Enums + operationId: getArrayOfEnums + responses: + 200: + description: Got named array of enums + content: + application/json: + schema: + $ref: '#/components/schemas/ArrayOfEnums' +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' + - url: https://127.0.0.1/no_variable + description: The local server without variables +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + examples: + simple-list: + summary: Simple list example + description: Should not get into code examples + value: + - username: foo + - username: bar + 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 + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + # Test the 'HTTP signature' security scheme. + # Each HTTP request is cryptographically signed as specified + # in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + example: '2020-02-02T20:20:20.000222Z' + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + objectWithNoDeclaredProps: + type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + description: test code generation for objects + Value must be a map of strings to values. It cannot be the 'null' value. + objectWithNoDeclaredPropsNullable: + type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + description: test code generation for nullable objects. + Value must be a map of strings to values or the 'null' value. + nullable: true + anyTypeProp: + description: test code generation for any type + Here the 'type' attribute is not specified, which means the value can be anything, + including the null value, string, number, boolean, array or object. + See https://github.com/OAI/OpenAPI-Specification/issues/1389 + # TODO: this should be supported, currently there are some issues in the code generation. + #anyTypeExceptNullProp: + # description: any type except 'null' + # Here the 'type' attribute is not specified, which means the value can be anything, + # including the null value, string, number, boolean, array or object. + # not: + # type: 'null' + anyTypePropNullable: + description: test code generation for any type + Here the 'type' attribute is not specified, which means the value can be anything, + including the null value, string, number, boolean, array or object. + The 'nullable' attribute does not change the allowed values. + nullable: true + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + 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' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Address' + - type: object + properties: + declawed: + type: boolean + Address: + type: object + additionalProperties: + type: integer + Animal: + type: object + discriminator: + propertyName: className + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + multipleOf: 2 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + multipleOf: 32.5 + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + decimal: + type: string + format: number + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + example: '2020-02-02' + dateTime: + type: string + format: date-time + example: '2007-12-03T10:15:30+01:00' + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + #EnumClass: + # type: string + # default: '-efg' + # enum: + # - _abc + # - '-efg' + # - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_integer_only: + type: integer + enum: + - 2 + - -2 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' + # outerEnumInteger: + # $ref: '#/components/schemas/OuterEnumInteger' + # outerEnumDefaultValue: + # $ref: '#/components/schemas/OuterEnumDefaultValue' + # outerEnumIntegerDefaultValue: + # $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + anytype_1: {} + map_with_undeclared_properties_anytype_1: + type: object + map_with_undeclared_properties_anytype_2: + type: object + properties: {} + map_with_undeclared_properties_anytype_3: + type: object + additionalProperties: true + empty_map: + type: object + description: an object with no declared properties and no undeclared + properties, hence it's an empty map. + additionalProperties: false + map_with_undeclared_properties_string: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + 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 + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + OuterEnum: + nullable: true + type: string + enum: + - placed + - approved + - delivered + #OuterEnumInteger: + # type: integer + # enum: + # - 0 + # - 1 + # - 2 + #OuterEnumDefaultValue: + # type: string + # enum: + # - placed + # - approved + # - delivered + # default: placed + #OuterEnumIntegerDefaultValue: + # type: integer + # enum: + # - 0 + # - 1 + # - 2 + # default: 0 + OuterComposite: + type: object + properties: + my_number: + $ref: '#/components/schemas/OuterNumber' + my_string: + $ref: '#/components/schemas/OuterString' + my_boolean: + $ref: '#/components/schemas/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + _special_model.name_: + properties: + '$special[property.name]': + type: integer + format: int64 + '_special_model.name_': + type: string + xml: + name: '$special[model.name]' + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + fruit: + properties: + color: + type: string + oneOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + # Below additionalProperties is set to false to validate the use + # case when a composed schema has additionalProperties set to false. + additionalProperties: false + apple: + type: object + properties: + cultivar: + type: string + pattern: ^[a-zA-Z\s]*$ + origin: + type: string + pattern: /^[A-Z\s]*$/i + nullable: true + banana: + type: object + properties: + lengthCm: + type: number + mammal: + oneOf: + - $ref: '#/components/schemas/whale' + - $ref: '#/components/schemas/zebra' + - $ref: '#/components/schemas/Pig' + discriminator: + propertyName: className + whale: + type: object + properties: + hasBaleen: + type: boolean + hasTeeth: + type: boolean + className: + type: string + required: + - className + zebra: + type: object + properties: + type: + type: string + enum: + - plains + - mountain + - grevys + className: + type: string + required: + - className + additionalProperties: true + Pig: + oneOf: + - $ref: '#/components/schemas/BasquePig' + - $ref: '#/components/schemas/DanishPig' + discriminator: + propertyName: className + BasquePig: + type: object + properties: + className: + type: string + required: + - className + DanishPig: + type: object + properties: + className: + type: string + required: + - className + gmFruit: + properties: + color: + type: string + anyOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + additionalProperties: false + fruitReq: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/appleReq' + - $ref: '#/components/schemas/bananaReq' + additionalProperties: false + appleReq: + type: object + properties: + cultivar: + type: string + mealy: + type: boolean + required: + - cultivar + additionalProperties: false + bananaReq: + type: object + properties: + lengthCm: + type: number + sweet: + type: boolean + required: + - lengthCm + additionalProperties: false + # go-experimental is unable to make Triangle and Quadrilateral models + # correctly https://github.com/OpenAPITools/openapi-generator/issues/6149 + Drawing: + type: object + properties: + mainShape: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value cannot be null. + $ref: '#/components/schemas/Shape' + shapeOrNull: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value may be null because ShapeOrNull has 'null' + # type as a child schema of 'oneOf'. + $ref: '#/components/schemas/ShapeOrNull' + nullableShape: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value may be null because NullableShape has the + # 'nullable: true' attribute. For this specific scenario this is exactly the + # same thing as 'shapeOrNull'. + $ref: '#/components/schemas/NullableShape' + shapes: + type: array + items: + $ref: '#/components/schemas/Shape' + additionalProperties: + # Here the additional properties are specified using a referenced schema. + # This is just to validate the generated code works when using $ref + # under 'additionalProperties'. + $ref: '#/components/schemas/fruit' + Shape: + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + ShapeOrNull: + description: The value may be a shape or the 'null' value. + This is introduced in OAS schema >= 3.1. + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + NullableShape: + description: The value may be a shape or the 'null' value. + The 'nullable' attribute was introduced in OAS schema >= 3.0 + and has been deprecated in OAS schema >= 3.1. + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + nullable: true + ShapeInterface: + properties: + shapeType: + type: string + required: + - shapeType + TriangleInterface: + properties: + triangleType: + type: string + required: + - triangleType + Triangle: + oneOf: + - $ref: '#/components/schemas/EquilateralTriangle' + - $ref: '#/components/schemas/IsoscelesTriangle' + - $ref: '#/components/schemas/ScaleneTriangle' + discriminator: + propertyName: triangleType + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + EquilateralTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + IsoscelesTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + additionalProperties: false + ScaleneTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + QuadrilateralInterface: + properties: + quadrilateralType: + type: string + required: + - quadrilateralType + Quadrilateral: + oneOf: + - $ref: '#/components/schemas/SimpleQuadrilateral' + - $ref: '#/components/schemas/ComplexQuadrilateral' + discriminator: + propertyName: quadrilateralType + SimpleQuadrilateral: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/QuadrilateralInterface' + ComplexQuadrilateral: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/QuadrilateralInterface' + GrandparentAnimal: + type: object + required: + - pet_type + properties: + pet_type: + type: string + discriminator: + propertyName: pet_type + ParentPet: + type: object + allOf: + - $ref: '#/components/schemas/GrandparentAnimal' + #ChildCat: + # allOf: + # - $ref: '#/components/schemas/ParentPet' + # - type: object + # properties: + # name: + # type: string + # pet_type: + # x-enum-as-string: true + # type: string + # enum: + # - ChildCat + # default: ChildCat + ArrayOfEnums: + type: array + items: + $ref: '#/components/schemas/OuterEnum' + DateTimeTest: + type: string + default: '2010-01-01T10:10:10.000111+01:00' + example: '2010-01-01T10:10:10.000111+01:00' + format: date-time + DeprecatedObject: + type: object + deprecated: true + properties: + name: + type: string + ObjectWithDeprecatedFields: + type: object + properties: + uuid: + type: string + id: + type: number + deprecated: true + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + type: array + deprecated: true + items: + $ref: '#/components/schemas/Bar' + PetWithRequiredTags: + type: object + required: + - name + - photoUrls + - tags + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 16a4d04a1345..5b31f8d14f18 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1490,6 +1490,74 @@ paths: allOf: - type: string minLength: 1 + '/fake/objInQuery': + get: + tags: + - fake + summary: user list + operationId: objectInQuery + parameters: + - name: mapBean + in: query + required: false + description: mapBean + style: deepObject + explode: true + schema: + type: object + properties: + keyword: + title: keyword + type: string + responses: + '200': + description: ok + '/fake/refObjInQuery': + get: + tags: + - fake + summary: user list + operationId: refObjectInQuery + parameters: + - name: mapBean + in: query + required: false + description: mapBean + style: deepObject + explode: true + schema: + $ref: '#/components/schemas/Foo' + responses: + '200': + description: ok + '/fake/jsonWithCharset': + post: + tags: + - fake + summary: json with charset tx and rx + operationId: jsonWithCharset + requestBody: + content: + application/json; charset=utf-8: + schema: {} + responses: + 200: + description: success + content: + application/json; charset=utf-8: + schema: {} + "/fake/responseWithoutSchema": + get: + tags: + - fake + summary: receives a response without schema + operationId: responseWithoutSchema + responses: + '200': + description: contents without schema definition + content: + application/json: {} + application/xml: {} servers: - url: 'http://{server}.swagger.io:{port}/v2' description: petstore server @@ -1662,13 +1730,12 @@ components: Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 - # TODO: this should be supported, currently there are some issues in the code generation. - #anyTypeExceptNullProp: - # description: any type except 'null' - # Here the 'type' attribute is not specified, which means the value can be anything, - # including the null value, string, number, boolean, array or object. - # not: - # type: 'null' + anyTypeExceptNullProp: + description: any type except 'null' + Here the 'type' attribute is not specified, which means the value can be anything, + including the null value, string, number, boolean, array or object. + not: + type: 'null' anyTypePropNullable: description: test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, @@ -2620,9 +2687,6 @@ components: SomeObject: allOf: - $ref: '#/components/schemas/ObjectInterface' -# TODO turn this back on later -# AnyType: -# description: this should allow any type because type was not specified ArrayWithValidationsInItems: type: array maxItems: 2 @@ -2740,3 +2804,10 @@ components: allOf: - type: string minLength: 1 + UUIDString: + type: string + format: uuid + minLength: 1 + AnyTypeNotString: + not: + type: string diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_11897.yaml b/modules/openapi-generator/src/test/resources/bugs/issue_11897.yaml new file mode 100644 index 000000000000..f5cbdaa8b9b4 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_11897.yaml @@ -0,0 +1,130 @@ +openapi: 3.0.1 +info: + title: metadata-svc + description: Metadata Service + contact: + name: Test Svc + email: xyz@xyz.com + version: 3.1.2 +servers: +- url: https://localhost:8080/ +tags: +- name: metadata + description: APIs to get metadata. +paths: + /v1/array-of-string: + get: + tags: + - metadata + summary: Get groups. + description: Get the list of groups for this example. + operationId: getWithArrayOfString + responses: + 200: + description: List of groups. + content: + application/json: + schema: + type: array + items: + type: string + /v1/array-of-objects: + get: + tags: + - metadata + summary: Get groups. + description: Get the list of groups for this example. + operationId: getWithArrayOfObjects + responses: + 200: + description: List of groups. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TestResponse' + /v1/set-of-strings: + get: + tags: + - metadata + summary: Get groups. + description: Get the set of strings for this example. + operationId: getWithSetOfStrings + responses: + 200: + description: Set of strings. + content: + application/json: + schema: + type: array + uniqueItems: true + items: + type: string + /v1/set-of-objects: + get: + tags: + - metadata + summary: Get groups. + description: Get the set of groups for this example. + operationId: getWithSetOfObjects + responses: + 200: + description: Set of groups. + content: + application/json: + schema: + type: array + uniqueItems: true + items: + $ref: '#/components/schemas/TestResponse' + /v1/map-of-strings: + get: + tags: + - metadata + summary: Get groups. + description: Get the map of strings for this example. + operationId: getWithMapOfStrings + responses: + 200: + description: Map of strings. + content: + application/json: + schema: + additionalProperties: + type: string + type: object + /v1/map-of-objects: + get: + tags: + - metadata + summary: Get groups. + description: Get the map of groups for this example. + operationId: getWithMapOfObjects + responses: + 200: + description: Map of groups. + content: + application/json: + schema: + additionalProperties: + $ref: '#/components/schemas/TestResponse' + type: object +components: + schemas: + TestResponse: + title: TestResponse + required: + - enabled + type: object + properties: + enabled: + type: boolean + description: Default value is false. + example: false + description: Object + securitySchemes: + bearerAuth: + type: apiKey + name: Authorization + in: header diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_11957.yaml b/modules/openapi-generator/src/test/resources/bugs/issue_11957.yaml new file mode 100644 index 000000000000..40305f258cf5 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_11957.yaml @@ -0,0 +1,109 @@ +openapi: '3.0.2' +info: + title: Search API + version: '1.0' +servers: +- url: http://localhost:8080/api/v1 +tags: +- name: "search" +paths: + /default-list: + get: + tags: + - search + operationId: defaultList + parameters: + - in: query + name: p + schema: + type: integer + default: 0 + minimum: 0 + - in: query + name: orderBy + schema: + type: array + default: ["updatedAt:DESC", "createdAt:DESC"] + items: + type: string + enum: [ "createdAt:ASC", "createdAt:DESC", + "updatedAt:ASC", "updatedAt:DESC" ] + responses: + 204: + description: "Custom response" + /empty-default-list: + get: + tags: + - search + operationId: emptyDefaultList + parameters: + - in: query + name: p + description: Page + schema: + type: integer + default: 0 + minimum: 0 + - in: query + name: orderBy + schema: + type: array + default: [ ] + items: + type: string + enum: [ "createdAt:ASC", "createdAt:DESC", + "updatedAt:ASC", "updatedAt:DESC" ] + responses: + 204: + description: "Custom response" + /default-set: + get: + tags: + - search + operationId: defaultSet + parameters: + - in: query + name: p + schema: + type: integer + default: 0 + minimum: 0 + - in: query + name: orderBy + schema: + type: array + default: [ "updatedAt:DESC", "createdAt:DESC" ] + uniqueItems: true + items: + type: string + enum: [ "createdAt:ASC", "createdAt:DESC", + "updatedAt:ASC", "updatedAt:DESC" ] + responses: + 204: + description: "Custom response" + /empty-default-set: + get: + tags: + - search + operationId: emptyDefaultSet + parameters: + - in: query + name: p + description: Page + schema: + type: integer + default: 0 + minimum: 0 + - in: query + name: orderBy + schema: + type: array + default: [ ] + uniqueItems: true + items: + type: string + enum: [ "createdAt:ASC", "createdAt:DESC", + "updatedAt:ASC", "updatedAt:DESC" ] + responses: + 204: + description: "Custom response" diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json index 6e30608df673..54e4c8a12a12 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json @@ -32,7 +32,7 @@ "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", "zone.js": "^0.6.17", - "typescript": "^2.0.0", + "typescript": "^4.0", "typings": "^1.3.2" } } diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json index 42ba4d5d54fd..16a813c383c1 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json @@ -32,7 +32,7 @@ "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", "zone.js": "^0.6.17", - "typescript": "^2.0.0", + "typescript": "^4.0", "typings": "^1.3.2" } } diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/package.json index e2ef93f0d6dc..e146042b7ed3 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/package.json @@ -17,7 +17,7 @@ "request": "^2.72.0" }, "devDependencies": { - "typescript": "^1.8.10", + "typescript": "^4.0", "typings": "^0.8.1" } } diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json index 18383fe4b860..b95f70f0d336 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json @@ -20,7 +20,7 @@ "rewire": "^3.0.2" }, "devDependencies": { - "typescript": "^2.4.2", + "typescript": "^4.0", "@types/node": "8.10.34" } } diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json index 6fda4434ce15..720ddd966f6e 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json @@ -32,7 +32,7 @@ "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", "zone.js": "^0.6.17", - "typescript": "^2.0.0", + "typescript": "^4.0", "typings": "^1.3.2" } } diff --git a/pom.xml b/pom.xml index 913c80f406ef..ade8cc5e2c12 100644 --- a/pom.xml +++ b/pom.xml @@ -41,10 +41,6 @@ cbornet Christophe Bornet - - ackintosh - Akihito Nakano - jmini Jérémie Bresson @@ -928,6 +924,18 @@ samples/openapi3/client/petstore/typescript/tests/jquery + + typescript-client-tests-browser + + + env + java + + + + samples/openapi3/client/petstore/typescript/tests/browser + + typescript-fetch-client-tests-default @@ -1117,6 +1125,8 @@ + samples/client/petstore/cpp-qt + samples/client/petstore/php/OpenAPIClient-php @@ -1137,12 +1147,9 @@ - samples/client/petstore/cpp-qt samples/client/petstore/rust samples/client/petstore/rust/reqwest/petstore samples/client/petstore/rust/reqwest/petstore-async - samples/client/petstore/python-legacy samples/client/petstore/python-asyncio @@ -1210,6 +1217,8 @@ + samples/openapi3/client/petstore/typescript/builds/browser + samples/openapi3/client/petstore/typescript/tests/browser samples/client/petstore/typescript-fetch/builds/default samples/client/petstore/typescript-fetch/builds/es6-target samples/client/petstore/typescript-fetch/builds/with-npm-version @@ -1252,10 +1261,10 @@ samples/client/petstore/scala-akka samples/client/petstore/scala-sttp - samples/client/petstore/scala-httpclient samples/client/petstore/clojure samples/client/petstore/java/jersey2-java8 samples/openapi3/client/petstore/java/jersey2-java8 + samples/client/petstore/java/jersey3 samples/client/others/java/okhttp-gson-streaming samples/client/petstore/java/okhttp-gson @@ -1289,7 +1298,6 @@ - samples/client/petstore/R @@ -1303,11 +1311,11 @@ - samples.dart-2.13 + samples.dart env - samples.dart-2.13 + samples.dart @@ -1315,19 +1323,6 @@ samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake - - samples.dart-2.10 - - - env - samples.dart-2.10 - - - - samples/openapi3/client/petstore/dart-dio/petstore_client_lib - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake - - samples.ios @@ -1488,12 +1483,12 @@ 4.3.1 1.7.32 3.1.12.2 - 3.0.0-M5 + 3.0.0-M6 7.19.0 2.1.12 io.swagger.parser.v3 - 2.0.29 - 7.3.0 + 2.0.31 + 7.5 1.34 3.4.3 1.12 diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs index e250938bb32a..f503f31306d1 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs @@ -34,8 +34,9 @@ public interface IMultipartApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// - void MultipartArray(List files = default(List)); + void MultipartArray(List files = default(List), int operationIndex = 0); /// /// @@ -45,8 +46,9 @@ public interface IMultipartApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse MultipartArrayWithHttpInfo(List files = default(List)); + ApiResponse MultipartArrayWithHttpInfo(List files = default(List), int operationIndex = 0); /// /// /// @@ -57,8 +59,9 @@ public interface IMultipartApiSync : IApiAccessor /// /// a file /// (optional) + /// Index associated with the operation. /// - void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker)); + void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0); /// /// @@ -70,8 +73,9 @@ public interface IMultipartApiSync : IApiAccessor /// /// a file /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker)); + ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0); /// /// /// @@ -80,8 +84,9 @@ public interface IMultipartApiSync : IApiAccessor /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// - void MultipartSingle(System.IO.Stream file = default(System.IO.Stream)); + void MultipartSingle(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// @@ -91,8 +96,9 @@ public interface IMultipartApiSync : IApiAccessor /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse MultipartSingleWithHttpInfo(System.IO.Stream file = default(System.IO.Stream)); + ApiResponse MultipartSingleWithHttpInfo(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); #endregion Synchronous Operations } @@ -110,9 +116,10 @@ public interface IMultipartApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task MultipartArrayAsync(List files = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MultipartArrayAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -122,9 +129,10 @@ public interface IMultipartApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(List files = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -135,9 +143,10 @@ public interface IMultipartApiAsync : IApiAccessor /// /// a file /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -149,9 +158,10 @@ public interface IMultipartApiAsync : IApiAccessor /// /// a file /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -160,9 +170,10 @@ public interface IMultipartApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task MultipartSingleAsync(System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MultipartSingleAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -172,9 +183,10 @@ public interface IMultipartApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -300,8 +312,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// - public void MultipartArray(List files = default(List)) + public void MultipartArray(List files = default(List), int operationIndex = 0) { MultipartArrayWithHttpInfo(files); } @@ -311,8 +324,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse MultipartArrayWithHttpInfo(List files = default(List)) + public Org.OpenAPITools.Client.ApiResponse MultipartArrayWithHttpInfo(List files = default(List), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -344,6 +358,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory } } + localVarRequestOptions.Operation = "MultipartApi.MultipartArray"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/multipart-array", localVarRequestOptions, this.Configuration); @@ -364,11 +381,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task MultipartArrayAsync(List files = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MultipartArrayAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await MultipartArrayWithHttpInfoAsync(files, cancellationToken).ConfigureAwait(false); + await MultipartArrayWithHttpInfoAsync(files, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -376,9 +394,10 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Many files (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(List files = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MultipartArrayWithHttpInfoAsync(List files = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -411,6 +430,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory } } + localVarRequestOptions.Operation = "MultipartApi.MultipartArray"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/multipart-array", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -434,8 +456,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// a file /// (optional) + /// Index associated with the operation. /// - public void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker)) + public void MultipartMixed(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0) { MultipartMixedWithHttpInfo(status, file, marker); } @@ -447,8 +470,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// a file /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker)) + public Org.OpenAPITools.Client.ApiResponse MultipartMixedWithHttpInfo(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0) { // verify the required parameter 'file' is set if (file == null) @@ -485,6 +509,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory } localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.Operation = "MultipartApi.MultipartMixed"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/multipart-mixed", localVarRequestOptions, this.Configuration); @@ -507,11 +534,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// a file /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MultipartMixedAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await MultipartMixedWithHttpInfoAsync(status, file, marker, cancellationToken).ConfigureAwait(false); + await MultipartMixedWithHttpInfoAsync(status, file, marker, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -521,9 +549,10 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// a file /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MultipartMixedWithHttpInfoAsync(MultipartMixedStatus status, System.IO.Stream file, MultipartMixedMarker marker = default(MultipartMixedMarker), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'file' is set if (file == null) @@ -561,6 +590,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory } localVarRequestOptions.FileParameters.Add("file", file); + localVarRequestOptions.Operation = "MultipartApi.MultipartMixed"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/multipart-mixed", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -582,8 +614,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// - public void MultipartSingle(System.IO.Stream file = default(System.IO.Stream)) + public void MultipartSingle(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { MultipartSingleWithHttpInfo(file); } @@ -593,8 +626,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse MultipartSingleWithHttpInfo(System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse MultipartSingleWithHttpInfo(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -623,6 +657,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "MultipartApi.MultipartSingle"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/multipart-single", localVarRequestOptions, this.Configuration); @@ -643,11 +680,12 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task MultipartSingleAsync(System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MultipartSingleAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await MultipartSingleWithHttpInfoAsync(file, cancellationToken).ConfigureAwait(false); + await MultipartSingleWithHttpInfoAsync(file, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -655,9 +693,10 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// One file (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -687,6 +726,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "MultipartApi.MultipartSingle"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/multipart-single", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs index 3c817d1a646f..584eaebe4f6b 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs @@ -429,9 +429,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -548,9 +549,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -673,7 +675,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -688,7 +690,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -703,7 +705,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -718,7 +720,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -733,7 +735,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -748,7 +750,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -763,7 +765,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -779,7 +781,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -793,7 +795,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -807,7 +809,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -821,7 +823,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -835,7 +837,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -849,7 +851,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -863,7 +865,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/Configuration.cs index 2bee826bd883..31223cdbd787 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/Configuration.cs @@ -90,6 +90,13 @@ public class Configuration : IReadableConfiguration /// /// The servers private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + #endregion Private Members #region Constructors @@ -115,6 +122,9 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -374,6 +384,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -382,7 +409,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -393,9 +420,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -403,31 +470,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -506,7 +576,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index adf0a7b2f0a0..78076a6d500b 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs index 6ebad92d9470..7f440630dd5a 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Model/InlineObject2.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Model/InlineObject2.cs index 1df1d1953eca..a067def18677 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Model/InlineObject2.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Model/InlineObject2.cs @@ -53,7 +53,8 @@ protected InlineObject2() { } { this.Status = status; // to ensure "file" is required (not null) - if (file == null) { + if (file == null) + { throw new ArgumentNullException("file is a required property for InlineObject2 and cannot be null"); } this.File = file; diff --git a/samples/client/others/java/okhttp-gson-streaming/api/openapi.yaml b/samples/client/others/java/okhttp-gson-streaming/api/openapi.yaml index 540e8f4e6dba..0fd31f4db560 100644 --- a/samples/client/others/java/okhttp-gson-streaming/api/openapi.yaml +++ b/samples/client/others/java/okhttp-gson-streaming/api/openapi.yaml @@ -23,7 +23,7 @@ paths: tags: - ping x-streaming: true - x-contentType: application/json + x-content-type: application/json x-accepts: application/json components: schemas: diff --git a/samples/client/others/java/okhttp-gson-streaming/build.gradle b/samples/client/others/java/okhttp-gson-streaming/build.gradle index b2944f768d66..85773c446ba1 100644 --- a/samples/client/others/java/okhttp-gson-streaming/build.gradle +++ b/samples/client/others/java/okhttp-gson-streaming/build.gradle @@ -12,8 +12,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -106,19 +106,19 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' + implementation 'io.swagger:swagger-annotations:1.6.5' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' + implementation 'com.squareup.okhttp3:okhttp:4.9.3' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' + implementation 'com.google.code.gson:gson:2.9.0' + implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.0' - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.2' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:3.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.mockito:mockito-core:3.12.4' } javadoc { diff --git a/samples/client/others/java/okhttp-gson-streaming/build.sbt b/samples/client/others/java/okhttp-gson-streaming/build.sbt index 38fc39baab5f..b4d6251b0de5 100644 --- a/samples/client/others/java/okhttp-gson-streaming/build.sbt +++ b/samples/client/others/java/okhttp-gson-streaming/build.sbt @@ -9,19 +9,19 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.9.3", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", + "com.google.code.gson" % "gson" % "2.9.0", + "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.0", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", "org.openapitools" % "jackson-databind-nullable" % "0.2.2", - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/others/java/okhttp-gson-streaming/docs/PingApi.md b/samples/client/others/java/okhttp-gson-streaming/docs/PingApi.md index 53026450464f..e775f3b709bc 100644 --- a/samples/client/others/java/okhttp-gson-streaming/docs/PingApi.md +++ b/samples/client/others/java/okhttp-gson-streaming/docs/PingApi.md @@ -2,9 +2,9 @@ All URIs are relative to *http://localhost:8082* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**postPing**](PingApi.md#postPing) | **POST** /ping | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postPing**](PingApi.md#postPing) | **POST** /ping | | @@ -45,9 +45,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **someObj** | [**SomeObj**](SomeObj.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **someObj** | [**SomeObj**](SomeObj.md)| | [optional] | ### Return type @@ -65,5 +65,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | +| **200** | OK | - | diff --git a/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md b/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md index 02762e107645..49a0726b5a38 100644 --- a/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md +++ b/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$type** | [**TypeEnum**](#TypeEnum) | | [optional] -**id** | **Long** | | [optional] -**name** | **String** | | [optional] -**active** | **Boolean** | | [optional] -**type** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | +|**active** | **Boolean** | | [optional] | +|**type** | **String** | | [optional] | ## Enum: TypeEnum -Name | Value ----- | ----- -SOMEOBJIDENTIFIER | "SomeObjIdentifier" +| Name | Value | +|---- | -----| +| SOMEOBJIDENTIFIER | "SomeObjIdentifier" | diff --git a/samples/client/others/java/okhttp-gson-streaming/pom.xml b/samples/client/others/java/okhttp-gson-streaming/pom.xml index d02ceeab89e2..1428ead94eda 100644 --- a/samples/client/others/java/okhttp-gson-streaming/pom.xml +++ b/samples/client/others/java/okhttp-gson-streaming/pom.xml @@ -299,24 +299,24 @@ javax.ws.rs jsr311-api - 1.1.1 + ${jsr311-api-version} javax.ws.rs javax.ws.rs-api - 2.0 + ${javax.ws.rs-api-version} - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test org.mockito mockito-core - 3.12.4 + ${mockito-core-version} test @@ -325,14 +325,17 @@ ${java.version} ${java.version} 1.8.5 - 1.6.3 - 4.9.2 - 2.8.8 + 1.6.5 + 4.9.3 + 2.9.0 3.12.0 0.2.2 1.3.5 - 4.13.2 + 5.8.2 + 3.12.4 + 2.1.1 + 1.1.1 UTF-8 - 2.17.3 + 2.21.0 diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java index 7b52fe547a95..20c24352d3d8 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java @@ -296,7 +296,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { /** *

    Set OffsetDateTimeFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { @@ -307,7 +307,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { /** *

    Set LocalDateFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { @@ -993,7 +993,7 @@ public InputStream executeStream(Call call, Type returnType) throws ApiException try { Response response = call.execute(); if (!response.isSuccessful()) { - throw new ApiException(response.code(), response.message()); + throw new ApiException(response.code(), response.message(), response.headers().toMultimap(), null); } if (response.body() == null) { return null; @@ -1151,7 +1151,7 @@ public Request buildRequest(String baseUrl, String path, String method, List formParams) { File file = (File) param.getValue(); addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { - List files = (List) param.getValue(); - for (File file : files) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } } } else { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java index afa977ee2585..869f54f325d4 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java @@ -27,8 +27,6 @@ public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - private Object errorObject = null; - private GenericType errorObjectType = null; /** *

    Constructor for ApiException.

    @@ -155,40 +153,4 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } - - /** - * Get the error object type. - * - * @return Error object type - */ - public GenericType getErrorObjectType() { - return errorObjectType; - } - - /** - * Set the error object type. - * - * @param errorObjectType object type - */ - public void setErrorObjectType(GenericType errorObjectType) { - this.errorObjectType = errorObjectType; - } - - /** - * Get the error object. - * - * @return Error object - */ - public Object getErrorObject() { - return errorObject; - } - - /** - * Get the error object. - * - * @param errorObject Error object - */ - public void setErrorObject(Object errorObject) { - this.errorObject = errorObject; - } } diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java index 31835e16e011..11a916735618 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java @@ -171,14 +171,8 @@ public InputStream postPing(SomeObj someObj) throws ApiException { */ public InputStream postPingWithHttpInfo(SomeObj someObj) throws ApiException { okhttp3.Call localVarCall = postPingValidateBeforeCall(someObj, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.executeStream(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.executeStream(localVarCall, localVarReturnType); } /** diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java index 30d95005c16f..d68460b7e209 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -231,6 +232,7 @@ public void setType(String type) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -307,6 +309,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SomeObj is not found in the empty JSON string", SomeObj.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -314,6 +317,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SomeObj` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("$_type") != null && !jsonObj.get("$_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `$_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("$_type").toString())); + } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/api/PingApiTest.java b/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/api/PingApiTest.java index da6fa9d6a624..0a39fbae22fb 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/api/PingApiTest.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/api/PingApiTest.java @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.SomeObj; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -27,7 +27,7 @@ /** * API tests for PingApi */ -@Ignore +@Disabled public class PingApiTest { private final PingApi api = new PingApi(); diff --git a/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/model/SomeObjTest.java b/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/model/SomeObjTest.java index 6ad67287fbce..206f51c9ac44 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/model/SomeObjTest.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/test/java/org/openapitools/client/model/SomeObjTest.java @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/others/typescript/builds/with-unique-items/auth/auth.ts b/samples/client/others/typescript/builds/with-unique-items/auth/auth.ts index 49340932e11b..be50274b9d65 100644 --- a/samples/client/others/typescript/builds/with-unique-items/auth/auth.ts +++ b/samples/client/others/typescript/builds/with-unique-items/auth/auth.ts @@ -1,4 +1,3 @@ -// typings for btoa are incorrect import { RequestContext } from "../http/http"; /** diff --git a/samples/client/others/typescript/builds/with-unique-items/http/http.ts b/samples/client/others/typescript/builds/with-unique-items/http/http.ts index f19e206b19ff..579326776771 100644 --- a/samples/client/others/typescript/builds/with-unique-items/http/http.ts +++ b/samples/client/others/typescript/builds/with-unique-items/http/http.ts @@ -1,5 +1,3 @@ -// typings of url-parse are incorrect... -// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; diff --git a/samples/client/others/typescript/builds/with-unique-items/index.ts b/samples/client/others/typescript/builds/with-unique-items/index.ts index 127f89d99723..89069bd11889 100644 --- a/samples/client/others/typescript/builds/with-unique-items/index.ts +++ b/samples/client/others/typescript/builds/with-unique-items/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration" export { Configuration } from "./configuration" export * from "./apis/exception"; export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; export { PromiseDefaultApi as DefaultApi } from './types/PromiseAPI'; diff --git a/samples/client/others/typescript/builds/with-unique-items/models/ObjectSerializer.ts b/samples/client/others/typescript/builds/with-unique-items/models/ObjectSerializer.ts index 63ab4090903d..66e56a9dc84e 100644 --- a/samples/client/others/typescript/builds/with-unique-items/models/ObjectSerializer.ts +++ b/samples/client/others/typescript/builds/with-unique-items/models/ObjectSerializer.ts @@ -141,7 +141,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/client/others/typescript/builds/with-unique-items/package.json b/samples/client/others/typescript/builds/with-unique-items/package.json index b5bc9412dfe3..0dc1dc48ad4f 100644 --- a/samples/client/others/typescript/builds/with-unique-items/package.json +++ b/samples/client/others/typescript/builds/with-unique-items/package.json @@ -11,6 +11,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + "type": "commonjs", + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -22,6 +26,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" } } diff --git a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json index 6576215ef877..aa173eb68f32 100644 --- a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json +++ b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json @@ -3,7 +3,6 @@ "strict": true, /* Basic Options */ "target": "es5", - "module": "commonjs", "moduleResolution": "node", "declaration": true, diff --git a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/httpclient/build.gradle b/samples/client/petstore/android/httpclient/build.gradle index 5f4c815d2ed1..4d2c18d82274 100644 --- a/samples/client/petstore/android/httpclient/build.gradle +++ b/samples/client/petstore/android/httpclient/build.gradle @@ -31,8 +31,8 @@ android { targetSdkVersion 25 } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } // Rename the aar correctly diff --git a/samples/client/petstore/android/httpclient/git_push.sh b/samples/client/petstore/android/httpclient/git_push.sh index ced3be2b0c7b..f53a75d4fabe 100644 --- a/samples/client/petstore/android/httpclient/git_push.sh +++ b/samples/client/petstore/android/httpclient/git_push.sh @@ -1,7 +1,7 @@ #!/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" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/android/httpclient/pom.xml b/samples/client/petstore/android/httpclient/pom.xml index f8718b1782cc..179c040e510c 100644 --- a/samples/client/petstore/android/httpclient/pom.xml +++ b/samples/client/petstore/android/httpclient/pom.xml @@ -119,8 +119,8 @@ maven-compiler-plugin 3.6.1 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/UserApi.java index c6a854dec579..f0cd2ee0e706 100644 --- a/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/UserApi.java @@ -20,6 +20,7 @@ import java.util.*; +import java.util.Date; import java.util.*; import org.openapitools.client.model.User; diff --git a/samples/client/petstore/android/volley/.openapi-generator/VERSION b/samples/client/petstore/android/volley/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/client/petstore/android/volley/.openapi-generator/VERSION +++ b/samples/client/petstore/android/volley/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/volley/build.gradle b/samples/client/petstore/android/volley/build.gradle index afa1d97884d8..15a6ef68d268 100644 --- a/samples/client/petstore/android/volley/build.gradle +++ b/samples/client/petstore/android/volley/build.gradle @@ -35,8 +35,8 @@ android { targetSdkVersion 25 } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } lintOptions { abortOnError false diff --git a/samples/client/petstore/android/volley/git_push.sh b/samples/client/petstore/android/volley/git_push.sh index ced3be2b0c7b..f53a75d4fabe 100644 --- a/samples/client/petstore/android/volley/git_push.sh +++ b/samples/client/petstore/android/volley/git_push.sh @@ -1,7 +1,7 @@ #!/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" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/android/volley/pom.xml b/samples/client/petstore/android/volley/pom.xml index 98bff7edf8dd..53d3892bb62b 100644 --- a/samples/client/petstore/android/volley/pom.xml +++ b/samples/client/petstore/android/volley/pom.xml @@ -45,8 +45,8 @@ maven-compiler-plugin 3.8.1 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/UserApi.java index edec8bce95e9..8baf3c9367aa 100644 --- a/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/UserApi.java @@ -23,6 +23,7 @@ import com.android.volley.Response; import com.android.volley.VolleyError; +import java.util.Date; import java.util.*; import org.openapitools.client.model.User; diff --git a/samples/client/petstore/c/api/PetAPI.c b/samples/client/petstore/c/api/PetAPI.c index b5d6f2d61806..515146a12ba2 100644 --- a/samples/client/petstore/c/api/PetAPI.c +++ b/samples/client/petstore/c/api/PetAPI.c @@ -95,9 +95,10 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t * body ) localVarBodyParameters, "POST"); - if (apiClient->response_code == 405) { - printf("%s\n","Invalid input"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 405) { + // printf("%s\n","Invalid input"); + //} //No return type end: if (apiClient->dataReceived) { @@ -174,9 +175,10 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId , char * api_key ) localVarBodyParameters, "DELETE"); - if (apiClient->response_code == 400) { - printf("%s\n","Invalid pet value"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid pet value"); + //} //No return type end: if (apiClient->dataReceived) { @@ -242,12 +244,14 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status ) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid status value"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid status value"); + //} cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); if(!cJSON_IsArray(PetAPIlocalVarJSON)) { return 0;//nonprimitive container @@ -324,12 +328,14 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags ) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid tag value"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid tag value"); + //} cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); if(!cJSON_IsArray(PetAPIlocalVarJSON)) { return 0;//nonprimitive container @@ -414,15 +420,18 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId ) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid ID supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","Pet not found"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid ID supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","Pet not found"); + //} //nonprimitive not container cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); pet_t *elementToReturn = pet_parseFromJSON(PetAPIlocalVarJSON); @@ -491,15 +500,18 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t * body ) localVarBodyParameters, "PUT"); - if (apiClient->response_code == 400) { - printf("%s\n","Invalid ID supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","Pet not found"); - } - if (apiClient->response_code == 405) { - printf("%s\n","Validation exception"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid ID supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","Pet not found"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 405) { + // printf("%s\n","Validation exception"); + //} //No return type end: if (apiClient->dataReceived) { @@ -589,9 +601,10 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId , char * name , char localVarBodyParameters, "POST"); - if (apiClient->response_code == 405) { - printf("%s\n","Invalid input"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 405) { + // printf("%s\n","Invalid input"); + //} //No return type end: if (apiClient->dataReceived) { @@ -696,9 +709,10 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId , char * additionalMetadata localVarBodyParameters, "POST"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} //nonprimitive not container cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); api_response_t *elementToReturn = api_response_parseFromJSON(PetAPIlocalVarJSON); diff --git a/samples/client/petstore/c/api/StoreAPI.c b/samples/client/petstore/c/api/StoreAPI.c index 8086a57a64c2..3208b8ae53a2 100644 --- a/samples/client/petstore/c/api/StoreAPI.c +++ b/samples/client/petstore/c/api/StoreAPI.c @@ -53,12 +53,14 @@ StoreAPI_deleteOrder(apiClient_t *apiClient, char * orderId ) localVarBodyParameters, "DELETE"); - if (apiClient->response_code == 400) { - printf("%s\n","Invalid ID supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","Order not found"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid ID supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","Order not found"); + //} //No return type end: if (apiClient->dataReceived) { @@ -108,9 +110,10 @@ StoreAPI_getInventory(apiClient_t *apiClient) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} //primitive return type not simple cJSON *localVarJSON = cJSON_Parse(apiClient->dataReceived); cJSON *VarJSON; @@ -186,15 +189,18 @@ StoreAPI_getOrderById(apiClient_t *apiClient, long orderId ) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid ID supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","Order not found"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid ID supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","Order not found"); + //} //nonprimitive not container cJSON *StoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); order_t *elementToReturn = order_parseFromJSON(StoreAPIlocalVarJSON); @@ -263,12 +269,14 @@ StoreAPI_placeOrder(apiClient_t *apiClient, order_t * body ) localVarBodyParameters, "POST"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid Order"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid Order"); + //} //nonprimitive not container cJSON *StoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); order_t *elementToReturn = order_parseFromJSON(StoreAPIlocalVarJSON); diff --git a/samples/client/petstore/c/api/UserAPI.c b/samples/client/petstore/c/api/UserAPI.c index de32d2eef0d6..dff8c0934250 100644 --- a/samples/client/petstore/c/api/UserAPI.c +++ b/samples/client/petstore/c/api/UserAPI.c @@ -52,9 +52,10 @@ UserAPI_createUser(apiClient_t *apiClient, user_t * body ) localVarBodyParameters, "POST"); - if (apiClient->response_code == 0) { - printf("%s\n","successful operation"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 0) { + // printf("%s\n","successful operation"); + //} //No return type end: if (apiClient->dataReceived) { @@ -134,9 +135,10 @@ UserAPI_createUsersWithArrayInput(apiClient_t *apiClient, list_t * body ) localVarBodyParameters, "POST"); - if (apiClient->response_code == 0) { - printf("%s\n","successful operation"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 0) { + // printf("%s\n","successful operation"); + //} //No return type end: if (apiClient->dataReceived) { @@ -224,9 +226,10 @@ UserAPI_createUsersWithListInput(apiClient_t *apiClient, list_t * body ) localVarBodyParameters, "POST"); - if (apiClient->response_code == 0) { - printf("%s\n","successful operation"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 0) { + // printf("%s\n","successful operation"); + //} //No return type end: if (apiClient->dataReceived) { @@ -297,12 +300,14 @@ UserAPI_deleteUser(apiClient_t *apiClient, char * username ) localVarBodyParameters, "DELETE"); - if (apiClient->response_code == 400) { - printf("%s\n","Invalid username supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","User not found"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid username supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","User not found"); + //} //No return type end: if (apiClient->dataReceived) { @@ -361,15 +366,18 @@ UserAPI_getUserByName(apiClient_t *apiClient, char * username ) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid username supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","User not found"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid username supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","User not found"); + //} //nonprimitive not container cJSON *UserAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); user_t *elementToReturn = user_parseFromJSON(UserAPIlocalVarJSON); @@ -453,12 +461,14 @@ UserAPI_loginUser(apiClient_t *apiClient, char * username , char * password ) localVarBodyParameters, "GET"); - if (apiClient->response_code == 200) { - printf("%s\n","successful operation"); - } - if (apiClient->response_code == 400) { - printf("%s\n","Invalid username/password supplied"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid username/password supplied"); + //} //primitive return type simple char* elementToReturn = strdup((char*)apiClient->dataReceived); @@ -533,9 +543,10 @@ UserAPI_logoutUser(apiClient_t *apiClient) localVarBodyParameters, "GET"); - if (apiClient->response_code == 0) { - printf("%s\n","successful operation"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 0) { + // printf("%s\n","successful operation"); + //} //No return type end: if (apiClient->dataReceived) { @@ -602,12 +613,14 @@ UserAPI_updateUser(apiClient_t *apiClient, char * username , user_t * body ) localVarBodyParameters, "PUT"); - if (apiClient->response_code == 400) { - printf("%s\n","Invalid user supplied"); - } - if (apiClient->response_code == 404) { - printf("%s\n","User not found"); - } + // uncomment below to debug the error response + //if (apiClient->response_code == 400) { + // printf("%s\n","Invalid user supplied"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 404) { + // printf("%s\n","User not found"); + //} //No return type end: if (apiClient->dataReceived) { diff --git a/samples/client/petstore/c/include/list.h b/samples/client/petstore/c/include/list.h index 96c5832b02b4..96384d049b3e 100644 --- a/samples/client/petstore/c/include/list.h +++ b/samples/client/petstore/c/include/list.h @@ -23,8 +23,8 @@ typedef struct list_t { #define list_ForEach(element, list) for(element = (list != NULL) ? (list)->firstEntry : NULL; element != NULL; element = element->nextListEntry) -list_t* List(); -void list_freeListList(list_t* listToFree); +list_t* list_createList(); +void list_freeList(list_t* listToFree); void list_addElement(list_t* list, void* dataToAddInList); listEntry_t* list_getElementAt(list_t *list, long indexOfElement); diff --git a/samples/client/petstore/c/model/api_response.c b/samples/client/petstore/c/model/api_response.c index f783fd848545..117be5cb40d5 100644 --- a/samples/client/petstore/c/model/api_response.c +++ b/samples/client/petstore/c/model/api_response.c @@ -42,27 +42,27 @@ cJSON *api_response_convertToJSON(api_response_t *api_response) { cJSON *item = cJSON_CreateObject(); // api_response->code - if(api_response->code) { + if(api_response->code) { if(cJSON_AddNumberToObject(item, "code", api_response->code) == NULL) { goto fail; //Numeric } - } + } // api_response->type - if(api_response->type) { + if(api_response->type) { if(cJSON_AddStringToObject(item, "type", api_response->type) == NULL) { goto fail; //String } - } + } // api_response->message - if(api_response->message) { + if(api_response->message) { if(cJSON_AddStringToObject(item, "message", api_response->message) == NULL) { goto fail; //String } - } + } return item; fail: diff --git a/samples/client/petstore/c/model/category.c b/samples/client/petstore/c/model/category.c index c192b2b96058..34f5a804bdb2 100644 --- a/samples/client/petstore/c/model/category.c +++ b/samples/client/petstore/c/model/category.c @@ -36,19 +36,19 @@ cJSON *category_convertToJSON(category_t *category) { cJSON *item = cJSON_CreateObject(); // category->id - if(category->id) { + if(category->id) { if(cJSON_AddNumberToObject(item, "id", category->id) == NULL) { goto fail; //Numeric } - } + } // category->name - if(category->name) { + if(category->name) { if(cJSON_AddStringToObject(item, "name", category->name) == NULL) { goto fail; //String } - } + } return item; fail: diff --git a/samples/client/petstore/c/model/order.c b/samples/client/petstore/c/model/order.c index f9e518452738..132aa09405cd 100644 --- a/samples/client/petstore/c/model/order.c +++ b/samples/client/petstore/c/model/order.c @@ -61,52 +61,52 @@ cJSON *order_convertToJSON(order_t *order) { cJSON *item = cJSON_CreateObject(); // order->id - if(order->id) { + if(order->id) { if(cJSON_AddNumberToObject(item, "id", order->id) == NULL) { goto fail; //Numeric } - } + } // order->pet_id - if(order->pet_id) { + if(order->pet_id) { if(cJSON_AddNumberToObject(item, "petId", order->pet_id) == NULL) { goto fail; //Numeric } - } + } // order->quantity - if(order->quantity) { + if(order->quantity) { if(cJSON_AddNumberToObject(item, "quantity", order->quantity) == NULL) { goto fail; //Numeric } - } + } // order->ship_date - if(order->ship_date) { + if(order->ship_date) { if(cJSON_AddStringToObject(item, "shipDate", order->ship_date) == NULL) { goto fail; //Date-Time } - } + } // order->status - + if(order->status != openapi_petstore_order_STATUS_NULL) { if(cJSON_AddStringToObject(item, "status", statusorder_ToString(order->status)) == NULL) { goto fail; //Enum } - + } // order->complete - if(order->complete) { + if(order->complete) { if(cJSON_AddBoolToObject(item, "complete", order->complete) == NULL) { goto fail; //Bool } - } + } return item; fail: diff --git a/samples/client/petstore/c/model/pet.c b/samples/client/petstore/c/model/pet.c index a9f9c27ee472..d46ad06b1014 100644 --- a/samples/client/petstore/c/model/pet.c +++ b/samples/client/petstore/c/model/pet.c @@ -79,15 +79,15 @@ cJSON *pet_convertToJSON(pet_t *pet) { cJSON *item = cJSON_CreateObject(); // pet->id - if(pet->id) { + if(pet->id) { if(cJSON_AddNumberToObject(item, "id", pet->id) == NULL) { goto fail; //Numeric } - } + } // pet->category - if(pet->category) { + if(pet->category) { cJSON *category_local_JSON = category_convertToJSON(pet->category); if(category_local_JSON == NULL) { goto fail; //model @@ -96,14 +96,13 @@ cJSON *pet_convertToJSON(pet_t *pet) { if(item->child == NULL) { goto fail; } - } + } // pet->name if (!pet->name) { goto fail; } - if(cJSON_AddStringToObject(item, "name", pet->name) == NULL) { goto fail; //String } @@ -113,7 +112,6 @@ cJSON *pet_convertToJSON(pet_t *pet) { if (!pet->photo_urls) { goto fail; } - cJSON *photo_urls = cJSON_AddArrayToObject(item, "photoUrls"); if(photo_urls == NULL) { goto fail; //primitive container @@ -129,7 +127,7 @@ cJSON *pet_convertToJSON(pet_t *pet) { // pet->tags - if(pet->tags) { + if(pet->tags) { cJSON *tags = cJSON_AddArrayToObject(item, "tags"); if(tags == NULL) { goto fail; //nonprimitive container @@ -145,16 +143,16 @@ cJSON *pet_convertToJSON(pet_t *pet) { cJSON_AddItemToArray(tags, itemLocal); } } - } + } // pet->status - + if(pet->status != openapi_petstore_pet_STATUS_NULL) { if(cJSON_AddStringToObject(item, "status", statuspet_ToString(pet->status)) == NULL) { goto fail; //Enum } - + } return item; fail: @@ -171,6 +169,12 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){ // define the local variable for pet->category category_t *category_local_nonprim = NULL; + // define the local list for pet->photo_urls + list_t *photo_urlsList = NULL; + + // define the local list for pet->tags + list_t *tagsList = NULL; + // pet->id cJSON *id = cJSON_GetObjectItemCaseSensitive(petJSON, "id"); if (id) { @@ -204,9 +208,8 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){ goto end; } - list_t *photo_urlsList; - cJSON *photo_urls_local; + cJSON *photo_urls_local = NULL; if(!cJSON_IsArray(photo_urls)) { goto end;//primitive container } @@ -223,9 +226,8 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){ // pet->tags cJSON *tags = cJSON_GetObjectItemCaseSensitive(petJSON, "tags"); - list_t *tagsList; if (tags) { - cJSON *tags_local_nonprimitive; + cJSON *tags_local_nonprimitive = NULL; if(!cJSON_IsArray(tags)){ goto end; //nonprimitive container } @@ -270,6 +272,24 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){ category_free(category_local_nonprim); category_local_nonprim = NULL; } + if (photo_urlsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, photo_urlsList) { + free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(photo_urlsList); + photo_urlsList = NULL; + } + if (tagsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, tagsList) { + tag_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(tagsList); + tagsList = NULL; + } return NULL; } diff --git a/samples/client/petstore/c/model/tag.c b/samples/client/petstore/c/model/tag.c index 00b62ddb0764..ab3f4cce1fc6 100644 --- a/samples/client/petstore/c/model/tag.c +++ b/samples/client/petstore/c/model/tag.c @@ -36,19 +36,19 @@ cJSON *tag_convertToJSON(tag_t *tag) { cJSON *item = cJSON_CreateObject(); // tag->id - if(tag->id) { + if(tag->id) { if(cJSON_AddNumberToObject(item, "id", tag->id) == NULL) { goto fail; //Numeric } - } + } // tag->name - if(tag->name) { + if(tag->name) { if(cJSON_AddStringToObject(item, "name", tag->name) == NULL) { goto fail; //String } - } + } return item; fail: diff --git a/samples/client/petstore/c/model/user.c b/samples/client/petstore/c/model/user.c index eab6606225d4..5e5b9b39b03f 100644 --- a/samples/client/petstore/c/model/user.c +++ b/samples/client/petstore/c/model/user.c @@ -68,67 +68,67 @@ cJSON *user_convertToJSON(user_t *user) { cJSON *item = cJSON_CreateObject(); // user->id - if(user->id) { + if(user->id) { if(cJSON_AddNumberToObject(item, "id", user->id) == NULL) { goto fail; //Numeric } - } + } // user->username - if(user->username) { + if(user->username) { if(cJSON_AddStringToObject(item, "username", user->username) == NULL) { goto fail; //String } - } + } // user->first_name - if(user->first_name) { + if(user->first_name) { if(cJSON_AddStringToObject(item, "firstName", user->first_name) == NULL) { goto fail; //String } - } + } // user->last_name - if(user->last_name) { + if(user->last_name) { if(cJSON_AddStringToObject(item, "lastName", user->last_name) == NULL) { goto fail; //String } - } + } // user->email - if(user->email) { + if(user->email) { if(cJSON_AddStringToObject(item, "email", user->email) == NULL) { goto fail; //String } - } + } // user->password - if(user->password) { + if(user->password) { if(cJSON_AddStringToObject(item, "password", user->password) == NULL) { goto fail; //String } - } + } // user->phone - if(user->phone) { + if(user->phone) { if(cJSON_AddStringToObject(item, "phone", user->phone) == NULL) { goto fail; //String } - } + } // user->user_status - if(user->user_status) { + if(user->user_status) { if(cJSON_AddNumberToObject(item, "userStatus", user->user_status) == NULL) { goto fail; //Numeric } - } + } return item; fail: diff --git a/samples/client/petstore/cpp-qt/README.md b/samples/client/petstore/cpp-qt/README.md index 9bb1fbd58b1a..7700fd41b82a 100644 --- a/samples/client/petstore/cpp-qt/README.md +++ b/samples/client/petstore/cpp-qt/README.md @@ -66,8 +66,8 @@ void Example::exampleFunction1(){ loop.quit(); }); - PFXPet body = create(); // PFXPet | Pet object that needs to be added to the store - apiInstance.addPet(body); + PFXPet pfx_pet = create(); // PFXPet | Pet object that needs to be added to the store + apiInstance.addPet(pfx_pet); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); } diff --git a/samples/client/petstore/cpp-qt/client/PFXOauth.h b/samples/client/petstore/cpp-qt/client/PFXOauth.h index df282d47cee9..3c3ad8c1c3d5 100644 --- a/samples/client/petstore/cpp-qt/client/PFXOauth.h +++ b/samples/client/petstore/cpp-qt/client/PFXOauth.h @@ -39,15 +39,15 @@ class oauthToken { public: oauthToken(QString token, int expiresIn, QString scope, QString tokenType) : m_token(token), m_scope(scope), m_type(tokenType){ - m_validUntil = time(0) + expiresIn; + m_validUntil = time(nullptr) + expiresIn; } oauthToken(){ - m_validUntil = time(0) - 1; + m_validUntil = time(nullptr) - 1; } QString getToken(){return m_token;}; QString getScope(){return m_scope;}; QString getType(){return m_type;}; - bool isValid(){return time(0) < m_validUntil;}; + bool isValid(){return time(nullptr) < m_validUntil;}; private: QString m_token; diff --git a/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp index 7d577df67c52..584b77042dd4 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp @@ -226,7 +226,7 @@ QString PFXPetApi::getParamStyleDelimiter(const QString &style, const QString &n } } -void PFXPetApi::addPet(const PFXPet &body) { +void PFXPetApi::addPet(const PFXPet &pfx_pet) { QString fullPath = QString(_serverConfigs["addPet"][_serverIndices.value("addPet")].URL()+"/pet"); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -236,7 +236,7 @@ void PFXPetApi::addPet(const PFXPet &body) { { - QByteArray output = body.asJson().toUtf8(); + QByteArray output = pfx_pet.asJson().toUtf8(); input.request_body.append(output); } #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) @@ -326,7 +326,7 @@ void PFXPetApi::deletePet(const qint64 &pet_id, const ::test_namespace::Optional QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -806,7 +806,7 @@ void PFXPetApi::getPetById(const qint64 &pet_id) { QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -861,7 +861,7 @@ void PFXPetApi::getPetByIdCallback(PFXHttpRequestWorker *worker) { } } -void PFXPetApi::updatePet(const PFXPet &body) { +void PFXPetApi::updatePet(const PFXPet &pfx_pet) { QString fullPath = QString(_serverConfigs["updatePet"][_serverIndices.value("updatePet")].URL()+"/pet"); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -871,7 +871,7 @@ void PFXPetApi::updatePet(const PFXPet &body) { { - QByteArray output = body.asJson().toUtf8(); + QByteArray output = pfx_pet.asJson().toUtf8(); input.request_body.append(output); } #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) @@ -961,7 +961,7 @@ void PFXPetApi::updatePetWithForm(const qint64 &pet_id, const ::test_namespace:: QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -1071,7 +1071,7 @@ void PFXPetApi::uploadFile(const qint64 &pet_id, const ::test_namespace::Optiona QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); diff --git a/samples/client/petstore/cpp-qt/client/PFXPetApi.h b/samples/client/petstore/cpp-qt/client/PFXPetApi.h index 9fc00dd6d3cf..0f05e6cb7469 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPetApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXPetApi.h @@ -59,9 +59,9 @@ class PFXPetApi : public QObject { QString getParamStyleDelimiter(const QString &style, const QString &name, bool isExplode); /** - * @param[in] body PFXPet [required] + * @param[in] pfx_pet PFXPet [required] */ - void addPet(const PFXPet &body); + void addPet(const PFXPet &pfx_pet); /** * @param[in] pet_id qint64 [required] @@ -85,9 +85,9 @@ class PFXPetApi : public QObject { void getPetById(const qint64 &pet_id); /** - * @param[in] body PFXPet [required] + * @param[in] pfx_pet PFXPet [required] */ - void updatePet(const PFXPet &body); + void updatePet(const PFXPet &pfx_pet); /** * @param[in] pet_id qint64 [required] diff --git a/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp index e9b868dc0376..efb2c5de46ef 100644 --- a/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp @@ -226,7 +226,7 @@ void PFXStoreApi::deleteOrder(const QString &order_id) { QString order_idPathParam("{"); order_idPathParam.append("orderId").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -350,7 +350,7 @@ void PFXStoreApi::getOrderById(const qint64 &order_id) { QString order_idPathParam("{"); order_idPathParam.append("orderId").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -405,7 +405,7 @@ void PFXStoreApi::getOrderByIdCallback(PFXHttpRequestWorker *worker) { } } -void PFXStoreApi::placeOrder(const PFXOrder &body) { +void PFXStoreApi::placeOrder(const PFXOrder &pfx_order) { QString fullPath = QString(_serverConfigs["placeOrder"][_serverIndices.value("placeOrder")].URL()+"/store/order"); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -415,7 +415,7 @@ void PFXStoreApi::placeOrder(const PFXOrder &body) { { - QByteArray output = body.asJson().toUtf8(); + QByteArray output = pfx_order.asJson().toUtf8(); input.request_body.append(output); } #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) diff --git a/samples/client/petstore/cpp-qt/client/PFXStoreApi.h b/samples/client/petstore/cpp-qt/client/PFXStoreApi.h index 037ef2f4d2f9..43bf25f4ea51 100644 --- a/samples/client/petstore/cpp-qt/client/PFXStoreApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXStoreApi.h @@ -71,9 +71,9 @@ class PFXStoreApi : public QObject { void getOrderById(const qint64 &order_id); /** - * @param[in] body PFXOrder [required] + * @param[in] pfx_order PFXOrder [required] */ - void placeOrder(const PFXOrder &body); + void placeOrder(const PFXOrder &pfx_order); private: diff --git a/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp index e60d3acd1c10..c19978bd6126 100644 --- a/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp @@ -226,7 +226,7 @@ QString PFXUserApi::getParamStyleDelimiter(const QString &style, const QString & } } -void PFXUserApi::createUser(const PFXUser &body) { +void PFXUserApi::createUser(const PFXUser &pfx_user) { QString fullPath = QString(_serverConfigs["createUser"][_serverIndices.value("createUser")].URL()+"/user"); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -236,7 +236,7 @@ void PFXUserApi::createUser(const PFXUser &body) { { - QByteArray output = body.asJson().toUtf8(); + QByteArray output = pfx_user.asJson().toUtf8(); input.request_body.append(output); } #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) @@ -278,7 +278,7 @@ void PFXUserApi::createUserCallback(PFXHttpRequestWorker *worker) { } } -void PFXUserApi::createUsersWithArrayInput(const QList &body) { +void PFXUserApi::createUsersWithArrayInput(const QList &pfx_user) { QString fullPath = QString(_serverConfigs["createUsersWithArrayInput"][_serverIndices.value("createUsersWithArrayInput")].URL()+"/user/createWithArray"); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -287,7 +287,7 @@ void PFXUserApi::createUsersWithArrayInput(const QList &body) { PFXHttpRequestInput input(fullPath, "POST"); { - QJsonDocument doc(::test_namespace::toJsonValue(body).toArray()); + QJsonDocument doc(::test_namespace::toJsonValue(pfx_user).toArray()); QByteArray bytes = doc.toJson(); input.request_body.append(bytes); } @@ -330,7 +330,7 @@ void PFXUserApi::createUsersWithArrayInputCallback(PFXHttpRequestWorker *worker) } } -void PFXUserApi::createUsersWithListInput(const QList &body) { +void PFXUserApi::createUsersWithListInput(const QList &pfx_user) { QString fullPath = QString(_serverConfigs["createUsersWithListInput"][_serverIndices.value("createUsersWithListInput")].URL()+"/user/createWithList"); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -339,7 +339,7 @@ void PFXUserApi::createUsersWithListInput(const QList &body) { PFXHttpRequestInput input(fullPath, "POST"); { - QJsonDocument doc(::test_namespace::toJsonValue(body).toArray()); + QJsonDocument doc(::test_namespace::toJsonValue(pfx_user).toArray()); QByteArray bytes = doc.toJson(); input.request_body.append(bytes); } @@ -390,7 +390,7 @@ void PFXUserApi::deleteUser(const QString &username) { QString usernamePathParam("{"); usernamePathParam.append("username").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -452,7 +452,7 @@ void PFXUserApi::getUserByName(const QString &username) { QString usernamePathParam("{"); usernamePathParam.append("username").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -513,12 +513,12 @@ void PFXUserApi::loginUser(const QString &username, const QString &password) { QString queryPrefix, querySuffix, queryDelimiter, queryStyle; { - queryStyle = ""; + queryStyle = "form"; if (queryStyle == "") queryStyle = "form"; queryPrefix = getParamStylePrefix(queryStyle); querySuffix = getParamStyleSuffix(queryStyle); - queryDelimiter = getParamStyleDelimiter(queryStyle, "username", false); + queryDelimiter = getParamStyleDelimiter(queryStyle, "username", true); if (fullPath.indexOf("?") > 0) fullPath.append(queryPrefix); else @@ -528,12 +528,12 @@ void PFXUserApi::loginUser(const QString &username, const QString &password) { } { - queryStyle = ""; + queryStyle = "form"; if (queryStyle == "") queryStyle = "form"; queryPrefix = getParamStylePrefix(queryStyle); querySuffix = getParamStyleSuffix(queryStyle); - queryDelimiter = getParamStyleDelimiter(queryStyle, "password", false); + queryDelimiter = getParamStyleDelimiter(queryStyle, "password", true); if (fullPath.indexOf("?") > 0) fullPath.append(queryPrefix); else @@ -636,7 +636,7 @@ void PFXUserApi::logoutUserCallback(PFXHttpRequestWorker *worker) { } } -void PFXUserApi::updateUser(const QString &username, const PFXUser &body) { +void PFXUserApi::updateUser(const QString &username, const PFXUser &pfx_user) { QString fullPath = QString(_serverConfigs["updateUser"][_serverIndices.value("updateUser")].URL()+"/user/{username}"); @@ -644,7 +644,7 @@ void PFXUserApi::updateUser(const QString &username, const PFXUser &body) { QString usernamePathParam("{"); usernamePathParam.append("username").append("}"); QString pathPrefix, pathSuffix, pathDelimiter; - QString pathStyle = ""; + QString pathStyle = "simple"; if (pathStyle == "") pathStyle = "simple"; pathPrefix = getParamStylePrefix(pathStyle); @@ -660,7 +660,7 @@ void PFXUserApi::updateUser(const QString &username, const PFXUser &body) { { - QByteArray output = body.asJson().toUtf8(); + QByteArray output = pfx_user.asJson().toUtf8(); input.request_body.append(output); } #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) diff --git a/samples/client/petstore/cpp-qt/client/PFXUserApi.h b/samples/client/petstore/cpp-qt/client/PFXUserApi.h index 0fc9a73266e8..4e4b3e1a9f45 100644 --- a/samples/client/petstore/cpp-qt/client/PFXUserApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXUserApi.h @@ -58,19 +58,19 @@ class PFXUserApi : public QObject { QString getParamStyleDelimiter(const QString &style, const QString &name, bool isExplode); /** - * @param[in] body PFXUser [required] + * @param[in] pfx_user PFXUser [required] */ - void createUser(const PFXUser &body); + void createUser(const PFXUser &pfx_user); /** - * @param[in] body QList [required] + * @param[in] pfx_user QList [required] */ - void createUsersWithArrayInput(const QList &body); + void createUsersWithArrayInput(const QList &pfx_user); /** - * @param[in] body QList [required] + * @param[in] pfx_user QList [required] */ - void createUsersWithListInput(const QList &body); + void createUsersWithListInput(const QList &pfx_user); /** * @param[in] username QString [required] @@ -93,9 +93,9 @@ class PFXUserApi : public QObject { /** * @param[in] username QString [required] - * @param[in] body PFXUser [required] + * @param[in] pfx_user PFXUser [required] */ - void updateUser(const QString &username, const PFXUser &body); + void updateUser(const QString &username, const PFXUser &pfx_user); private: diff --git a/samples/client/petstore/csharp-netcore-functions/.openapi-generator-ignore b/samples/client/petstore/csharp-netcore-functions/.openapi-generator-ignore index 7484ee590a38..bc5b823c4d0b 100644 --- a/samples/client/petstore/csharp-netcore-functions/.openapi-generator-ignore +++ b/samples/client/petstore/csharp-netcore-functions/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +Org.OpenAPITools.sln +src/Org.OpenAPITools/Org.OpenAPITools.csproj diff --git a/samples/client/petstore/csharp-netcore-functions/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore-functions/.openapi-generator/FILES index e6e8df0a401c..4d6ee81cc58d 100644 --- a/samples/client/petstore/csharp-netcore-functions/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore-functions/.openapi-generator/FILES @@ -1,51 +1,17 @@ -.gitignore -Docs/PetApi.md -Docs/StoreApi.md -Docs/UserApi.md README.md -appveyor.yml -docs/ApiResponse.md -docs/Category.md -docs/Order.md -docs/Pet.md -docs/Tag.md -docs/User.md -generatedSrc/Client/ApiClient.cs -generatedSrc/Client/ApiException.cs -generatedSrc/Client/ApiResponse.cs -generatedSrc/Client/Configuration.cs -generatedSrc/Client/ExceptionFactory.cs -generatedSrc/Client/IApiAccessor.cs -generatedSrc/Client/OpenAPIDateConverter.cs -generatedSrc/Functions/PetApi.cs -generatedSrc/Functions/PetApi.cs -generatedSrc/Functions/StoreApi.cs -generatedSrc/Functions/StoreApi.cs -generatedSrc/Functions/UserApi.cs -generatedSrc/Functions/UserApi.cs -generatedSrc/Models/ApiResponse.cs -generatedSrc/Models/Category.cs -generatedSrc/Models/Order.cs -generatedSrc/Models/Pet.cs -generatedSrc/Models/Tag.cs -generatedSrc/Models/User.cs -generatedSrc/README.md -generatedSrc/project.json -git_push.sh -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/ClientUtils.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/HttpMethod.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IAsynchronousClient.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/ISynchronousClient.cs -src/Org.OpenAPITools/Client/Multimap.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/Client/RequestOptions.cs -src/Org.OpenAPITools/Client/RetryConfiguration.cs -src/Org.OpenAPITools/Models/AbstractOpenAPISchema.cs +build.bat +build.sh +src/Org.OpenAPITools/.gitignore +src/Org.OpenAPITools/Converters/CustomEnumConverter.cs +src/Org.OpenAPITools/Functions/PetApi.cs +src/Org.OpenAPITools/Functions/StoreApi.cs +src/Org.OpenAPITools/Functions/UserApi.cs +src/Org.OpenAPITools/Models/ApiResponse.cs +src/Org.OpenAPITools/Models/Category.cs +src/Org.OpenAPITools/Models/Order.cs +src/Org.OpenAPITools/Models/Pet.cs +src/Org.OpenAPITools/Models/Tag.cs +src/Org.OpenAPITools/Models/User.cs +src/Org.OpenAPITools/OpenApi/TypeExtensions.cs +src/Org.OpenAPITools/host.json +src/Org.OpenAPITools/local.settings.json diff --git a/samples/client/petstore/csharp-netcore-functions/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore-functions/.openapi-generator/VERSION index 4077803655c0..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore-functions/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore-functions/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore-functions/Org.OpenAPITools.sln b/samples/client/petstore/csharp-netcore-functions/Org.OpenAPITools.sln new file mode 100644 index 000000000000..6f12b4fa17de --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/Org.OpenAPITools.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2043 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{6C41B0FB-16DE-4E0C-9797-286D6A24F96F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6C41B0FB-16DE-4E0C-9797-286D6A24F96F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C41B0FB-16DE-4E0C-9797-286D6A24F96F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C41B0FB-16DE-4E0C-9797-286D6A24F96F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C41B0FB-16DE-4E0C-9797-286D6A24F96F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/samples/client/petstore/csharp-netcore-functions/README.md b/samples/client/petstore/csharp-netcore-functions/README.md index a531ad1e6029..24c2ac27b364 100644 --- a/samples/client/petstore/csharp-netcore-functions/README.md +++ b/samples/client/petstore/csharp-netcore-functions/README.md @@ -1,159 +1,24 @@ -# Org.OpenAPITools - the C# library for the OpenAPI Petstore +# Org.OpenAPITools - Azure Functions v4 Server This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: +## Run -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CsharpNetcoreFunctionsServerCodegen +Linux/OS X: - -## Frameworks supported -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext - - -## Dependencies - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.11.7 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: ``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -Install-Package System.ComponentModel.Annotations +sh build.sh ``` -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). -NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). - - -## Installation -Generate the DLL using your preferred tool (e.g. `dotnet build`) +Windows: -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: -```csharp -using Org.OpenAPITools.Apis; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Models; ``` - -## Usage - -To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` -```csharp -Configuration c = new Configuration(); -System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/"); -webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; -c.Proxy = webProxy; +build.bat ``` +## Run in Docker - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Apis; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Models; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - config.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(config); - var pet = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - Pet result = apiInstance.AddPet(pet); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} ``` - - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io/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 - - - [Models.ApiResponse](docs/ApiResponse.md) - - [Models.Category](docs/Category.md) - - [Models.Order](docs/Order.md) - - [Models.Pet](docs/Pet.md) - - [Models.Tag](docs/Tag.md) - - [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 - +cd src/Org.OpenAPITools +docker build -t org.openapitools . +docker run -p 5000:8080 org.openapitools +``` diff --git a/samples/client/petstore/csharp-netcore-functions/build.bat b/samples/client/petstore/csharp-netcore-functions/build.bat new file mode 100644 index 000000000000..cd65518e4287 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/build.bat @@ -0,0 +1,9 @@ +:: Generated by: https://openapi-generator.tech +:: + +@echo off + +dotnet restore src\Org.OpenAPITools +dotnet build src\Org.OpenAPITools +echo Now, run the following to start the project: dotnet run -p src\Org.OpenAPITools\Org.OpenAPITools.csproj --launch-profile web. +echo. diff --git a/samples/client/petstore/csharp-netcore-functions/build.sh b/samples/client/petstore/csharp-netcore-functions/build.sh new file mode 100644 index 000000000000..2d2f90a3aa96 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# +# Generated by: https://openapi-generator.tech +# + +dotnet restore src/Org.OpenAPITools/ && \ + dotnet build src/Org.OpenAPITools/ && \ + echo "Now, run the following to start the project: func start" diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/.gitignore b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/.gitignore new file mode 100644 index 000000000000..1ee53850b84c --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/.gitignore @@ -0,0 +1,362 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs new file mode 100644 index 000000000000..85bd3167b285 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs @@ -0,0 +1,33 @@ +using System; +using System.ComponentModel; +using System.Globalization; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Converters +{ + /// + /// Custom string to enum converter + /// + public class CustomEnumConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(string)) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + var s = value as string; + if (string.IsNullOrEmpty(s)) + { + return null; + } + + return JsonConvert.DeserializeObject(@"""" + value.ToString() + @""""); + } + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/PetApi.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/PetApi.cs new file mode 100644 index 000000000000..2e606b0a8c12 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/PetApi.cs @@ -0,0 +1,108 @@ +using System.IO; +using System.Net; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.WebJobs; +using Microsoft.Azure.WebJobs.Extensions.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; +using Newtonsoft.Json; +using Org.OpenAPITools.Models; + +namespace Org.OpenAPITools.Functions +{ + public partial class PetApi + { + [FunctionName("PetApi_AddPet")] + public async Task> _AddPet([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2pet")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("AddPet"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_DeletePet")] + public async Task> _DeletePet([HttpTrigger(AuthorizationLevel.Anonymous, "Delete", Route = "v2pet/{petId}")]HttpRequest req, ExecutionContext context, long petId) + { + var method = this.GetType().GetMethod("DeletePet"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_FindPetsByStatus")] + public async Task>> _FindPetsByStatus([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2pet/findByStatus")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("FindPetsByStatus"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_FindPetsByTags")] + public async Task>> _FindPetsByTags([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2pet/findByTags")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("FindPetsByTags"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_GetPetById")] + public async Task> _GetPetById([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2pet/{petId}")]HttpRequest req, ExecutionContext context, long petId) + { + var method = this.GetType().GetMethod("GetPetById"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_UpdatePet")] + public async Task> _UpdatePet([HttpTrigger(AuthorizationLevel.Anonymous, "Put", Route = "v2pet")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("UpdatePet"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_UpdatePetWithForm")] + public async Task> _UpdatePetWithForm([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2pet/{petId}")]HttpRequest req, ExecutionContext context, long petId) + { + var method = this.GetType().GetMethod("UpdatePetWithForm"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("PetApi_UploadFile")] + public async Task> _UploadFile([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2pet/{petId}/uploadImage")]HttpRequest req, ExecutionContext context, long petId) + { + var method = this.GetType().GetMethod("UploadFile"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/StoreApi.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/StoreApi.cs new file mode 100644 index 000000000000..560582f3374f --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/StoreApi.cs @@ -0,0 +1,64 @@ +using System.IO; +using System.Net; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.WebJobs; +using Microsoft.Azure.WebJobs.Extensions.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; +using Newtonsoft.Json; +using Org.OpenAPITools.Models; + +namespace Org.OpenAPITools.Functions +{ + public partial class StoreApi + { + [FunctionName("StoreApi_DeleteOrder")] + public async Task> _DeleteOrder([HttpTrigger(AuthorizationLevel.Anonymous, "Delete", Route = "v2store/order/{orderId}")]HttpRequest req, ExecutionContext context, string orderId) + { + var method = this.GetType().GetMethod("DeleteOrder"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("StoreApi_GetInventory")] + public async Task>> _GetInventory([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2store/inventory")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("GetInventory"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("StoreApi_GetOrderById")] + public async Task> _GetOrderById([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2store/order/{orderId}")]HttpRequest req, ExecutionContext context, [Range(1, 5)]long orderId) + { + var method = this.GetType().GetMethod("GetOrderById"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("StoreApi_PlaceOrder")] + public async Task> _PlaceOrder([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2store/order")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("PlaceOrder"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/UserApi.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/UserApi.cs new file mode 100644 index 000000000000..a4219eb43ce8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Functions/UserApi.cs @@ -0,0 +1,108 @@ +using System.IO; +using System.Net; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.WebJobs; +using Microsoft.Azure.WebJobs.Extensions.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; +using Newtonsoft.Json; +using Org.OpenAPITools.Models; + +namespace Org.OpenAPITools.Functions +{ + public partial class UserApi + { + [FunctionName("UserApi_CreateUser")] + public async Task> _CreateUser([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2user")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("CreateUser"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_CreateUsersWithArrayInput")] + public async Task> _CreateUsersWithArrayInput([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2user/createWithArray")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("CreateUsersWithArrayInput"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_CreateUsersWithListInput")] + public async Task> _CreateUsersWithListInput([HttpTrigger(AuthorizationLevel.Anonymous, "Post", Route = "v2user/createWithList")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("CreateUsersWithListInput"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_DeleteUser")] + public async Task> _DeleteUser([HttpTrigger(AuthorizationLevel.Anonymous, "Delete", Route = "v2user/{username}")]HttpRequest req, ExecutionContext context, string username) + { + var method = this.GetType().GetMethod("DeleteUser"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_GetUserByName")] + public async Task> _GetUserByName([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2user/{username}")]HttpRequest req, ExecutionContext context, string username) + { + var method = this.GetType().GetMethod("GetUserByName"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_LoginUser")] + public async Task> _LoginUser([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2user/login")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("LoginUser"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_LogoutUser")] + public async Task> _LogoutUser([HttpTrigger(AuthorizationLevel.Anonymous, "Get", Route = "v2user/logout")]HttpRequest req, ExecutionContext context) + { + var method = this.GetType().GetMethod("LogoutUser"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + + [FunctionName("UserApi_UpdateUser")] + public async Task> _UpdateUser([HttpTrigger(AuthorizationLevel.Anonymous, "Put", Route = "v2user/{username}")]HttpRequest req, ExecutionContext context, string username) + { + var method = this.GetType().GetMethod("UpdateUser"); + if(method == null) + { + return new StatusCodeResult((int)HttpStatusCode.NotImplemented); + } + return (await ((Task<>)method.Invoke(this, new object[] { req, context, id })).ConfigureAwait(false)); + } + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/ApiResponse.cs new file mode 100644 index 000000000000..88e45fce388b --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -0,0 +1,147 @@ +/* + * 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 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// Describes the result of uploading an image resource + /// + [DataContract] + public partial class ApiResponse : IEquatable + { + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public int Code { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ApiResponse {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((ApiResponse)obj); + } + + /// + /// Returns true if ApiResponse instances are equal + /// + /// Instance of ApiResponse to be compared + /// Boolean + public bool Equals(ApiResponse other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Code == other.Code || + + Code.Equals(other.Code) + ) && + ( + Type == other.Type || + Type != null && + Type.Equals(other.Type) + ) && + ( + Message == other.Message || + Message != null && + Message.Equals(other.Message) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Code.GetHashCode(); + if (Type != null) + hashCode = hashCode * 59 + Type.GetHashCode(); + if (Message != null) + hashCode = hashCode * 59 + Message.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(ApiResponse left, ApiResponse right) + { + return Equals(left, right); + } + + public static bool operator !=(ApiResponse left, ApiResponse right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Category.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Category.cs new file mode 100644 index 000000000000..8b9fd03a240e --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Category.cs @@ -0,0 +1,134 @@ +/* + * 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 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A category for a pet + /// + [DataContract] + public partial class Category : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long Id { get; set; } + + /// + /// Gets or Sets Name + /// + [RegularExpression("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Category {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Category)obj); + } + + /// + /// Returns true if Category instances are equal + /// + /// Instance of Category to be compared + /// Boolean + public bool Equals(Category other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Category left, Category right) + { + return Equals(left, right); + } + + public static bool operator !=(Category left, Category right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Order.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Order.cs new file mode 100644 index 000000000000..e9013f0ed0df --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Order.cs @@ -0,0 +1,219 @@ +/* + * 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 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// An order for a pets from the pet store + /// + [DataContract] + public partial class Order : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long Id { get; set; } + + /// + /// Gets or Sets PetId + /// + [DataMember(Name="petId", EmitDefaultValue=false)] + public long PetId { get; set; } + + /// + /// Gets or Sets Quantity + /// + [DataMember(Name="quantity", EmitDefaultValue=false)] + public int Quantity { get; set; } + + /// + /// Gets or Sets ShipDate + /// + [DataMember(Name="shipDate", EmitDefaultValue=false)] + public DateTime ShipDate { get; set; } + + + /// + /// Order Status + /// + /// Order Status + [TypeConverter(typeof(CustomEnumConverter))] + [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum PlacedEnum for placed + /// + [EnumMember(Value = "placed")] + PlacedEnum = 1, + + /// + /// Enum ApprovedEnum for approved + /// + [EnumMember(Value = "approved")] + ApprovedEnum = 2, + + /// + /// Enum DeliveredEnum for delivered + /// + [EnumMember(Value = "delivered")] + DeliveredEnum = 3 + } + + /// + /// Order Status + /// + /// Order Status + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + + /// + /// Gets or Sets Complete + /// + [DataMember(Name="complete", EmitDefaultValue=false)] + public bool Complete { get; set; } = false; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Order {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" PetId: ").Append(PetId).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Order)obj); + } + + /// + /// Returns true if Order instances are equal + /// + /// Instance of Order to be compared + /// Boolean + public bool Equals(Order other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + PetId == other.PetId || + + PetId.Equals(other.PetId) + ) && + ( + Quantity == other.Quantity || + + Quantity.Equals(other.Quantity) + ) && + ( + ShipDate == other.ShipDate || + ShipDate != null && + ShipDate.Equals(other.ShipDate) + ) && + ( + Status == other.Status || + + Status.Equals(other.Status) + ) && + ( + Complete == other.Complete || + + Complete.Equals(other.Complete) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + + hashCode = hashCode * 59 + PetId.GetHashCode(); + + hashCode = hashCode * 59 + Quantity.GetHashCode(); + if (ShipDate != null) + hashCode = hashCode * 59 + ShipDate.GetHashCode(); + + hashCode = hashCode * 59 + Status.GetHashCode(); + + hashCode = hashCode * 59 + Complete.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Order left, Order right) + { + return Equals(left, right); + } + + public static bool operator !=(Order left, Order right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Pet.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Pet.cs new file mode 100644 index 000000000000..d5a816cd5ee1 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Pet.cs @@ -0,0 +1,223 @@ +/* + * 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 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A pet for sale in the pet store + /// + [DataContract] + public partial class Pet : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long Id { get; set; } + + /// + /// Gets or Sets Category + /// + [DataMember(Name="category", EmitDefaultValue=false)] + public Category Category { get; set; } + + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Gets or Sets PhotoUrls + /// + [Required] + [DataMember(Name="photoUrls", EmitDefaultValue=false)] + public List PhotoUrls { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + public List Tags { get; set; } + + + /// + /// pet status in the store + /// + /// pet status in the store + [TypeConverter(typeof(CustomEnumConverter))] + [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum AvailableEnum for available + /// + [EnumMember(Value = "available")] + AvailableEnum = 1, + + /// + /// Enum PendingEnum for pending + /// + [EnumMember(Value = "pending")] + PendingEnum = 2, + + /// + /// Enum SoldEnum for sold + /// + [EnumMember(Value = "sold")] + SoldEnum = 3 + } + + /// + /// pet status in the store + /// + /// pet status in the store + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Pet {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Pet)obj); + } + + /// + /// Returns true if Pet instances are equal + /// + /// Instance of Pet to be compared + /// Boolean + public bool Equals(Pet other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Category == other.Category || + Category != null && + Category.Equals(other.Category) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ) && + ( + PhotoUrls == other.PhotoUrls || + PhotoUrls != null && + other.PhotoUrls != null && + PhotoUrls.SequenceEqual(other.PhotoUrls) + ) && + ( + Tags == other.Tags || + Tags != null && + other.Tags != null && + Tags.SequenceEqual(other.Tags) + ) && + ( + Status == other.Status || + + Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Category != null) + hashCode = hashCode * 59 + Category.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + if (PhotoUrls != null) + hashCode = hashCode * 59 + PhotoUrls.GetHashCode(); + if (Tags != null) + hashCode = hashCode * 59 + Tags.GetHashCode(); + + hashCode = hashCode * 59 + Status.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Pet left, Pet right) + { + return Equals(left, right); + } + + public static bool operator !=(Pet left, Pet right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Tag.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Tag.cs new file mode 100644 index 000000000000..090f95cc494f --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/Tag.cs @@ -0,0 +1,133 @@ +/* + * 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 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A tag for a pet + /// + [DataContract] + public partial class Tag : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Tag {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Tag)obj); + } + + /// + /// Returns true if Tag instances are equal + /// + /// Instance of Tag to be compared + /// Boolean + public bool Equals(Tag other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Tag left, Tag right) + { + return Equals(left, right); + } + + public static bool operator !=(Tag left, Tag right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/User.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/User.cs new file mode 100644 index 000000000000..4c6d96d08c50 --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Models/User.cs @@ -0,0 +1,218 @@ +/* + * 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 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A User who is purchasing from the pet store + /// + [DataContract] + public partial class User : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long Id { get; set; } + + /// + /// Gets or Sets Username + /// + [DataMember(Name="username", EmitDefaultValue=false)] + public string Username { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Gets or Sets Email + /// + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Gets or Sets Password + /// + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// Gets or Sets Phone + /// + [DataMember(Name="phone", EmitDefaultValue=false)] + public string Phone { get; set; } + + /// + /// User Status + /// + /// User Status + [DataMember(Name="userStatus", EmitDefaultValue=false)] + public int UserStatus { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class User {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((User)obj); + } + + /// + /// Returns true if User instances are equal + /// + /// Instance of User to be compared + /// Boolean + public bool Equals(User other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Username == other.Username || + Username != null && + Username.Equals(other.Username) + ) && + ( + FirstName == other.FirstName || + FirstName != null && + FirstName.Equals(other.FirstName) + ) && + ( + LastName == other.LastName || + LastName != null && + LastName.Equals(other.LastName) + ) && + ( + Email == other.Email || + Email != null && + Email.Equals(other.Email) + ) && + ( + Password == other.Password || + Password != null && + Password.Equals(other.Password) + ) && + ( + Phone == other.Phone || + Phone != null && + Phone.Equals(other.Phone) + ) && + ( + UserStatus == other.UserStatus || + + UserStatus.Equals(other.UserStatus) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Username != null) + hashCode = hashCode * 59 + Username.GetHashCode(); + if (FirstName != null) + hashCode = hashCode * 59 + FirstName.GetHashCode(); + if (LastName != null) + hashCode = hashCode * 59 + LastName.GetHashCode(); + if (Email != null) + hashCode = hashCode * 59 + Email.GetHashCode(); + if (Password != null) + hashCode = hashCode * 59 + Password.GetHashCode(); + if (Phone != null) + hashCode = hashCode * 59 + Phone.GetHashCode(); + + hashCode = hashCode * 59 + UserStatus.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(User left, User right) + { + return Equals(left, right); + } + + public static bool operator !=(User left, User right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/OpenApi/TypeExtensions.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/OpenApi/TypeExtensions.cs new file mode 100644 index 000000000000..b862226f2c1b --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/OpenApi/TypeExtensions.cs @@ -0,0 +1,51 @@ +using System; +using System.Linq; +using System.Text; + +namespace Org.OpenAPITools.OpenApi +{ + /// + /// Replacement utilities from Swashbuckle.AspNetCore.SwaggerGen which are not in 5.x + /// + public static class TypeExtensions + { + /// + /// Produce a friendly name for the type which is unique. + /// + /// + /// + public static string FriendlyId(this Type type, bool fullyQualified = false) + { + var typeName = fullyQualified + ? type.FullNameSansTypeParameters().Replace("+", ".") + : type.Name; + + if (type.IsGenericType) + { + var genericArgumentIds = type.GetGenericArguments() + .Select(t => t.FriendlyId(fullyQualified)) + .ToArray(); + + return new StringBuilder(typeName) + .Replace($"`{genericArgumentIds.Count()}", string.Empty) + .Append($"[{string.Join(",", genericArgumentIds).TrimEnd(',')}]") + .ToString(); + } + + return typeName; + } + + /// + /// Determine the fully qualified type name without type parameters. + /// + /// + public static string FullNameSansTypeParameters(this Type type) + { + var fullName = type.FullName; + if (string.IsNullOrEmpty(fullName)) + fullName = type.Name; + var chopIndex = fullName.IndexOf("[[", StringComparison.Ordinal); + return (chopIndex == -1) ? fullName : fullName.Substring(0, chopIndex); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Org.OpenAPITools.csproj new file mode 100644 index 000000000000..71f4541f696c --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -0,0 +1,33 @@ + + + A library generated from a OpenAPI doc + No Copyright + OpenAPI + net6.0 + true + true + 1.0.0 + v4 + Org.OpenAPITools + Org.OpenAPITools + ec5e31f0-aa1e-4436-9c99-10f99a6500e4 + Linux + ..\.. + + + + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/host.json b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/host.json new file mode 100644 index 000000000000..beb2e4020b8b --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/host.json @@ -0,0 +1,11 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/local.settings.json b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/local.settings.json new file mode 100644 index 000000000000..4fce9ff39ede --- /dev/null +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/local.settings.json @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "FUNCTIONS_WORKER_RUNTIME": "dotnet" + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES index 2ea9b2919963..72c57beb6cff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES @@ -67,6 +67,7 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Pig.md +docs/PolymorphicProperty.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -172,6 +173,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md index 6afaf65b95ac..7c9507fb6106 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/README.md @@ -207,6 +207,7 @@ Class | Method | HTTP request | Description - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) - [Model.Pig](docs/Pig.md) + - [Model.PolymorphicProperty](docs/PolymorphicProperty.md) - [Model.Quadrilateral](docs/Quadrilateral.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PolymorphicProperty.md new file mode 100644 index 000000000000..8262a41c50d5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/SerializeBasedOnInitialization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/SerializeBasedOnInitialization.cs index 5fdb80097d81..68fb2e70f5f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/SerializeBasedOnInitialization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Model/SerializeBasedOnInitialization.cs @@ -48,5 +48,38 @@ public void SerializeApple() string expectedJson = "{\r\n \"cultivar\": \"Kashmiri\",\r\n \"origin\": \"India\"\r\n}"; Assert.Equal(expectedJson, apple.ToJson()); } + + /// + /// Apple has two properties, here we serialize only cultivar property using the constructor + /// + [Fact] + public void SerializeAppleCultivateWithConstructor() + { + Apple apple = new Apple(cultivar: "Kashmiri"); + string expectedJson = "{\r\n \"cultivar\": \"Kashmiri\"\r\n}"; + Assert.Equal(expectedJson, apple.ToJson()); + } + + /// + /// Apple has two properties, here we serialize only origin property using the constructor + /// + [Fact] + public void SerializeAppleOriginWithConstructor() + { + Apple apple = new Apple(origin: "India"); + string expectedJson = "{\r\n \"origin\": \"India\"\r\n}"; + Assert.Equal(expectedJson, apple.ToJson()); + } + + /// + /// Here we serialze all the properties of Apple with constructor. + /// + [Fact] + public void SerializeAppleWithConstructor() + { + Apple apple = new Apple(origin: "India", cultivar: "Kashmiri"); + string expectedJson = "{\r\n \"cultivar\": \"Kashmiri\",\r\n \"origin\": \"India\"\r\n}"; + Assert.Equal(expectedJson, apple.ToJson()); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index ac8fbdcdc946..e04c8df5fdde 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -34,8 +34,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient Call123TestSpecialTags(ModelClient modelClient); + ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0); /// /// To test special tags @@ -45,8 +46,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient); + ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test special tags @@ -76,9 +79,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient Call123TestSpecialTags(ModelClient modelClient) + public ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient Call123TestSpecialTags(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/another-fake/dummy", localVarRequestOptions, this.Configuration); @@ -270,11 +279,12 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi ///
    /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -283,9 +293,10 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi ///
    /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -319,6 +330,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs index a9e5cfb9c4d2..af9619134ea6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -30,8 +30,9 @@ public interface IDefaultApiSync : IApiAccessor /// ///
    /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - InlineResponseDefault FooGet(); + InlineResponseDefault FooGet(int operationIndex = 0); /// /// @@ -40,8 +41,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - ApiResponse FooGetWithHttpInfo(); + ApiResponse FooGetWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -58,9 +60,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -69,9 +72,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -196,8 +200,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - public InlineResponseDefault FooGet() + public InlineResponseDefault FooGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FooGetWithHttpInfo(); return localVarResponse.Data; @@ -207,8 +212,9 @@ public InlineResponseDefault FooGet() /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -233,6 +239,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/foo", localVarRequestOptions, this.Configuration); @@ -252,11 +261,12 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// ///
    /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -264,9 +274,10 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// ///
    /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -292,6 +303,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs index 5f1dae74c24d..421f93ed0441 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs @@ -30,8 +30,9 @@ public interface IFakeApiSync : IApiAccessor /// Health check endpoint ///
    /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - HealthCheckResult FakeHealthGet(); + HealthCheckResult FakeHealthGet(int operationIndex = 0); /// /// Health check endpoint @@ -40,8 +41,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - ApiResponse FakeHealthGetWithHttpInfo(); + ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0); /// /// /// @@ -50,8 +52,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); /// /// @@ -61,8 +64,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); /// /// /// @@ -71,8 +75,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// @@ -82,8 +87,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// /// @@ -92,8 +98,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); /// /// @@ -103,8 +110,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); /// /// /// @@ -113,8 +121,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - string FakeOuterStringSerialize(string body = default(string)); + string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0); /// /// @@ -124,14 +133,16 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0); /// /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - List GetArrayOfEnums(); + List GetArrayOfEnums(int operationIndex = 0); /// /// Array of Enums @@ -140,8 +151,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - ApiResponse> GetArrayOfEnumsWithHttpInfo(); + ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0); /// /// /// @@ -150,8 +162,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); + void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// @@ -161,16 +174,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass); + ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// /// /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - void TestBodyWithQueryParams(string query, User user); + void TestBodyWithQueryParams(string query, User user, int operationIndex = 0); /// /// @@ -181,8 +196,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user); + ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0); /// /// To test \"client\" model /// @@ -191,8 +207,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClientModel(ModelClient modelClient); + ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0); /// /// To test \"client\" model @@ -202,8 +219,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient); + ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -225,8 +243,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -249,8 +268,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// To test enum parameters /// @@ -266,8 +286,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// To test enum parameters @@ -284,8 +305,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -299,8 +321,9 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -315,15 +338,17 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// test inline additionalProperties /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - void TestInlineAdditionalProperties(Dictionary requestBody); + void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0); /// /// test inline additionalProperties @@ -333,16 +358,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody); + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0); /// /// test json serialization of form data /// /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - void TestJsonFormData(string param, string param2); + void TestJsonFormData(string param, string param2, int operationIndex = 0); /// /// test json serialization of form data @@ -353,8 +380,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2); + ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0); /// /// /// @@ -367,8 +395,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); /// /// @@ -382,8 +411,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); #endregion Synchronous Operations } @@ -400,9 +430,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Health check endpoint @@ -411,9 +442,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -422,9 +454,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -434,9 +467,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -445,9 +479,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -457,9 +492,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -468,9 +504,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -480,9 +517,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -491,9 +529,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -503,9 +542,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -513,9 +553,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums @@ -524,9 +565,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -535,9 +577,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -547,9 +590,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -559,9 +603,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -572,9 +617,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model /// @@ -583,9 +629,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model @@ -595,9 +642,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -619,9 +667,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -644,9 +693,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -662,9 +712,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -681,9 +732,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -697,9 +749,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -714,9 +767,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -725,9 +779,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties @@ -737,9 +792,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data /// @@ -749,9 +805,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data @@ -762,9 +819,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -777,9 +835,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -793,9 +852,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -920,8 +980,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - public HealthCheckResult FakeHealthGet() + public HealthCheckResult FakeHealthGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); return localVarResponse.Data; @@ -931,8 +992,9 @@ public HealthCheckResult FakeHealthGet() /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -957,6 +1019,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/health", localVarRequestOptions, this.Configuration); @@ -976,11 +1041,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -988,9 +1054,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1016,6 +1083,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1037,8 +1107,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1049,8 +1120,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1077,6 +1149,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/boolean", localVarRequestOptions, this.Configuration); @@ -1097,11 +1172,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1110,9 +1186,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1140,6 +1217,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1161,8 +1241,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1173,8 +1254,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1201,6 +1283,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/composite", localVarRequestOptions, this.Configuration); @@ -1221,11 +1306,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1234,9 +1320,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1264,6 +1351,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1285,8 +1375,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1297,8 +1388,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,6 +1417,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/number", localVarRequestOptions, this.Configuration); @@ -1345,11 +1440,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1358,9 +1454,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1388,6 +1485,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1409,8 +1509,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(string body = default(string)) + public string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1421,8 +1522,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1449,6 +1551,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/string", localVarRequestOptions, this.Configuration); @@ -1469,11 +1574,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1482,9 +1588,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1512,6 +1619,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1532,8 +1642,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - public List GetArrayOfEnums() + public List GetArrayOfEnums(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetArrayOfEnumsWithHttpInfo(); return localVarResponse.Data; @@ -1543,8 +1654,9 @@ public List GetArrayOfEnums() /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1569,6 +1681,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/fake/array-of-enums", localVarRequestOptions, this.Configuration); @@ -1588,11 +1703,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1600,9 +1716,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1628,6 +1745,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/fake/array-of-enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1649,8 +1769,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -1660,8 +1781,9 @@ public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1693,6 +1815,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); @@ -1713,11 +1838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1725,9 +1851,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1760,6 +1887,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1782,8 +1912,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - public void TestBodyWithQueryParams(string query, User user) + public void TestBodyWithQueryParams(string query, User user, int operationIndex = 0) { TestBodyWithQueryParamsWithHttpInfo(query, user); } @@ -1794,8 +1925,9 @@ public void TestBodyWithQueryParams(string query, User user) /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0) { // verify the required parameter 'query' is set if (query == null) @@ -1834,6 +1966,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); @@ -1855,11 +1990,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1868,9 +2004,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'query' is set if (query == null) @@ -1910,6 +2047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1931,8 +2071,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClientModel(ModelClient modelClient) + public ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); return localVarResponse.Data; @@ -1943,8 +2084,9 @@ public ModelClient TestClientModel(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -1977,6 +2119,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/fake", localVarRequestOptions, this.Configuration); @@ -1997,11 +2142,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2010,9 +2156,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -2046,6 +2193,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2080,8 +2230,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2104,8 +2255,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2186,6 +2338,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2225,11 +2380,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2250,9 +2406,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2334,6 +2491,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2368,8 +2528,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2386,8 +2547,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2444,6 +2606,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); @@ -2471,11 +2636,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2490,9 +2656,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2550,6 +2717,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2576,8 +2746,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2592,8 +2763,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2632,6 +2804,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2663,11 +2838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2680,9 +2856,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2722,6 +2899,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2749,8 +2929,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - public void TestInlineAdditionalProperties(Dictionary requestBody) + public void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0) { TestInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -2760,8 +2941,9 @@ public void TestInlineAdditionalProperties(Dictionary requestBod /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody) + public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2793,6 +2975,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); @@ -2813,11 +2998,12 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2825,9 +3011,10 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2860,6 +3047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2882,8 +3072,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - public void TestJsonFormData(string param, string param2) + public void TestJsonFormData(string param, string param2, int operationIndex = 0) { TestJsonFormDataWithHttpInfo(param, param2); } @@ -2894,8 +3085,9 @@ public void TestJsonFormData(string param, string param2) /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2) + public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0) { // verify the required parameter 'param' is set if (param == null) @@ -2934,6 +3126,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); @@ -2955,11 +3150,12 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); + await TestJsonFormDataWithHttpInfoAsync(param, param2, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2968,9 +3164,10 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'param' is set if (param == null) @@ -3010,6 +3207,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3035,8 +3235,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// /// /// + /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -3050,8 +3251,9 @@ public void TestQueryParameterCollectionFormat(List pipe, List i /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3110,6 +3312,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/test-query-parameters", localVarRequestOptions, this.Configuration); @@ -3134,11 +3339,12 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -3150,9 +3356,10 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3212,6 +3419,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-parameters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index c2852b36a44b..6b665775253f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -34,8 +34,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClassname(ModelClient modelClient); + ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0); /// /// To test class name in snake case @@ -45,8 +46,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient); + ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test class name in snake case @@ -76,9 +79,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClassname(ModelClient modelClient) + public ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient TestClassname(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { @@ -275,11 +284,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -288,9 +298,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -324,6 +335,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs index b42f2c168bae..562c0f4807f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs @@ -31,8 +31,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void AddPet(Pet pet); + void AddPet(Pet pet, int operationIndex = 0); /// /// Add a new pet to the store @@ -42,16 +43,18 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo(Pet pet); + ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Deletes a pet /// /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Deletes a pet @@ -62,8 +65,9 @@ public interface IPetApiSync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Finds Pets by status /// @@ -72,8 +76,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - List FindPetsByStatus(List status); + List FindPetsByStatus(List status, int operationIndex = 0); /// /// Finds Pets by status @@ -83,8 +88,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo(List status); + ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0); /// /// Finds Pets by tags /// @@ -93,9 +99,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - List FindPetsByTags(List tags); + List FindPetsByTags(List tags, int operationIndex = 0); /// /// Finds Pets by tags @@ -105,9 +112,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo(List tags); + ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0); /// /// Find pet by ID /// @@ -116,8 +124,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - Pet GetPetById(long petId); + Pet GetPetById(long petId, int operationIndex = 0); /// /// Find pet by ID @@ -127,15 +136,17 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo(long petId); + ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0); /// /// Update an existing pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void UpdatePet(Pet pet); + void UpdatePet(Pet pet, int operationIndex = 0); /// /// Update an existing pet @@ -145,8 +156,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo(Pet pet); + ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Updates a pet in the store with form data /// @@ -154,8 +166,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -167,8 +180,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// uploads an image /// @@ -176,8 +190,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image @@ -189,8 +204,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image (required) /// @@ -198,8 +214,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); /// /// uploads an image (required) @@ -211,8 +228,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); #endregion Synchronous Operations } @@ -230,9 +248,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -242,9 +261,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -254,9 +274,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -267,9 +288,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -278,9 +300,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status @@ -290,9 +313,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags /// @@ -301,10 +325,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags @@ -314,10 +339,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID /// @@ -326,9 +352,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID @@ -338,9 +365,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet /// @@ -349,9 +377,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -361,9 +390,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -374,9 +404,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -388,9 +419,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -401,9 +433,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -415,9 +448,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -428,9 +462,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -442,9 +477,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -570,8 +606,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void AddPet(Pet pet) + public void AddPet(Pet pet, int operationIndex = 0) { AddPetWithHttpInfo(pet); } @@ -581,8 +618,9 @@ public void AddPet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -615,6 +653,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -657,11 +698,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await AddPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -669,9 +711,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -705,6 +748,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -749,8 +795,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -761,8 +808,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -791,6 +839,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -818,11 +869,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); + await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -831,9 +883,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -863,6 +916,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -890,8 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - public List FindPetsByStatus(List status) + public List FindPetsByStatus(List status, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); return localVarResponse.Data; @@ -902,8 +959,9 @@ public List FindPetsByStatus(List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0) { // verify the required parameter 'status' is set if (status == null) @@ -936,6 +994,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -978,11 +1039,12 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -991,9 +1053,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'status' is set if (status == null) @@ -1027,6 +1090,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1070,9 +1136,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - public List FindPetsByTags(List tags) + public List FindPetsByTags(List tags, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); return localVarResponse.Data; @@ -1083,9 +1150,10 @@ public List FindPetsByTags(List tags) /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0) { // verify the required parameter 'tags' is set if (tags == null) @@ -1118,6 +1186,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1160,12 +1231,13 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1174,10 +1246,11 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'tags' is set if (tags == null) @@ -1211,6 +1284,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1254,8 +1330,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - public Pet GetPetById(long petId) + public Pet GetPetById(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1266,8 +1343,9 @@ public Pet GetPetById(long petId) /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId) + public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1294,6 +1372,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1319,11 +1400,12 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1332,9 +1414,10 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1362,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1388,8 +1474,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void UpdatePet(Pet pet) + public void UpdatePet(Pet pet, int operationIndex = 0) { UpdatePetWithHttpInfo(pet); } @@ -1399,8 +1486,9 @@ public void UpdatePet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -1433,6 +1521,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1475,11 +1566,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await UpdatePetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1487,9 +1579,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1523,6 +1616,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1568,8 +1664,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1581,8 +1678,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1616,6 +1714,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1644,11 +1745,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1658,9 +1760,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1695,6 +1798,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1724,8 +1830,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1738,8 +1845,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1774,6 +1882,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1802,11 +1913,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1817,9 +1929,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1855,6 +1968,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1884,8 +2000,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1898,8 +2015,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -1937,6 +2055,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1965,11 +2086,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1980,9 +2102,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -2021,6 +2144,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs index 7cda385b3b40..63403e7dcdfd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs @@ -34,8 +34,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - void DeleteOrder(string orderId); + void DeleteOrder(string orderId, int operationIndex = 0); /// /// Delete purchase order by ID @@ -45,8 +46,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo(string orderId); + ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0); /// /// Returns pet inventories by status /// @@ -54,8 +56,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - Dictionary GetInventory(); + Dictionary GetInventory(int operationIndex = 0); /// /// Returns pet inventories by status @@ -64,8 +67,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo(); + ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0); /// /// Find purchase order by ID /// @@ -74,8 +78,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - Order GetOrderById(long orderId); + Order GetOrderById(long orderId, int operationIndex = 0); /// /// Find purchase order by ID @@ -85,15 +90,17 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo(long orderId); + ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0); /// /// Place an order for a pet /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - Order PlaceOrder(Order order); + Order PlaceOrder(Order order, int operationIndex = 0); /// /// Place an order for a pet @@ -103,8 +110,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo(Order order); + ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0); #endregion Synchronous Operations } @@ -122,9 +130,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete purchase order by ID @@ -134,9 +143,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status /// @@ -144,9 +154,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status @@ -155,9 +166,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID /// @@ -166,9 +178,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID @@ -178,9 +191,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet /// @@ -189,9 +203,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet @@ -201,9 +216,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -329,8 +345,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - public void DeleteOrder(string orderId) + public void DeleteOrder(string orderId, int operationIndex = 0) { DeleteOrderWithHttpInfo(orderId); } @@ -340,8 +357,9 @@ public void DeleteOrder(string orderId) /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId) + public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -372,6 +390,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -392,11 +413,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + await DeleteOrderWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -404,9 +426,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -438,6 +461,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -458,8 +484,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - public Dictionary GetInventory() + public Dictionary GetInventory(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; @@ -469,8 +496,9 @@ public Dictionary GetInventory() /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -495,6 +523,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -519,11 +550,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -531,9 +563,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -559,6 +592,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -585,8 +621,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - public Order GetOrderById(long orderId) + public Order GetOrderById(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -597,8 +634,9 @@ public Order GetOrderById(long orderId) /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId) + public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -625,6 +663,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -645,11 +686,12 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -658,9 +700,10 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -688,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -709,8 +755,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - public Order PlaceOrder(Order order) + public Order PlaceOrder(Order order, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; @@ -721,8 +768,9 @@ public Order PlaceOrder(Order order) /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order) + public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0) { // verify the required parameter 'order' is set if (order == null) @@ -756,6 +804,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/store/order", localVarRequestOptions, this.Configuration); @@ -776,11 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -789,9 +841,10 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'order' is set if (order == null) @@ -826,6 +879,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs index a1716303f6f3..c37a6501c68a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/UserApi.cs @@ -34,8 +34,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - void CreateUser(User user); + void CreateUser(User user, int operationIndex = 0); /// /// Create user @@ -45,15 +46,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(User user); + ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithArrayInput(List user); + void CreateUsersWithArrayInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -63,15 +66,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user); + ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithListInput(List user); + void CreateUsersWithListInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -81,8 +86,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo(List user); + ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0); /// /// Delete user /// @@ -91,8 +97,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - void DeleteUser(string username); + void DeleteUser(string username, int operationIndex = 0); /// /// Delete user @@ -102,15 +109,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo(string username); + ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0); /// /// Get user by user name /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - User GetUserByName(string username); + User GetUserByName(string username, int operationIndex = 0); /// /// Get user by user name @@ -120,16 +129,18 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo(string username); + ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); /// /// Logs user into the system /// /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - string LoginUser(string username, string password); + string LoginUser(string username, string password, int operationIndex = 0); /// /// Logs user into the system @@ -140,14 +151,16 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo(string username, string password); + ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0); /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void LogoutUser(); + void LogoutUser(int operationIndex = 0); /// /// Logs out current logged in user session @@ -156,8 +169,9 @@ public interface IUserApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo(); + ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0); /// /// Updated user /// @@ -167,8 +181,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - void UpdateUser(string username, User user); + void UpdateUser(string username, User user, int operationIndex = 0); /// /// Updated user @@ -179,8 +194,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo(string username, User user); + ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0); #endregion Synchronous Operations } @@ -198,9 +214,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create user @@ -210,9 +227,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -221,9 +239,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -233,9 +252,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -244,9 +264,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -256,9 +277,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user /// @@ -267,9 +289,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user @@ -279,9 +302,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name /// @@ -290,9 +314,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name @@ -302,9 +327,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system /// @@ -314,9 +340,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system @@ -327,9 +354,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session /// @@ -337,9 +365,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session @@ -348,9 +377,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user /// @@ -360,9 +390,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user @@ -373,9 +404,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -501,8 +533,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - public void CreateUser(User user) + public void CreateUser(User user, int operationIndex = 0) { CreateUserWithHttpInfo(user); } @@ -512,8 +545,9 @@ public void CreateUser(User user) /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user) + public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -545,6 +579,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); @@ -565,11 +602,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUserWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -577,9 +615,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -612,6 +651,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -633,8 +675,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithArrayInput(List user) + public void CreateUsersWithArrayInput(List user, int operationIndex = 0) { CreateUsersWithArrayInputWithHttpInfo(user); } @@ -644,8 +687,9 @@ public void CreateUsersWithArrayInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -677,6 +721,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); @@ -697,11 +744,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -709,9 +757,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -744,6 +793,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -765,8 +817,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithListInput(List user) + public void CreateUsersWithListInput(List user, int operationIndex = 0) { CreateUsersWithListInputWithHttpInfo(user); } @@ -776,8 +829,9 @@ public void CreateUsersWithListInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -809,6 +863,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); @@ -829,11 +886,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithListInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -841,9 +899,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -876,6 +935,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -897,8 +959,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - public void DeleteUser(string username) + public void DeleteUser(string username, int operationIndex = 0) { DeleteUserWithHttpInfo(username); } @@ -908,8 +971,9 @@ public void DeleteUser(string username) /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -940,6 +1004,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); @@ -960,11 +1027,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + await DeleteUserWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -972,9 +1040,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1006,6 +1075,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1027,8 +1099,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - public User GetUserByName(string username) + public User GetUserByName(string username, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -1039,8 +1112,9 @@ public User GetUserByName(string username) /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1073,6 +1147,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1093,11 +1170,12 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1106,9 +1184,10 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1142,6 +1221,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1164,8 +1246,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - public string LoginUser(string username, string password) + public string LoginUser(string username, string password, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); return localVarResponse.Data; @@ -1177,8 +1260,9 @@ public string LoginUser(string username, string password) /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password) + public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1218,6 +1302,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/login", localVarRequestOptions, this.Configuration); @@ -1239,11 +1326,12 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1253,9 +1341,10 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1296,6 +1385,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1316,8 +1408,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void LogoutUser() + public void LogoutUser(int operationIndex = 0) { LogoutUserWithHttpInfo(); } @@ -1326,8 +1419,9 @@ public void LogoutUser() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1351,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); @@ -1370,20 +1467,22 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await LogoutUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1408,6 +1507,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1430,8 +1532,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - public void UpdateUser(string username, User user) + public void UpdateUser(string username, User user, int operationIndex = 0) { UpdateUserWithHttpInfo(username, user); } @@ -1442,8 +1545,9 @@ public void UpdateUser(string username, User user) /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user) + public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1482,6 +1586,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1503,11 +1610,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + await UpdateUserWithHttpInfoAsync(username, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1516,9 +1624,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1558,6 +1667,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs index 96ed4f895950..66ec18ddf578 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs @@ -429,9 +429,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -548,9 +549,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -673,7 +675,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -688,7 +690,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -703,7 +705,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -718,7 +720,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -733,7 +735,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -748,7 +750,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -763,7 +765,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -779,7 +781,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -793,7 +795,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -807,7 +809,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -821,7 +823,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -835,7 +837,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -849,7 +851,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -863,7 +865,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index 992454bacf6d..a67ad721ed47 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -91,6 +91,13 @@ public class Configuration : IReadableConfiguration /// The servers private IList> _servers; + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + /// /// HttpSigning configuration /// @@ -177,6 +184,47 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + { + "PetApi.AddPet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + { + "PetApi.UpdatePet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -436,6 +484,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -444,7 +509,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -455,9 +520,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -465,31 +570,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -578,7 +686,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration AccessToken = second.AccessToken ?? first.AccessToken, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 2c22d47296f9..b99a151e5bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs index 68cd16375903..3932047e027a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index ec5eb3cdd93a..4c371eb457b2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -46,13 +46,45 @@ public partial class AdditionalPropertiesClass : IEquatable mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) { this._MapProperty = mapProperty; + if (this.MapProperty != null) + { + this._flagMapProperty = true; + } this._MapOfMapProperty = mapOfMapProperty; + if (this.MapOfMapProperty != null) + { + this._flagMapOfMapProperty = true; + } this._Anytype1 = anytype1; + if (this.Anytype1 != null) + { + this._flagAnytype1 = true; + } this._MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + if (this.MapWithUndeclaredPropertiesAnytype1 != null) + { + this._flagMapWithUndeclaredPropertiesAnytype1 = true; + } this._MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + if (this.MapWithUndeclaredPropertiesAnytype2 != null) + { + this._flagMapWithUndeclaredPropertiesAnytype2 = true; + } this._MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + if (this.MapWithUndeclaredPropertiesAnytype3 != null) + { + this._flagMapWithUndeclaredPropertiesAnytype3 = true; + } this._EmptyMap = emptyMap; + if (this.EmptyMap != null) + { + this._flagEmptyMap = true; + } this._MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + if (this.MapWithUndeclaredPropertiesString != null) + { + this._flagMapWithUndeclaredPropertiesString = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs index 1ecea975be7e..0a9b6b337dfe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs @@ -52,7 +52,8 @@ protected Animal() public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Animal and cannot be null"); } this._ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs index 87db69a8d850..5b0f3df7b731 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -41,8 +41,20 @@ public partial class ApiResponse : IEquatable, IValidatableObject public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) { this._Code = code; + if (this.Code != null) + { + this._flagCode = true; + } this._Type = type; + if (this.Type != null) + { + this._flagType = true; + } this._Message = message; + if (this.Message != null) + { + this._flagMessage = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs index f5bfb1230b52..11b480ef63b7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs @@ -40,7 +40,15 @@ public partial class Apple : IEquatable, IValidatableObject public Apple(string cultivar = default(string), string origin = default(string)) { this._Cultivar = cultivar; + if (this.Cultivar != null) + { + this._flagCultivar = true; + } this._Origin = origin; + if (this.Origin != null) + { + this._flagOrigin = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs index 5f042a01cf96..264577c24190 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs @@ -45,11 +45,16 @@ protected AppleReq() { } public AppleReq(string cultivar = default(string), bool mealy = default(bool)) { // to ensure "cultivar" is required (not null) - if (cultivar == null) { + if (cultivar == null) + { throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); } this._Cultivar = cultivar; this._Mealy = mealy; + if (this.Mealy != null) + { + this._flagMealy = true; + } } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index aadaaa720205..7ad65647a786 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -39,6 +39,10 @@ public partial class ArrayOfArrayOfNumberOnly : IEquatable> arrayArrayNumber = default(List>)) { this._ArrayArrayNumber = arrayArrayNumber; + if (this.ArrayArrayNumber != null) + { + this._flagArrayArrayNumber = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 66f7bcce0ac5..4c42444cc8c5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -39,6 +39,10 @@ public partial class ArrayOfNumberOnly : IEquatable, IValidat public ArrayOfNumberOnly(List arrayNumber = default(List)) { this._ArrayNumber = arrayNumber; + if (this.ArrayNumber != null) + { + this._flagArrayNumber = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs index 1825d97b3ea0..6914c6b657ad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -41,8 +41,20 @@ public partial class ArrayTest : IEquatable, IValidatableObject public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) { this._ArrayOfString = arrayOfString; + if (this.ArrayOfString != null) + { + this._flagArrayOfString = true; + } this._ArrayArrayOfInteger = arrayArrayOfInteger; + if (this.ArrayArrayOfInteger != null) + { + this._flagArrayArrayOfInteger = true; + } this._ArrayArrayOfModel = arrayArrayOfModel; + if (this.ArrayArrayOfModel != null) + { + this._flagArrayArrayOfModel = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs index 3bdc27063272..48f7f67df9fc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs @@ -39,6 +39,10 @@ public partial class Banana : IEquatable, IValidatableObject public Banana(decimal lengthCm = default(decimal)) { this._LengthCm = lengthCm; + if (this.LengthCm != null) + { + this._flagLengthCm = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs index e7289cd6f3e2..5602630dc807 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs @@ -46,6 +46,10 @@ protected BananaReq() { } { this._LengthCm = lengthCm; this._Sweet = sweet; + if (this.Sweet != null) + { + this._flagSweet = true; + } } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs index 0ba9ff1eedfc..6cde5d45ebb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs @@ -47,7 +47,8 @@ protected BasquePig() public BasquePig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); } this._ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs index 1cee58da84bd..dbf1d37b035d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs @@ -44,11 +44,35 @@ public partial class Capitalization : IEquatable, IValidatableOb public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) { this._SmallCamel = smallCamel; + if (this.SmallCamel != null) + { + this._flagSmallCamel = true; + } this._CapitalCamel = capitalCamel; + if (this.CapitalCamel != null) + { + this._flagCapitalCamel = true; + } this._SmallSnake = smallSnake; + if (this.SmallSnake != null) + { + this._flagSmallSnake = true; + } this._CapitalSnake = capitalSnake; + if (this.CapitalSnake != null) + { + this._flagCapitalSnake = true; + } this._SCAETHFlowPoints = sCAETHFlowPoints; + if (this.SCAETHFlowPoints != null) + { + this._flagSCAETHFlowPoints = true; + } this._ATT_NAME = aTTNAME; + if (this.ATT_NAME != null) + { + this._flagATT_NAME = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs index a07eac2b8ee0..6d31d2520a95 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs @@ -51,6 +51,10 @@ protected Cat() public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) { this._Declawed = declawed; + if (this.Declawed != null) + { + this._flagDeclawed = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs index e31e45a795fd..d97b2bc88a59 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -39,6 +39,10 @@ public partial class CatAllOf : IEquatable, IValidatableObject public CatAllOf(bool declawed = default(bool)) { this._Declawed = declawed; + if (this.Declawed != null) + { + this._flagDeclawed = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs index 621dff0ce0a7..ecd7492d5ff2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs @@ -48,11 +48,16 @@ protected Category() public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Category and cannot be null"); } this._Name = name; this._Id = id; + if (this.Id != null) + { + this._flagId = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs index bdef892ab86d..6358e859ce17 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs @@ -91,6 +91,10 @@ protected ChildCat() { this._PetType = petType; this._Name = name; + if (this.Name != null) + { + this._flagName = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index 7c39109418ee..81bcbec5a90d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -80,6 +80,10 @@ public bool ShouldSerializePetType() public ChildCatAllOf(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) { this._Name = name; + if (this.Name != null) + { + this._flagName = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs index f223ab882b49..f5c0e910e733 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs @@ -39,6 +39,10 @@ public partial class ClassModel : IEquatable, IValidatableObject public ClassModel(string _class = default(string)) { this._Class = _class; + if (this.Class != null) + { + this._flagClass = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 7288bffb3957..8df5f4c0cf1d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -48,12 +48,14 @@ protected ComplexQuadrilateral() public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); } this._ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); } this._QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs index 1955404a4584..8f90997e8f67 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs @@ -47,7 +47,8 @@ protected DanishPig() public DanishPig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); } this._ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs index b2aeb2111634..2e0a59ec8e20 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -39,6 +39,10 @@ public partial class DeprecatedObject : IEquatable, IValidatab public DeprecatedObject(string name = default(string)) { this._Name = name; + if (this.Name != null) + { + this._flagName = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs index b3709a99dd91..45f65d0d7b82 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs @@ -51,6 +51,10 @@ protected Dog() public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) { this._Breed = breed; + if (this.Breed != null) + { + this._flagBreed = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs index 40e42a0bf829..e462064842a0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -39,6 +39,10 @@ public partial class DogAllOf : IEquatable, IValidatableObject public DogAllOf(string breed = default(string)) { this._Breed = breed; + if (this.Breed != null) + { + this._flagBreed = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs index a7ab7daa3b20..b0a657793d97 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs @@ -42,9 +42,25 @@ public partial class Drawing : Dictionary, IEquatable, I public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) : base() { this._MainShape = mainShape; + if (this.MainShape != null) + { + this._flagMainShape = true; + } this._ShapeOrNull = shapeOrNull; + if (this.ShapeOrNull != null) + { + this._flagShapeOrNull = true; + } this._NullableShape = nullableShape; + if (this.NullableShape != null) + { + this._flagNullableShape = true; + } this._Shapes = shapes; + if (this.Shapes != null) + { + this._flagShapes = true; + } } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs index d4cc2bbcf318..c799b734ccbb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -133,7 +133,15 @@ public bool ShouldSerializeArrayEnum() public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) { this._JustSymbol = justSymbol; + if (this.JustSymbol != null) + { + this._flagJustSymbol = true; + } this._ArrayEnum = arrayEnum; + if (this.ArrayEnum != null) + { + this._flagArrayEnum = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs index 605274f7c1c8..d1d325588b0d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs @@ -396,13 +396,45 @@ protected EnumTest() { this._EnumStringRequired = enumStringRequired; this._EnumString = enumString; + if (this.EnumString != null) + { + this._flagEnumString = true; + } this._EnumInteger = enumInteger; + if (this.EnumInteger != null) + { + this._flagEnumInteger = true; + } this._EnumIntegerOnly = enumIntegerOnly; + if (this.EnumIntegerOnly != null) + { + this._flagEnumIntegerOnly = true; + } this._EnumNumber = enumNumber; + if (this.EnumNumber != null) + { + this._flagEnumNumber = true; + } this._OuterEnum = outerEnum; + if (this.OuterEnum != null) + { + this._flagOuterEnum = true; + } this._OuterEnumInteger = outerEnumInteger; + if (this.OuterEnumInteger != null) + { + this._flagOuterEnumInteger = true; + } this._OuterEnumDefaultValue = outerEnumDefaultValue; + if (this.OuterEnumDefaultValue != null) + { + this._flagOuterEnumDefaultValue = true; + } this._OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + if (this.OuterEnumIntegerDefaultValue != null) + { + this._flagOuterEnumIntegerDefaultValue = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 3029945d8a32..458a320fee71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -48,12 +48,14 @@ protected EquilateralTriangle() public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); } this._ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); } this._TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs index 521cf9bf4d4b..6f16bbf69643 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs @@ -39,6 +39,10 @@ public partial class File : IEquatable, IValidatableObject public File(string sourceURI = default(string)) { this._SourceURI = sourceURI; + if (this.SourceURI != null) + { + this._flagSourceURI = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 841cb56f6493..333c81d65052 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -40,7 +40,15 @@ public partial class FileSchemaTestClass : IEquatable, IVal public FileSchemaTestClass(File file = default(File), List files = default(List)) { this._File = file; + if (this.File != null) + { + this._flagFile = true; + } this._Files = files; + if (this.Files != null) + { + this._flagFiles = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs index ef25bf8889de..6260dacfb077 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs @@ -63,28 +63,78 @@ protected FormatTest() { this._Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) { + if (_byte == null) + { throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); } this._Byte = _byte; this._Date = date; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); } this._Password = password; this._Integer = integer; + if (this.Integer != null) + { + this._flagInteger = true; + } this._Int32 = int32; + if (this.Int32 != null) + { + this._flagInt32 = true; + } this._Int64 = int64; + if (this.Int64 != null) + { + this._flagInt64 = true; + } this._Float = _float; + if (this.Float != null) + { + this._flagFloat = true; + } this._Double = _double; + if (this.Double != null) + { + this._flagDouble = true; + } this._Decimal = _decimal; + if (this.Decimal != null) + { + this._flagDecimal = true; + } this._String = _string; + if (this.String != null) + { + this._flagString = true; + } this._Binary = binary; + if (this.Binary != null) + { + this._flagBinary = true; + } this._DateTime = dateTime; + if (this.DateTime != null) + { + this._flagDateTime = true; + } this._Uuid = uuid; + if (this.Uuid != null) + { + this._flagUuid = true; + } this._PatternWithDigits = patternWithDigits; + if (this.PatternWithDigits != null) + { + this._flagPatternWithDigits = true; + } this._PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + if (this.PatternWithDigitsAndDelimiter != null) + { + this._flagPatternWithDigitsAndDelimiter = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index f26d700c2072..a9409a3e1809 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -51,7 +51,8 @@ protected GrandparentAnimal() public GrandparentAnimal(string petType = default(string)) { // to ensure "petType" is required (not null) - if (petType == null) { + if (petType == null) + { throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); } this._PetType = petType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs index aa33b076d06c..57cfec9a09d3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -39,6 +39,10 @@ public partial class HealthCheckResult : IEquatable, IValidat public HealthCheckResult(string nullableMessage = default(string)) { this._NullableMessage = nullableMessage; + if (this.NullableMessage != null) + { + this._flagNullableMessage = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs index 909c34c2cefd..d2532a0f9552 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs @@ -39,6 +39,10 @@ public partial class InlineResponseDefault : IEquatable, public InlineResponseDefault(Foo _string = default(Foo)) { this._String = _string; + if (this.String != null) + { + this._flagString = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index ca9a10e5f9ef..f0dce588f7a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -45,12 +45,14 @@ protected IsoscelesTriangle() { } public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); } this._ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); } this._TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs index a55d149d4af5..872d8d8b8fdf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs @@ -39,6 +39,10 @@ public partial class List : IEquatable, IValidatableObject public List(string _123list = default(string)) { this.__123List = _123list; + if (this._123List != null) + { + this._flag_123List = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs index 841b9ba43e92..8630f21bba49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Mammal.cs @@ -37,10 +37,10 @@ public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValida { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// An instance of Whale. + public Mammal(Whale actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Mammal(Pig actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// An instance of Zebra. + public Mammal(Zebra actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +61,10 @@ public Mammal(Whale actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// An instance of Pig. + public Mammal(Pig actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -104,16 +104,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown - /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } - /// /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, /// the InvalidClassException will be thrown @@ -134,6 +124,16 @@ public Zebra GetZebra() return (Zebra)this.ActualInstance; } + /// + /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs index fa45d1411a34..64bdcf20a3dd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs @@ -89,9 +89,25 @@ public bool ShouldSerializeMapOfEnumString() public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) { this._MapMapOfString = mapMapOfString; + if (this.MapMapOfString != null) + { + this._flagMapMapOfString = true; + } this._MapOfEnumString = mapOfEnumString; + if (this.MapOfEnumString != null) + { + this._flagMapOfEnumString = true; + } this._DirectMap = directMap; + if (this.DirectMap != null) + { + this._flagDirectMap = true; + } this._IndirectMap = indirectMap; + if (this.IndirectMap != null) + { + this._flagIndirectMap = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 7eabc6242c8f..f4c0f85ea8d2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -41,8 +41,20 @@ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable map = default(Dictionary)) { this._Uuid = uuid; + if (this.Uuid != null) + { + this._flagUuid = true; + } this._DateTime = dateTime; + if (this.DateTime != null) + { + this._flagDateTime = true; + } this._Map = map; + if (this.Map != null) + { + this._flagMap = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs index c1c8a3890632..1491add2e7bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs @@ -40,7 +40,15 @@ public partial class Model200Response : IEquatable, IValidatab public Model200Response(int name = default(int), string _class = default(string)) { this._Name = name; + if (this.Name != null) + { + this._flagName = true; + } this._Class = _class; + if (this.Class != null) + { + this._flagClass = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs index d9a2d7b846c1..50543b263235 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs @@ -39,6 +39,10 @@ public partial class ModelClient : IEquatable, IValidatableObject public ModelClient(string _client = default(string)) { this.__Client = _client; + if (this._Client != null) + { + this._flag_Client = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs index dd8a2a2aed9c..1579e494c071 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs @@ -49,6 +49,10 @@ protected Name() { this.__Name = name; this._Property = property; + if (this.Property != null) + { + this._flagProperty = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs index 428f7c3deef9..25779b92e2dc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs @@ -50,17 +50,65 @@ public partial class NullableClass : Dictionary, IEquatable arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) : base() { this._IntegerProp = integerProp; + if (this.IntegerProp != null) + { + this._flagIntegerProp = true; + } this._NumberProp = numberProp; + if (this.NumberProp != null) + { + this._flagNumberProp = true; + } this._BooleanProp = booleanProp; + if (this.BooleanProp != null) + { + this._flagBooleanProp = true; + } this._StringProp = stringProp; + if (this.StringProp != null) + { + this._flagStringProp = true; + } this._DateProp = dateProp; + if (this.DateProp != null) + { + this._flagDateProp = true; + } this._DatetimeProp = datetimeProp; + if (this.DatetimeProp != null) + { + this._flagDatetimeProp = true; + } this._ArrayNullableProp = arrayNullableProp; + if (this.ArrayNullableProp != null) + { + this._flagArrayNullableProp = true; + } this._ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + if (this.ArrayAndItemsNullableProp != null) + { + this._flagArrayAndItemsNullableProp = true; + } this._ArrayItemsNullable = arrayItemsNullable; + if (this.ArrayItemsNullable != null) + { + this._flagArrayItemsNullable = true; + } this._ObjectNullableProp = objectNullableProp; + if (this.ObjectNullableProp != null) + { + this._flagObjectNullableProp = true; + } this._ObjectAndItemsNullableProp = objectAndItemsNullableProp; + if (this.ObjectAndItemsNullableProp != null) + { + this._flagObjectAndItemsNullableProp = true; + } this._ObjectItemsNullable = objectItemsNullable; + if (this.ObjectItemsNullable != null) + { + this._flagObjectItemsNullable = true; + } } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs index ab311baedd65..01cedb8807b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableShape.cs @@ -46,10 +46,10 @@ public NullableShape() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public NullableShape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs index 4e5425354515..8d5098e344e1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -39,6 +39,10 @@ public partial class NumberOnly : IEquatable, IValidatableObject public NumberOnly(decimal justNumber = default(decimal)) { this._JustNumber = justNumber; + if (this.JustNumber != null) + { + this._flagJustNumber = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 3d6d12d562bf..de9baa3fe2ff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -42,9 +42,25 @@ public partial class ObjectWithDeprecatedFields : IEquatable bars = default(List)) { this._Uuid = uuid; + if (this.Uuid != null) + { + this._flagUuid = true; + } this._Id = id; + if (this.Id != null) + { + this._flagId = true; + } this._DeprecatedRef = deprecatedRef; + if (this.DeprecatedRef != null) + { + this._flagDeprecatedRef = true; + } this._Bars = bars; + if (this.Bars != null) + { + this._flagBars = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs index 21fb784543be..4dcea3ebe1df 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs @@ -98,10 +98,30 @@ public bool ShouldSerializeStatus() public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) { this._Id = id; + if (this.Id != null) + { + this._flagId = true; + } this._PetId = petId; + if (this.PetId != null) + { + this._flagPetId = true; + } this._Quantity = quantity; + if (this.Quantity != null) + { + this._flagQuantity = true; + } this._ShipDate = shipDate; + if (this.ShipDate != null) + { + this._flagShipDate = true; + } this._Status = status; + if (this.Status != null) + { + this._flagStatus = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs index 8521e32d470c..cf4ea1fc9b6c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -41,8 +41,20 @@ public partial class OuterComposite : IEquatable, IValidatableOb public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) { this._MyNumber = myNumber; + if (this.MyNumber != null) + { + this._flagMyNumber = true; + } this._MyString = myString; + if (this.MyString != null) + { + this._flagMyString = true; + } this._MyBoolean = myBoolean; + if (this.MyBoolean != null) + { + this._flagMyBoolean = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs index 4737a5b7aee6..b2d853f7b205 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs @@ -106,19 +106,37 @@ protected Pet() public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this._Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this._PhotoUrls = photoUrls; this._Id = id; + if (this.Id != null) + { + this._flagId = true; + } this._Category = category; + if (this.Category != null) + { + this._flagCategory = true; + } this._Tags = tags; + if (this.Tags != null) + { + this._flagTags = true; + } this._Status = status; + if (this.Status != null) + { + this._flagStatus = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..0ce4e18eb2ea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,383 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + [JsonConverter(typeof(PolymorphicPropertyJsonConverter))] + [DataContract(Name = "PolymorphicProperty")] + public partial class PolymorphicProperty : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of bool. + public PolymorphicProperty(bool actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of string. + public PolymorphicProperty(string actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Object. + public PolymorphicProperty(Object actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of List<string>. + public PolymorphicProperty(List actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(List)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Object)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(bool)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(string)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: List, Object, bool, string"); + } + } + } + + /// + /// Get the actual instance of `bool`. If the actual instance is not `bool`, + /// the InvalidClassException will be thrown + /// + /// An instance of bool + public bool GetBool() + { + return (bool)this.ActualInstance; + } + + /// + /// Get the actual instance of `string`. If the actual instance is not `string`, + /// the InvalidClassException will be thrown + /// + /// An instance of string + public string GetString() + { + return (string)this.ActualInstance; + } + + /// + /// Get the actual instance of `Object`. If the actual instance is not `Object`, + /// the InvalidClassException will be thrown + /// + /// An instance of Object + public Object GetObject() + { + return (Object)this.ActualInstance; + } + + /// + /// Get the actual instance of `List<string>`. If the actual instance is not `List<string>`, + /// the InvalidClassException will be thrown + /// + /// An instance of List<string> + public List GetListString() + { + return (List)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PolymorphicProperty.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PolymorphicProperty + /// + /// JSON string + /// An instance of PolymorphicProperty + public static PolymorphicProperty FromJson(string jsonString) + { + PolymorphicProperty newPolymorphicProperty = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPolymorphicProperty; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(List).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("List"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into List: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(Object).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("Object"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Object: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(bool).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("bool"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into bool: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(string).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("string"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPolymorphicProperty; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PolymorphicProperty).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PolymorphicProperty.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs index 7e232c39f0a4..2e4fc5cb0419 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -37,10 +37,10 @@ public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Quadrilateral(ComplexQuadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() { - return (ComplexQuadrilateral)this.ActualInstance; + return (SimpleQuadrilateral)this.ActualInstance; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() { - return (SimpleQuadrilateral)this.ActualInstance; + return (ComplexQuadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 75fa6ad72717..e4aa4fba69b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -47,7 +47,8 @@ protected QuadrilateralInterface() public QuadrilateralInterface(string quadrilateralType = default(string)) { // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); } this._QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 4152b8eaa2d8..f5f1b145160d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -39,6 +39,10 @@ public partial class ReadOnlyFirst : IEquatable, IValidatableObje public ReadOnlyFirst(string baz = default(string)) { this._Baz = baz; + if (this.Baz != null) + { + this._flagBaz = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs index b9681ebec3c4..709c50b93515 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs @@ -39,6 +39,10 @@ public partial class Return : IEquatable, IValidatableObject public Return(int _return = default(int)) { this.__Return = _return; + if (this._Return != null) + { + this._flag_Return = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index a0c0e1da8b15..421aeb4bbb11 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -48,12 +48,14 @@ protected ScaleneTriangle() public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); } this._ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); } this._TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs index fd3d6cb439f4..bc73c0d68a71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Shape.cs @@ -37,10 +37,10 @@ public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidata { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// An instance of Triangle. + public Shape(Triangle actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Shape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs index 619a80986647..79bbd10fa3ce 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -47,7 +47,8 @@ protected ShapeInterface() public ShapeInterface(string shapeType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); } this._ShapeType = shapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs index f378c1e3b7b6..a6d3624c26f3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -46,10 +46,10 @@ public ShapeOrNull() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public ShapeOrNull(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 0c3d83f8e66d..8ac75f73d9cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -48,12 +48,14 @@ protected SimpleQuadrilateral() public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); } this._ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); } this._QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs index 647b87399fda..9a4d9fc482a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -40,7 +40,15 @@ public partial class SpecialModelName : IEquatable, IValidatab public SpecialModelName(long specialPropertyName = default(long), string specialModelName = default(string)) { this._SpecialPropertyName = specialPropertyName; + if (this.SpecialPropertyName != null) + { + this._flagSpecialPropertyName = true; + } this.__SpecialModelName = specialModelName; + if (this._SpecialModelName != null) + { + this._flag_SpecialModelName = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs index 93d34bef1a12..cb9f2aa96f55 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs @@ -40,7 +40,15 @@ public partial class Tag : IEquatable, IValidatableObject public Tag(long id = default(long), string name = default(string)) { this._Id = id; + if (this.Id != null) + { + this._flagId = true; + } this._Name = name; + if (this.Name != null) + { + this._flagName = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs index 183b3be09fbc..06d4d832a029 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -47,7 +47,8 @@ protected TriangleInterface() public TriangleInterface(string triangleType = default(string)) { // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); } this._TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs index 9309128511c3..5eb84346ec8b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs @@ -50,17 +50,65 @@ public partial class User : IEquatable, IValidatableObject public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) { this._Id = id; + if (this.Id != null) + { + this._flagId = true; + } this._Username = username; + if (this.Username != null) + { + this._flagUsername = true; + } this._FirstName = firstName; + if (this.FirstName != null) + { + this._flagFirstName = true; + } this._LastName = lastName; + if (this.LastName != null) + { + this._flagLastName = true; + } this._Email = email; + if (this.Email != null) + { + this._flagEmail = true; + } this._Password = password; + if (this.Password != null) + { + this._flagPassword = true; + } this._Phone = phone; + if (this.Phone != null) + { + this._flagPhone = true; + } this._UserStatus = userStatus; + if (this.UserStatus != null) + { + this._flagUserStatus = true; + } this._ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; + if (this.ObjectWithNoDeclaredProps != null) + { + this._flagObjectWithNoDeclaredProps = true; + } this._ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + if (this.ObjectWithNoDeclaredPropsNullable != null) + { + this._flagObjectWithNoDeclaredPropsNullable = true; + } this._AnyTypeProp = anyTypeProp; + if (this.AnyTypeProp != null) + { + this._flagAnyTypeProp = true; + } this._AnyTypePropNullable = anyTypePropNullable; + if (this.AnyTypePropNullable != null) + { + this._flagAnyTypePropNullable = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs index 31f06658f01b..19a2c468dd28 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs @@ -49,12 +49,21 @@ protected Whale() public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Whale and cannot be null"); } this._ClassName = className; this._HasBaleen = hasBaleen; + if (this.HasBaleen != null) + { + this._flagHasBaleen = true; + } this._HasTeeth = hasTeeth; + if (this.HasTeeth != null) + { + this._flagHasTeeth = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs index f4bf84c86474..e85075370295 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs @@ -100,11 +100,16 @@ protected Zebra() public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); } this._ClassName = className; this._Type = type; + if (this.Type != null) + { + this._flagType = true; + } this.AdditionalProperties = new Dictionary(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES index 2f141a0eb477..e19a38918ec9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES @@ -69,6 +69,7 @@ docs/models/OuterEnumIntegerDefaultValue.md docs/models/ParentPet.md docs/models/Pet.md docs/models/Pig.md +docs/models/PolymorphicProperty.md docs/models/Quadrilateral.md docs/models/QuadrilateralInterface.md docs/models/ReadOnlyFirst.md @@ -107,13 +108,13 @@ src/Org.OpenAPITools/Client/HostConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningToken.cs src/Org.OpenAPITools/Client/IApi.cs +src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs src/Org.OpenAPITools/Client/OAuthToken.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs -src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs @@ -174,6 +175,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md index ae352309dda4..2d038034349d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md @@ -642,7 +642,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -680,14 +680,14 @@ namespace Example var _string = "_string_example"; // string? | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string? | None (optional) var callback = "callback_example"; // string? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); } catch (ApiException e) { @@ -715,9 +715,9 @@ Name | Type | Description | Notes **_string** | **string?**| None | [optional] **binary** | **System.IO.Stream?****System.IO.Stream?**| None | [optional] **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] **password** | **string?**| None | [optional] **callback** | **string?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] ### Return type @@ -743,7 +743,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null) +> void TestEnumParameters (List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null) To test enum parameters @@ -767,18 +767,18 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List?(); // List? | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List?(); // List? | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -796,11 +796,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**List<string>?**](string.md)| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string?**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | [**List<string>?**](string.md)| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string?**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] + **enumHeaderString** | **string?**| Header parameter enum test (string) | [optional] [default to -efg] + **enumQueryString** | **string?**| Query parameter enum test (string) | [optional] [default to -efg] **enumFormStringArray** | [**List<string>?**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string?**| Form parameter enum test (string) | [optional] [default to -efg] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Cat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Cat.md index 310a5e6575ec..16db4a55bd30 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Cat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Cat.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Declawed** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ChildCat.md index 48a3c7fd38d9..dae2ff760262 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ChildCat.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PetType** | **string** | | [default to PetTypeEnum.ChildCat] -**Name** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ComplexQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ComplexQuadrilateral.md index 14da4bba22ed..0926bb55e71c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ComplexQuadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ComplexQuadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Dog.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Dog.md index 70cdc80e83e0..b1e39dcf07c7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Dog.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Dog.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EquilateralTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EquilateralTriangle.md index 8360b5c16a5b..ddc9885fe560 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EquilateralTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EquilateralTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Fruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Fruit.md index cb095b74f324..b3bee18f7ba0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Fruit.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Fruit.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Color** | **string** | | [optional] -**Cultivar** | **string** | | [optional] -**Origin** | **string** | | [optional] -**LengthCm** | **decimal** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FruitReq.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FruitReq.md index 5217febc9b68..38ab0c1a6caa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FruitReq.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FruitReq.md @@ -4,10 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Cultivar** | **string** | | -**LengthCm** | **decimal** | | -**Mealy** | **bool** | | [optional] -**Sweet** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/GmFruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/GmFruit.md index 049f6f5c1574..584c4fd323d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/GmFruit.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/GmFruit.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Color** | **string** | | [optional] -**Cultivar** | **string** | | [optional] -**Origin** | **string** | | [optional] -**LengthCm** | **decimal** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/IsoscelesTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/IsoscelesTriangle.md index 07c62ac93382..ed481ad14486 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/IsoscelesTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/IsoscelesTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Mammal.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Mammal.md index 82a8ca6027b5..5546632e4d67 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Mammal.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Mammal.md @@ -4,10 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**HasBaleen** | **bool** | | [optional] -**HasTeeth** | **bool** | | [optional] -**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md index 1fbf5dd5e8b6..2ee782c0c542 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md @@ -5,7 +5,7 @@ Model for testing model name same as property name Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Name** | **int** | | +**NameProperty** | **int** | | **SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] **_123Number** | **int** | | [optional] [readonly] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableShape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableShape.md index 570ef48f98fc..0caa1aa5b9d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableShape.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableShape.md @@ -5,8 +5,6 @@ The value may be a shape or the 'null' value. The 'nullable' attribute was intro Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pig.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pig.md index fd7bb9359ac4..83e58b6098d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pig.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pig.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/PolymorphicProperty.md new file mode 100644 index 000000000000..4507ec41cd51 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Quadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Quadrilateral.md index bb7507997a2f..4fd16b32ea58 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Quadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Quadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Return.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Return.md index a1dadccc421d..e11cdae8db98 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Return.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Return.md @@ -5,7 +5,7 @@ Model for testing reserved words Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Return** | **int** | | [optional] +**ReturnProperty** | **int** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ScaleneTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ScaleneTriangle.md index d3f15354bccc..a01c2edc0687 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ScaleneTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ScaleneTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Shape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Shape.md index 5627c30bbfc7..2ec279cef3c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Shape.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Shape.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | **QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ShapeOrNull.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ShapeOrNull.md index a348f4f8bff5..056fcbfdbddc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ShapeOrNull.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ShapeOrNull.md @@ -5,7 +5,6 @@ The value may be a shape or the 'null' value. This is introduced in OAS schema > Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | **QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SimpleQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SimpleQuadrilateral.md index a36c9957a609..3bc21009b7e5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SimpleQuadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SimpleQuadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md index fa146367bdea..662fa6f4a387 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SpecialPropertyName** | **long** | | [optional] -**_SpecialModelName** | **string** | | [optional] +**SpecialModelNameProperty** | **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/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 8ddc102dd849..b20faebe9c4b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -164,10 +164,10 @@ public async Task TestEndpointParametersAsyncTest() string? _string = default; System.IO.Stream? binary = default; DateTime? date = default; - DateTime? dateTime = default; string? password = default; string? callback = default; - await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + DateTime? dateTime = default; + await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); } /// @@ -177,14 +177,14 @@ public async Task TestEndpointParametersAsyncTest() public async Task TestEnumParametersAsyncTest() { List? enumHeaderStringArray = default; - string? enumHeaderString = default; List? enumQueryStringArray = default; - string? enumQueryString = default; int? enumQueryInteger = default; double? enumQueryDouble = default; + string? enumHeaderString = default; + string? enumQueryString = default; List? enumFormStringArray = default; string? enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs index 701ba7602823..9c3c48ffefe3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -56,14 +56,6 @@ public void CatInstanceTest() } - /// - /// Test the property 'Declawed' - /// - [Fact] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 6ce48e601e47..621877aa9732 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -57,20 +57,20 @@ public void CategoryInstanceTest() /// - /// Test the property 'Id' + /// Test the property 'Name' /// [Fact] - public void IdTest() + public void NameTest() { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Id' /// [Fact] - public void NameTest() + public void IdTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Id' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs index 68566fd8d560..0fe3ebfa06ef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -56,22 +56,6 @@ public void ChildCatInstanceTest() } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PetType' - /// - [Fact] - public void PetTypeTest() - { - // TODO unit test for the property 'PetType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs index b3529280c8d6..6c50fe7aab5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -56,22 +56,6 @@ public void ComplexQuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs index 992f93a51fd5..bf906f01bc63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -56,14 +56,6 @@ public void DogInstanceTest() } - /// - /// Test the property 'Breed' - /// - [Fact] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index 4f81b845d493..a22c39ca845d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -57,20 +57,20 @@ public void EnumTestInstanceTest() /// - /// Test the property 'EnumString' + /// Test the property 'EnumStringRequired' /// [Fact] - public void EnumStringTest() + public void EnumStringRequiredTest() { - // TODO unit test for the property 'EnumString' + // TODO unit test for the property 'EnumStringRequired' } /// - /// Test the property 'EnumStringRequired' + /// Test the property 'EnumString' /// [Fact] - public void EnumStringRequiredTest() + public void EnumStringTest() { - // TODO unit test for the property 'EnumStringRequired' + // TODO unit test for the property 'EnumString' } /// /// Test the property 'EnumInteger' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs index 4663cb667de6..9ca755c4b070 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -56,22 +56,6 @@ public void EquilateralTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 97332800e9af..707847bbcd19 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -56,6 +56,38 @@ public void FormatTestInstanceTest() } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Byte' + /// + [Fact] + public void ByteTest() + { + // TODO unit test for the property 'Byte' + } + /// + /// Test the property 'Date' + /// + [Fact] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'Password' + /// + [Fact] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } /// /// Test the property 'Integer' /// @@ -81,14 +113,6 @@ public void Int64Test() // TODO unit test for the property 'Int64' } /// - /// Test the property 'Number' - /// - [Fact] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// /// Test the property 'Float' /// [Fact] @@ -121,14 +145,6 @@ public void StringTest() // TODO unit test for the property 'String' } /// - /// Test the property 'Byte' - /// - [Fact] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// /// Test the property 'Binary' /// [Fact] @@ -137,14 +153,6 @@ public void BinaryTest() // TODO unit test for the property 'Binary' } /// - /// Test the property 'Date' - /// - [Fact] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// /// Test the property 'DateTime' /// [Fact] @@ -161,14 +169,6 @@ public void UuidTest() // TODO unit test for the property 'Uuid' } /// - /// Test the property 'Password' - /// - [Fact] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// /// Test the property 'PatternWithDigits' /// [Fact] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs index 5ea9e3ffc1d5..3a0b55b93e3f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -56,38 +56,6 @@ public void FruitReqInstanceTest() } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Mealy' - /// - [Fact] - public void MealyTest() - { - // TODO unit test for the property 'Mealy' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } - /// - /// Test the property 'Sweet' - /// - [Fact] - public void SweetTest() - { - // TODO unit test for the property 'Sweet' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs index 91e069bb42fa..ddc424d56ead 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -64,30 +64,6 @@ public void ColorTest() { // TODO unit test for the property 'Color' } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Origin' - /// - [Fact] - public void OriginTest() - { - // TODO unit test for the property 'Origin' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs index 08fb0e07a1c8..cbd35f9173c7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -64,30 +64,6 @@ public void ColorTest() { // TODO unit test for the property 'Color' } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Origin' - /// - [Fact] - public void OriginTest() - { - // TODO unit test for the property 'Origin' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs index 755c417cc54f..8e0dae934202 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -56,22 +56,6 @@ public void IsoscelesTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs index 7b46cbf06450..6477ab950fae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -56,38 +56,6 @@ public void MammalInstanceTest() } - /// - /// Test the property 'HasBaleen' - /// - [Fact] - public void HasBaleenTest() - { - // TODO unit test for the property 'HasBaleen' - } - /// - /// Test the property 'HasTeeth' - /// - [Fact] - public void HasTeethTest() - { - // TODO unit test for the property 'HasTeeth' - } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs index c390049e66dc..61f8ad11379f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -57,12 +57,12 @@ public void NameInstanceTest() /// - /// Test the property '_Name' + /// Test the property 'NameProperty' /// [Fact] - public void _NameTest() + public void NamePropertyTest() { - // TODO unit test for the property '_Name' + // TODO unit test for the property 'NameProperty' } /// /// Test the property 'SnakeCase' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs index 5662f91d6e64..8202ef63914b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -56,22 +56,6 @@ public void NullableShapeInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs index 154e66f8dfc0..28ea4d8478da 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -57,36 +57,36 @@ public void PetInstanceTest() /// - /// Test the property 'Id' + /// Test the property 'Name' /// [Fact] - public void IdTest() + public void NameTest() { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Category' + /// Test the property 'PhotoUrls' /// [Fact] - public void CategoryTest() + public void PhotoUrlsTest() { - // TODO unit test for the property 'Category' + // TODO unit test for the property 'PhotoUrls' } /// - /// Test the property 'Name' + /// Test the property 'Id' /// [Fact] - public void NameTest() + public void IdTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Id' } /// - /// Test the property 'PhotoUrls' + /// Test the property 'Category' /// [Fact] - public void PhotoUrlsTest() + public void CategoryTest() { - // TODO unit test for the property 'PhotoUrls' + // TODO unit test for the property 'Category' } /// /// Test the property 'Tags' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs index 55cf2189046b..a66befe8f581 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -56,14 +56,6 @@ public void PigInstanceTest() } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs index 26826681a478..3d62673d093e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -56,22 +56,6 @@ public void QuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index c8c1d6510d2f..65fa199fe35e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -57,12 +57,12 @@ public void ReturnInstanceTest() /// - /// Test the property '_Return' + /// Test the property 'ReturnProperty' /// [Fact] - public void _ReturnTest() + public void ReturnPropertyTest() { - // TODO unit test for the property '_Return' + // TODO unit test for the property 'ReturnProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs index 04cb9f1ab6b1..018dffb59642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -56,22 +56,6 @@ public void ScaleneTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs index d0af114157c9..ef5643576485 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -56,14 +56,6 @@ public void ShapeOrNullInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } /// /// Test the property 'QuadrilateralType' /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs index b01bd531f857..783a9657ed42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -56,14 +56,6 @@ public void ShapeInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } /// /// Test the property 'QuadrilateralType' /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs index 6648e9809281..3bcd65e792d6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -56,22 +56,6 @@ public void SimpleQuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 0f0e1ff12a9e..91682a7afd6a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -65,12 +65,12 @@ public void SpecialPropertyNameTest() // TODO unit test for the property 'SpecialPropertyName' } /// - /// Test the property '_SpecialModelName' + /// Test the property 'SpecialModelNameProperty' /// [Fact] - public void _SpecialModelNameTest() + public void SpecialModelNamePropertyTest() { - // TODO unit test for the property '_SpecialModelName' + // TODO unit test for the property 'SpecialModelNameProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs index 09610791943c..9b82c29c8fd8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -56,6 +56,14 @@ public void WhaleInstanceTest() } + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } /// /// Test the property 'HasBaleen' /// @@ -72,14 +80,6 @@ public void HasTeethTest() { // TODO unit test for the property 'HasTeeth' } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs index f44e92131400..39e0561fe0f8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -57,20 +57,20 @@ public void ZebraInstanceTest() /// - /// Test the property 'Type' + /// Test the property 'ClassName' /// [Fact] - public void TypeTest() + public void ClassNameTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'ClassName' } /// - /// Test the property 'ClassName' + /// Test the property 'Type' /// [Fact] - public void ClassNameTest() + public void TypeTest() { - // TODO unit test for the property 'ClassName' + // TODO unit test for the property 'Type' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 39ca9f95c47e..d48adffd90a5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +39,7 @@ public interface IAnotherFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient?>> Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test special tags /// @@ -50,7 +51,7 @@ public interface IAnotherFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test special tags /// @@ -61,13 +62,16 @@ public interface IAnotherFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient?> Task Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class AnotherFakeApi : IAnotherFakeApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -88,22 +92,22 @@ public partial class AnotherFakeApi : IAnotherFakeApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -113,13 +117,14 @@ public partial class AnotherFakeApi : IAnotherFakeApi /// Initializes a new instance of the class. /// /// - public AnotherFakeApi(ILogger logger, HttpClient httpClient, + public AnotherFakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -139,7 +144,7 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, public async Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -184,42 +189,41 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/another-fake/dummy"; - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Patch; + request.Method = HttpMethod.Patch; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -242,7 +246,7 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -253,6 +257,5 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs index 171b696702d9..e24605070a99 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -37,7 +38,7 @@ public interface IDefaultApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<InlineResponseDefault?>> Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -48,7 +49,7 @@ public interface IDefaultApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<InlineResponseDefault> Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -58,13 +59,16 @@ public interface IDefaultApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<InlineResponseDefault?> Task FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class DefaultApi : IDefaultApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -85,22 +89,22 @@ public partial class DefaultApi : IDefaultApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -110,13 +114,14 @@ public partial class DefaultApi : IDefaultApi /// Initializes a new instance of the class. /// /// - public DefaultApi(ILogger logger, HttpClient httpClient, + public DefaultApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -135,7 +140,7 @@ public DefaultApi(ILogger logger, HttpClient httpClient, public async Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -182,17 +187,17 @@ public DefaultApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/foo"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -215,7 +220,7 @@ public DefaultApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -226,6 +231,5 @@ public DefaultApi(ILogger logger, HttpClient httpClient, Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs index 5f8f4525c9d7..b6c15b685446 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -37,7 +38,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<HealthCheckResult?>> Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Health check endpoint /// @@ -48,7 +49,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<HealthCheckResult> Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Health check endpoint /// @@ -59,7 +60,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<HealthCheckResult?> Task FakeHealthGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -70,7 +72,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<bool?>> Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -82,7 +84,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<bool> Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -94,7 +96,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<bool?> Task FakeOuterBooleanSerializeOrDefaultAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -105,7 +108,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<OuterComposite?>> Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -117,7 +120,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<OuterComposite> Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -129,7 +132,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<OuterComposite?> Task FakeOuterCompositeSerializeOrDefaultAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -140,7 +144,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<decimal?>> Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -152,7 +156,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<decimal> Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -164,7 +168,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<decimal?> Task FakeOuterNumberSerializeOrDefaultAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -175,7 +180,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<string?>> Task> FakeOuterStringSerializeWithHttpInfoAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -187,7 +192,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task FakeOuterStringSerializeAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -199,7 +204,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<string?> Task FakeOuterStringSerializeOrDefaultAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Array of Enums /// /// @@ -209,7 +215,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<OuterEnum>?>> Task?>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Array of Enums /// @@ -220,7 +226,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<OuterEnum>> Task?> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Array of Enums /// @@ -231,7 +237,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<List<OuterEnum>?> Task?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -242,7 +249,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -254,7 +261,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -266,7 +273,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<object?> Task TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -278,7 +286,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -291,7 +299,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -304,7 +312,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<object?> Task TestBodyWithQueryParamsOrDefaultAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// To test \"client\" model /// /// @@ -315,7 +324,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient?>> Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test \"client\" model /// @@ -327,7 +336,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test \"client\" model /// @@ -339,7 +348,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<ModelClient?> Task TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// @@ -357,13 +367,13 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> - Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null, System.Threading.CancellationToken? cancellationToken = null); - + Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -382,13 +392,13 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null, System.Threading.CancellationToken? cancellationToken = null); - + Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -406,14 +416,15 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// To test enum parameters /// /// @@ -421,17 +432,17 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> - Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - + Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test enum parameters /// @@ -440,17 +451,17 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEnumParametersAsync(List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - + Task TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test enum parameters /// @@ -458,18 +469,19 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Fake endpoint to test group parameters (optional) /// /// @@ -485,7 +497,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Fake endpoint to test group parameters (optional) /// @@ -502,7 +514,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Fake endpoint to test group parameters (optional) /// @@ -519,7 +531,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<object?> Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// test inline additionalProperties /// /// @@ -530,7 +543,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test inline additionalProperties /// @@ -542,7 +555,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test inline additionalProperties /// @@ -554,7 +567,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<object?> Task TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// test json serialization of form data /// /// @@ -566,7 +580,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test json serialization of form data /// @@ -579,7 +593,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test json serialization of form data /// @@ -592,7 +606,8 @@ public interface IFakeApi : IApi /// Task of ApiResponse<object?> Task TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// /// /// @@ -607,7 +622,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -623,7 +638,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -638,13 +653,16 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FakeApi : IFakeApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -665,22 +683,22 @@ public partial class FakeApi : IFakeApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -690,13 +708,14 @@ public partial class FakeApi : IFakeApi /// Initializes a new instance of the class. /// /// - public FakeApi(ILogger logger, HttpClient httpClient, + public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -715,7 +734,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -762,17 +781,17 @@ public FakeApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/health"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -795,7 +814,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -818,7 +837,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -865,33 +884,32 @@ public FakeApi(ILogger logger, HttpClient httpClient, uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/boolean"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -914,7 +932,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -937,7 +955,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -984,33 +1002,32 @@ public FakeApi(ILogger logger, HttpClient httpClient, uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/composite"; - - if ((outerComposite as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(outerComposite, ClientUtils.JsonSerializerSettings)); + + request.Content = (outerComposite as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(outerComposite, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1033,7 +1050,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1056,7 +1073,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1103,33 +1120,32 @@ public FakeApi(ILogger logger, HttpClient httpClient, uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/number"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1152,7 +1168,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1175,7 +1191,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeOuterStringSerializeAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1222,33 +1238,32 @@ public FakeApi(ILogger logger, HttpClient httpClient, uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/string"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1271,7 +1286,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1293,7 +1308,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task?> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1340,17 +1355,17 @@ public FakeApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/array-of-enums"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1373,7 +1388,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1396,7 +1411,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1441,33 +1456,32 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (fileSchemaTestClass == null) throw new ArgumentNullException(nameof(fileSchemaTestClass)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/body-with-file-schema"; - - if ((fileSchemaTestClass as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(fileSchemaTestClass, ClientUtils.JsonSerializerSettings)); + + request.Content = (fileSchemaTestClass as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(fileSchemaTestClass, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1490,7 +1504,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1514,7 +1528,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1564,9 +1578,9 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1579,24 +1593,23 @@ public FakeApi(ILogger logger, HttpClient httpClient, parseQueryString["query"] = Uri.EscapeDataString(query.ToString()!); uriBuilder.Query = parseQueryString.ToString(); - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1619,7 +1632,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1642,7 +1655,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1687,42 +1700,41 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake"; - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Patch; + request.Method = HttpMethod.Patch; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1745,7 +1757,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1773,15 +1785,15 @@ public FakeApi(ILogger logger, HttpClient httpClient, /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); - + ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1803,17 +1815,17 @@ public FakeApi(ILogger logger, HttpClient httpClient, /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1839,12 +1851,12 @@ public FakeApi(ILogger logger, HttpClient httpClient, /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { try { @@ -1861,9 +1873,9 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (_byte == null) throw new ArgumentNullException(nameof(_byte)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1874,11 +1886,19 @@ public FakeApi(ILogger logger, HttpClient httpClient, MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); + formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); + + formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); + + formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); + + formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + if (integer != null) formParams.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer))); @@ -1887,36 +1907,28 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (int64 != null) formParams.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64))); - - formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); if (_float != null) formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); - - formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); if (_string != null) formParams.Add(new KeyValuePair("string", ClientUtils.ParameterToString(_string))); - - formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); - - formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); - + if (binary != null) multipartContent.Add(new StreamContent(binary)); if (date != null) formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); - if (dateTime != null) - formParams.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime))); - if (password != null) formParams.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password))); if (callback != null) formParams.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback))); + if (dateTime != null) + formParams.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime))); + List tokens = new List(); request.RequestUri = uriBuilder.Uri; @@ -1924,19 +1936,19 @@ public FakeApi(ILogger logger, HttpClient httpClient, BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(basicToken); - + basicToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1959,7 +1971,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1980,19 +1992,19 @@ public FakeApi(ILogger logger, HttpClient httpClient, /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); - + ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2004,21 +2016,21 @@ public FakeApi(ILogger logger, HttpClient httpClient, /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2034,16 +2046,16 @@ public FakeApi(ILogger logger, HttpClient httpClient, /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { try { @@ -2058,27 +2070,27 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (enumQueryStringArray != null) parseQueryString["enum_query_string_array"] = Uri.EscapeDataString(enumQueryStringArray.ToString()!); - if (enumQueryString != null) - parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()!); - if (enumQueryInteger != null) parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()!); if (enumQueryDouble != null) parseQueryString["enum_query_double"] = Uri.EscapeDataString(enumQueryDouble.ToString()!); + if (enumQueryString != null) + parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()!); + uriBuilder.Query = parseQueryString.ToString(); - + if (enumHeaderStringArray != null) request.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray)); - + if (enumHeaderString != null) request.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString)); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); @@ -2090,17 +2102,17 @@ public FakeApi(ILogger logger, HttpClient httpClient, formParams.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString))); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2123,7 +2135,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2151,7 +2163,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2212,9 +2224,9 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (requiredInt64Group == null) throw new ArgumentNullException(nameof(requiredInt64Group)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2234,9 +2246,9 @@ public FakeApi(ILogger logger, HttpClient httpClient, parseQueryString["int64_group"] = Uri.EscapeDataString(int64Group.ToString()!); uriBuilder.Query = parseQueryString.ToString(); - + request.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); - + if (booleanGroup != null) request.Headers.Add("boolean_group", ClientUtils.ParameterToString(booleanGroup)); @@ -2247,10 +2259,10 @@ public FakeApi(ILogger logger, HttpClient httpClient, BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(bearerToken); - + bearerToken.UseInHeader(request, ""); - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2273,7 +2285,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -2299,7 +2311,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2344,33 +2356,32 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (requestBody == null) throw new ArgumentNullException(nameof(requestBody)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-additionalProperties"; - - if ((requestBody as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestBody, ClientUtils.JsonSerializerSettings)); + + request.Content = (requestBody as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2393,7 +2404,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2417,7 +2428,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2467,9 +2478,9 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (param2 == null) throw new ArgumentNullException(nameof(param2)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2480,27 +2491,27 @@ public FakeApi(ILogger logger, HttpClient httpClient, MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); - + formParams.Add(new KeyValuePair("param", ClientUtils.ParameterToString(param))); - + formParams.Add(new KeyValuePair("param2", ClientUtils.ParameterToString(param2))); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2523,7 +2534,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2550,7 +2561,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2615,9 +2626,9 @@ public FakeApi(ILogger logger, HttpClient httpClient, if (context == null) throw new ArgumentNullException(nameof(context)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2637,7 +2648,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2660,7 +2671,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2671,6 +2682,5 @@ public FakeApi(ILogger logger, HttpClient httpClient, Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 39d5c0908bbc..651adb38ef93 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +39,7 @@ public interface IFakeClassnameTags123Api : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient?>> Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test class name in snake case /// @@ -50,7 +51,7 @@ public interface IFakeClassnameTags123Api : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test class name in snake case /// @@ -61,13 +62,16 @@ public interface IFakeClassnameTags123Api : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient?> Task TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -88,22 +92,22 @@ public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -113,13 +117,14 @@ public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// Initializes a new instance of the class. /// /// - public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, + public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -139,7 +144,7 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie public async Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -184,54 +189,53 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake_classname_test"; - + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInQuery(request, uriBuilder, parseQueryString, "api_key_query"); - + uriBuilder.Query = parseQueryString.ToString(); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Patch; + request.Method = HttpMethod.Patch; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -254,7 +258,7 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -268,6 +272,5 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs index f9d802892a22..c667da14abd9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +39,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Add a new pet to the store /// @@ -50,7 +51,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Add a new pet to the store /// @@ -62,7 +63,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<object?> Task AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Deletes a pet /// /// @@ -74,7 +76,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Deletes a pet /// @@ -87,7 +89,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Deletes a pet /// @@ -100,7 +102,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<object?> Task DeletePetOrDefaultAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Finds Pets by status /// /// @@ -111,7 +114,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<Pet>?>> Task?>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by status /// @@ -123,7 +126,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task?> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by status /// @@ -135,7 +138,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<List<Pet>?> Task?> FindPetsByStatusOrDefaultAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Finds Pets by tags /// /// @@ -146,7 +150,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<Pet>?>> Task?>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by tags /// @@ -158,7 +162,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task?> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by tags /// @@ -170,7 +174,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<List<Pet>?> Task?> FindPetsByTagsOrDefaultAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Find pet by ID /// /// @@ -181,7 +186,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Pet?>> Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find pet by ID /// @@ -193,7 +198,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Pet> Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find pet by ID /// @@ -205,7 +210,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<Pet?> Task GetPetByIdOrDefaultAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Update an existing pet /// /// @@ -216,7 +222,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Update an existing pet /// @@ -228,7 +234,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Update an existing pet /// @@ -240,7 +246,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<object?> Task UpdatePetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Updates a pet in the store with form data /// /// @@ -253,7 +260,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updates a pet in the store with form data /// @@ -267,7 +274,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updates a pet in the store with form data /// @@ -281,7 +288,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<object?> Task UpdatePetWithFormOrDefaultAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// uploads an image /// /// @@ -294,7 +302,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse?>> Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image /// @@ -308,7 +316,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> Task UploadFileAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image /// @@ -322,7 +330,8 @@ public interface IPetApi : IApi /// Task of ApiResponse<ApiResponse?> Task UploadFileOrDefaultAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// uploads an image (required) /// /// @@ -335,7 +344,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse?>> Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image (required) /// @@ -349,7 +358,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image (required) /// @@ -362,13 +371,16 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse?> Task UploadFileWithRequiredFileOrDefaultAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class PetApi : IPetApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -389,22 +401,22 @@ public partial class PetApi : IPetApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -414,13 +426,14 @@ public partial class PetApi : IPetApi /// Initializes a new instance of the class. /// /// - public PetApi(ILogger logger, HttpClient httpClient, + public PetApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -440,7 +453,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -485,25 +498,24 @@ public PetApi(ILogger logger, HttpClient httpClient, if (pet == null) throw new ArgumentNullException(nameof(pet)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; - - if ((pet as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(pet, ClientUtils.JsonSerializerSettings)); + + request.Content = (pet as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(pet, _jsonSerializerOptions)); List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -515,20 +527,20 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/json", "application/xml" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -551,7 +563,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -581,7 +593,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -628,9 +640,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (petId == null) throw new ArgumentNullException(nameof(petId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -638,7 +650,7 @@ public PetApi(ILogger logger, HttpClient httpClient, uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - + if (apiKey != null) request.Headers.Add("api_key", ClientUtils.ParameterToString(apiKey)); @@ -649,10 +661,10 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -675,7 +687,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -701,7 +713,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task?> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -746,9 +758,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (status == null) throw new ArgumentNullException(nameof(status)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -765,7 +777,7 @@ public PetApi(ILogger logger, HttpClient httpClient, List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -777,20 +789,20 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -813,7 +825,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -842,7 +854,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task?> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -887,9 +899,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (tags == null) throw new ArgumentNullException(nameof(tags)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -906,7 +918,7 @@ public PetApi(ILogger logger, HttpClient httpClient, List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -918,20 +930,20 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -954,7 +966,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -983,7 +995,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1028,9 +1040,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (petId == null) throw new ArgumentNullException(nameof(petId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1040,26 +1052,26 @@ public PetApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInHeader(request, "api_key"); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1082,7 +1094,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1108,7 +1120,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1153,25 +1165,24 @@ public PetApi(ILogger logger, HttpClient httpClient, if (pet == null) throw new ArgumentNullException(nameof(pet)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; - - if ((pet as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(pet, ClientUtils.JsonSerializerSettings)); + + request.Content = (pet as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(pet, _jsonSerializerOptions)); List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -1183,20 +1194,20 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/json", "application/xml" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1219,7 +1230,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1250,7 +1261,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1299,9 +1310,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (petId == null) throw new ArgumentNullException(nameof(petId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1313,7 +1324,7 @@ public PetApi(ILogger logger, HttpClient httpClient, MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); @@ -1331,19 +1342,19 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1366,7 +1377,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1394,7 +1405,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task UploadFileAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1443,9 +1454,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (petId == null) throw new ArgumentNullException(nameof(petId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1457,14 +1468,14 @@ public PetApi(ILogger logger, HttpClient httpClient, MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - + if (file != null) multipartContent.Add(new StreamContent(file)); @@ -1475,28 +1486,28 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "multipart/form-data" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1519,7 +1530,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1547,7 +1558,7 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1599,9 +1610,9 @@ public PetApi(ILogger logger, HttpClient httpClient, if (requiredFile == null) throw new ArgumentNullException(nameof(requiredFile)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1613,15 +1624,15 @@ public PetApi(ILogger logger, HttpClient httpClient, MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); + multipartContent.Add(new StreamContent(requiredFile)); + if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - - multipartContent.Add(new StreamContent(requiredFile)); List tokens = new List(); @@ -1630,28 +1641,28 @@ public PetApi(ILogger logger, HttpClient httpClient, OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "multipart/form-data" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1674,7 +1685,7 @@ public PetApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1688,6 +1699,5 @@ public PetApi(ILogger logger, HttpClient httpClient, Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs index e4adfc47c8f9..68763e65dcef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +39,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete purchase order by ID /// @@ -50,7 +51,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete purchase order by ID /// @@ -62,7 +63,8 @@ public interface IStoreApi : IApi /// Task of ApiResponse<object?> Task DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Returns pet inventories by status /// /// @@ -72,7 +74,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Dictionary<string, int>?>> Task?>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Returns pet inventories by status /// @@ -83,7 +85,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Dictionary<string, int>> Task?> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Returns pet inventories by status /// @@ -94,7 +96,8 @@ public interface IStoreApi : IApi /// Task of ApiResponse<Dictionary<string, int>?> Task?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Find purchase order by ID /// /// @@ -105,7 +108,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Order?>> Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find purchase order by ID /// @@ -117,7 +120,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find purchase order by ID /// @@ -129,7 +132,8 @@ public interface IStoreApi : IApi /// Task of ApiResponse<Order?> Task GetOrderByIdOrDefaultAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Place an order for a pet /// /// @@ -140,7 +144,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Order?>> Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Place an order for a pet /// @@ -152,7 +156,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Place an order for a pet /// @@ -163,13 +167,16 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order?> Task PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class StoreApi : IStoreApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -190,22 +197,22 @@ public partial class StoreApi : IStoreApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -215,13 +222,14 @@ public partial class StoreApi : IStoreApi /// Initializes a new instance of the class. /// /// - public StoreApi(ILogger logger, HttpClient httpClient, + public StoreApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -241,7 +249,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, public async Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -286,9 +294,9 @@ public StoreApi(ILogger logger, HttpClient httpClient, if (orderId == null) throw new ArgumentNullException(nameof(orderId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -299,7 +307,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -322,7 +330,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -344,7 +352,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, public async Task?> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -391,25 +399,25 @@ public StoreApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/inventory"; List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInHeader(request, "api_key"); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -432,7 +440,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -458,7 +466,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, public async Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -503,9 +511,9 @@ public StoreApi(ILogger logger, HttpClient httpClient, if (orderId == null) throw new ArgumentNullException(nameof(orderId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -515,18 +523,18 @@ public StoreApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -549,7 +557,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -572,7 +580,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, public async Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -617,43 +625,42 @@ public StoreApi(ILogger logger, HttpClient httpClient, if (order == null) throw new ArgumentNullException(nameof(order)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order"; - - if ((order as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(order, ClientUtils.JsonSerializerSettings)); + + request.Content = (order as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(order, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -676,7 +683,7 @@ public StoreApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -687,6 +694,5 @@ public StoreApi(ILogger logger, HttpClient httpClient, Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs index c49fd35541c1..dc5f0eb8aa9e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +39,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Create user /// @@ -50,7 +51,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Create user /// @@ -62,7 +63,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<object?> Task CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Creates list of users with given input array /// /// @@ -73,7 +75,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -85,7 +87,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -97,7 +99,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<object?> Task CreateUsersWithArrayInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Creates list of users with given input array /// /// @@ -108,7 +111,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -120,7 +123,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -132,7 +135,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<object?> Task CreateUsersWithListInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Delete user /// /// @@ -143,7 +147,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete user /// @@ -155,7 +159,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete user /// @@ -167,7 +171,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<object?> Task DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Get user by user name /// /// @@ -178,7 +183,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<User?>> Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Get user by user name /// @@ -190,7 +195,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<User> Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Get user by user name /// @@ -202,7 +207,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<User?> Task GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Logs user into the system /// /// @@ -214,7 +220,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<string?>> Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs user into the system /// @@ -227,7 +233,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs user into the system /// @@ -240,7 +246,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<string?> Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Logs out current logged in user session /// /// @@ -250,7 +257,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs out current logged in user session /// @@ -261,7 +268,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs out current logged in user session /// @@ -272,7 +279,8 @@ public interface IUserApi : IApi /// Task of ApiResponse<object?> Task LogoutUserOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// + + /// /// Updated user /// /// @@ -284,7 +292,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updated user /// @@ -297,7 +305,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updated user /// @@ -309,13 +317,16 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - } + + } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class UserApi : IUserApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -336,22 +347,22 @@ public partial class UserApi : IUserApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -361,13 +372,14 @@ public partial class UserApi : IUserApi /// Initializes a new instance of the class. /// /// - public UserApi(ILogger logger, HttpClient httpClient, + public UserApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -387,7 +399,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -432,33 +444,32 @@ public UserApi(ILogger logger, HttpClient httpClient, if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -481,7 +492,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -504,7 +515,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -549,33 +560,32 @@ public UserApi(ILogger logger, HttpClient httpClient, if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/createWithArray"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -598,7 +608,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -621,7 +631,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -666,33 +676,32 @@ public UserApi(ILogger logger, HttpClient httpClient, if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/createWithList"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -715,7 +724,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -738,7 +747,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -783,9 +792,9 @@ public UserApi(ILogger logger, HttpClient httpClient, if (username == null) throw new ArgumentNullException(nameof(username)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -796,7 +805,7 @@ public UserApi(ILogger logger, HttpClient httpClient, request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -819,7 +828,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -842,7 +851,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -887,9 +896,9 @@ public UserApi(ILogger logger, HttpClient httpClient, if (username == null) throw new ArgumentNullException(nameof(username)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -899,18 +908,18 @@ public UserApi(ILogger logger, HttpClient httpClient, uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -933,7 +942,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -957,7 +966,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1007,9 +1016,9 @@ public UserApi(ILogger logger, HttpClient httpClient, if (password == null) throw new ArgumentNullException(nameof(password)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1025,18 +1034,18 @@ public UserApi(ILogger logger, HttpClient httpClient, uriBuilder.Query = parseQueryString.ToString(); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string? accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1059,7 +1068,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1081,7 +1090,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1129,7 +1138,7 @@ public UserApi(ILogger logger, HttpClient httpClient, request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1152,7 +1161,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1176,7 +1185,7 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1226,9 +1235,9 @@ public UserApi(ILogger logger, HttpClient httpClient, if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1236,24 +1245,23 @@ public UserApi(ILogger logger, HttpClient httpClient, uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1276,7 +1284,7 @@ public UserApi(ILogger logger, HttpClient httpClient, ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1287,6 +1295,5 @@ public UserApi(ILogger logger, HttpClient httpClient, Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 29d184dddaec..78a0047905cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -13,7 +13,6 @@ using System; using System.Collections.Generic; using System.Net; -using Newtonsoft.Json; namespace Org.OpenAPITools.Client { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs index 4bc32f6b9831..73d48918517b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -7,18 +7,20 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.IO; using System.Linq; +using System.Net.Http; using System.Text; +using System.Text.Json; using System.Text.RegularExpressions; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using Polly.Timeout; using Polly.Extensions.Http; using Polly; -using System.Net.Http; using Org.OpenAPITools.Api; using KellermanSoftware.CompareNetObjects; @@ -52,21 +54,48 @@ static ClientUtils() public delegate void EventHandler(object sender, T e) where T : EventArgs; /// - /// Custom JSON serializer + /// Returns true when deserialization succeeds. /// - public static Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; set; } = new Newtonsoft.Json.JsonSerializerSettings + /// + /// + /// + /// + /// + public static bool TryDeserialize(string json, JsonSerializerOptions options, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = Newtonsoft.Json.ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore, - ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver + try { - NamingStrategy = new Newtonsoft.Json.Serialization.CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } + result = JsonSerializer.Deserialize(json, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + { + try + { + result = JsonSerializer.Deserialize(ref reader, options); + return result != null; } - }; + catch (Exception) + { + result = default; + return false; + } + } /// /// Sanitize filename by removing the path @@ -175,7 +204,7 @@ public static byte[] ReadAsBytes(Stream inputStream) /// /// The Content-Type array to select from. /// The Content-Type header to use. - public static string SelectHeaderContentType(string[] contentTypes) + public static string? SelectHeaderContentType(string[] contentTypes) { if (contentTypes.Length == 0) return null; @@ -196,7 +225,7 @@ public static string SelectHeaderContentType(string[] contentTypes) /// /// The accepts array to select from. /// The Accept header to use. - public static string SelectHeaderAccept(string[] accepts) + public static string? SelectHeaderAccept(string[] accepts) { if (accepts.Length == 0) return null; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs index 7b8ea652b167..d0346cfb491d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -7,13 +7,17 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Client { @@ -23,6 +27,8 @@ namespace Org.OpenAPITools.Client public class HostConfiguration { private readonly IServiceCollection _services; + private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + internal bool HttpClientsAdded { get; private set; } /// @@ -32,13 +38,36 @@ public class HostConfiguration public HostConfiguration(IServiceCollection services) { _services = services; - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + _jsonOptions.Converters.Add(new JsonStringEnumConverter()); + _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); + _jsonOptions.Converters.Add(new CatJsonConverter()); + _jsonOptions.Converters.Add(new ChildCatJsonConverter()); + _jsonOptions.Converters.Add(new ComplexQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new DogJsonConverter()); + _jsonOptions.Converters.Add(new EquilateralTriangleJsonConverter()); + _jsonOptions.Converters.Add(new FruitJsonConverter()); + _jsonOptions.Converters.Add(new FruitReqJsonConverter()); + _jsonOptions.Converters.Add(new GmFruitJsonConverter()); + _jsonOptions.Converters.Add(new IsoscelesTriangleJsonConverter()); + _jsonOptions.Converters.Add(new MammalJsonConverter()); + _jsonOptions.Converters.Add(new NullableShapeJsonConverter()); + _jsonOptions.Converters.Add(new ParentPetJsonConverter()); + _jsonOptions.Converters.Add(new PigJsonConverter()); + _jsonOptions.Converters.Add(new PolymorphicPropertyJsonConverter()); + _jsonOptions.Converters.Add(new QuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); + _jsonOptions.Converters.Add(new ShapeJsonConverter()); + _jsonOptions.Converters.Add(new ShapeOrNullJsonConverter()); + _jsonOptions.Converters.Add(new SimpleQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new TriangleJsonConverter()); + _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); } /// @@ -86,8 +115,7 @@ public HostConfiguration AddApiHttpClients /// /// - public HostConfiguration AddApiHttpClients( - Action? client = null, Action? builder = null) + public HostConfiguration AddApiHttpClients(Action? client = null, Action? builder = null) { AddApiHttpClients(client, builder); @@ -99,9 +127,9 @@ public HostConfiguration AddApiHttpClients( /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { - options(Client.ClientUtils.JsonSerializerSettings); + options(_jsonOptions); return this; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs new file mode 100644 index 000000000000..0184d9ad9446 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs @@ -0,0 +1,27 @@ +// + +#nullable enable + +using System.Text.Json; + +namespace Org.OpenAPITools.Client +{ + /// + /// Provides the JsonSerializerOptions + /// + public class JsonSerializerOptionsProvider + { + /// + /// the JsonSerializerOptions + /// + public JsonSerializerOptions Options { get; } + + /// + /// Instantiates a JsonSerializerOptionsProvider + /// + public JsonSerializerOptionsProvider(JsonSerializerOptions options) + { + Options = options; + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a5253e582013..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs new file mode 100644 index 000000000000..5f64123b7d57 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs @@ -0,0 +1,42 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateJsonConverter : JsonConverter + { + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + DateTime.ParseExact(reader.GetString()!, "yyyy-MM-dd", CultureInfo.InvariantCulture); + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs deleted file mode 100644 index b3fc4c3c7a3a..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Org.OpenAPITools.Model -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Custom JSON serializer for objects with additional properties - /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 19896e401bcb..6525a4a03481 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,87 +29,85 @@ namespace Org.OpenAPITools.Model /// /// AdditionalPropertiesClass /// - [DataContract(Name = "AdditionalPropertiesClass")] public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapProperty. - /// mapOfMapProperty. - /// anytype1. - /// mapWithUndeclaredPropertiesAnytype1. - /// mapWithUndeclaredPropertiesAnytype2. - /// mapWithUndeclaredPropertiesAnytype3. - /// an object with no declared properties and no undeclared properties, hence it's an empty map.. - /// mapWithUndeclaredPropertiesString. + /// mapProperty + /// mapOfMapProperty + /// anytype1 + /// mapWithUndeclaredPropertiesAnytype1 + /// mapWithUndeclaredPropertiesAnytype2 + /// mapWithUndeclaredPropertiesAnytype3 + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + /// mapWithUndeclaredPropertiesString public AdditionalPropertiesClass(Dictionary? mapProperty = default, Dictionary>? mapOfMapProperty = default, Object? anytype1 = default, Object? mapWithUndeclaredPropertiesAnytype1 = default, Object? mapWithUndeclaredPropertiesAnytype2 = default, Dictionary? mapWithUndeclaredPropertiesAnytype3 = default, Object? emptyMap = default, Dictionary? mapWithUndeclaredPropertiesString = default) { - this.MapProperty = mapProperty; - this.MapOfMapProperty = mapOfMapProperty; - this.Anytype1 = anytype1; - this.MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; - this.MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; - this.MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - this.EmptyMap = emptyMap; - this.MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; - this.AdditionalProperties = new Dictionary(); + MapProperty = mapProperty; + MapOfMapProperty = mapOfMapProperty; + Anytype1 = anytype1; + MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + EmptyMap = emptyMap; + MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; } /// /// Gets or Sets MapProperty /// - [DataMember(Name = "map_property", EmitDefaultValue = false)] + [JsonPropertyName("map_property")] public Dictionary? MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// - [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] + [JsonPropertyName("map_of_map_property")] public Dictionary>? MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// - [DataMember(Name = "anytype_1", EmitDefaultValue = true)] + [JsonPropertyName("anytype_1")] public Object? Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_1")] public Object? MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_2")] public Object? MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_3")] public Dictionary? MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. - [DataMember(Name = "empty_map", EmitDefaultValue = false)] + [JsonPropertyName("empty_map")] public Object? EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// - [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_string")] public Dictionary? MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -132,21 +130,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as AdditionalPropertiesClass).AreEqual; } @@ -156,7 +145,7 @@ public override bool Equals(object input) /// /// Instance of AdditionalPropertiesClass to be compared /// Boolean - public bool Equals(AdditionalPropertiesClass input) + public bool Equals(AdditionalPropertiesClass? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs index fba745ea51d8..21aa789d3065 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,12 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,54 +29,39 @@ namespace Org.OpenAPITools.Model /// /// Animal /// - [DataContract(Name = "Animal")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] public partial class Animal : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Animal() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). + /// className (required) + /// color (default to "red") public Animal(string className, string? color = "red") { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); - } - this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? "red"; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for Animal and cannot be null."); + + ClassName = className; + Color = color; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets Color /// - [DataMember(Name = "color", EmitDefaultValue = false)] + [JsonPropertyName("color")] public string? Color { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -94,21 +78,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Animal).AreEqual; } @@ -118,7 +93,7 @@ public override bool Equals(object input) /// /// Instance of Animal to be compared /// Boolean - public bool Equals(Animal input) + public bool Equals(Animal? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs index f4cdba705069..8bde19180cb2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +29,44 @@ namespace Org.OpenAPITools.Model /// /// ApiResponse /// - [DataContract(Name = "ApiResponse")] public partial class ApiResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// code. - /// type. - /// message. + /// code + /// type + /// message public ApiResponse(int? code = default, string? type = default, string? message = default) { - this.Code = code; - this.Type = type; - this.Message = message; - this.AdditionalProperties = new Dictionary(); + Code = code; + Type = type; + Message = message; } /// /// Gets or Sets Code /// - [DataMember(Name = "code", EmitDefaultValue = false)] + [JsonPropertyName("code")] public int? Code { get; set; } /// /// Gets or Sets Type /// - [DataMember(Name = "type", EmitDefaultValue = false)] + [JsonPropertyName("type")] public string? Type { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name = "message", EmitDefaultValue = false)] + [JsonPropertyName("message")] public string? Message { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,21 +84,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ApiResponse).AreEqual; } @@ -110,7 +99,7 @@ public override bool Equals(object input) /// /// Instance of ApiResponse to be compared /// Boolean - public bool Equals(ApiResponse input) + public bool Equals(ApiResponse? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs index 345517cc2592..dadf5664d050 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +29,36 @@ namespace Org.OpenAPITools.Model /// /// Apple /// - [DataContract(Name = "apple")] public partial class Apple : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cultivar. - /// origin. + /// cultivar + /// origin public Apple(string? cultivar = default, string? origin = default) { - this.Cultivar = cultivar; - this.Origin = origin; - this.AdditionalProperties = new Dictionary(); + Cultivar = cultivar; + Origin = origin; } /// /// Gets or Sets Cultivar /// - [DataMember(Name = "cultivar", EmitDefaultValue = false)] + [JsonPropertyName("cultivar")] public string? Cultivar { get; set; } /// /// Gets or Sets Origin /// - [DataMember(Name = "origin", EmitDefaultValue = false)] + [JsonPropertyName("origin")] public string? Origin { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,21 +75,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Apple).AreEqual; } @@ -101,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of Apple to be compared /// Boolean - public bool Equals(Apple input) + public bool Equals(Apple? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs index 7cfaecc03f14..d323a03e068c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,39 +29,32 @@ namespace Org.OpenAPITools.Model /// /// AppleReq /// - [DataContract(Name = "appleReq")] public partial class AppleReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AppleReq() { } - /// - /// Initializes a new instance of the class. - /// - /// cultivar (required). - /// mealy. + /// cultivar (required) + /// mealy public AppleReq(string cultivar, bool? mealy = default) { - // to ensure "cultivar" is required (not null) - if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); - } - this.Cultivar = cultivar; - this.Mealy = mealy; + if (cultivar == null) + throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null."); + + Cultivar = cultivar; + Mealy = mealy; } /// /// Gets or Sets Cultivar /// - [DataMember(Name = "cultivar", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("cultivar")] public string Cultivar { get; set; } /// /// Gets or Sets Mealy /// - [DataMember(Name = "mealy", EmitDefaultValue = true)] + [JsonPropertyName("mealy")] public bool? Mealy { get; set; } /// @@ -78,21 +71,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as AppleReq).AreEqual; } @@ -102,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of AppleReq to be compared /// Boolean - public bool Equals(AppleReq input) + public bool Equals(AppleReq? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index f2ed6250a5f4..e284a52634b3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfArrayOfNumberOnly /// - [DataContract(Name = "ArrayOfArrayOfNumberOnly")] public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayArrayNumber. + /// arrayArrayNumber public ArrayOfArrayOfNumberOnly(List>? arrayArrayNumber = default) { - this.ArrayArrayNumber = arrayArrayNumber; - this.AdditionalProperties = new Dictionary(); + ArrayArrayNumber = arrayArrayNumber; } /// /// Gets or Sets ArrayArrayNumber /// - [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] + [JsonPropertyName("ArrayArrayNumber")] public List>? ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfArrayOfNumberOnly).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of ArrayOfArrayOfNumberOnly to be compared /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) + public bool Equals(ArrayOfArrayOfNumberOnly? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 0d9d0781d946..1670dcd31a3b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfNumberOnly /// - [DataContract(Name = "ArrayOfNumberOnly")] public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayNumber. + /// arrayNumber public ArrayOfNumberOnly(List? arrayNumber = default) { - this.ArrayNumber = arrayNumber; - this.AdditionalProperties = new Dictionary(); + ArrayNumber = arrayNumber; } /// /// Gets or Sets ArrayNumber /// - [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] + [JsonPropertyName("ArrayNumber")] public List? ArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfNumberOnly).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of ArrayOfNumberOnly to be compared /// Boolean - public bool Equals(ArrayOfNumberOnly input) + public bool Equals(ArrayOfNumberOnly? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs index 3831f2ecc87b..371238a32a63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +29,44 @@ namespace Org.OpenAPITools.Model /// /// ArrayTest /// - [DataContract(Name = "ArrayTest")] public partial class ArrayTest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. + /// arrayOfString + /// arrayArrayOfInteger + /// arrayArrayOfModel public ArrayTest(List? arrayOfString = default, List>? arrayArrayOfInteger = default, List>? arrayArrayOfModel = default) { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - this.AdditionalProperties = new Dictionary(); + ArrayOfString = arrayOfString; + ArrayArrayOfInteger = arrayArrayOfInteger; + ArrayArrayOfModel = arrayArrayOfModel; } /// /// Gets or Sets ArrayOfString /// - [DataMember(Name = "array_of_string", EmitDefaultValue = false)] + [JsonPropertyName("array_of_string")] public List? ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// - [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] + [JsonPropertyName("array_array_of_integer")] public List>? ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// - [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] + [JsonPropertyName("array_array_of_model")] public List>? ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,21 +84,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayTest).AreEqual; } @@ -110,7 +99,7 @@ public override bool Equals(object input) /// /// Instance of ArrayTest to be compared /// Boolean - public bool Equals(ArrayTest input) + public bool Equals(ArrayTest? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs index f1e62ce23956..d41ec32c1d8d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// Banana /// - [DataContract(Name = "banana")] public partial class Banana : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// lengthCm. + /// lengthCm public Banana(decimal? lengthCm = default) { - this.LengthCm = lengthCm; - this.AdditionalProperties = new Dictionary(); + LengthCm = lengthCm; } /// /// Gets or Sets LengthCm /// - [DataMember(Name = "lengthCm", EmitDefaultValue = false)] + [JsonPropertyName("lengthCm")] public decimal? LengthCm { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Banana).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of Banana to be compared /// Boolean - public bool Equals(Banana input) + public bool Equals(Banana? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs index 1c4f23aac56f..cd3eaea94838 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,35 +29,32 @@ namespace Org.OpenAPITools.Model /// /// BananaReq /// - [DataContract(Name = "bananaReq")] public partial class BananaReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected BananaReq() { } - /// - /// Initializes a new instance of the class. - /// - /// lengthCm (required). - /// sweet. + /// lengthCm (required) + /// sweet public BananaReq(decimal lengthCm, bool? sweet = default) { - this.LengthCm = lengthCm; - this.Sweet = sweet; + if (lengthCm == null) + throw new ArgumentNullException("lengthCm is a required property for BananaReq and cannot be null."); + + LengthCm = lengthCm; + Sweet = sweet; } /// /// Gets or Sets LengthCm /// - [DataMember(Name = "lengthCm", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("lengthCm")] public decimal LengthCm { get; set; } /// /// Gets or Sets Sweet /// - [DataMember(Name = "sweet", EmitDefaultValue = true)] + [JsonPropertyName("sweet")] public bool? Sweet { get; set; } /// @@ -74,21 +71,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as BananaReq).AreEqual; } @@ -98,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of BananaReq to be compared /// Boolean - public bool Equals(BananaReq input) + public bool Equals(BananaReq? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs index 0706a3e8196b..4f846443361b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +29,31 @@ namespace Org.OpenAPITools.Model /// /// BasquePig /// - [DataContract(Name = "BasquePig")] public partial class BasquePig : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected BasquePig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). + /// className (required) public BasquePig(string className) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); - } - this.ClassName = className; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for BasquePig and cannot be null."); + + ClassName = className; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,21 +69,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as BasquePig).AreEqual; } @@ -104,7 +84,7 @@ public override bool Equals(object input) /// /// Instance of BasquePig to be compared /// Boolean - public bool Equals(BasquePig input) + public bool Equals(BasquePig? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs index 2a49007bfbe5..2a52a362f696 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,71 +29,69 @@ namespace Org.OpenAPITools.Model /// /// Capitalization /// - [DataContract(Name = "Capitalization")] public partial class Capitalization : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . + /// smallCamel + /// capitalCamel + /// smallSnake + /// capitalSnake + /// sCAETHFlowPoints + /// Name of the pet public Capitalization(string? smallCamel = default, string? capitalCamel = default, string? smallSnake = default, string? capitalSnake = default, string? sCAETHFlowPoints = default, string? aTTNAME = default) { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - this.AdditionalProperties = new Dictionary(); + SmallCamel = smallCamel; + CapitalCamel = capitalCamel; + SmallSnake = smallSnake; + CapitalSnake = capitalSnake; + SCAETHFlowPoints = sCAETHFlowPoints; + ATT_NAME = aTTNAME; } /// /// Gets or Sets SmallCamel /// - [DataMember(Name = "smallCamel", EmitDefaultValue = false)] + [JsonPropertyName("smallCamel")] public string? SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// - [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] + [JsonPropertyName("CapitalCamel")] public string? CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// - [DataMember(Name = "small_Snake", EmitDefaultValue = false)] + [JsonPropertyName("small_Snake")] public string? SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// - [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] + [JsonPropertyName("Capital_Snake")] public string? CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// - [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] + [JsonPropertyName("SCA_ETH_Flow_Points")] public string? SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet - [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] + [JsonPropertyName("ATT_NAME")] public string? ATT_NAME { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,21 +112,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Capitalization).AreEqual; } @@ -138,7 +127,7 @@ public override bool Equals(object input) /// /// Instance of Capitalization to be compared /// Boolean - public bool Equals(Capitalization input) + public bool Equals(Capitalization? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs index 53ebf92552ec..b18b39a2c742 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,12 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,41 +29,30 @@ namespace Org.OpenAPITools.Model /// /// Cat /// - [DataContract(Name = "Cat")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - public partial class Cat : Animal, IEquatable, IValidatableObject + public partial class Cat : Animal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Cat() + /// + /// + /// className (required) + /// color (default to "red") + public Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string? color = "red") : base(className, color) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required) (default to "Cat"). - /// declawed. - /// color (default to "red"). - public Cat(string className = "Cat", bool? declawed = default, string? color = "red") : base(className, color) - { - this.Declawed = declawed; - this.AdditionalProperties = new Dictionary(); + Dictionary = dictionary; + CatAllOf = catAllOf; } /// - /// Gets or Sets Declawed + /// Gets or Sets Dictionary /// - [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool? Declawed { get; set; } + public Dictionary Dictionary { get; set; } /// - /// Gets or Sets additional properties + /// Gets or Sets CatAllOf /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public CatAllOf CatAllOf { get; set; } /// /// Returns the string presentation of the object @@ -75,27 +63,16 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Cat).AreEqual; } @@ -105,7 +82,7 @@ public override bool Equals(object input) /// /// Instance of Cat to be compared /// Boolean - public bool Equals(Cat input) + public bool Equals(Cat? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -119,38 +96,80 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type Cat + /// + public class CatJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Cat).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override Cat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader dictionaryReader = reader; + bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref dictionaryReader, options, out Dictionary? dictionary); + + Utf8JsonReader catAllOfReader = reader; + bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref catAllOfReader, options, out CatAllOf? catAllOf); + + string? className = default; + string? color = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + } + } } - yield break; + + return new Cat(dictionary, catAllOf, className, color); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs index 1f47a8e5439f..c397e1b6bc3b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// CatAllOf /// - [DataContract(Name = "Cat_allOf")] public partial class CatAllOf : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// declawed. + /// declawed public CatAllOf(bool? declawed = default) { - this.Declawed = declawed; - this.AdditionalProperties = new Dictionary(); + Declawed = declawed; } /// /// Gets or Sets Declawed /// - [DataMember(Name = "declawed", EmitDefaultValue = true)] + [JsonPropertyName("declawed")] public bool? Declawed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as CatAllOf).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of CatAllOf to be compared /// Boolean - public bool Equals(CatAllOf input) + public bool Equals(CatAllOf? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs index c9ed80eeb113..05300f8a0b78 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,50 +29,39 @@ namespace Org.OpenAPITools.Model /// /// Category /// - [DataContract(Name = "Category")] public partial class Category : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Category() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required) (default to "default-name"). - /// id. + /// name (required) (default to "default-name") + /// id public Category(string name = "default-name", long? id = default) { - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); - } - this.Name = name; - this.Id = id; - this.AdditionalProperties = new Dictionary(); + if (name == null) + throw new ArgumentNullException("name is a required property for Category and cannot be null."); + + Name = name; + Id = id; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long? Id { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -89,21 +78,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Category).AreEqual; } @@ -113,7 +93,7 @@ public override bool Equals(object input) /// /// Instance of Category to be compared /// Boolean - public bool Equals(Category input) + public bool Equals(Category? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs index 1fe9959c94d5..57c72e45da90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,12 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,61 +29,22 @@ namespace Org.OpenAPITools.Model /// /// ChildCat /// - [DataContract(Name = "ChildCat")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - public partial class ChildCat : ParentPet, IEquatable, IValidatableObject + public partial class ChildCat : ParentPet, IEquatable { - /// - /// Defines PetType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PetTypeEnum - { - /// - /// Enum ChildCat for value: ChildCat - /// - [EnumMember(Value = "ChildCat")] - ChildCat = 1 - - } - - - /// - /// Gets or Sets PetType - /// - [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] - public PetTypeEnum PetType { get; set; } /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ChildCat() + /// + /// petType (required) + public ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) { - this.AdditionalProperties = new Dictionary(); + ChildCatAllOf = childCatAllOf; } - /// - /// Initializes a new instance of the class. - /// - /// petType (required) (default to PetTypeEnum.ChildCat). - /// name. - public ChildCat(PetTypeEnum petType = PetTypeEnum.ChildCat, string? name = default) : base() - { - this.PetType = petType; - this.Name = name; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public string? Name { get; set; } /// - /// Gets or Sets additional properties + /// Gets or Sets ChildCatAllOf /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public ChildCatAllOf ChildCatAllOf { get; set; } /// /// Returns the string presentation of the object @@ -95,28 +55,16 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" PetType: ").Append(PetType).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCat).AreEqual; } @@ -126,7 +74,7 @@ public override bool Equals(object input) /// /// Instance of ChildCat to be compared /// Boolean - public bool Equals(ChildCat input) + public bool Equals(ChildCat? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -140,42 +88,73 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type ChildCat + /// + public class ChildCatJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ChildCat).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override ChildCat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader childCatAllOfReader = reader; + bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref childCatAllOfReader, options, out ChildCatAllOf? childCatAllOf); + + string? petType = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + } + } } - yield break; + + return new ChildCat(childCatAllOf, petType); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index ad1636c77538..194c0fc96eff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +29,22 @@ namespace Org.OpenAPITools.Model /// /// ChildCatAllOf /// - [DataContract(Name = "ChildCat_allOf")] public partial class ChildCatAllOf : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// name + /// petType (default to PetTypeEnum.ChildCat) + public ChildCatAllOf(string? name = default, PetTypeEnum? petType = PetTypeEnum.ChildCat) + { + Name = name; + PetType = petType; + } + /// /// Defines PetType /// - [JsonConverter(typeof(StringEnumConverter))] public enum PetTypeEnum { /// @@ -46,35 +55,23 @@ public enum PetTypeEnum } - /// /// Gets or Sets PetType /// - [DataMember(Name = "pet_type", EmitDefaultValue = false)] + [JsonPropertyName("pet_type")] public PetTypeEnum? PetType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// name. - /// petType (default to PetTypeEnum.ChildCat). - public ChildCatAllOf(string? name = default, PetTypeEnum? petType = PetTypeEnum.ChildCat) - { - this.Name = name; - this.PetType = petType; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string? Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -91,21 +88,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCatAllOf).AreEqual; } @@ -115,7 +103,7 @@ public override bool Equals(object input) /// /// Instance of ChildCatAllOf to be compared /// Boolean - public bool Equals(ChildCatAllOf input) + public bool Equals(ChildCatAllOf? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs index 8aa42b57ddbb..5e9b01f14a3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model with \"_class\" property /// - [DataContract(Name = "ClassModel")] public partial class ClassModel : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _class. + /// _class public ClassModel(string? _class = default) { - this.Class = _class; - this.AdditionalProperties = new Dictionary(); + Class = _class; } /// /// Gets or Sets Class /// - [DataMember(Name = "_class", EmitDefaultValue = false)] + [JsonPropertyName("_class")] public string? Class { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ClassModel).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of ClassModel to be compared /// Boolean - public bool Equals(ClassModel input) + public bool Equals(ClassModel? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index ab75994ddf5c..1a3fe55f3c54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +29,34 @@ namespace Org.OpenAPITools.Model /// /// ComplexQuadrilateral /// - [DataContract(Name = "ComplexQuadrilateral")] public partial class ComplexQuadrilateral : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ComplexQuadrilateral() + /// + /// + public ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// quadrilateralType (required). - public ComplexQuadrilateral(string shapeType, string quadrilateralType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + QuadrilateralInterface = quadrilateralInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets QuadrilateralType + /// Gets or Sets QuadrilateralInterface /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] - public string QuadrilateralType { get; set; } + public QuadrilateralInterface QuadrilateralInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,28 +66,17 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ComplexQuadrilateral {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ComplexQuadrilateral).AreEqual; } @@ -117,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of ComplexQuadrilateral to be compared /// Boolean - public bool Equals(ComplexQuadrilateral input) + public bool Equals(ComplexQuadrilateral? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -131,14 +100,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +119,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type ComplexQuadrilateral + /// + public class ComplexQuadrilateralJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ComplexQuadrilateral).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ComplexQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + + Utf8JsonReader quadrilateralInterfaceReader = reader; + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface? quadrilateralInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new ComplexQuadrilateral(shapeInterface, quadrilateralInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs index 7314bf3a2140..9be9ffbc898c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +29,31 @@ namespace Org.OpenAPITools.Model /// /// DanishPig /// - [DataContract(Name = "DanishPig")] public partial class DanishPig : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DanishPig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). + /// className (required) public DanishPig(string className) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); - } - this.ClassName = className; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for DanishPig and cannot be null."); + + ClassName = className; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,21 +69,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as DanishPig).AreEqual; } @@ -104,7 +84,7 @@ public override bool Equals(object input) /// /// Instance of DanishPig to be compared /// Boolean - public bool Equals(DanishPig input) + public bool Equals(DanishPig? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 191d7f38d247..e5ec23562d98 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// DeprecatedObject /// - [DataContract(Name = "DeprecatedObject")] public partial class DeprecatedObject : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name. + /// name public DeprecatedObject(string? name = default) { - this.Name = name; - this.AdditionalProperties = new Dictionary(); + Name = name; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string? Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as DeprecatedObject).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of DeprecatedObject to be compared /// Boolean - public bool Equals(DeprecatedObject input) + public bool Equals(DeprecatedObject? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs index 3714017fe63e..7ce3f26883bc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,12 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,41 +29,23 @@ namespace Org.OpenAPITools.Model /// /// Dog /// - [DataContract(Name = "Dog")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - public partial class Dog : Animal, IEquatable, IValidatableObject + public partial class Dog : Animal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Dog() + /// + /// className (required) + /// color (default to "red") + public Dog(DogAllOf dogAllOf, string className, string? color = "red") : base(className, color) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required) (default to "Dog"). - /// breed. - /// color (default to "red"). - public Dog(string className = "Dog", string? breed = default, string? color = "red") : base(className, color) - { - this.Breed = breed; - this.AdditionalProperties = new Dictionary(); + DogAllOf = dogAllOf; } /// - /// Gets or Sets Breed + /// Gets or Sets DogAllOf /// - [DataMember(Name = "breed", EmitDefaultValue = false)] - public string? Breed { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public DogAllOf DogAllOf { get; set; } /// /// Returns the string presentation of the object @@ -75,27 +56,16 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Dog).AreEqual; } @@ -105,7 +75,7 @@ public override bool Equals(object input) /// /// Instance of Dog to be compared /// Boolean - public bool Equals(Dog input) + public bool Equals(Dog? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -119,41 +89,77 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) - { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type Dog + /// + public class DogJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Dog).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override Dog Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader dogAllOfReader = reader; + bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref dogAllOfReader, options, out DogAllOf? dogAllOf); + + string? className = default; + string? color = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + } + } } - yield break; + + return new Dog(dogAllOf, className, color); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs index 134ad1d40dba..f6a94b443ea9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// DogAllOf /// - [DataContract(Name = "Dog_allOf")] public partial class DogAllOf : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// breed. + /// breed public DogAllOf(string? breed = default) { - this.Breed = breed; - this.AdditionalProperties = new Dictionary(); + Breed = breed; } /// /// Gets or Sets Breed /// - [DataMember(Name = "breed", EmitDefaultValue = false)] + [JsonPropertyName("breed")] public string? Breed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as DogAllOf).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of DogAllOf to be compared /// Boolean - public bool Equals(DogAllOf input) + public bool Equals(DogAllOf? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs index 14558ee5aea5..b5d4b43be10a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +29,45 @@ namespace Org.OpenAPITools.Model /// /// Drawing /// - [DataContract(Name = "Drawing")] public partial class Drawing : Dictionary, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mainShape. - /// shapeOrNull. - /// nullableShape. - /// shapes. + /// mainShape + /// shapeOrNull + /// nullableShape + /// shapes public Drawing(Shape? mainShape = default, ShapeOrNull? shapeOrNull = default, NullableShape? nullableShape = default, List? shapes = default) : base() { - this.MainShape = mainShape; - this.ShapeOrNull = shapeOrNull; - this.NullableShape = nullableShape; - this.Shapes = shapes; + MainShape = mainShape; + ShapeOrNull = shapeOrNull; + NullableShape = nullableShape; + Shapes = shapes; } /// /// Gets or Sets MainShape /// - [DataMember(Name = "mainShape", EmitDefaultValue = false)] + [JsonPropertyName("mainShape")] public Shape? MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// - [DataMember(Name = "shapeOrNull", EmitDefaultValue = false)] + [JsonPropertyName("shapeOrNull")] public ShapeOrNull? ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// - [DataMember(Name = "nullableShape", EmitDefaultValue = true)] + [JsonPropertyName("nullableShape")] public NullableShape? NullableShape { get; set; } /// /// Gets or Sets Shapes /// - [DataMember(Name = "shapes", EmitDefaultValue = false)] + [JsonPropertyName("shapes")] public List? Shapes { get; set; } /// @@ -88,21 +87,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Drawing).AreEqual; } @@ -112,7 +102,7 @@ public override bool Equals(object input) /// /// Instance of Drawing to be compared /// Boolean - public bool Equals(Drawing input) + public bool Equals(Drawing? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs index f651effcbab7..97e3a3b9649a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +29,22 @@ namespace Org.OpenAPITools.Model /// /// EnumArrays /// - [DataContract(Name = "EnumArrays")] public partial class EnumArrays : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// justSymbol + /// arrayEnum + public EnumArrays(JustSymbolEnum? justSymbol = default, List? arrayEnum = default) + { + JustSymbol = justSymbol; + ArrayEnum = arrayEnum; + } + /// /// Defines JustSymbol /// - [JsonConverter(typeof(StringEnumConverter))] public enum JustSymbolEnum { /// @@ -52,16 +61,15 @@ public enum JustSymbolEnum } - /// /// Gets or Sets JustSymbol /// - [DataMember(Name = "just_symbol", EmitDefaultValue = false)] + [JsonPropertyName("just_symbol")] public JustSymbolEnum? JustSymbol { get; set; } + /// /// Defines ArrayEnum /// - [JsonConverter(typeof(StringEnumConverter))] public enum ArrayEnumEnum { /// @@ -79,29 +87,17 @@ public enum ArrayEnumEnum } - /// /// Gets or Sets ArrayEnum /// - [DataMember(Name = "array_enum", EmitDefaultValue = false)] + [JsonPropertyName("array_enum")] public List? ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default, List? arrayEnum = default) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -118,21 +114,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumArrays).AreEqual; } @@ -142,7 +129,7 @@ public override bool Equals(object input) /// /// Instance of EnumArrays to be compared /// Boolean - public bool Equals(EnumArrays input) + public bool Equals(EnumArrays? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs index 48b3d7d0e7e0..9aa3badce215 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +29,6 @@ namespace Org.OpenAPITools.Model /// /// Defines EnumClass /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumClass { /// @@ -51,5 +50,4 @@ public enum EnumClass Xyz = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs index bde4245a8022..c8f0a683357a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +29,39 @@ namespace Org.OpenAPITools.Model /// /// EnumTest /// - [DataContract(Name = "Enum_Test")] public partial class EnumTest : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// enumStringRequired (required) + /// enumString + /// enumInteger + /// enumIntegerOnly + /// enumNumber + /// outerEnum + /// outerEnumInteger + /// outerEnumDefaultValue + /// outerEnumIntegerDefaultValue + public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum? enumString = default, EnumIntegerEnum? enumInteger = default, EnumIntegerOnlyEnum? enumIntegerOnly = default, EnumNumberEnum? enumNumber = default, OuterEnum? outerEnum = default, OuterEnumInteger? outerEnumInteger = default, OuterEnumDefaultValue? outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default) + { + if (enumStringRequired == null) + throw new ArgumentNullException("enumStringRequired is a required property for EnumTest and cannot be null."); + + EnumStringRequired = enumStringRequired; + EnumString = enumString; + EnumInteger = enumInteger; + EnumIntegerOnly = enumIntegerOnly; + EnumNumber = enumNumber; + OuterEnum = outerEnum; + OuterEnumInteger = outerEnumInteger; + OuterEnumDefaultValue = outerEnumDefaultValue; + OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + } + /// /// Defines EnumStringRequired /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumStringRequiredEnum { /// @@ -58,16 +84,15 @@ public enum EnumStringRequiredEnum } - /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name = "enum_string_required", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("enum_string_required")] public EnumStringRequiredEnum EnumStringRequired { get; set; } + /// /// Defines EnumString /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumStringEnum { /// @@ -90,12 +115,12 @@ public enum EnumStringEnum } - /// /// Gets or Sets EnumString /// - [DataMember(Name = "enum_string", EmitDefaultValue = false)] + [JsonPropertyName("enum_string")] public EnumStringEnum? EnumString { get; set; } + /// /// Defines EnumInteger /// @@ -113,12 +138,12 @@ public enum EnumIntegerEnum } - /// /// Gets or Sets EnumInteger /// - [DataMember(Name = "enum_integer", EmitDefaultValue = false)] + [JsonPropertyName("enum_integer")] public EnumIntegerEnum? EnumInteger { get; set; } + /// /// Defines EnumIntegerOnly /// @@ -136,16 +161,15 @@ public enum EnumIntegerOnlyEnum } - /// /// Gets or Sets EnumIntegerOnly /// - [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] + [JsonPropertyName("enum_integer_only")] public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + /// /// Defines EnumNumber /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumNumberEnum { /// @@ -162,75 +186,41 @@ public enum EnumNumberEnum } - /// /// Gets or Sets EnumNumber /// - [DataMember(Name = "enum_number", EmitDefaultValue = false)] + [JsonPropertyName("enum_number")] public EnumNumberEnum? EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// - [DataMember(Name = "outerEnum", EmitDefaultValue = true)] + [JsonPropertyName("outerEnum")] public OuterEnum? OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// - [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumInteger")] public OuterEnumInteger? OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// - [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumDefaultValue")] public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// - [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumIntegerDefaultValue")] public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// enumStringRequired (required). - /// enumString. - /// enumInteger. - /// enumIntegerOnly. - /// enumNumber. - /// outerEnum. - /// outerEnumInteger. - /// outerEnumDefaultValue. - /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum? enumString = default, EnumIntegerEnum? enumInteger = default, EnumIntegerOnlyEnum? enumIntegerOnly = default, EnumNumberEnum? enumNumber = default, OuterEnum? outerEnum = default, OuterEnumInteger? outerEnumInteger = default, OuterEnumDefaultValue? outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default) - { - this.EnumStringRequired = enumStringRequired; - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumIntegerOnly = enumIntegerOnly; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - this.OuterEnumInteger = outerEnumInteger; - this.OuterEnumDefaultValue = outerEnumDefaultValue; - this.OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -254,21 +244,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumTest).AreEqual; } @@ -278,7 +259,7 @@ public override bool Equals(object input) /// /// Instance of EnumTest to be compared /// Boolean - public bool Equals(EnumTest input) + public bool Equals(EnumTest? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 43e72bd635aa..8a4946d99b85 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +29,34 @@ namespace Org.OpenAPITools.Model /// /// EquilateralTriangle /// - [DataContract(Name = "EquilateralTriangle")] public partial class EquilateralTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected EquilateralTriangle() + /// + /// + public EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public EquilateralTriangle(string shapeType, string triangleType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,28 +66,17 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EquilateralTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as EquilateralTriangle).AreEqual; } @@ -117,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of EquilateralTriangle to be compared /// Boolean - public bool Equals(EquilateralTriangle input) + public bool Equals(EquilateralTriangle? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -131,14 +100,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +119,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type EquilateralTriangle + /// + public class EquilateralTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(EquilateralTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EquilateralTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface? triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new EquilateralTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs index b3c3263ba5b1..2ae90b249a2e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,31 +29,29 @@ namespace Org.OpenAPITools.Model /// /// Must be named `File` for test. /// - [DataContract(Name = "File")] public partial class File : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Test capitalization. + /// Test capitalization public File(string? sourceURI = default) { - this.SourceURI = sourceURI; - this.AdditionalProperties = new Dictionary(); + SourceURI = sourceURI; } /// /// Test capitalization /// /// Test capitalization - [DataMember(Name = "sourceURI", EmitDefaultValue = false)] + [JsonPropertyName("sourceURI")] public string? SourceURI { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,21 +67,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as File).AreEqual; } @@ -93,7 +82,7 @@ public override bool Equals(object input) /// /// Instance of File to be compared /// Boolean - public bool Equals(File input) + public bool Equals(File? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 06920e9adf69..26c1e83b07a0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +29,36 @@ namespace Org.OpenAPITools.Model /// /// FileSchemaTestClass /// - [DataContract(Name = "FileSchemaTestClass")] public partial class FileSchemaTestClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// file. - /// files. + /// file + /// files public FileSchemaTestClass(File? file = default, List? files = default) { - this.File = file; - this.Files = files; - this.AdditionalProperties = new Dictionary(); + File = file; + Files = files; } /// /// Gets or Sets File /// - [DataMember(Name = "file", EmitDefaultValue = false)] + [JsonPropertyName("file")] public File? File { get; set; } /// /// Gets or Sets Files /// - [DataMember(Name = "files", EmitDefaultValue = false)] + [JsonPropertyName("files")] public List? Files { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,21 +75,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as FileSchemaTestClass).AreEqual; } @@ -101,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of FileSchemaTestClass to be compared /// Boolean - public bool Equals(FileSchemaTestClass input) + public bool Equals(FileSchemaTestClass? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs index eefb6ba98611..4997e8d3bb7f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,31 +29,28 @@ namespace Org.OpenAPITools.Model /// /// Foo /// - [DataContract(Name = "Foo")] public partial class Foo : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bar (default to "bar"). + /// bar (default to "bar") public Foo(string? bar = "bar") { - // use default value if no "bar" provided - this.Bar = bar ?? "bar"; - this.AdditionalProperties = new Dictionary(); + Bar = bar; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string? Bar { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Foo).AreEqual; } @@ -93,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of Foo to be compared /// Boolean - public bool Equals(Foo input) + public bool Equals(Foo? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs index 8bd1caec56ac..e3fc4c55e839 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,169 +29,162 @@ namespace Org.OpenAPITools.Model /// /// FormatTest /// - [DataContract(Name = "format_test")] public partial class FormatTest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected FormatTest() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// number (required). - /// _byte (required). - /// date (required). - /// password (required). - /// integer. - /// int32. - /// int64. - /// _float. - /// _double. - /// _decimal. - /// _string. - /// binary. - /// dateTime. - /// uuid. - /// A string that is a 10 digit number. Can have leading zeros.. - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. + /// number (required) + /// _byte (required) + /// date (required) + /// password (required) + /// integer + /// int32 + /// int64 + /// _float + /// _double + /// _decimal + /// _string + /// binary + /// dateTime + /// uuid + /// A string that is a 10 digit number. Can have leading zeros. + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int? integer = default, int? int32 = default, long? int64 = default, float? _float = default, double? _double = default, decimal? _decimal = default, string? _string = default, System.IO.Stream? binary = default, DateTime? dateTime = default, Guid? uuid = default, string? patternWithDigits = default, string? patternWithDigitsAndDelimiter = default) { - this.Number = number; - // to ensure "_byte" is required (not null) - if (_byte == null) { - throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); - } - this.Byte = _byte; - this.Date = date; - // to ensure "password" is required (not null) - if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); - } - this.Password = password; - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.Decimal = _decimal; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.PatternWithDigits = patternWithDigits; - this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - this.AdditionalProperties = new Dictionary(); + if (number == null) + throw new ArgumentNullException("number is a required property for FormatTest and cannot be null."); + + if (_byte == null) + throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null."); + + if (date == null) + throw new ArgumentNullException("date is a required property for FormatTest and cannot be null."); + + if (password == null) + throw new ArgumentNullException("password is a required property for FormatTest and cannot be null."); + + Number = number; + Byte = _byte; + Date = date; + Password = password; + Integer = integer; + Int32 = int32; + Int64 = int64; + Float = _float; + Double = _double; + Decimal = _decimal; + String = _string; + Binary = binary; + DateTime = dateTime; + Uuid = uuid; + PatternWithDigits = patternWithDigits; + PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } /// /// Gets or Sets Number /// - [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("number")] public decimal Number { get; set; } /// /// Gets or Sets Byte /// - [DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("byte")] public byte[] Byte { get; set; } /// /// Gets or Sets Date /// - [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] + [JsonPropertyName("date")] public DateTime Date { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("password")] public string Password { get; set; } /// /// Gets or Sets Integer /// - [DataMember(Name = "integer", EmitDefaultValue = false)] + [JsonPropertyName("integer")] public int? Integer { get; set; } /// /// Gets or Sets Int32 /// - [DataMember(Name = "int32", EmitDefaultValue = false)] + [JsonPropertyName("int32")] public int? Int32 { get; set; } /// /// Gets or Sets Int64 /// - [DataMember(Name = "int64", EmitDefaultValue = false)] + [JsonPropertyName("int64")] public long? Int64 { get; set; } /// /// Gets or Sets Float /// - [DataMember(Name = "float", EmitDefaultValue = false)] + [JsonPropertyName("float")] public float? Float { get; set; } /// /// Gets or Sets Double /// - [DataMember(Name = "double", EmitDefaultValue = false)] + [JsonPropertyName("double")] public double? Double { get; set; } /// /// Gets or Sets Decimal /// - [DataMember(Name = "decimal", EmitDefaultValue = false)] + [JsonPropertyName("decimal")] public decimal? Decimal { get; set; } /// /// Gets or Sets String /// - [DataMember(Name = "string", EmitDefaultValue = false)] + [JsonPropertyName("string")] public string? String { get; set; } /// /// Gets or Sets Binary /// - [DataMember(Name = "binary", EmitDefaultValue = false)] + [JsonPropertyName("binary")] public System.IO.Stream? Binary { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name = "dateTime", EmitDefaultValue = false)] + [JsonPropertyName("dateTime")] public DateTime? DateTime { get; set; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public Guid? Uuid { get; set; } /// /// A string that is a 10 digit number. Can have leading zeros. /// /// A string that is a 10 digit number. Can have leading zeros. - [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] + [JsonPropertyName("pattern_with_digits")] public string? PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] + [JsonPropertyName("pattern_with_digits_and_delimiter")] public string? PatternWithDigitsAndDelimiter { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -222,21 +215,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as FormatTest).AreEqual; } @@ -246,7 +230,7 @@ public override bool Equals(object input) /// /// Instance of FormatTest to be compared /// Boolean - public bool Equals(FormatTest input) + public bool Equals(FormatTest? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs index 726b1e8f72e7..4e173ba6d517 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,95 +19,55 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Fruit /// - [JsonConverter(typeof(FruitJsonConverter))] - [DataContract(Name = "fruit")] - public partial class Fruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Fruit : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Apple. - public Fruit(Apple actualInstance) + /// + /// color + public Fruit(Apple? apple, string? color = default) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Apple = apple; + Color = color; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Banana. - public Fruit(Banana actualInstance) + /// + /// color + public Fruit(Banana banana, string? color = default) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Banana = banana; + Color = color; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Apple /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Apple)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Banana)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); - } - } - } + public Apple? Apple { get; set; } /// - /// Get the actual instance of `Apple`. If the actual instance is not `Apple`, - /// the InvalidClassException will be thrown + /// Gets or Sets Banana /// - /// An instance of Apple - public Apple GetApple() - { - return (Apple)this.ActualInstance; - } + public Banana Banana { get; set; } /// - /// Get the actual instance of `Banana`. If the actual instance is not `Banana`, - /// the InvalidClassException will be thrown + /// Gets or Sets Color /// - /// An instance of Banana - public Banana GetBanana() - { - return (Banana)this.ActualInstance; - } + [JsonPropertyName("color")] + public string? Color { get; set; } /// /// Returns the string presentation of the object @@ -113,97 +75,19 @@ public Banana GetBanana() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Fruit {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Fruit.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Fruit - /// - /// JSON string - /// An instance of Fruit - public static Fruit FromJson(string jsonString) - { - Fruit newFruit = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newFruit; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Apple).GetProperty("AdditionalProperties") == null) - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); - } - else - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Apple"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Banana).GetProperty("AdditionalProperties") == null) - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); - } - else - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Banana"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newFruit; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Fruit).AreEqual; } @@ -213,7 +97,7 @@ public override bool Equals(object input) /// /// Instance of Fruit to be compared /// Boolean - public bool Equals(Fruit input) + public bool Equals(Fruit? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -227,8 +111,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.Color != null) + { + hashCode = (hashCode * 59) + this.Color.GetHashCode(); + } return hashCode; } } @@ -238,54 +124,82 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Fruit + /// A Json converter for type Fruit /// - public class FruitJsonConverter : JsonConverter + public class FruitJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Fruit).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Fruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReader = reader; + bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple? apple); + + Utf8JsonReader bananaReader = reader; + bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana? banana); + + string? color = default; + + while (reader.Read()) { - return Fruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "color": + color = reader.GetString(); + break; + } + } } - return null; + + if (appleDeserialized) + return new Fruit(apple, color); + + if (bananaDeserialized) + return new Fruit(banana, color); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs index 548da490def0..98f30ed1e7d7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,104 +19,45 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// FruitReq /// - [JsonConverter(typeof(FruitReqJsonConverter))] - [DataContract(Name = "fruitReq")] - public partial class FruitReq : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class FruitReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public FruitReq() + /// + public FruitReq(AppleReq appleReq) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + AppleReq = appleReq; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of AppleReq. - public FruitReq(AppleReq actualInstance) + /// + public FruitReq(BananaReq bananaReq) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + BananaReq = bananaReq; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets AppleReq /// - /// An instance of BananaReq. - public FruitReq(BananaReq actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public AppleReq AppleReq { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets BananaReq /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AppleReq)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BananaReq)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AppleReq, BananaReq"); - } - } - } - - /// - /// Get the actual instance of `AppleReq`. If the actual instance is not `AppleReq`, - /// the InvalidClassException will be thrown - /// - /// An instance of AppleReq - public AppleReq GetAppleReq() - { - return (AppleReq)this.ActualInstance; - } - - /// - /// Get the actual instance of `BananaReq`. If the actual instance is not `BananaReq`, - /// the InvalidClassException will be thrown - /// - /// An instance of BananaReq - public BananaReq GetBananaReq() - { - return (BananaReq)this.ActualInstance; - } + public BananaReq BananaReq { get; set; } /// /// Returns the string presentation of the object @@ -122,97 +65,18 @@ public BananaReq GetBananaReq() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FruitReq {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, FruitReq.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of FruitReq - /// - /// JSON string - /// An instance of FruitReq - public static FruitReq FromJson(string jsonString) - { - FruitReq newFruitReq = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newFruitReq; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(AppleReq).GetProperty("AdditionalProperties") == null) - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); - } - else - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("AppleReq"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into AppleReq: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(BananaReq).GetProperty("AdditionalProperties") == null) - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); - } - else - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("BananaReq"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into BananaReq: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newFruitReq; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as FruitReq).AreEqual; } @@ -222,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of FruitReq to be compared /// Boolean - public bool Equals(FruitReq input) + public bool Equals(FruitReq? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -236,8 +100,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); return hashCode; } } @@ -247,54 +109,78 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for FruitReq + /// A Json converter for type FruitReq /// - public class FruitReqJsonConverter : JsonConverter + public class FruitReqJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(FruitReq).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override FruitReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReqReader = reader; + bool appleReqDeserialized = Client.ClientUtils.TryDeserialize(ref appleReqReader, options, out AppleReq? appleReq); + + Utf8JsonReader bananaReqReader = reader; + bool bananaReqDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReqReader, options, out BananaReq? bananaReq); + + + while (reader.Read()) { - return FruitReq.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (appleReqDeserialized) + return new FruitReq(appleReq); + + if (bananaReqDeserialized) + return new FruitReq(bananaReq); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs index bd8f4435c92f..bdb883115d6b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,82 +29,36 @@ namespace Org.OpenAPITools.Model /// /// GmFruit /// - [JsonConverter(typeof(GmFruitJsonConverter))] - [DataContract(Name = "gmFruit")] - public partial class GmFruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class GmFruit : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Apple. - public GmFruit(Apple actualInstance) + /// + /// + /// color + public GmFruit(Apple? apple, Banana banana, string? color = default) { - this.IsNullable = false; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Apple = Apple; + Banana = Banana; + Color = color; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Apple /// - /// An instance of Banana. - public GmFruit(Banana actualInstance) - { - this.IsNullable = false; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Apple)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Banana)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); - } - } - } + public Apple? Apple { get; set; } /// - /// Get the actual instance of `Apple`. If the actual instance is not `Apple`, - /// the InvalidClassException will be thrown + /// Gets or Sets Banana /// - /// An instance of Apple - public Apple GetApple() - { - return (Apple)this.ActualInstance; - } + public Banana Banana { get; set; } /// - /// Get the actual instance of `Banana`. If the actual instance is not `Banana`, - /// the InvalidClassException will be thrown + /// Gets or Sets Color /// - /// An instance of Banana - public Banana GetBanana() - { - return (Banana)this.ActualInstance; - } + [JsonPropertyName("color")] + public string? Color { get; set; } /// /// Returns the string presentation of the object @@ -112,70 +66,19 @@ public Banana GetBanana() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GmFruit {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of GmFruit - /// - /// JSON string - /// An instance of GmFruit - public static GmFruit FromJson(string jsonString) - { - GmFruit newGmFruit = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newGmFruit; - } - - try - { - newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); - // deserialization is considered successful at this point if no exception has been thrown. - return newGmFruit; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); - } - - try - { - newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); - // deserialization is considered successful at this point if no exception has been thrown. - return newGmFruit; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); - } - - // no match found, throw an exception - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as GmFruit).AreEqual; } @@ -185,7 +88,7 @@ public override bool Equals(object input) /// /// Instance of GmFruit to be compared /// Boolean - public bool Equals(GmFruit input) + public bool Equals(GmFruit? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -199,8 +102,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.Color != null) + { + hashCode = (hashCode * 59) + this.Color.GetHashCode(); + } return hashCode; } } @@ -210,54 +115,76 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for GmFruit + /// A Json converter for type GmFruit /// - public class GmFruitJsonConverter : JsonConverter + public class GmFruitJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(GmFruit).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override GmFruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReader = reader; + bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple? apple); + + Utf8JsonReader bananaReader = reader; + bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana? banana); + + string? color = default; + + while (reader.Read()) { - return GmFruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "color": + color = reader.GetString(); + break; + } + } } - return null; + + return new GmFruit(apple, banana, color); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 24b3df864e19..ba90bb468720 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,12 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,45 +29,31 @@ namespace Org.OpenAPITools.Model /// /// GrandparentAnimal /// - [DataContract(Name = "GrandparentAnimal")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] public partial class GrandparentAnimal : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected GrandparentAnimal() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// petType (required). + /// petType (required) public GrandparentAnimal(string petType) { - // to ensure "petType" is required (not null) - if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); - } - this.PetType = petType; - this.AdditionalProperties = new Dictionary(); + if (petType == null) + throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null."); + + PetType = petType; } /// /// Gets or Sets PetType /// - [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("pet_type")] public string PetType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -84,21 +69,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as GrandparentAnimal).AreEqual; } @@ -108,7 +84,7 @@ public override bool Equals(object input) /// /// Instance of GrandparentAnimal to be compared /// Boolean - public bool Equals(GrandparentAnimal input) + public bool Equals(GrandparentAnimal? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 76c03db21736..ae81256f8256 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,51 +29,36 @@ namespace Org.OpenAPITools.Model /// /// HasOnlyReadOnly /// - [DataContract(Name = "hasOnlyReadOnly")] public partial class HasOnlyReadOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() + /// bar + /// foo + public HasOnlyReadOnly(string? bar = default, string? foo = default) { - this.AdditionalProperties = new Dictionary(); + Bar = bar; + Foo = foo; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string? Bar { get; private set; } - /// - /// Returns false as Bar should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBar() - { - return false; - } /// /// Gets or Sets Foo /// - [DataMember(Name = "foo", EmitDefaultValue = false)] + [JsonPropertyName("foo")] public string? Foo { get; private set; } - /// - /// Returns false as Foo should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeFoo() - { - return false; - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -90,21 +75,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as HasOnlyReadOnly).AreEqual; } @@ -114,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of HasOnlyReadOnly to be compared /// Boolean - public bool Equals(HasOnlyReadOnly input) + public bool Equals(HasOnlyReadOnly? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 53fa8992f612..34a2909e1c39 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// - [DataContract(Name = "HealthCheckResult")] public partial class HealthCheckResult : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// nullableMessage. + /// nullableMessage public HealthCheckResult(string? nullableMessage = default) { - this.NullableMessage = nullableMessage; - this.AdditionalProperties = new Dictionary(); + NullableMessage = nullableMessage; } /// /// Gets or Sets NullableMessage /// - [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] + [JsonPropertyName("NullableMessage")] public string? NullableMessage { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as HealthCheckResult).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of HealthCheckResult to be compared /// Boolean - public bool Equals(HealthCheckResult input) + public bool Equals(HealthCheckResult? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/InlineResponseDefault.cs index 09d4dde78f74..7e5ed58fad2f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/InlineResponseDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/InlineResponseDefault.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// InlineResponseDefault /// - [DataContract(Name = "inline_response_default")] public partial class InlineResponseDefault : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _string. + /// _string public InlineResponseDefault(Foo? _string = default) { - this.String = _string; - this.AdditionalProperties = new Dictionary(); + String = _string; } /// /// Gets or Sets String /// - [DataMember(Name = "string", EmitDefaultValue = false)] + [JsonPropertyName("string")] public Foo? String { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as InlineResponseDefault).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of InlineResponseDefault to be compared /// Boolean - public bool Equals(InlineResponseDefault input) + public bool Equals(InlineResponseDefault? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index d5ff97d769cc..e207d964b035 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,44 +29,28 @@ namespace Org.OpenAPITools.Model /// /// IsoscelesTriangle /// - [DataContract(Name = "IsoscelesTriangle")] public partial class IsoscelesTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected IsoscelesTriangle() { } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public IsoscelesTriangle(string shapeType, string triangleType) + /// + /// + public IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); - } - this.TriangleType = triangleType; + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Returns the string presentation of the object @@ -76,27 +60,16 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IsoscelesTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as IsoscelesTriangle).AreEqual; } @@ -106,7 +79,7 @@ public override bool Equals(object input) /// /// Instance of IsoscelesTriangle to be compared /// Boolean - public bool Equals(IsoscelesTriangle input) + public bool Equals(IsoscelesTriangle? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -120,14 +93,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } return hashCode; } } @@ -143,4 +108,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type IsoscelesTriangle + /// + public class IsoscelesTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(IsoscelesTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override IsoscelesTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface? triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new IsoscelesTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs index c6b2042d9819..af537950c8dc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// List /// - [DataContract(Name = "List")] public partial class List : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _123list. + /// _123list public List(string? _123list = default) { - this._123List = _123list; - this.AdditionalProperties = new Dictionary(); + _123List = _123list; } /// /// Gets or Sets _123List /// - [DataMember(Name = "123-list", EmitDefaultValue = false)] + [JsonPropertyName("123-list")] public string? _123List { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as List).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of List to be compared /// Boolean - public bool Equals(List input) + public bool Equals(List? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs index 68ac31619921..f7ca7b5b6079 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,122 +19,65 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Mammal /// - [JsonConverter(typeof(MammalJsonConverter))] - [DataContract(Name = "mammal")] - public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Mammal : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// + public Mammal(Whale whale) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Whale = whale; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// + public Mammal(Zebra zebra) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Zebra = zebra; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// + public Mammal(Pig pig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Pig = pig; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Whale /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Pig)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Whale)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Zebra)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Pig, Whale, Zebra"); - } - } - } + public Whale Whale { get; set; } /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown + /// Gets or Sets Zebra /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } + public Zebra Zebra { get; set; } /// - /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, - /// the InvalidClassException will be thrown + /// Gets or Sets Pig /// - /// An instance of Whale - public Whale GetWhale() - { - return (Whale)this.ActualInstance; - } + public Pig Pig { get; set; } /// - /// Get the actual instance of `Zebra`. If the actual instance is not `Zebra`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Zebra - public Zebra GetZebra() - { - return (Zebra)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -140,117 +85,19 @@ public Zebra GetZebra() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Mammal {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Mammal.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Mammal - /// - /// JSON string - /// An instance of Mammal - public static Mammal FromJson(string jsonString) - { - Mammal newMammal = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newMammal; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Pig).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Pig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Pig: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Whale).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Whale"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Whale: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Zebra).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Zebra"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Zebra: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newMammal; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Mammal).AreEqual; } @@ -260,7 +107,7 @@ public override bool Equals(object input) /// /// Instance of Mammal to be compared /// Boolean - public bool Equals(Mammal input) + public bool Equals(Mammal? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -274,8 +121,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -285,54 +134,94 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Mammal + /// A Json converter for type Mammal /// - public class MammalJsonConverter : JsonConverter + public class MammalJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Mammal).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Mammal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader whaleReader = reader; + bool whaleDeserialized = Client.ClientUtils.TryDeserialize(ref whaleReader, options, out Whale? whale); + + Utf8JsonReader zebraReader = reader; + bool zebraDeserialized = Client.ClientUtils.TryDeserialize(ref zebraReader, options, out Zebra? zebra); + + Utf8JsonReader pigReader = reader; + bool pigDeserialized = Client.ClientUtils.TryDeserialize(ref pigReader, options, out Pig? pig); + + + while (reader.Read()) { - return Mammal.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (whaleDeserialized) + return new Mammal(whale); + + if (zebraDeserialized) + return new Mammal(zebra); + + if (pigDeserialized) + return new Mammal(pig); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs index 4b18ed169afb..5a01c4039519 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +29,26 @@ namespace Org.OpenAPITools.Model /// /// MapTest /// - [DataContract(Name = "MapTest")] public partial class MapTest : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// mapMapOfString + /// mapOfEnumString + /// directMap + /// indirectMap + public MapTest(Dictionary>? mapMapOfString = default, Dictionary? mapOfEnumString = default, Dictionary? directMap = default, Dictionary? indirectMap = default) + { + MapMapOfString = mapMapOfString; + MapOfEnumString = mapOfEnumString; + DirectMap = directMap; + IndirectMap = indirectMap; + } + /// /// Defines Inner /// - [JsonConverter(typeof(StringEnumConverter))] public enum InnerEnum { /// @@ -53,51 +66,35 @@ public enum InnerEnum } - /// /// Gets or Sets MapOfEnumString /// - [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] + [JsonPropertyName("map_of_enum_string")] public Dictionary? MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary>? mapMapOfString = default, Dictionary? mapOfEnumString = default, Dictionary? directMap = default, Dictionary? indirectMap = default) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets MapMapOfString /// - [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] + [JsonPropertyName("map_map_of_string")] public Dictionary>? MapMapOfString { get; set; } /// /// Gets or Sets DirectMap /// - [DataMember(Name = "direct_map", EmitDefaultValue = false)] + [JsonPropertyName("direct_map")] public Dictionary? DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// - [DataMember(Name = "indirect_map", EmitDefaultValue = false)] + [JsonPropertyName("indirect_map")] public Dictionary? IndirectMap { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -116,21 +113,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as MapTest).AreEqual; } @@ -140,7 +128,7 @@ public override bool Equals(object input) /// /// Instance of MapTest to be compared /// Boolean - public bool Equals(MapTest input) + public bool Equals(MapTest? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index c99949454686..a583c8f393c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +29,44 @@ namespace Org.OpenAPITools.Model /// /// MixedPropertiesAndAdditionalPropertiesClass /// - [DataContract(Name = "MixedPropertiesAndAdditionalPropertiesClass")] public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid. - /// dateTime. - /// map. + /// uuid + /// dateTime + /// map public MixedPropertiesAndAdditionalPropertiesClass(Guid? uuid = default, DateTime? dateTime = default, Dictionary? map = default) { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - this.AdditionalProperties = new Dictionary(); + Uuid = uuid; + DateTime = dateTime; + Map = map; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public Guid? Uuid { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name = "dateTime", EmitDefaultValue = false)] + [JsonPropertyName("dateTime")] public DateTime? DateTime { get; set; } /// /// Gets or Sets Map /// - [DataMember(Name = "map", EmitDefaultValue = false)] + [JsonPropertyName("map")] public Dictionary? Map { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,21 +84,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as MixedPropertiesAndAdditionalPropertiesClass).AreEqual; } @@ -110,7 +99,7 @@ public override bool Equals(object input) /// /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) + public bool Equals(MixedPropertiesAndAdditionalPropertiesClass? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs index c08ba66f533f..318ef8a27a9b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +29,36 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name starting with number /// - [DataContract(Name = "200_response")] public partial class Model200Response : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name. - /// _class. + /// name + /// _class public Model200Response(int? name = default, string? _class = default) { - this.Name = name; - this.Class = _class; - this.AdditionalProperties = new Dictionary(); + Name = name; + Class = _class; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public int? Name { get; set; } /// /// Gets or Sets Class /// - [DataMember(Name = "class", EmitDefaultValue = false)] + [JsonPropertyName("class")] public string? Class { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,21 +75,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Model200Response).AreEqual; } @@ -101,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of Model200Response to be compared /// Boolean - public bool Equals(Model200Response input) + public bool Equals(Model200Response? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs index 20b409cf263d..86364761194c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// ModelClient /// - [DataContract(Name = "_Client")] public partial class ModelClient : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _client. + /// _client public ModelClient(string? _client = default) { - this._Client = _client; - this.AdditionalProperties = new Dictionary(); + _Client = _client; } /// /// Gets or Sets _Client /// - [DataMember(Name = "client", EmitDefaultValue = false)] + [JsonPropertyName("client")] public string? _Client { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ModelClient).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of ModelClient to be compared /// Boolean - public bool Equals(ModelClient input) + public bool Equals(ModelClient? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs index d0705677db3f..3c560228d8d2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,74 +29,55 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name same as property name /// - [DataContract(Name = "Name")] public partial class Name : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Name() + /// nameProperty (required) + /// snakeCase + /// property + /// _123number + public Name(int nameProperty, int? snakeCase = default, string? property = default, int? _123number = default) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name, string? property = default) - { - this._Name = name; - this.Property = property; - this.AdditionalProperties = new Dictionary(); + if (nameProperty == null) + throw new ArgumentNullException("nameProperty is a required property for Name and cannot be null."); + + NameProperty = nameProperty; + SnakeCase = snakeCase; + Property = property; + _123Number = _123number; } /// - /// Gets or Sets _Name + /// Gets or Sets NameProperty /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public int _Name { get; set; } + [JsonPropertyName("name")] + public int NameProperty { get; set; } /// /// Gets or Sets SnakeCase /// - [DataMember(Name = "snake_case", EmitDefaultValue = false)] + [JsonPropertyName("snake_case")] public int? SnakeCase { get; private set; } - /// - /// Returns false as SnakeCase should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeSnakeCase() - { - return false; - } /// /// Gets or Sets Property /// - [DataMember(Name = "property", EmitDefaultValue = false)] + [JsonPropertyName("property")] public string? Property { get; set; } /// /// Gets or Sets _123Number /// - [DataMember(Name = "123Number", EmitDefaultValue = false)] + [JsonPropertyName("123Number")] public int? _123Number { get; private set; } - /// - /// Returns false as _123Number should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize_123Number() - { - return false; - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -106,7 +87,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); + sb.Append(" NameProperty: ").Append(NameProperty).Append("\n"); sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" Property: ").Append(Property).Append("\n"); sb.Append(" _123Number: ").Append(_123Number).Append("\n"); @@ -115,21 +96,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Name).AreEqual; } @@ -139,7 +111,7 @@ public override bool Equals(object input) /// /// Instance of Name to be compared /// Boolean - public bool Equals(Name input) + public bool Equals(Name? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -153,7 +125,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._Name.GetHashCode(); + hashCode = (hashCode * 59) + this.NameProperty.GetHashCode(); hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); if (this.Property != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs index c45e895dfc66..8b935f49408f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,111 +29,109 @@ namespace Org.OpenAPITools.Model /// /// NullableClass /// - [DataContract(Name = "NullableClass")] public partial class NullableClass : Dictionary, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// integerProp. - /// numberProp. - /// booleanProp. - /// stringProp. - /// dateProp. - /// datetimeProp. - /// arrayNullableProp. - /// arrayAndItemsNullableProp. - /// arrayItemsNullable. - /// objectNullableProp. - /// objectAndItemsNullableProp. - /// objectItemsNullable. + /// integerProp + /// numberProp + /// booleanProp + /// stringProp + /// dateProp + /// datetimeProp + /// arrayNullableProp + /// arrayAndItemsNullableProp + /// arrayItemsNullable + /// objectNullableProp + /// objectAndItemsNullableProp + /// objectItemsNullable public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string? stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List? arrayNullableProp = default, List? arrayAndItemsNullableProp = default, List? arrayItemsNullable = default, Dictionary? objectNullableProp = default, Dictionary? objectAndItemsNullableProp = default, Dictionary? objectItemsNullable = default) : base() { - this.IntegerProp = integerProp; - this.NumberProp = numberProp; - this.BooleanProp = booleanProp; - this.StringProp = stringProp; - this.DateProp = dateProp; - this.DatetimeProp = datetimeProp; - this.ArrayNullableProp = arrayNullableProp; - this.ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - this.ArrayItemsNullable = arrayItemsNullable; - this.ObjectNullableProp = objectNullableProp; - this.ObjectAndItemsNullableProp = objectAndItemsNullableProp; - this.ObjectItemsNullable = objectItemsNullable; + IntegerProp = integerProp; + NumberProp = numberProp; + BooleanProp = booleanProp; + StringProp = stringProp; + DateProp = dateProp; + DatetimeProp = datetimeProp; + ArrayNullableProp = arrayNullableProp; + ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + ArrayItemsNullable = arrayItemsNullable; + ObjectNullableProp = objectNullableProp; + ObjectAndItemsNullableProp = objectAndItemsNullableProp; + ObjectItemsNullable = objectItemsNullable; } /// /// Gets or Sets IntegerProp /// - [DataMember(Name = "integer_prop", EmitDefaultValue = true)] + [JsonPropertyName("integer_prop")] public int? IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// - [DataMember(Name = "number_prop", EmitDefaultValue = true)] + [JsonPropertyName("number_prop")] public decimal? NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// - [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] + [JsonPropertyName("boolean_prop")] public bool? BooleanProp { get; set; } /// /// Gets or Sets StringProp /// - [DataMember(Name = "string_prop", EmitDefaultValue = true)] + [JsonPropertyName("string_prop")] public string? StringProp { get; set; } /// /// Gets or Sets DateProp /// - [DataMember(Name = "date_prop", EmitDefaultValue = true)] - [JsonConverter(typeof(OpenAPIDateConverter))] + [JsonPropertyName("date_prop")] public DateTime? DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// - [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] + [JsonPropertyName("datetime_prop")] public DateTime? DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// - [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("array_nullable_prop")] public List? ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// - [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("array_and_items_nullable_prop")] public List? ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// - [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] + [JsonPropertyName("array_items_nullable")] public List? ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// - [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("object_nullable_prop")] public Dictionary? ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// - [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("object_and_items_nullable_prop")] public Dictionary? ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// - [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] + [JsonPropertyName("object_items_nullable")] public Dictionary? ObjectItemsNullable { get; set; } /// @@ -161,21 +159,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableClass).AreEqual; } @@ -185,7 +174,7 @@ public override bool Equals(object input) /// /// Instance of NullableClass to be compared /// Boolean - public bool Equals(NullableClass input) + public bool Equals(NullableClass? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs index 5dd73a56ef76..f5eb1bcd8ec0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,105 +19,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. /// - [JsonConverter(typeof(NullableShapeJsonConverter))] - [DataContract(Name = "NullableShape")] - public partial class NullableShape : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class NullableShape : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public NullableShape() + /// + public NullableShape(Triangle triangle) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + Triangle = triangle; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// + public NullableShape(Quadrilateral quadrilateral) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + Quadrilateral = quadrilateral; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Triangle /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Triangle Triangle { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets Quadrilateral /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -123,97 +71,19 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class NullableShape {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, NullableShape.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of NullableShape - /// - /// JSON string - /// An instance of NullableShape - public static NullableShape FromJson(string jsonString) - { - NullableShape newNullableShape = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newNullableShape; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); - } - else - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); - } - else - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newNullableShape; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableShape).AreEqual; } @@ -223,7 +93,7 @@ public override bool Equals(object input) /// /// Instance of NullableShape to be compared /// Boolean - public bool Equals(NullableShape input) + public bool Equals(NullableShape? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -237,8 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -248,54 +120,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for NullableShape + /// A Json converter for type NullableShape /// - public class NullableShapeJsonConverter : JsonConverter + public class NullableShapeJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(NullableShape).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override NullableShape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle? triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral? quadrilateral); + + + while (reader.Read()) { - return NullableShape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (triangleDeserialized) + return new NullableShape(triangle); + + if (quadrilateralDeserialized) + return new NullableShape(quadrilateral); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs index 06bd026938fe..6f413c0fca2d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// NumberOnly /// - [DataContract(Name = "NumberOnly")] public partial class NumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// justNumber. + /// justNumber public NumberOnly(decimal? justNumber = default) { - this.JustNumber = justNumber; - this.AdditionalProperties = new Dictionary(); + JustNumber = justNumber; } /// /// Gets or Sets JustNumber /// - [DataMember(Name = "JustNumber", EmitDefaultValue = false)] + [JsonPropertyName("JustNumber")] public decimal? JustNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,21 +66,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as NumberOnly).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of NumberOnly to be compared /// Boolean - public bool Equals(NumberOnly input) + public bool Equals(NumberOnly? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index ff6275890045..bcaaa473035f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,49 +29,47 @@ namespace Org.OpenAPITools.Model /// /// ObjectWithDeprecatedFields /// - [DataContract(Name = "ObjectWithDeprecatedFields")] public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid. - /// id. - /// deprecatedRef. - /// bars. + /// uuid + /// id + /// deprecatedRef + /// bars public ObjectWithDeprecatedFields(string? uuid = default, decimal? id = default, DeprecatedObject? deprecatedRef = default, List? bars = default) { - this.Uuid = uuid; - this.Id = id; - this.DeprecatedRef = deprecatedRef; - this.Bars = bars; - this.AdditionalProperties = new Dictionary(); + Uuid = uuid; + Id = id; + DeprecatedRef = deprecatedRef; + Bars = bars; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public string? Uuid { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] [Obsolete] public decimal? Id { get; set; } /// /// Gets or Sets DeprecatedRef /// - [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] + [JsonPropertyName("deprecatedRef")] [Obsolete] public DeprecatedObject? DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// - [DataMember(Name = "bars", EmitDefaultValue = false)] + [JsonPropertyName("bars")] [Obsolete] public List? Bars { get; set; } @@ -79,7 +77,7 @@ public ObjectWithDeprecatedFields(string? uuid = default, decimal? id = default, /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -98,21 +96,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ObjectWithDeprecatedFields).AreEqual; } @@ -122,7 +111,7 @@ public override bool Equals(object input) /// /// Instance of ObjectWithDeprecatedFields to be compared /// Boolean - public bool Equals(ObjectWithDeprecatedFields input) + public bool Equals(ObjectWithDeprecatedFields? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs index cdc227e0564f..14f4d8e4b881 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,14 +29,31 @@ namespace Org.OpenAPITools.Model /// /// Order /// - [DataContract(Name = "Order")] public partial class Order : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// id + /// petId + /// quantity + /// shipDate + /// Order Status + /// complete (default to false) + public Order(long? id = default, long? petId = default, int? quantity = default, DateTime? shipDate = default, StatusEnum? status = default, bool? complete = false) + { + Id = id; + PetId = petId; + Quantity = quantity; + ShipDate = shipDate; + Status = status; + Complete = complete; + } + /// /// Order Status /// /// Order Status - [JsonConverter(typeof(StringEnumConverter))] public enum StatusEnum { /// @@ -59,68 +76,48 @@ public enum StatusEnum } - /// /// Order Status /// /// Order Status - [DataMember(Name = "status", EmitDefaultValue = false)] + [JsonPropertyName("status")] public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long? id = default, long? petId = default, int? quantity = default, DateTime? shipDate = default, StatusEnum? status = default, bool? complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - this.Complete = complete; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long? Id { get; set; } /// /// Gets or Sets PetId /// - [DataMember(Name = "petId", EmitDefaultValue = false)] + [JsonPropertyName("petId")] public long? PetId { get; set; } /// /// Gets or Sets Quantity /// - [DataMember(Name = "quantity", EmitDefaultValue = false)] + [JsonPropertyName("quantity")] public int? Quantity { get; set; } /// /// Gets or Sets ShipDate /// - [DataMember(Name = "shipDate", EmitDefaultValue = false)] + [JsonPropertyName("shipDate")] public DateTime? ShipDate { get; set; } /// /// Gets or Sets Complete /// - [DataMember(Name = "complete", EmitDefaultValue = true)] + [JsonPropertyName("complete")] public bool? Complete { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -141,21 +138,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Order).AreEqual; } @@ -165,7 +153,7 @@ public override bool Equals(object input) /// /// Instance of Order to be compared /// Boolean - public bool Equals(Order input) + public bool Equals(Order? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs index 0acf83c4c628..f4d199456b2b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +29,44 @@ namespace Org.OpenAPITools.Model /// /// OuterComposite /// - [DataContract(Name = "OuterComposite")] public partial class OuterComposite : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// myNumber. - /// myString. - /// myBoolean. + /// myNumber + /// myString + /// myBoolean public OuterComposite(decimal? myNumber = default, string? myString = default, bool? myBoolean = default) { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - this.AdditionalProperties = new Dictionary(); + MyNumber = myNumber; + MyString = myString; + MyBoolean = myBoolean; } /// /// Gets or Sets MyNumber /// - [DataMember(Name = "my_number", EmitDefaultValue = false)] + [JsonPropertyName("my_number")] public decimal? MyNumber { get; set; } /// /// Gets or Sets MyString /// - [DataMember(Name = "my_string", EmitDefaultValue = false)] + [JsonPropertyName("my_string")] public string? MyString { get; set; } /// /// Gets or Sets MyBoolean /// - [DataMember(Name = "my_boolean", EmitDefaultValue = true)] + [JsonPropertyName("my_boolean")] public bool? MyBoolean { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,21 +84,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as OuterComposite).AreEqual; } @@ -110,7 +99,7 @@ public override bool Equals(object input) /// /// Instance of OuterComposite to be compared /// Boolean - public bool Equals(OuterComposite input) + public bool Equals(OuterComposite? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs index 2aa496a2e074..8a82c640206f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +29,6 @@ namespace Org.OpenAPITools.Model /// /// Defines OuterEnum /// - [JsonConverter(typeof(StringEnumConverter))] public enum OuterEnum { /// @@ -51,5 +50,4 @@ public enum OuterEnum Delivered = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index dd79c7010d6b..edee83082832 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +29,6 @@ namespace Org.OpenAPITools.Model /// /// Defines OuterEnumDefaultValue /// - [JsonConverter(typeof(StringEnumConverter))] public enum OuterEnumDefaultValue { /// @@ -51,5 +50,4 @@ public enum OuterEnumDefaultValue Delivered = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 44dc91c700ad..b1e9dc142e35 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -47,5 +47,4 @@ public enum OuterEnumInteger NUMBER_2 = 2 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index b927507cf97a..1167271da6e0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -47,5 +47,4 @@ public enum OuterEnumIntegerDefaultValue NUMBER_2 = 2 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs index ac986b555efd..58475dcfe237 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,12 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,34 +29,16 @@ namespace Org.OpenAPITools.Model /// /// ParentPet /// - [DataContract(Name = "ParentPet")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject + public partial class ParentPet : GrandparentAnimal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ParentPet() + /// petType (required) + public ParentPet(string petType) : base(petType) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// petType (required) (default to "ParentPet"). - public ParentPet(string petType = "ParentPet") : base(petType) - { - this.AdditionalProperties = new Dictionary(); } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -67,26 +48,16 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ParentPet {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ParentPet).AreEqual; } @@ -96,7 +67,7 @@ public override bool Equals(object input) /// /// Instance of ParentPet to be compared /// Boolean - public bool Equals(ParentPet input) + public bool Equals(ParentPet? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -110,37 +81,70 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type ParentPet + /// + public class ParentPetJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ParentPet).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override ParentPet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + string? petType = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + } + } } - yield break; + + return new ParentPet(petType); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs index f94869df280c..1694a5311ec1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,14 +29,37 @@ namespace Org.OpenAPITools.Model /// /// Pet /// - [DataContract(Name = "Pet")] public partial class Pet : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// name (required) + /// photoUrls (required) + /// id + /// category + /// tags + /// pet status in the store + public Pet(string name, List photoUrls, long? id = default, Category? category = default, List? tags = default, StatusEnum? status = default) + { + if (name == null) + throw new ArgumentNullException("name is a required property for Pet and cannot be null."); + + if (photoUrls == null) + throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null."); + + Name = name; + PhotoUrls = photoUrls; + Id = id; + Category = category; + Tags = tags; + Status = status; + } + /// /// pet status in the store /// /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] public enum StatusEnum { /// @@ -59,84 +82,48 @@ public enum StatusEnum } - /// /// pet status in the store /// /// pet status in the store - [DataMember(Name = "status", EmitDefaultValue = false)] + [JsonPropertyName("status")] public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// photoUrls (required). - /// id. - /// category. - /// tags. - /// pet status in the store. - public Pet(string name, List photoUrls, long? id = default, Category? category = default, List? tags = default, StatusEnum? status = default) - { - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); - } - this.Name = name; - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); - } - this.PhotoUrls = photoUrls; - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name = "photoUrls", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("photoUrls")] public List PhotoUrls { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long? Id { get; set; } /// /// Gets or Sets Category /// - [DataMember(Name = "category", EmitDefaultValue = false)] + [JsonPropertyName("category")] public Category? Category { get; set; } /// /// Gets or Sets Tags /// - [DataMember(Name = "tags", EmitDefaultValue = false)] + [JsonPropertyName("tags")] public List? Tags { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -157,21 +144,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Pet).AreEqual; } @@ -181,7 +159,7 @@ public override bool Equals(object input) /// /// Instance of Pet to be compared /// Boolean - public bool Equals(Pet input) + public bool Equals(Pet? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs index b82c0899c27d..e80f7c4c3724 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,96 +19,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Pig /// - [JsonConverter(typeof(PigJsonConverter))] - [DataContract(Name = "Pig")] - public partial class Pig : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Pig : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of BasquePig. - public Pig(BasquePig actualInstance) + /// + public Pig(BasquePig basquePig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + BasquePig = basquePig; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of DanishPig. - public Pig(DanishPig actualInstance) + /// + public Pig(DanishPig danishPig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + DanishPig = danishPig; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets BasquePig /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(BasquePig)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DanishPig)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: BasquePig, DanishPig"); - } - } - } + public BasquePig BasquePig { get; set; } /// - /// Get the actual instance of `BasquePig`. If the actual instance is not `BasquePig`, - /// the InvalidClassException will be thrown + /// Gets or Sets DanishPig /// - /// An instance of BasquePig - public BasquePig GetBasquePig() - { - return (BasquePig)this.ActualInstance; - } + public DanishPig DanishPig { get; set; } /// - /// Get the actual instance of `DanishPig`. If the actual instance is not `DanishPig`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of DanishPig - public DanishPig GetDanishPig() - { - return (DanishPig)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,97 +71,19 @@ public DanishPig GetDanishPig() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Pig {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Pig.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Pig - /// - /// JSON string - /// An instance of Pig - public static Pig FromJson(string jsonString) - { - Pig newPig = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newPig; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(BasquePig).GetProperty("AdditionalProperties") == null) - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); - } - else - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("BasquePig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into BasquePig: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(DanishPig).GetProperty("AdditionalProperties") == null) - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); - } - else - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("DanishPig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DanishPig: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newPig; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Pig).AreEqual; } @@ -214,7 +93,7 @@ public override bool Equals(object input) /// /// Instance of Pig to be compared /// Boolean - public bool Equals(Pig input) + public bool Equals(Pig? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -228,8 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +120,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Pig + /// A Json converter for type Pig /// - public class PigJsonConverter : JsonConverter + public class PigJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Pig).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Pig).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Pig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader basquePigReader = reader; + bool basquePigDeserialized = Client.ClientUtils.TryDeserialize(ref basquePigReader, options, out BasquePig? basquePig); + + Utf8JsonReader danishPigReader = reader; + bool danishPigDeserialized = Client.ClientUtils.TryDeserialize(ref danishPigReader, options, out DanishPig? danishPig); + + + while (reader.Read()) { - return Pig.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (basquePigDeserialized) + return new Pig(basquePig); + + if (danishPigDeserialized) + return new Pig(danishPig); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..b9bc60379aec --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,237 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + public partial class PolymorphicProperty : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(bool _bool) + { + Bool = _bool; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(string _string) + { + String = _string; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(Object _object) + { + Object = _object; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(List liststring) + { + Liststring = liststring; + } + + /// + /// Gets or Sets Bool + /// + public bool Bool { get; set; } + + /// + /// Gets or Sets String + /// + public string String { get; set; } + + /// + /// Gets or Sets Object + /// + public Object Object { get; set; } + + /// + /// Gets or Sets Liststring + /// + public List Liststring { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object? input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty? input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(PolymorphicProperty).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override PolymorphicProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader _boolReader = reader; + bool _boolDeserialized = Client.ClientUtils.TryDeserialize(ref _boolReader, options, out bool _bool); + + Utf8JsonReader _stringReader = reader; + bool _stringDeserialized = Client.ClientUtils.TryDeserialize(ref _stringReader, options, out string? _string); + + Utf8JsonReader _objectReader = reader; + bool _objectDeserialized = Client.ClientUtils.TryDeserialize(ref _objectReader, options, out Object? _object); + + Utf8JsonReader liststringReader = reader; + bool liststringDeserialized = Client.ClientUtils.TryDeserialize>(ref liststringReader, options, out List? liststring); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + if (_boolDeserialized) + return new PolymorphicProperty(_bool); + + if (_stringDeserialized) + return new PolymorphicProperty(_string); + + if (_objectDeserialized) + return new PolymorphicProperty(_object); + + if (liststringDeserialized) + return new PolymorphicProperty(liststring); + + throw new JsonException(); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) => throw new NotImplementedException(); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs index a1a850f169e4..ba1b3e017735 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,96 +19,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Quadrilateral /// - [JsonConverter(typeof(QuadrilateralJsonConverter))] - [DataContract(Name = "Quadrilateral")] - public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Quadrilateral : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// + public Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + SimpleQuadrilateral = simpleQuadrilateral; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// + public Quadrilateral(ComplexQuadrilateral complexQuadrilateral) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + ComplexQuadrilateral = complexQuadrilateral; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets SimpleQuadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ComplexQuadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SimpleQuadrilateral)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ComplexQuadrilateral, SimpleQuadrilateral"); - } - } - } + public SimpleQuadrilateral SimpleQuadrilateral { get; set; } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets ComplexQuadrilateral /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() - { - return (ComplexQuadrilateral)this.ActualInstance; - } + public ComplexQuadrilateral ComplexQuadrilateral { get; set; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() - { - return (SimpleQuadrilateral)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,97 +71,19 @@ public SimpleQuadrilateral GetSimpleQuadrilateral() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Quadrilateral {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Quadrilateral.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Quadrilateral - /// - /// JSON string - /// An instance of Quadrilateral - public static Quadrilateral FromJson(string jsonString) - { - Quadrilateral newQuadrilateral = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newQuadrilateral; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(ComplexQuadrilateral).GetProperty("AdditionalProperties") == null) - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); - } - else - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("ComplexQuadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ComplexQuadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(SimpleQuadrilateral).GetProperty("AdditionalProperties") == null) - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); - } - else - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("SimpleQuadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into SimpleQuadrilateral: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newQuadrilateral; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Quadrilateral).AreEqual; } @@ -214,7 +93,7 @@ public override bool Equals(object input) /// /// Instance of Quadrilateral to be compared /// Boolean - public bool Equals(Quadrilateral input) + public bool Equals(Quadrilateral? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -228,8 +107,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +120,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Quadrilateral + /// A Json converter for type Quadrilateral /// - public class QuadrilateralJsonConverter : JsonConverter + public class QuadrilateralJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Quadrilateral).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Quadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader simpleQuadrilateralReader = reader; + bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral? simpleQuadrilateral); + + Utf8JsonReader complexQuadrilateralReader = reader; + bool complexQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref complexQuadrilateralReader, options, out ComplexQuadrilateral? complexQuadrilateral); + + + while (reader.Read()) { - return Quadrilateral.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (simpleQuadrilateralDeserialized) + return new Quadrilateral(simpleQuadrilateral); + + if (complexQuadrilateralDeserialized) + return new Quadrilateral(complexQuadrilateral); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index b29e2db36b6b..0aadff208b82 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +29,31 @@ namespace Org.OpenAPITools.Model /// /// QuadrilateralInterface /// - [DataContract(Name = "QuadrilateralInterface")] public partial class QuadrilateralInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected QuadrilateralInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// quadrilateralType (required). + /// quadrilateralType (required) public QuadrilateralInterface(string quadrilateralType) { - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null."); + + QuadrilateralType = quadrilateralType; } /// /// Gets or Sets QuadrilateralType /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("quadrilateralType")] public string QuadrilateralType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,21 +69,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as QuadrilateralInterface).AreEqual; } @@ -104,7 +84,7 @@ public override bool Equals(object input) /// /// Instance of QuadrilateralInterface to be compared /// Boolean - public bool Equals(QuadrilateralInterface input) + public bool Equals(QuadrilateralInterface? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index c668741b9609..431c19694ab7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,44 +29,36 @@ namespace Org.OpenAPITools.Model /// /// ReadOnlyFirst /// - [DataContract(Name = "ReadOnlyFirst")] public partial class ReadOnlyFirst : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// baz. - public ReadOnlyFirst(string? baz = default) + /// bar + /// baz + public ReadOnlyFirst(string? bar = default, string? baz = default) { - this.Baz = baz; - this.AdditionalProperties = new Dictionary(); + Bar = bar; + Baz = baz; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string? Bar { get; private set; } - /// - /// Returns false as Bar should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBar() - { - return false; - } /// /// Gets or Sets Baz /// - [DataMember(Name = "baz", EmitDefaultValue = false)] + [JsonPropertyName("baz")] public string? Baz { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -83,21 +75,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ReadOnlyFirst).AreEqual; } @@ -107,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of ReadOnlyFirst to be compared /// Boolean - public bool Equals(ReadOnlyFirst input) + public bool Equals(ReadOnlyFirst? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs index 4b6b8710a1d4..9c1b60d8791c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +29,28 @@ namespace Org.OpenAPITools.Model /// /// Model for testing reserved words /// - [DataContract(Name = "Return")] public partial class Return : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _return. - public Return(int? _return = default) + /// returnProperty + public Return(int? returnProperty = default) { - this._Return = _return; - this.AdditionalProperties = new Dictionary(); + ReturnProperty = returnProperty; } /// - /// Gets or Sets _Return + /// Gets or Sets ReturnProperty /// - [DataMember(Name = "return", EmitDefaultValue = false)] - public int? _Return { get; set; } + [JsonPropertyName("return")] + public int? ReturnProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -62,27 +60,18 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); + sb.Append(" ReturnProperty: ").Append(ReturnProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Return).AreEqual; } @@ -92,7 +81,7 @@ public override bool Equals(object input) /// /// Instance of Return to be compared /// Boolean - public bool Equals(Return input) + public bool Equals(Return? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -106,7 +95,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._Return.GetHashCode(); + hashCode = (hashCode * 59) + this.ReturnProperty.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 206e0fbe3315..6fcceeb24264 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +29,34 @@ namespace Org.OpenAPITools.Model /// /// ScaleneTriangle /// - [DataContract(Name = "ScaleneTriangle")] public partial class ScaleneTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ScaleneTriangle() + /// + /// + public ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public ScaleneTriangle(string shapeType, string triangleType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,28 +66,17 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ScaleneTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ScaleneTriangle).AreEqual; } @@ -117,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of ScaleneTriangle to be compared /// Boolean - public bool Equals(ScaleneTriangle input) + public bool Equals(ScaleneTriangle? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -131,14 +100,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +119,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type ScaleneTriangle + /// + public class ScaleneTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ScaleneTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ScaleneTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface? triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new ScaleneTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs index dd74fa4b7184..5f34a4523239 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,96 +19,67 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Shape /// - [JsonConverter(typeof(ShapeJsonConverter))] - [DataContract(Name = "Shape")] - public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Shape : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// + /// quadrilateralType (required) + public Shape(Triangle triangle, string quadrilateralType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + + Triangle = triangle; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// + /// quadrilateralType (required) + public Shape(Quadrilateral quadrilateral, string quadrilateralType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + Quadrilateral = quadrilateral; + QuadrilateralType = quadrilateralType; + } - private Object _actualInstance; + /// + /// Gets or Sets Triangle + /// + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets QuadrilateralType /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + [JsonPropertyName("quadrilateralType")] + public string QuadrilateralType { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,97 +87,20 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Shape {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Shape.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Shape - /// - /// JSON string - /// An instance of Shape - public static Shape FromJson(string jsonString) - { - Shape newShape = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newShape; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); - } - else - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); - } - else - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newShape; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Shape).AreEqual; } @@ -214,7 +110,7 @@ public override bool Equals(object input) /// /// Instance of Shape to be compared /// Boolean - public bool Equals(Shape input) + public bool Equals(Shape? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -228,8 +124,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.QuadrilateralType != null) + { + hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +141,92 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Shape + /// A Json converter for type Shape /// - public class ShapeJsonConverter : JsonConverter + public class ShapeJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Shape).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Shape).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Shape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle? triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral? quadrilateral); + + string? quadrilateralType = default; + + while (reader.Read()) { - return Shape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + } + } } - return null; + + if (triangleDeserialized) + return new Shape(triangle, quadrilateralType); + + if (quadrilateralDeserialized) + return new Shape(quadrilateral, quadrilateralType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs index 55788e33f354..37871f3dc2a9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +29,31 @@ namespace Org.OpenAPITools.Model /// /// ShapeInterface /// - [DataContract(Name = "ShapeInterface")] public partial class ShapeInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ShapeInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). + /// shapeType (required) public ShapeInterface(string shapeType) { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); - } - this.ShapeType = shapeType; - this.AdditionalProperties = new Dictionary(); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null."); + + ShapeType = shapeType; } /// /// Gets or Sets ShapeType /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("shapeType")] public string ShapeType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,21 +69,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeInterface).AreEqual; } @@ -104,7 +84,7 @@ public override bool Equals(object input) /// /// Instance of ShapeInterface to be compared /// Boolean - public bool Equals(ShapeInterface input) + public bool Equals(ShapeInterface? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs index c6b87c89751a..171347cda27c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,105 +19,67 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. /// - [JsonConverter(typeof(ShapeOrNullJsonConverter))] - [DataContract(Name = "ShapeOrNull")] - public partial class ShapeOrNull : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class ShapeOrNull : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public ShapeOrNull() + /// + /// quadrilateralType (required) + public ShapeOrNull(Triangle triangle, string quadrilateralType) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + + Triangle = triangle; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// + /// quadrilateralType (required) + public ShapeOrNull(Quadrilateral quadrilateral, string quadrilateralType) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + + Quadrilateral = quadrilateral; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Triangle /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets QuadrilateralType /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + [JsonPropertyName("quadrilateralType")] + public string QuadrilateralType { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -123,97 +87,20 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ShapeOrNull {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, ShapeOrNull.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of ShapeOrNull - /// - /// JSON string - /// An instance of ShapeOrNull - public static ShapeOrNull FromJson(string jsonString) - { - ShapeOrNull newShapeOrNull = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newShapeOrNull; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); - } - else - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); - } - else - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newShapeOrNull; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeOrNull).AreEqual; } @@ -223,7 +110,7 @@ public override bool Equals(object input) /// /// Instance of ShapeOrNull to be compared /// Boolean - public bool Equals(ShapeOrNull input) + public bool Equals(ShapeOrNull? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -237,8 +124,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.QuadrilateralType != null) + { + hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -248,54 +141,92 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for ShapeOrNull + /// A Json converter for type ShapeOrNull /// - public class ShapeOrNullJsonConverter : JsonConverter + public class ShapeOrNullJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ShapeOrNull).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override ShapeOrNull Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle? triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral? quadrilateral); + + string? quadrilateralType = default; + + while (reader.Read()) { - return ShapeOrNull.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + } + } } - return null; + + if (triangleDeserialized) + return new ShapeOrNull(triangle, quadrilateralType); + + if (quadrilateralDeserialized) + return new ShapeOrNull(quadrilateral, quadrilateralType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 1398011e13f1..d5565e094cce 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +29,34 @@ namespace Org.OpenAPITools.Model /// /// SimpleQuadrilateral /// - [DataContract(Name = "SimpleQuadrilateral")] public partial class SimpleQuadrilateral : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SimpleQuadrilateral() + /// + /// + public SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// quadrilateralType (required). - public SimpleQuadrilateral(string shapeType, string quadrilateralType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + QuadrilateralInterface = quadrilateralInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets QuadrilateralType + /// Gets or Sets QuadrilateralInterface /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] - public string QuadrilateralType { get; set; } + public QuadrilateralInterface QuadrilateralInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,28 +66,17 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimpleQuadrilateral {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as SimpleQuadrilateral).AreEqual; } @@ -117,7 +86,7 @@ public override bool Equals(object input) /// /// Instance of SimpleQuadrilateral to be compared /// Boolean - public bool Equals(SimpleQuadrilateral input) + public bool Equals(SimpleQuadrilateral? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -131,14 +100,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +119,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type SimpleQuadrilateral + /// + public class SimpleQuadrilateralJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(SimpleQuadrilateral).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override SimpleQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + + Utf8JsonReader quadrilateralInterfaceReader = reader; + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface? quadrilateralInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new SimpleQuadrilateral(shapeInterface, quadrilateralInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs index 64d0866fbf05..6d7d21215bcf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +29,36 @@ namespace Org.OpenAPITools.Model /// /// SpecialModelName /// - [DataContract(Name = "_special_model.name_")] public partial class SpecialModelName : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// specialPropertyName. - /// specialModelName. - public SpecialModelName(long? specialPropertyName = default, string? specialModelName = default) + /// specialPropertyName + /// specialModelNameProperty + public SpecialModelName(long? specialPropertyName = default, string? specialModelNameProperty = default) { - this.SpecialPropertyName = specialPropertyName; - this._SpecialModelName = specialModelName; - this.AdditionalProperties = new Dictionary(); + SpecialPropertyName = specialPropertyName; + SpecialModelNameProperty = specialModelNameProperty; } /// /// Gets or Sets SpecialPropertyName /// - [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] + [JsonPropertyName("$special[property.name]")] public long? SpecialPropertyName { get; set; } /// - /// Gets or Sets _SpecialModelName + /// Gets or Sets SpecialModelNameProperty /// - [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string? _SpecialModelName { get; set; } + [JsonPropertyName("_special_model.name_")] + public string? SpecialModelNameProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -71,27 +69,18 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" _SpecialModelName: ").Append(_SpecialModelName).Append("\n"); + sb.Append(" SpecialModelNameProperty: ").Append(SpecialModelNameProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as SpecialModelName).AreEqual; } @@ -101,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of SpecialModelName to be compared /// Boolean - public bool Equals(SpecialModelName input) + public bool Equals(SpecialModelName? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -116,9 +105,9 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this._SpecialModelName != null) + if (this.SpecialModelNameProperty != null) { - hashCode = (hashCode * 59) + this._SpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.SpecialModelNameProperty.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs index 09b8204eb380..69236717eb8d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +29,36 @@ namespace Org.OpenAPITools.Model /// /// Tag /// - [DataContract(Name = "Tag")] public partial class Tag : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id. - /// name. + /// id + /// name public Tag(long? id = default, string? name = default) { - this.Id = id; - this.Name = name; - this.AdditionalProperties = new Dictionary(); + Id = id; + Name = name; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long? Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string? Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,21 +75,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Tag).AreEqual; } @@ -101,7 +90,7 @@ public override bool Equals(object input) /// /// Instance of Tag to be compared /// Boolean - public bool Equals(Tag input) + public bool Equals(Tag? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs index c8cf49ef7f66..5d502172b9e6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,122 +19,107 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Triangle /// - [JsonConverter(typeof(TriangleJsonConverter))] - [DataContract(Name = "Triangle")] - public partial class Triangle : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Triangle : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of EquilateralTriangle. - public Triangle(EquilateralTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(EquilateralTriangle equilateralTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + EquilateralTriangle = equilateralTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of IsoscelesTriangle. - public Triangle(IsoscelesTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(IsoscelesTriangle isoscelesTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + IsoscelesTriangle = isoscelesTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of ScaleneTriangle. - public Triangle(ScaleneTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + ScaleneTriangle = scaleneTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } + /// + /// Gets or Sets EquilateralTriangle + /// + public EquilateralTriangle EquilateralTriangle { get; set; } - private Object _actualInstance; + /// + /// Gets or Sets IsoscelesTriangle + /// + public IsoscelesTriangle IsoscelesTriangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets ScaleneTriangle /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(EquilateralTriangle)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IsoscelesTriangle)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ScaleneTriangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle"); - } - } - } + public ScaleneTriangle ScaleneTriangle { get; set; } /// - /// Get the actual instance of `EquilateralTriangle`. If the actual instance is not `EquilateralTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets ShapeType /// - /// An instance of EquilateralTriangle - public EquilateralTriangle GetEquilateralTriangle() - { - return (EquilateralTriangle)this.ActualInstance; - } + [JsonPropertyName("shapeType")] + public string ShapeType { get; set; } /// - /// Get the actual instance of `IsoscelesTriangle`. If the actual instance is not `IsoscelesTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets TriangleType /// - /// An instance of IsoscelesTriangle - public IsoscelesTriangle GetIsoscelesTriangle() - { - return (IsoscelesTriangle)this.ActualInstance; - } + [JsonPropertyName("triangleType")] + public string TriangleType { get; set; } /// - /// Get the actual instance of `ScaleneTriangle`. If the actual instance is not `ScaleneTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of ScaleneTriangle - public ScaleneTriangle GetScaleneTriangle() - { - return (ScaleneTriangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -140,117 +127,21 @@ public ScaleneTriangle GetScaleneTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Triangle {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Triangle.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Triangle - /// - /// JSON string - /// An instance of Triangle - public static Triangle FromJson(string jsonString) - { - Triangle newTriangle = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTriangle; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(EquilateralTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("EquilateralTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into EquilateralTriangle: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(IsoscelesTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("IsoscelesTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into IsoscelesTriangle: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(ScaleneTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("ScaleneTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ScaleneTriangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTriangle; - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Triangle).AreEqual; } @@ -260,7 +151,7 @@ public override bool Equals(object input) /// /// Instance of Triangle to be compared /// Boolean - public bool Equals(Triangle input) + public bool Equals(Triangle? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } @@ -274,8 +165,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.ShapeType != null) + { + hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); + } + if (this.TriangleType != null) + { + hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -285,54 +186,102 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Triangle + /// A Json converter for type Triangle /// - public class TriangleJsonConverter : JsonConverter + public class TriangleJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Triangle).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Triangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader equilateralTriangleReader = reader; + bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref equilateralTriangleReader, options, out EquilateralTriangle? equilateralTriangle); + + Utf8JsonReader isoscelesTriangleReader = reader; + bool isoscelesTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref isoscelesTriangleReader, options, out IsoscelesTriangle? isoscelesTriangle); + + Utf8JsonReader scaleneTriangleReader = reader; + bool scaleneTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref scaleneTriangleReader, options, out ScaleneTriangle? scaleneTriangle); + + string? shapeType = default; + string? triangleType = default; + + while (reader.Read()) { - return Triangle.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "shapeType": + shapeType = reader.GetString(); + break; + case "triangleType": + triangleType = reader.GetString(); + break; + } + } } - return null; + + if (equilateralTriangleDeserialized) + return new Triangle(equilateralTriangle, shapeType, triangleType); + + if (isoscelesTriangleDeserialized) + return new Triangle(isoscelesTriangle, shapeType, triangleType); + + if (scaleneTriangleDeserialized) + return new Triangle(scaleneTriangle, shapeType, triangleType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs index 8c62abd8c657..f6d4c31c8c4d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +29,31 @@ namespace Org.OpenAPITools.Model /// /// TriangleInterface /// - [DataContract(Name = "TriangleInterface")] public partial class TriangleInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TriangleInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// triangleType (required). + /// triangleType (required) public TriangleInterface(string triangleType) { - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null."); + + TriangleType = triangleType; } /// /// Gets or Sets TriangleType /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("triangleType")] public string TriangleType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,21 +69,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as TriangleInterface).AreEqual; } @@ -104,7 +84,7 @@ public override bool Equals(object input) /// /// Instance of TriangleInterface to be compared /// Boolean - public bool Equals(TriangleInterface input) + public bool Equals(TriangleInterface? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs index cc4448626432..1cf4f172eca7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,123 +29,121 @@ namespace Org.OpenAPITools.Model /// /// User /// - [DataContract(Name = "User")] public partial class User : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. - /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. - /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. + /// id + /// username + /// firstName + /// lastName + /// email + /// password + /// phone + /// User Status + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. public User(long? id = default, string? username = default, string? firstName = default, string? lastName = default, string? email = default, string? password = default, string? phone = default, int? userStatus = default, Object? objectWithNoDeclaredProps = default, Object? objectWithNoDeclaredPropsNullable = default, Object? anyTypeProp = default, Object? anyTypePropNullable = default) { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - this.ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - this.ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; - this.AnyTypeProp = anyTypeProp; - this.AnyTypePropNullable = anyTypePropNullable; - this.AdditionalProperties = new Dictionary(); + Id = id; + Username = username; + FirstName = firstName; + LastName = lastName; + Email = email; + Password = password; + Phone = phone; + UserStatus = userStatus; + ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; + ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + AnyTypeProp = anyTypeProp; + AnyTypePropNullable = anyTypePropNullable; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long? Id { get; set; } /// /// Gets or Sets Username /// - [DataMember(Name = "username", EmitDefaultValue = false)] + [JsonPropertyName("username")] public string? Username { get; set; } /// /// Gets or Sets FirstName /// - [DataMember(Name = "firstName", EmitDefaultValue = false)] + [JsonPropertyName("firstName")] public string? FirstName { get; set; } /// /// Gets or Sets LastName /// - [DataMember(Name = "lastName", EmitDefaultValue = false)] + [JsonPropertyName("lastName")] public string? LastName { get; set; } /// /// Gets or Sets Email /// - [DataMember(Name = "email", EmitDefaultValue = false)] + [JsonPropertyName("email")] public string? Email { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name = "password", EmitDefaultValue = false)] + [JsonPropertyName("password")] public string? Password { get; set; } /// /// Gets or Sets Phone /// - [DataMember(Name = "phone", EmitDefaultValue = false)] + [JsonPropertyName("phone")] public string? Phone { get; set; } /// /// User Status /// /// User Status - [DataMember(Name = "userStatus", EmitDefaultValue = false)] + [JsonPropertyName("userStatus")] public int? UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] + [JsonPropertyName("objectWithNoDeclaredProps")] public Object? ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] + [JsonPropertyName("objectWithNoDeclaredPropsNullable")] public Object? ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 - [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] + [JsonPropertyName("anyTypeProp")] public Object? AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. - [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] + [JsonPropertyName("anyTypePropNullable")] public Object? AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -172,21 +170,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as User).AreEqual; } @@ -196,7 +185,7 @@ public override bool Equals(object input) /// /// Instance of User to be compared /// Boolean - public bool Equals(User input) + public bool Equals(User? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs index e13e3f2d012e..e8c73088da42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,58 +29,47 @@ namespace Org.OpenAPITools.Model /// /// Whale /// - [DataContract(Name = "whale")] public partial class Whale : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Whale() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// hasBaleen. - /// hasTeeth. + /// className (required) + /// hasBaleen + /// hasTeeth public Whale(string className, bool? hasBaleen = default, bool? hasTeeth = default) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); - } - this.ClassName = className; - this.HasBaleen = hasBaleen; - this.HasTeeth = hasTeeth; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for Whale and cannot be null."); + + ClassName = className; + HasBaleen = hasBaleen; + HasTeeth = hasTeeth; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets HasBaleen /// - [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] + [JsonPropertyName("hasBaleen")] public bool? HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// - [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] + [JsonPropertyName("hasTeeth")] public bool? HasTeeth { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -98,21 +87,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Whale).AreEqual; } @@ -122,7 +102,7 @@ public override bool Equals(object input) /// /// Instance of Whale to be compared /// Boolean - public bool Equals(Whale input) + public bool Equals(Whale? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs index 0d4c8c671305..a43e56ab1d5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,6 +8,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable using System; using System.Collections; @@ -17,11 +19,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +29,25 @@ namespace Org.OpenAPITools.Model /// /// Zebra /// - [DataContract(Name = "zebra")] public partial class Zebra : Dictionary, IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// className (required) + /// type + public Zebra(string className, TypeEnum? type = default) : base() + { + if (className == null) + throw new ArgumentNullException("className is a required property for Zebra and cannot be null."); + + ClassName = className; + Type = type; + } + /// /// Defines Type /// - [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { /// @@ -58,47 +70,23 @@ public enum TypeEnum } - /// /// Gets or Sets Type /// - [DataMember(Name = "type", EmitDefaultValue = false)] + [JsonPropertyName("type")] public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Zebra() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// type. - public Zebra(string className, TypeEnum? type = default) : base() - { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); - } - this.ClassName = className; - this.Type = type; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -116,21 +104,12 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean - public override bool Equals(object input) + public override bool Equals(object? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input as Zebra).AreEqual; } @@ -140,7 +119,7 @@ public override bool Equals(object input) /// /// Instance of Zebra to be compared /// Boolean - public bool Equals(Zebra input) + public bool Equals(Zebra? input) { return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 3ad77f5f5e82..1531b2ee02b8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -22,8 +22,6 @@ - - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES index 2f141a0eb477..e19a38918ec9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES @@ -69,6 +69,7 @@ docs/models/OuterEnumIntegerDefaultValue.md docs/models/ParentPet.md docs/models/Pet.md docs/models/Pig.md +docs/models/PolymorphicProperty.md docs/models/Quadrilateral.md docs/models/QuadrilateralInterface.md docs/models/ReadOnlyFirst.md @@ -107,13 +108,13 @@ src/Org.OpenAPITools/Client/HostConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningToken.cs src/Org.OpenAPITools/Client/IApi.cs +src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs src/Org.OpenAPITools/Client/OAuthToken.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs -src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs @@ -174,6 +175,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md index 54d29ffb72a4..7aedac0df23a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md @@ -642,7 +642,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -680,14 +680,14 @@ namespace Example var _string = "_string_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); } catch (ApiException e) { @@ -715,9 +715,9 @@ Name | Type | Description | Notes **_string** | **string**| None | [optional] **binary** | **System.IO.Stream****System.IO.Stream**| None | [optional] **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] ### Return type @@ -743,7 +743,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -767,18 +767,18 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -796,11 +796,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] + **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] + **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Cat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Cat.md index 310a5e6575ec..16db4a55bd30 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Cat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Cat.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Declawed** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ChildCat.md index 48a3c7fd38d9..dae2ff760262 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ChildCat.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PetType** | **string** | | [default to PetTypeEnum.ChildCat] -**Name** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ComplexQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ComplexQuadrilateral.md index 14da4bba22ed..0926bb55e71c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ComplexQuadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ComplexQuadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Dog.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Dog.md index 70cdc80e83e0..b1e39dcf07c7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Dog.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Dog.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EquilateralTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EquilateralTriangle.md index 8360b5c16a5b..ddc9885fe560 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EquilateralTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EquilateralTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Fruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Fruit.md index cb095b74f324..b3bee18f7ba0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Fruit.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Fruit.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Color** | **string** | | [optional] -**Cultivar** | **string** | | [optional] -**Origin** | **string** | | [optional] -**LengthCm** | **decimal** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FruitReq.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FruitReq.md index 5217febc9b68..38ab0c1a6caa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FruitReq.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FruitReq.md @@ -4,10 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Cultivar** | **string** | | -**LengthCm** | **decimal** | | -**Mealy** | **bool** | | [optional] -**Sweet** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/GmFruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/GmFruit.md index 049f6f5c1574..584c4fd323d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/GmFruit.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/GmFruit.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Color** | **string** | | [optional] -**Cultivar** | **string** | | [optional] -**Origin** | **string** | | [optional] -**LengthCm** | **decimal** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/IsoscelesTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/IsoscelesTriangle.md index 07c62ac93382..ed481ad14486 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/IsoscelesTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/IsoscelesTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Mammal.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Mammal.md index 82a8ca6027b5..5546632e4d67 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Mammal.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Mammal.md @@ -4,10 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**HasBaleen** | **bool** | | [optional] -**HasTeeth** | **bool** | | [optional] -**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md index 1fbf5dd5e8b6..2ee782c0c542 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md @@ -5,7 +5,7 @@ Model for testing model name same as property name Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Name** | **int** | | +**NameProperty** | **int** | | **SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] **_123Number** | **int** | | [optional] [readonly] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableShape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableShape.md index 570ef48f98fc..0caa1aa5b9d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableShape.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableShape.md @@ -5,8 +5,6 @@ The value may be a shape or the 'null' value. The 'nullable' attribute was intro Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pig.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pig.md index fd7bb9359ac4..83e58b6098d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pig.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pig.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/PolymorphicProperty.md new file mode 100644 index 000000000000..4507ec41cd51 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Quadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Quadrilateral.md index bb7507997a2f..4fd16b32ea58 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Quadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Quadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Return.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Return.md index a1dadccc421d..e11cdae8db98 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Return.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Return.md @@ -5,7 +5,7 @@ Model for testing reserved words Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Return** | **int** | | [optional] +**ReturnProperty** | **int** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ScaleneTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ScaleneTriangle.md index d3f15354bccc..a01c2edc0687 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ScaleneTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ScaleneTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Shape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Shape.md index 5627c30bbfc7..2ec279cef3c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Shape.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Shape.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | **QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ShapeOrNull.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ShapeOrNull.md index a348f4f8bff5..056fcbfdbddc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ShapeOrNull.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ShapeOrNull.md @@ -5,7 +5,6 @@ The value may be a shape or the 'null' value. This is introduced in OAS schema > Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | **QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SimpleQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SimpleQuadrilateral.md index a36c9957a609..3bc21009b7e5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SimpleQuadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SimpleQuadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md index fa146367bdea..662fa6f4a387 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SpecialPropertyName** | **long** | | [optional] -**_SpecialModelName** | **string** | | [optional] +**SpecialModelNameProperty** | **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/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index a730ebd21acf..b70f2a8adc7b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -164,10 +164,10 @@ public async Task TestEndpointParametersAsyncTest() string _string = default; System.IO.Stream binary = default; DateTime? date = default; - DateTime? dateTime = default; string password = default; string callback = default; - await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + DateTime? dateTime = default; + await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); } /// @@ -177,14 +177,14 @@ public async Task TestEndpointParametersAsyncTest() public async Task TestEnumParametersAsyncTest() { List enumHeaderStringArray = default; - string enumHeaderString = default; List enumQueryStringArray = default; - string enumQueryString = default; int? enumQueryInteger = default; double? enumQueryDouble = default; + string enumHeaderString = default; + string enumQueryString = default; List enumFormStringArray = default; string enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs index 701ba7602823..9c3c48ffefe3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -56,14 +56,6 @@ public void CatInstanceTest() } - /// - /// Test the property 'Declawed' - /// - [Fact] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 6ce48e601e47..621877aa9732 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -57,20 +57,20 @@ public void CategoryInstanceTest() /// - /// Test the property 'Id' + /// Test the property 'Name' /// [Fact] - public void IdTest() + public void NameTest() { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Id' /// [Fact] - public void NameTest() + public void IdTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Id' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs index 68566fd8d560..0fe3ebfa06ef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -56,22 +56,6 @@ public void ChildCatInstanceTest() } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PetType' - /// - [Fact] - public void PetTypeTest() - { - // TODO unit test for the property 'PetType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs index b3529280c8d6..6c50fe7aab5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -56,22 +56,6 @@ public void ComplexQuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs index 992f93a51fd5..bf906f01bc63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -56,14 +56,6 @@ public void DogInstanceTest() } - /// - /// Test the property 'Breed' - /// - [Fact] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index 4f81b845d493..a22c39ca845d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -57,20 +57,20 @@ public void EnumTestInstanceTest() /// - /// Test the property 'EnumString' + /// Test the property 'EnumStringRequired' /// [Fact] - public void EnumStringTest() + public void EnumStringRequiredTest() { - // TODO unit test for the property 'EnumString' + // TODO unit test for the property 'EnumStringRequired' } /// - /// Test the property 'EnumStringRequired' + /// Test the property 'EnumString' /// [Fact] - public void EnumStringRequiredTest() + public void EnumStringTest() { - // TODO unit test for the property 'EnumStringRequired' + // TODO unit test for the property 'EnumString' } /// /// Test the property 'EnumInteger' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs index 4663cb667de6..9ca755c4b070 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -56,22 +56,6 @@ public void EquilateralTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 97332800e9af..707847bbcd19 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -56,6 +56,38 @@ public void FormatTestInstanceTest() } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Byte' + /// + [Fact] + public void ByteTest() + { + // TODO unit test for the property 'Byte' + } + /// + /// Test the property 'Date' + /// + [Fact] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'Password' + /// + [Fact] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } /// /// Test the property 'Integer' /// @@ -81,14 +113,6 @@ public void Int64Test() // TODO unit test for the property 'Int64' } /// - /// Test the property 'Number' - /// - [Fact] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// /// Test the property 'Float' /// [Fact] @@ -121,14 +145,6 @@ public void StringTest() // TODO unit test for the property 'String' } /// - /// Test the property 'Byte' - /// - [Fact] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// /// Test the property 'Binary' /// [Fact] @@ -137,14 +153,6 @@ public void BinaryTest() // TODO unit test for the property 'Binary' } /// - /// Test the property 'Date' - /// - [Fact] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// /// Test the property 'DateTime' /// [Fact] @@ -161,14 +169,6 @@ public void UuidTest() // TODO unit test for the property 'Uuid' } /// - /// Test the property 'Password' - /// - [Fact] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// /// Test the property 'PatternWithDigits' /// [Fact] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs index 5ea9e3ffc1d5..3a0b55b93e3f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -56,38 +56,6 @@ public void FruitReqInstanceTest() } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Mealy' - /// - [Fact] - public void MealyTest() - { - // TODO unit test for the property 'Mealy' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } - /// - /// Test the property 'Sweet' - /// - [Fact] - public void SweetTest() - { - // TODO unit test for the property 'Sweet' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs index 91e069bb42fa..ddc424d56ead 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -64,30 +64,6 @@ public void ColorTest() { // TODO unit test for the property 'Color' } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Origin' - /// - [Fact] - public void OriginTest() - { - // TODO unit test for the property 'Origin' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs index 08fb0e07a1c8..cbd35f9173c7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -64,30 +64,6 @@ public void ColorTest() { // TODO unit test for the property 'Color' } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Origin' - /// - [Fact] - public void OriginTest() - { - // TODO unit test for the property 'Origin' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs index 755c417cc54f..8e0dae934202 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -56,22 +56,6 @@ public void IsoscelesTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs index 7b46cbf06450..6477ab950fae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -56,38 +56,6 @@ public void MammalInstanceTest() } - /// - /// Test the property 'HasBaleen' - /// - [Fact] - public void HasBaleenTest() - { - // TODO unit test for the property 'HasBaleen' - } - /// - /// Test the property 'HasTeeth' - /// - [Fact] - public void HasTeethTest() - { - // TODO unit test for the property 'HasTeeth' - } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs index c390049e66dc..61f8ad11379f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -57,12 +57,12 @@ public void NameInstanceTest() /// - /// Test the property '_Name' + /// Test the property 'NameProperty' /// [Fact] - public void _NameTest() + public void NamePropertyTest() { - // TODO unit test for the property '_Name' + // TODO unit test for the property 'NameProperty' } /// /// Test the property 'SnakeCase' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs index 5662f91d6e64..8202ef63914b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -56,22 +56,6 @@ public void NullableShapeInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs index 154e66f8dfc0..28ea4d8478da 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -57,36 +57,36 @@ public void PetInstanceTest() /// - /// Test the property 'Id' + /// Test the property 'Name' /// [Fact] - public void IdTest() + public void NameTest() { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Category' + /// Test the property 'PhotoUrls' /// [Fact] - public void CategoryTest() + public void PhotoUrlsTest() { - // TODO unit test for the property 'Category' + // TODO unit test for the property 'PhotoUrls' } /// - /// Test the property 'Name' + /// Test the property 'Id' /// [Fact] - public void NameTest() + public void IdTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Id' } /// - /// Test the property 'PhotoUrls' + /// Test the property 'Category' /// [Fact] - public void PhotoUrlsTest() + public void CategoryTest() { - // TODO unit test for the property 'PhotoUrls' + // TODO unit test for the property 'Category' } /// /// Test the property 'Tags' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs index 55cf2189046b..a66befe8f581 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -56,14 +56,6 @@ public void PigInstanceTest() } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs index 26826681a478..3d62673d093e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -56,22 +56,6 @@ public void QuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index c8c1d6510d2f..65fa199fe35e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -57,12 +57,12 @@ public void ReturnInstanceTest() /// - /// Test the property '_Return' + /// Test the property 'ReturnProperty' /// [Fact] - public void _ReturnTest() + public void ReturnPropertyTest() { - // TODO unit test for the property '_Return' + // TODO unit test for the property 'ReturnProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs index 04cb9f1ab6b1..018dffb59642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -56,22 +56,6 @@ public void ScaleneTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs index d0af114157c9..ef5643576485 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -56,14 +56,6 @@ public void ShapeOrNullInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } /// /// Test the property 'QuadrilateralType' /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs index b01bd531f857..783a9657ed42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -56,14 +56,6 @@ public void ShapeInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } /// /// Test the property 'QuadrilateralType' /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs index 6648e9809281..3bcd65e792d6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -56,22 +56,6 @@ public void SimpleQuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 0f0e1ff12a9e..91682a7afd6a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -65,12 +65,12 @@ public void SpecialPropertyNameTest() // TODO unit test for the property 'SpecialPropertyName' } /// - /// Test the property '_SpecialModelName' + /// Test the property 'SpecialModelNameProperty' /// [Fact] - public void _SpecialModelNameTest() + public void SpecialModelNamePropertyTest() { - // TODO unit test for the property '_SpecialModelName' + // TODO unit test for the property 'SpecialModelNameProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs index 09610791943c..9b82c29c8fd8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -56,6 +56,14 @@ public void WhaleInstanceTest() } + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } /// /// Test the property 'HasBaleen' /// @@ -72,14 +80,6 @@ public void HasTeethTest() { // TODO unit test for the property 'HasTeeth' } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs index f44e92131400..39e0561fe0f8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -57,20 +57,20 @@ public void ZebraInstanceTest() /// - /// Test the property 'Type' + /// Test the property 'ClassName' /// [Fact] - public void TypeTest() + public void ClassNameTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'ClassName' } /// - /// Test the property 'ClassName' + /// Test the property 'Type' /// [Fact] - public void ClassNameTest() + public void TypeTest() { - // TODO unit test for the property 'ClassName' + // TODO unit test for the property 'Type' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 04fbded6ac35..5ee137f7dcd8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IAnotherFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient>> Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test special tags /// @@ -49,14 +48,15 @@ public interface IAnotherFakeApi : IApi /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - } + Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class AnotherFakeApi : IAnotherFakeApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -77,22 +77,22 @@ public partial class AnotherFakeApi : IAnotherFakeApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -102,13 +102,14 @@ public partial class AnotherFakeApi : IAnotherFakeApi /// Initializes a new instance of the class. /// /// - public AnotherFakeApi(ILogger logger, HttpClient httpClient, + public AnotherFakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -128,12 +129,13 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, public async Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -156,7 +158,6 @@ public async Task Call123TestSpecialTagsOrDefaultAsync(ModelClient ? result.Content : null; } - /// /// To test special tags To test special tags and operation ID starting with number @@ -170,45 +171,44 @@ public async Task> Call123TestSpecialTagsWithHttpInfoAs try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/another-fake/dummy"; - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Patch; + request.Method = HttpMethod.Patch; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -231,7 +231,7 @@ public async Task> Call123TestSpecialTagsWithHttpInfoAs ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -242,6 +242,5 @@ public async Task> Call123TestSpecialTagsWithHttpInfoAs Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs index ca94212113b8..33dbb5aeebcf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -37,7 +36,7 @@ public interface IDefaultApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<InlineResponseDefault>> Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -47,14 +46,15 @@ public interface IDefaultApi : IApi /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<InlineResponseDefault> - Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); - } + Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class DefaultApi : IDefaultApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -75,22 +75,22 @@ public partial class DefaultApi : IDefaultApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -100,13 +100,14 @@ public partial class DefaultApi : IDefaultApi /// Initializes a new instance of the class. /// /// - public DefaultApi(ILogger logger, HttpClient httpClient, + public DefaultApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -125,12 +126,13 @@ public DefaultApi(ILogger logger, HttpClient httpClient, public async Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// /// @@ -152,7 +154,6 @@ public async Task FooGetOrDefaultAsync(System.Threading.C ? result.Content : null; } - /// /// @@ -172,17 +173,17 @@ public async Task> FooGetWithHttpInfoAsync(Sy uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/foo"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -205,7 +206,7 @@ public async Task> FooGetWithHttpInfoAsync(Sy ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -216,6 +217,5 @@ public async Task> FooGetWithHttpInfoAsync(Sy Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs index 23b051d8c53d..7f5d17ef8104 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -37,7 +36,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<HealthCheckResult>> Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Health check endpoint /// @@ -48,8 +47,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<HealthCheckResult> Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -60,7 +58,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<bool>> Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -72,8 +70,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<bool> Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -84,7 +81,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<OuterComposite>> Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -96,8 +93,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<OuterComposite> Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -108,7 +104,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<decimal>> Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -120,8 +116,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<decimal> Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -132,7 +127,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<string>> Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -144,8 +139,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task FakeOuterStringSerializeAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Array of Enums /// /// @@ -155,7 +149,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<OuterEnum>>> Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Array of Enums /// @@ -166,8 +160,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<OuterEnum>> Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -178,7 +171,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -190,8 +183,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -203,7 +195,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -216,8 +208,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// To test \"client\" model /// /// @@ -228,7 +219,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient>> Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test \"client\" model /// @@ -240,8 +231,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// @@ -259,13 +249,13 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> - Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null); - + Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -284,14 +274,13 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test enum parameters /// /// @@ -299,17 +288,17 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> - Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - + Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test enum parameters /// @@ -318,18 +307,17 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEnumParametersAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Fake endpoint to test group parameters (optional) /// /// @@ -345,7 +333,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Fake endpoint to test group parameters (optional) /// @@ -362,8 +350,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// test inline additionalProperties /// /// @@ -374,7 +361,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test inline additionalProperties /// @@ -386,8 +373,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// test json serialization of form data /// /// @@ -399,7 +385,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test json serialization of form data /// @@ -412,8 +398,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -428,7 +413,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -443,14 +428,15 @@ public interface IFakeApi : IApi /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - } + Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FakeApi : IFakeApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -471,22 +457,22 @@ public partial class FakeApi : IFakeApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -496,13 +482,14 @@ public partial class FakeApi : IFakeApi /// Initializes a new instance of the class. /// /// - public FakeApi(ILogger logger, HttpClient httpClient, + public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -521,12 +508,13 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Health check endpoint /// @@ -548,7 +536,6 @@ public async Task FakeHealthGetOrDefaultAsync(System.Threadin ? result.Content : null; } - /// /// Health check endpoint @@ -568,17 +555,17 @@ public async Task> FakeHealthGetWithHttpInfoAsync uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/health"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -601,7 +588,7 @@ public async Task> FakeHealthGetWithHttpInfoAsync ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -624,7 +611,7 @@ public async Task> FakeHealthGetWithHttpInfoAsync public async Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -650,33 +637,32 @@ public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync( uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/boolean"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -699,7 +685,7 @@ public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync( ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -722,12 +708,13 @@ public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync( public async Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Test serialization of object with outer number type /// @@ -750,7 +737,6 @@ public async Task FakeOuterCompositeSerializeOrDefaultAsync(Oute ? result.Content : null; } - /// /// Test serialization of object with outer number type @@ -769,33 +755,32 @@ public async Task> FakeOuterCompositeSerializeWithHt uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/composite"; - - if ((outerComposite as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(outerComposite, ClientUtils.JsonSerializerSettings)); + + request.Content = (outerComposite as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(outerComposite, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -818,7 +803,7 @@ public async Task> FakeOuterCompositeSerializeWithHt ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -841,7 +826,7 @@ public async Task> FakeOuterCompositeSerializeWithHt public async Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -867,33 +852,32 @@ public async Task> FakeOuterNumberSerializeWithHttpInfoAsyn uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/number"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -916,7 +900,7 @@ public async Task> FakeOuterNumberSerializeWithHttpInfoAsyn ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -939,7 +923,7 @@ public async Task> FakeOuterNumberSerializeWithHttpInfoAsyn public async Task FakeOuterStringSerializeAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -965,33 +949,32 @@ public async Task> FakeOuterStringSerializeWithHttpInfoAsync uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/string"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1014,7 +997,7 @@ public async Task> FakeOuterStringSerializeWithHttpInfoAsync ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1036,12 +1019,13 @@ public async Task> FakeOuterStringSerializeWithHttpInfoAsync public async Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Array of Enums /// @@ -1063,7 +1047,6 @@ public async Task> GetArrayOfEnumsOrDefaultAsync(System.Threadin ? result.Content : null; } - /// /// Array of Enums @@ -1083,17 +1066,17 @@ public async Task>> GetArrayOfEnumsWithHttpInfoAsync uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/array-of-enums"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1116,7 +1099,7 @@ public async Task>> GetArrayOfEnumsWithHttpInfoAsync ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1139,12 +1122,13 @@ public async Task>> GetArrayOfEnumsWithHttpInfoAsync public async Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// For this test, the body for this request much reference a schema named `File`. /// @@ -1167,7 +1151,6 @@ public async Task TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestCla ? result.Content : null; } - /// /// For this test, the body for this request much reference a schema named `File`. @@ -1181,36 +1164,35 @@ public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(F try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (fileSchemaTestClass == null) throw new ArgumentNullException(nameof(fileSchemaTestClass)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/body-with-file-schema"; - - if ((fileSchemaTestClass as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(fileSchemaTestClass, ClientUtils.JsonSerializerSettings)); + + request.Content = (fileSchemaTestClass as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(fileSchemaTestClass, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1233,7 +1215,7 @@ public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(F ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1257,12 +1239,13 @@ public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(F public async Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// /// @@ -1286,7 +1269,6 @@ public async Task TestBodyWithQueryParamsOrDefaultAsync(string query, Us ? result.Content : null; } - /// /// @@ -1301,15 +1283,15 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (query == null) throw new ArgumentNullException(nameof(query)); - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1322,24 +1304,23 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( parseQueryString["query"] = Uri.EscapeDataString(query.ToString()); uriBuilder.Query = parseQueryString.ToString(); - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1362,7 +1343,7 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1385,12 +1366,13 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( public async Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test \"client\" model To test \"client\" model /// @@ -1413,7 +1395,6 @@ public async Task TestClientModelOrDefaultAsync(ModelClient modelCl ? result.Content : null; } - /// /// To test \"client\" model To test \"client\" model @@ -1427,45 +1408,44 @@ public async Task> TestClientModelWithHttpInfoAsync(Mod try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake"; - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Patch; + request.Method = HttpMethod.Patch; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1488,7 +1468,7 @@ public async Task> TestClientModelWithHttpInfoAsync(Mod ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1516,20 +1496,21 @@ public async Task> TestClientModelWithHttpInfoAsync(Mod /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); - + ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -1545,17 +1526,17 @@ public async Task TestEndpointParametersAsync(decimal number, double _do /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1565,7 +1546,6 @@ public async Task TestEndpointParametersOrDefaultAsync(decimal number, d ? result.Content : null; } - /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1582,25 +1562,25 @@ public async Task TestEndpointParametersOrDefaultAsync(decimal number, d /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); - + if (_byte == null) throw new ArgumentNullException(nameof(_byte)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1611,11 +1591,19 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); + formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); + + formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); + + formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); + + formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + if (integer != null) formParams.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer))); @@ -1624,36 +1612,28 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d if (int64 != null) formParams.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64))); - - formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); if (_float != null) formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); - - formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); if (_string != null) formParams.Add(new KeyValuePair("string", ClientUtils.ParameterToString(_string))); - - formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); - - formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); - + if (binary != null) multipartContent.Add(new StreamContent(binary)); if (date != null) formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); - if (dateTime != null) - formParams.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime))); - if (password != null) formParams.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password))); if (callback != null) formParams.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback))); + if (dateTime != null) + formParams.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime))); + List tokens = new List(); request.RequestUri = uriBuilder.Uri; @@ -1661,19 +1641,19 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(basicToken); - + basicToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1696,7 +1676,7 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1717,44 +1697,45 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); - + ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1764,23 +1745,22 @@ public async Task TestEnumParametersOrDefaultAsync(List enumHead ? result.Content : null; } - /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { try { @@ -1795,27 +1775,27 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< if (enumQueryStringArray != null) parseQueryString["enum_query_string_array"] = Uri.EscapeDataString(enumQueryStringArray.ToString()); - if (enumQueryString != null) - parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()); - if (enumQueryInteger != null) parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()); if (enumQueryDouble != null) parseQueryString["enum_query_double"] = Uri.EscapeDataString(enumQueryDouble.ToString()); + if (enumQueryString != null) + parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()); + uriBuilder.Query = parseQueryString.ToString(); - + if (enumHeaderStringArray != null) request.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray)); - + if (enumHeaderString != null) request.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString)); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); @@ -1827,17 +1807,17 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< formParams.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString))); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1860,7 +1840,7 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1888,12 +1868,13 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// @@ -1921,7 +1902,6 @@ public async Task TestGroupParametersOrDefaultAsync(int requiredStringGr ? result.Content : null; } - /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -1940,9 +1920,9 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1962,9 +1942,9 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int parseQueryString["int64_group"] = Uri.EscapeDataString(int64Group.ToString()); uriBuilder.Query = parseQueryString.ToString(); - + request.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); - + if (booleanGroup != null) request.Headers.Add("boolean_group", ClientUtils.ParameterToString(booleanGroup)); @@ -1975,10 +1955,10 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(bearerToken); - + bearerToken.UseInHeader(request, ""); - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2001,7 +1981,7 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -2027,12 +2007,13 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int public async Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// test inline additionalProperties /// @@ -2055,7 +2036,6 @@ public async Task TestInlineAdditionalPropertiesOrDefaultAsync(Dictionar ? result.Content : null; } - /// /// test inline additionalProperties @@ -2069,36 +2049,35 @@ public async Task> TestInlineAdditionalPropertiesWithHttpInf try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (requestBody == null) throw new ArgumentNullException(nameof(requestBody)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-additionalProperties"; - - if ((requestBody as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestBody, ClientUtils.JsonSerializerSettings)); + + request.Content = (requestBody as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2121,7 +2100,7 @@ public async Task> TestInlineAdditionalPropertiesWithHttpInf ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2145,12 +2124,13 @@ public async Task> TestInlineAdditionalPropertiesWithHttpInf public async Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// test json serialization of form data /// @@ -2174,7 +2154,6 @@ public async Task TestJsonFormDataOrDefaultAsync(string param, string pa ? result.Content : null; } - /// /// test json serialization of form data @@ -2189,15 +2168,15 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (param == null) throw new ArgumentNullException(nameof(param)); - + if (param2 == null) throw new ArgumentNullException(nameof(param2)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2208,27 +2187,27 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); - + formParams.Add(new KeyValuePair("param", ClientUtils.ParameterToString(param))); - + formParams.Add(new KeyValuePair("param2", ClientUtils.ParameterToString(param2))); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2251,7 +2230,7 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2278,12 +2257,13 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test the collection format in query parameters /// @@ -2310,7 +2290,6 @@ public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List< ? result.Content : null; } - /// /// To test the collection format in query parameters @@ -2328,24 +2307,24 @@ public async Task> TestQueryParameterCollectionFormatWithHtt try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (pipe == null) throw new ArgumentNullException(nameof(pipe)); - + if (ioutil == null) throw new ArgumentNullException(nameof(ioutil)); - + if (http == null) throw new ArgumentNullException(nameof(http)); - + if (url == null) throw new ArgumentNullException(nameof(url)); - + if (context == null) throw new ArgumentNullException(nameof(context)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2365,7 +2344,7 @@ public async Task> TestQueryParameterCollectionFormatWithHtt request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2388,7 +2367,7 @@ public async Task> TestQueryParameterCollectionFormatWithHtt ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2399,6 +2378,5 @@ public async Task> TestQueryParameterCollectionFormatWithHtt Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 64db05ad389b..bb3b0c42754f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IFakeClassnameTags123Api : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient>> Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test class name in snake case /// @@ -49,14 +48,15 @@ public interface IFakeClassnameTags123Api : IApi /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - } + Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -77,22 +77,22 @@ public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -102,13 +102,14 @@ public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// Initializes a new instance of the class. /// /// - public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, + public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -128,12 +129,13 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie public async Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test class name in snake case To test class name in snake case /// @@ -156,7 +158,6 @@ public async Task TestClassnameOrDefaultAsync(ModelClient modelClie ? result.Content : null; } - /// /// To test class name in snake case To test class name in snake case @@ -170,57 +171,56 @@ public async Task> TestClassnameWithHttpInfoAsync(Model try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake_classname_test"; - + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInQuery(request, uriBuilder, parseQueryString, "api_key_query"); - + uriBuilder.Query = parseQueryString.ToString(); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Patch; + request.Method = HttpMethod.Patch; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -243,7 +243,7 @@ public async Task> TestClassnameWithHttpInfoAsync(Model ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -257,6 +257,5 @@ public async Task> TestClassnameWithHttpInfoAsync(Model Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs index fc205708a1da..0e266cbd15aa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Add a new pet to the store /// @@ -50,8 +49,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Deletes a pet /// /// @@ -63,7 +61,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Deletes a pet /// @@ -76,8 +74,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeletePetAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Finds Pets by status /// /// @@ -88,7 +85,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<Pet>>> Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by status /// @@ -100,8 +97,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Finds Pets by tags /// /// @@ -112,7 +108,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<Pet>>> Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by tags /// @@ -124,8 +120,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Find pet by ID /// /// @@ -136,7 +131,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Pet>> Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find pet by ID /// @@ -148,8 +143,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Pet> Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Update an existing pet /// /// @@ -160,7 +154,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Update an existing pet /// @@ -172,8 +166,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Updates a pet in the store with form data /// /// @@ -186,7 +179,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updates a pet in the store with form data /// @@ -200,8 +193,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetWithFormAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// uploads an image /// /// @@ -214,7 +206,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse>> Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image /// @@ -228,8 +220,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// uploads an image (required) /// /// @@ -242,7 +233,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse>> Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image (required) /// @@ -255,14 +246,15 @@ public interface IPetApi : IApi /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> - Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - } + Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class PetApi : IPetApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -283,22 +275,22 @@ public partial class PetApi : IPetApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -308,13 +300,14 @@ public partial class PetApi : IPetApi /// Initializes a new instance of the class. /// /// - public PetApi(ILogger logger, HttpClient httpClient, + public PetApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -334,12 +327,13 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Add a new pet to the store /// @@ -362,7 +356,6 @@ public async Task AddPetOrDefaultAsync(Pet pet, System.Threading.Cancell ? result.Content : null; } - /// /// Add a new pet to the store @@ -376,28 +369,27 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (pet == null) throw new ArgumentNullException(nameof(pet)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; - - if ((pet as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(pet, ClientUtils.JsonSerializerSettings)); + + request.Content = (pet as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(pet, _jsonSerializerOptions)); List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -409,20 +401,20 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/json", "application/xml" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -445,7 +437,7 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -475,12 +467,13 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T public async Task DeletePetAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Deletes a pet /// @@ -504,7 +497,6 @@ public async Task DeletePetOrDefaultAsync(long petId, string apiKey = nu ? result.Content : null; } - /// /// Deletes a pet @@ -519,9 +511,9 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -529,7 +521,7 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - + if (apiKey != null) request.Headers.Add("api_key", ClientUtils.ParameterToString(apiKey)); @@ -540,10 +532,10 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -566,7 +558,7 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -592,12 +584,13 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st public async Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// @@ -620,7 +613,6 @@ public async Task> FindPetsByStatusOrDefaultAsync(List status, ? result.Content : null; } - /// /// Finds Pets by status Multiple status values can be provided with comma separated strings @@ -634,12 +626,12 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (status == null) throw new ArgumentNullException(nameof(status)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -656,7 +648,7 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -668,20 +660,20 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -704,7 +696,7 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -733,12 +725,13 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List public async Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// @@ -761,7 +754,6 @@ public async Task> FindPetsByTagsOrDefaultAsync(List tags, Sys ? result.Content : null; } - /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -775,12 +767,12 @@ public async Task>> FindPetsByTagsWithHttpInfoAsync(List>> FindPetsByTagsWithHttpInfoAsync(List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -809,20 +801,20 @@ public async Task>> FindPetsByTagsWithHttpInfoAsync(List>> FindPetsByTagsWithHttpInfoAsync(List> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -874,12 +866,13 @@ public async Task>> FindPetsByTagsWithHttpInfoAsync(List GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Find pet by ID Returns a single pet /// @@ -902,7 +895,6 @@ public async Task GetPetByIdOrDefaultAsync(long petId, System.Threading.Can ? result.Content : null; } - /// /// Find pet by ID Returns a single pet @@ -916,9 +908,9 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -928,26 +920,26 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInHeader(request, "api_key"); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -970,7 +962,7 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -996,12 +988,13 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst public async Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Update an existing pet /// @@ -1024,7 +1017,6 @@ public async Task UpdatePetOrDefaultAsync(Pet pet, System.Threading.Canc ? result.Content : null; } - /// /// Update an existing pet @@ -1038,28 +1030,27 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (pet == null) throw new ArgumentNullException(nameof(pet)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; - - if ((pet as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(pet, ClientUtils.JsonSerializerSettings)); + + request.Content = (pet as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(pet, _jsonSerializerOptions)); List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -1071,20 +1062,20 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/json", "application/xml" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1107,7 +1098,7 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1138,12 +1129,13 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste public async Task UpdatePetWithFormAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Updates a pet in the store with form data /// @@ -1168,7 +1160,6 @@ public async Task UpdatePetWithFormOrDefaultAsync(long petId, string nam ? result.Content : null; } - /// /// Updates a pet in the store with form data @@ -1184,9 +1175,9 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1198,7 +1189,7 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); @@ -1216,19 +1207,19 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1251,7 +1242,7 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1279,12 +1270,13 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p public async Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// uploads an image /// @@ -1309,7 +1301,6 @@ public async Task UploadFileOrDefaultAsync(long petId, string addit ? result.Content : null; } - /// /// uploads an image @@ -1325,9 +1316,9 @@ public async Task> UploadFileWithHttpInfoAsync(long pet try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1339,14 +1330,14 @@ public async Task> UploadFileWithHttpInfoAsync(long pet MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - + if (file != null) multipartContent.Add(new StreamContent(file)); @@ -1357,28 +1348,28 @@ public async Task> UploadFileWithHttpInfoAsync(long pet OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "multipart/form-data" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1401,7 +1392,7 @@ public async Task> UploadFileWithHttpInfoAsync(long pet ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1429,12 +1420,13 @@ public async Task> UploadFileWithHttpInfoAsync(long pet public async Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// uploads an image (required) /// @@ -1459,7 +1451,6 @@ public async Task UploadFileWithRequiredFileOrDefaultAsync(long pet ? result.Content : null; } - /// /// uploads an image (required) @@ -1475,12 +1466,12 @@ public async Task> UploadFileWithRequiredFileWithHttpIn try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (requiredFile == null) throw new ArgumentNullException(nameof(requiredFile)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1492,15 +1483,15 @@ public async Task> UploadFileWithRequiredFileWithHttpIn MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); + multipartContent.Add(new StreamContent(requiredFile)); + if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - - multipartContent.Add(new StreamContent(requiredFile)); List tokens = new List(); @@ -1509,28 +1500,28 @@ public async Task> UploadFileWithRequiredFileWithHttpIn OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "multipart/form-data" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1553,7 +1544,7 @@ public async Task> UploadFileWithRequiredFileWithHttpIn ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1567,6 +1558,5 @@ public async Task> UploadFileWithRequiredFileWithHttpIn Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs index 2fbc676393c5..98f8c541c05d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete purchase order by ID /// @@ -50,8 +49,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Returns pet inventories by status /// /// @@ -61,7 +59,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Dictionary<string, int>>> Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Returns pet inventories by status /// @@ -72,8 +70,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Dictionary<string, int>> Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Find purchase order by ID /// /// @@ -84,7 +81,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Order>> Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find purchase order by ID /// @@ -96,8 +93,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Place an order for a pet /// /// @@ -108,7 +104,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Order>> Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Place an order for a pet /// @@ -119,14 +115,15 @@ public interface IStoreApi : IApi /// order placed for purchasing the pet /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> - Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - } + Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class StoreApi : IStoreApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -147,22 +144,22 @@ public partial class StoreApi : IStoreApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -172,13 +169,14 @@ public partial class StoreApi : IStoreApi /// Initializes a new instance of the class. /// /// - public StoreApi(ILogger logger, HttpClient httpClient, + public StoreApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -198,12 +196,13 @@ public StoreApi(ILogger logger, HttpClient httpClient, public async Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -226,7 +225,6 @@ public async Task DeleteOrderOrDefaultAsync(string orderId, System.Threa ? result.Content : null; } - /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -240,12 +238,12 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (orderId == null) throw new ArgumentNullException(nameof(orderId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -256,7 +254,7 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -279,7 +277,7 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -301,7 +299,7 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order public async Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -328,25 +326,25 @@ public async Task>> GetInventoryWithHttpInfo uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/inventory"; List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInHeader(request, "api_key"); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -369,7 +367,7 @@ public async Task>> GetInventoryWithHttpInfo ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -395,12 +393,13 @@ public async Task>> GetInventoryWithHttpInfo public async Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// @@ -423,7 +422,6 @@ public async Task GetOrderByIdOrDefaultAsync(long orderId, System.Threadi ? result.Content : null; } - /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -437,9 +435,9 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -449,18 +447,18 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -483,7 +481,7 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -506,12 +504,13 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId public async Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Place an order for a pet /// @@ -534,7 +533,6 @@ public async Task PlaceOrderOrDefaultAsync(Order order, System.Threading. ? result.Content : null; } - /// /// Place an order for a pet @@ -548,46 +546,45 @@ public async Task> PlaceOrderWithHttpInfoAsync(Order order, S try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (order == null) throw new ArgumentNullException(nameof(order)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order"; - - if ((order as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(order, ClientUtils.JsonSerializerSettings)); + + request.Content = (order as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(order, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -610,7 +607,7 @@ public async Task> PlaceOrderWithHttpInfoAsync(Order order, S ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -621,6 +618,5 @@ public async Task> PlaceOrderWithHttpInfoAsync(Order order, S Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs index 389c19c783e1..39ab66ef1d80 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Create user /// @@ -50,8 +49,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Creates list of users with given input array /// /// @@ -62,7 +60,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -74,8 +72,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Creates list of users with given input array /// /// @@ -86,7 +83,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -98,8 +95,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Delete user /// /// @@ -110,7 +106,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete user /// @@ -122,8 +118,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Get user by user name /// /// @@ -134,7 +129,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<User>> Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Get user by user name /// @@ -146,8 +141,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<User> Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Logs user into the system /// /// @@ -159,7 +153,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<string>> Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs user into the system /// @@ -172,8 +166,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Logs out current logged in user session /// /// @@ -183,7 +176,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs out current logged in user session /// @@ -194,8 +187,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Updated user /// /// @@ -207,7 +199,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updated user /// @@ -219,14 +211,15 @@ public interface IUserApi : IApi /// Updated user object /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - } + Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class UserApi : IUserApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -247,22 +240,22 @@ public partial class UserApi : IUserApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -272,13 +265,14 @@ public partial class UserApi : IUserApi /// Initializes a new instance of the class. /// /// - public UserApi(ILogger logger, HttpClient httpClient, + public UserApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -298,12 +292,13 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Create user This can only be done by the logged in user. /// @@ -326,7 +321,6 @@ public async Task CreateUserOrDefaultAsync(User user, System.Threading.C ? result.Content : null; } - /// /// Create user This can only be done by the logged in user. @@ -340,36 +334,35 @@ public async Task> CreateUserWithHttpInfoAsync(User user, Sy try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -392,7 +385,7 @@ public async Task> CreateUserWithHttpInfoAsync(User user, Sy ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -415,12 +408,13 @@ public async Task> CreateUserWithHttpInfoAsync(User user, Sy public async Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Creates list of users with given input array /// @@ -443,7 +437,6 @@ public async Task CreateUsersWithArrayInputOrDefaultAsync(List use ? result.Content : null; } - /// /// Creates list of users with given input array @@ -457,36 +450,35 @@ public async Task> CreateUsersWithArrayInputWithHttpInfoAsyn try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/createWithArray"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -509,7 +501,7 @@ public async Task> CreateUsersWithArrayInputWithHttpInfoAsyn ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -532,12 +524,13 @@ public async Task> CreateUsersWithArrayInputWithHttpInfoAsyn public async Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Creates list of users with given input array /// @@ -560,7 +553,6 @@ public async Task CreateUsersWithListInputOrDefaultAsync(List user ? result.Content : null; } - /// /// Creates list of users with given input array @@ -574,36 +566,35 @@ public async Task> CreateUsersWithListInputWithHttpInfoAsync try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/createWithList"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Post; + request.Method = HttpMethod.Post; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -626,7 +617,7 @@ public async Task> CreateUsersWithListInputWithHttpInfoAsync ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -649,12 +640,13 @@ public async Task> CreateUsersWithListInputWithHttpInfoAsync public async Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Delete user This can only be done by the logged in user. /// @@ -677,7 +669,6 @@ public async Task DeleteUserOrDefaultAsync(string username, System.Threa ? result.Content : null; } - /// /// Delete user This can only be done by the logged in user. @@ -691,12 +682,12 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -707,7 +698,7 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Delete; + request.Method = HttpMethod.Delete; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -730,7 +721,7 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -753,12 +744,13 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna public async Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Get user by user name /// @@ -781,7 +773,6 @@ public async Task GetUserByNameOrDefaultAsync(string username, System.Thre ? result.Content : null; } - /// /// Get user by user name @@ -795,12 +786,12 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -810,18 +801,18 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -844,7 +835,7 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -868,7 +859,7 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -890,15 +881,15 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + if (password == null) throw new ArgumentNullException(nameof(password)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -914,18 +905,18 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam uriBuilder.Query = parseQueryString.ToString(); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -948,7 +939,7 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -970,12 +961,13 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam public async Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Logs out current logged in user session /// @@ -997,7 +989,6 @@ public async Task LogoutUserOrDefaultAsync(System.Threading.Cancellation ? result.Content : null; } - /// /// Logs out current logged in user session @@ -1018,7 +1009,7 @@ public async Task> LogoutUserWithHttpInfoAsync(System.Thread request.RequestUri = uriBuilder.Uri; - request.Method = HttpMethod.Get; + request.Method = HttpMethod.Get; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1041,7 +1032,7 @@ public async Task> LogoutUserWithHttpInfoAsync(System.Thread ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1065,12 +1056,13 @@ public async Task> LogoutUserWithHttpInfoAsync(System.Thread public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Updated user This can only be done by the logged in user. /// @@ -1094,7 +1086,6 @@ public async Task UpdateUserOrDefaultAsync(string username, User user, S ? result.Content : null; } - /// /// Updated user This can only be done by the logged in user. @@ -1109,15 +1100,15 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1125,24 +1116,23 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = HttpMethod.Put; + request.Method = HttpMethod.Put; using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1165,7 +1155,7 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1176,6 +1166,5 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs index 7d4a463a9657..5728b5976d90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; namespace Org.OpenAPITools.Client diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs index a364874a105c..f63fd5933291 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs @@ -1,7 +1,5 @@ // - - using System; namespace Org.OpenAPITools.Client diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 04e92f7b19eb..85b2801ccbfb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -8,12 +8,9 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; -using Newtonsoft.Json; namespace Org.OpenAPITools.Client { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BasicToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BasicToken.cs index 66cc12da4f66..c58c0563231f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BasicToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BasicToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BearerToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BearerToken.cs index 16f90e96c149..df5c2310bacd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BearerToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/BearerToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 7a500bb08964..4ac8055d7df0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -7,18 +7,18 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.IO; using System.Linq; +using System.Net.Http; using System.Text; +using System.Text.Json; using System.Text.RegularExpressions; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using Polly.Timeout; using Polly.Extensions.Http; using Polly; -using System.Net.Http; using Org.OpenAPITools.Api; using KellermanSoftware.CompareNetObjects; @@ -52,21 +52,48 @@ static ClientUtils() public delegate void EventHandler(object sender, T e) where T : EventArgs; /// - /// Custom JSON serializer + /// Returns true when deserialization succeeds. /// - public static Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; set; } = new Newtonsoft.Json.JsonSerializerSettings + /// + /// + /// + /// + /// + public static bool TryDeserialize(string json, JsonSerializerOptions options, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T result) { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = Newtonsoft.Json.ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore, - ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver + try { - NamingStrategy = new Newtonsoft.Json.Serialization.CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } + result = JsonSerializer.Deserialize(json, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; } - }; + } + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T result) + { + try + { + result = JsonSerializer.Deserialize(ref reader, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } /// /// Sanitize filename by removing the path diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs index 7581b3998404..e3200ba23917 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -7,13 +7,15 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Client { @@ -23,6 +25,8 @@ namespace Org.OpenAPITools.Client public class HostConfiguration { private readonly IServiceCollection _services; + private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + internal bool HttpClientsAdded { get; private set; } /// @@ -32,13 +36,36 @@ public class HostConfiguration public HostConfiguration(IServiceCollection services) { _services = services; - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + _jsonOptions.Converters.Add(new JsonStringEnumConverter()); + _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); + _jsonOptions.Converters.Add(new CatJsonConverter()); + _jsonOptions.Converters.Add(new ChildCatJsonConverter()); + _jsonOptions.Converters.Add(new ComplexQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new DogJsonConverter()); + _jsonOptions.Converters.Add(new EquilateralTriangleJsonConverter()); + _jsonOptions.Converters.Add(new FruitJsonConverter()); + _jsonOptions.Converters.Add(new FruitReqJsonConverter()); + _jsonOptions.Converters.Add(new GmFruitJsonConverter()); + _jsonOptions.Converters.Add(new IsoscelesTriangleJsonConverter()); + _jsonOptions.Converters.Add(new MammalJsonConverter()); + _jsonOptions.Converters.Add(new NullableShapeJsonConverter()); + _jsonOptions.Converters.Add(new ParentPetJsonConverter()); + _jsonOptions.Converters.Add(new PigJsonConverter()); + _jsonOptions.Converters.Add(new PolymorphicPropertyJsonConverter()); + _jsonOptions.Converters.Add(new QuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); + _jsonOptions.Converters.Add(new ShapeJsonConverter()); + _jsonOptions.Converters.Add(new ShapeOrNullJsonConverter()); + _jsonOptions.Converters.Add(new SimpleQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new TriangleJsonConverter()); + _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); } /// @@ -86,8 +113,7 @@ public HostConfiguration AddApiHttpClients /// /// - public HostConfiguration AddApiHttpClients( - Action client = null, Action builder = null) + public HostConfiguration AddApiHttpClients(Action client = null, Action builder = null) { AddApiHttpClients(client, builder); @@ -99,9 +125,9 @@ public HostConfiguration AddApiHttpClients( /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { - options(Client.ClientUtils.JsonSerializerSettings); + options(_jsonOptions); return this; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index 22d8834f4cb6..c06ba4c50a0e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.IO; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs index 7cc2dc394d7c..478d60e66756 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs new file mode 100644 index 000000000000..8fd6b68578f0 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs @@ -0,0 +1,25 @@ +// + +using System.Text.Json; + +namespace Org.OpenAPITools.Client +{ + /// + /// Provides the JsonSerializerOptions + /// + public class JsonSerializerOptionsProvider + { + /// + /// the JsonSerializerOptions + /// + public JsonSerializerOptions Options { get; } + + /// + /// Instantiates a JsonSerializerOptionsProvider + /// + public JsonSerializerOptionsProvider(JsonSerializerOptions options) + { + Options = options; + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OAuthToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OAuthToken.cs index 530e8211d821..ec4d08e9c99a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OAuthToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OAuthToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a5253e582013..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs new file mode 100644 index 000000000000..a280076c5a94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs @@ -0,0 +1,42 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateJsonConverter : JsonConverter + { + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + DateTime.ParseExact(reader.GetString(), "yyyy-MM-dd", CultureInfo.InvariantCulture); + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs index 15cc15143c06..fbebfbb2f62d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Threading.Channels; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenBase.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenBase.cs index 7098850e99e2..ec843104cafe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenBase.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenBase.cs @@ -1,7 +1,5 @@ // - - using System; namespace Org.OpenAPITools.Client diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs index 1be1b27f2a9f..ab372352e217 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs @@ -1,7 +1,5 @@ // - - using System.Linq; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs index cc3135247d17..7a9c7743e114 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Linq; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs deleted file mode 100644 index b3fc4c3c7a3a..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Org.OpenAPITools.Model -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Custom JSON serializer for objects with additional properties - /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 14d0e92eaa29..25b11f890faa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,87 +27,85 @@ namespace Org.OpenAPITools.Model /// /// AdditionalPropertiesClass /// - [DataContract(Name = "AdditionalPropertiesClass")] public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapProperty. - /// mapOfMapProperty. - /// anytype1. - /// mapWithUndeclaredPropertiesAnytype1. - /// mapWithUndeclaredPropertiesAnytype2. - /// mapWithUndeclaredPropertiesAnytype3. - /// an object with no declared properties and no undeclared properties, hence it's an empty map.. - /// mapWithUndeclaredPropertiesString. + /// mapProperty + /// mapOfMapProperty + /// anytype1 + /// mapWithUndeclaredPropertiesAnytype1 + /// mapWithUndeclaredPropertiesAnytype2 + /// mapWithUndeclaredPropertiesAnytype3 + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + /// mapWithUndeclaredPropertiesString public AdditionalPropertiesClass(Dictionary mapProperty = default, Dictionary> mapOfMapProperty = default, Object anytype1 = default, Object mapWithUndeclaredPropertiesAnytype1 = default, Object mapWithUndeclaredPropertiesAnytype2 = default, Dictionary mapWithUndeclaredPropertiesAnytype3 = default, Object emptyMap = default, Dictionary mapWithUndeclaredPropertiesString = default) { - this.MapProperty = mapProperty; - this.MapOfMapProperty = mapOfMapProperty; - this.Anytype1 = anytype1; - this.MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; - this.MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; - this.MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - this.EmptyMap = emptyMap; - this.MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; - this.AdditionalProperties = new Dictionary(); + MapProperty = mapProperty; + MapOfMapProperty = mapOfMapProperty; + Anytype1 = anytype1; + MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + EmptyMap = emptyMap; + MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; } /// /// Gets or Sets MapProperty /// - [DataMember(Name = "map_property", EmitDefaultValue = false)] + [JsonPropertyName("map_property")] public Dictionary MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// - [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] + [JsonPropertyName("map_of_map_property")] public Dictionary> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// - [DataMember(Name = "anytype_1", EmitDefaultValue = true)] + [JsonPropertyName("anytype_1")] public Object Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_1")] public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_2")] public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_3")] public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. - [DataMember(Name = "empty_map", EmitDefaultValue = false)] + [JsonPropertyName("empty_map")] public Object EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// - [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_string")] public Dictionary MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -132,15 +128,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs index 73eef4704068..4d287b1d2fdc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,54 +27,39 @@ namespace Org.OpenAPITools.Model /// /// Animal /// - [DataContract(Name = "Animal")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] public partial class Animal : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Animal() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). + /// className (required) + /// color (default to "red") public Animal(string className, string color = "red") { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); - } - this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? "red"; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for Animal and cannot be null."); + + ClassName = className; + Color = color; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets Color /// - [DataMember(Name = "color", EmitDefaultValue = false)] + [JsonPropertyName("color")] public string Color { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -94,15 +76,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs index e5fee65b6bc2..9410088a4138 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// ApiResponse /// - [DataContract(Name = "ApiResponse")] public partial class ApiResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// code. - /// type. - /// message. + /// code + /// type + /// message public ApiResponse(int code = default, string type = default, string message = default) { - this.Code = code; - this.Type = type; - this.Message = message; - this.AdditionalProperties = new Dictionary(); + Code = code; + Type = type; + Message = message; } /// /// Gets or Sets Code /// - [DataMember(Name = "code", EmitDefaultValue = false)] + [JsonPropertyName("code")] public int Code { get; set; } /// /// Gets or Sets Type /// - [DataMember(Name = "type", EmitDefaultValue = false)] + [JsonPropertyName("type")] public string Type { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name = "message", EmitDefaultValue = false)] + [JsonPropertyName("message")] public string Message { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs index adf8438c5912..d6a9cf50290a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// Apple /// - [DataContract(Name = "apple")] public partial class Apple : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cultivar. - /// origin. + /// cultivar + /// origin public Apple(string cultivar = default, string origin = default) { - this.Cultivar = cultivar; - this.Origin = origin; - this.AdditionalProperties = new Dictionary(); + Cultivar = cultivar; + Origin = origin; } /// /// Gets or Sets Cultivar /// - [DataMember(Name = "cultivar", EmitDefaultValue = false)] + [JsonPropertyName("cultivar")] public string Cultivar { get; set; } /// /// Gets or Sets Origin /// - [DataMember(Name = "origin", EmitDefaultValue = false)] + [JsonPropertyName("origin")] public string Origin { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs index 28ce313d0b60..48e37cc0aa88 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,39 +27,32 @@ namespace Org.OpenAPITools.Model /// /// AppleReq /// - [DataContract(Name = "appleReq")] public partial class AppleReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AppleReq() { } - /// - /// Initializes a new instance of the class. - /// - /// cultivar (required). - /// mealy. + /// cultivar (required) + /// mealy public AppleReq(string cultivar, bool mealy = default) { - // to ensure "cultivar" is required (not null) - if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); - } - this.Cultivar = cultivar; - this.Mealy = mealy; + if (cultivar == null) + throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null."); + + Cultivar = cultivar; + Mealy = mealy; } /// /// Gets or Sets Cultivar /// - [DataMember(Name = "cultivar", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("cultivar")] public string Cultivar { get; set; } /// /// Gets or Sets Mealy /// - [DataMember(Name = "mealy", EmitDefaultValue = true)] + [JsonPropertyName("mealy")] public bool Mealy { get; set; } /// @@ -78,15 +69,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index a342794fafaa..256a6b596ad2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfArrayOfNumberOnly /// - [DataContract(Name = "ArrayOfArrayOfNumberOnly")] public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayArrayNumber. + /// arrayArrayNumber public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default) { - this.ArrayArrayNumber = arrayArrayNumber; - this.AdditionalProperties = new Dictionary(); + ArrayArrayNumber = arrayArrayNumber; } /// /// Gets or Sets ArrayArrayNumber /// - [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] + [JsonPropertyName("ArrayArrayNumber")] public List> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 349fc7ef5a1d..6c462dddf1e2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfNumberOnly /// - [DataContract(Name = "ArrayOfNumberOnly")] public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayNumber. + /// arrayNumber public ArrayOfNumberOnly(List arrayNumber = default) { - this.ArrayNumber = arrayNumber; - this.AdditionalProperties = new Dictionary(); + ArrayNumber = arrayNumber; } /// /// Gets or Sets ArrayNumber /// - [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] + [JsonPropertyName("ArrayNumber")] public List ArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs index b7f6f3cd1779..f9872d701057 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// ArrayTest /// - [DataContract(Name = "ArrayTest")] public partial class ArrayTest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. + /// arrayOfString + /// arrayArrayOfInteger + /// arrayArrayOfModel public ArrayTest(List arrayOfString = default, List> arrayArrayOfInteger = default, List> arrayArrayOfModel = default) { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - this.AdditionalProperties = new Dictionary(); + ArrayOfString = arrayOfString; + ArrayArrayOfInteger = arrayArrayOfInteger; + ArrayArrayOfModel = arrayArrayOfModel; } /// /// Gets or Sets ArrayOfString /// - [DataMember(Name = "array_of_string", EmitDefaultValue = false)] + [JsonPropertyName("array_of_string")] public List ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// - [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] + [JsonPropertyName("array_array_of_integer")] public List> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// - [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] + [JsonPropertyName("array_array_of_model")] public List> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs index bb1962fc2b2f..3192691eb715 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Banana /// - [DataContract(Name = "banana")] public partial class Banana : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// lengthCm. + /// lengthCm public Banana(decimal lengthCm = default) { - this.LengthCm = lengthCm; - this.AdditionalProperties = new Dictionary(); + LengthCm = lengthCm; } /// /// Gets or Sets LengthCm /// - [DataMember(Name = "lengthCm", EmitDefaultValue = false)] + [JsonPropertyName("lengthCm")] public decimal LengthCm { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs index 812c91b012fe..95ea0488f230 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,35 +27,32 @@ namespace Org.OpenAPITools.Model /// /// BananaReq /// - [DataContract(Name = "bananaReq")] public partial class BananaReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected BananaReq() { } - /// - /// Initializes a new instance of the class. - /// - /// lengthCm (required). - /// sweet. + /// lengthCm (required) + /// sweet public BananaReq(decimal lengthCm, bool sweet = default) { - this.LengthCm = lengthCm; - this.Sweet = sweet; + if (lengthCm == null) + throw new ArgumentNullException("lengthCm is a required property for BananaReq and cannot be null."); + + LengthCm = lengthCm; + Sweet = sweet; } /// /// Gets or Sets LengthCm /// - [DataMember(Name = "lengthCm", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("lengthCm")] public decimal LengthCm { get; set; } /// /// Gets or Sets Sweet /// - [DataMember(Name = "sweet", EmitDefaultValue = true)] + [JsonPropertyName("sweet")] public bool Sweet { get; set; } /// @@ -74,15 +69,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs index 0706a3e8196b..fc19bc19279c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// BasquePig /// - [DataContract(Name = "BasquePig")] public partial class BasquePig : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected BasquePig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). + /// className (required) public BasquePig(string className) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); - } - this.ClassName = className; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for BasquePig and cannot be null."); + + ClassName = className; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs index 377781227e62..92d924949679 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,71 +27,69 @@ namespace Org.OpenAPITools.Model /// /// Capitalization /// - [DataContract(Name = "Capitalization")] public partial class Capitalization : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . + /// smallCamel + /// capitalCamel + /// smallSnake + /// capitalSnake + /// sCAETHFlowPoints + /// Name of the pet public Capitalization(string smallCamel = default, string capitalCamel = default, string smallSnake = default, string capitalSnake = default, string sCAETHFlowPoints = default, string aTTNAME = default) { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - this.AdditionalProperties = new Dictionary(); + SmallCamel = smallCamel; + CapitalCamel = capitalCamel; + SmallSnake = smallSnake; + CapitalSnake = capitalSnake; + SCAETHFlowPoints = sCAETHFlowPoints; + ATT_NAME = aTTNAME; } /// /// Gets or Sets SmallCamel /// - [DataMember(Name = "smallCamel", EmitDefaultValue = false)] + [JsonPropertyName("smallCamel")] public string SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// - [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] + [JsonPropertyName("CapitalCamel")] public string CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// - [DataMember(Name = "small_Snake", EmitDefaultValue = false)] + [JsonPropertyName("small_Snake")] public string SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// - [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] + [JsonPropertyName("Capital_Snake")] public string CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// - [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] + [JsonPropertyName("SCA_ETH_Flow_Points")] public string SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet - [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] + [JsonPropertyName("ATT_NAME")] public string ATT_NAME { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,15 +110,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs index d7c0634c555a..b8c35dd406ab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,41 +27,30 @@ namespace Org.OpenAPITools.Model /// /// Cat /// - [DataContract(Name = "Cat")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - public partial class Cat : Animal, IEquatable, IValidatableObject + public partial class Cat : Animal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Cat() + /// + /// + /// className (required) + /// color (default to "red") + public Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required) (default to "Cat"). - /// declawed. - /// color (default to "red"). - public Cat(string className = "Cat", bool declawed = default, string color = "red") : base(className, color) - { - this.Declawed = declawed; - this.AdditionalProperties = new Dictionary(); + Dictionary = dictionary; + CatAllOf = catAllOf; } /// - /// Gets or Sets Declawed + /// Gets or Sets Dictionary /// - [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Dictionary Dictionary { get; set; } /// - /// Gets or Sets additional properties + /// Gets or Sets CatAllOf /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public CatAllOf CatAllOf { get; set; } /// /// Returns the string presentation of the object @@ -75,21 +61,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -119,38 +94,80 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type Cat + /// + public class CatJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Cat).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override Cat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader dictionaryReader = reader; + bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref dictionaryReader, options, out Dictionary dictionary); + + Utf8JsonReader catAllOfReader = reader; + bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref catAllOfReader, options, out CatAllOf catAllOf); + + string className = default; + string color = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + } + } } - yield break; + + return new Cat(dictionary, catAllOf, className, color); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs index 5aa226e03f6e..f1f19c6c88d6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// CatAllOf /// - [DataContract(Name = "Cat_allOf")] public partial class CatAllOf : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// declawed. + /// declawed public CatAllOf(bool declawed = default) { - this.Declawed = declawed; - this.AdditionalProperties = new Dictionary(); + Declawed = declawed; } /// /// Gets or Sets Declawed /// - [DataMember(Name = "declawed", EmitDefaultValue = true)] + [JsonPropertyName("declawed")] public bool Declawed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs index 8cd4fe7e9ac9..be6a1620b10b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,50 +27,39 @@ namespace Org.OpenAPITools.Model /// /// Category /// - [DataContract(Name = "Category")] public partial class Category : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Category() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required) (default to "default-name"). - /// id. + /// name (required) (default to "default-name") + /// id public Category(string name = "default-name", long id = default) { - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); - } - this.Name = name; - this.Id = id; - this.AdditionalProperties = new Dictionary(); + if (name == null) + throw new ArgumentNullException("name is a required property for Category and cannot be null."); + + Name = name; + Id = id; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -89,15 +76,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs index 991717f25912..5245528adb8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,61 +27,22 @@ namespace Org.OpenAPITools.Model /// /// ChildCat /// - [DataContract(Name = "ChildCat")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - public partial class ChildCat : ParentPet, IEquatable, IValidatableObject + public partial class ChildCat : ParentPet, IEquatable { - /// - /// Defines PetType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PetTypeEnum - { - /// - /// Enum ChildCat for value: ChildCat - /// - [EnumMember(Value = "ChildCat")] - ChildCat = 1 - - } - - - /// - /// Gets or Sets PetType - /// - [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] - public PetTypeEnum PetType { get; set; } /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ChildCat() + /// + /// petType (required) + public ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) { - this.AdditionalProperties = new Dictionary(); + ChildCatAllOf = childCatAllOf; } - /// - /// Initializes a new instance of the class. - /// - /// petType (required) (default to PetTypeEnum.ChildCat). - /// name. - public ChildCat(PetTypeEnum petType = PetTypeEnum.ChildCat, string name = default) : base() - { - this.PetType = petType; - this.Name = name; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } /// - /// Gets or Sets additional properties + /// Gets or Sets ChildCatAllOf /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public ChildCatAllOf ChildCatAllOf { get; set; } /// /// Returns the string presentation of the object @@ -95,22 +53,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" PetType: ").Append(PetType).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -140,42 +86,73 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type ChildCat + /// + public class ChildCatJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ChildCat).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override ChildCat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader childCatAllOfReader = reader; + bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref childCatAllOfReader, options, out ChildCatAllOf childCatAllOf); + + string petType = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + } + } } - yield break; + + return new ChildCat(childCatAllOf, petType); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index 483062ead25b..bc601c217baa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,22 @@ namespace Org.OpenAPITools.Model /// /// ChildCatAllOf /// - [DataContract(Name = "ChildCat_allOf")] public partial class ChildCatAllOf : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// name + /// petType (default to PetTypeEnum.ChildCat) + public ChildCatAllOf(string name = default, PetTypeEnum petType = PetTypeEnum.ChildCat) + { + Name = name; + PetType = petType; + } + /// /// Defines PetType /// - [JsonConverter(typeof(StringEnumConverter))] public enum PetTypeEnum { /// @@ -46,35 +53,23 @@ public enum PetTypeEnum } - /// /// Gets or Sets PetType /// - [DataMember(Name = "pet_type", EmitDefaultValue = false)] + [JsonPropertyName("pet_type")] public PetTypeEnum PetType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// name. - /// petType (default to PetTypeEnum.ChildCat). - public ChildCatAllOf(string name = default, PetTypeEnum petType = PetTypeEnum.ChildCat) - { - this.Name = name; - this.PetType = petType; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -91,15 +86,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs index fa446f3a33ff..84a40d948990 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model with \"_class\" property /// - [DataContract(Name = "ClassModel")] public partial class ClassModel : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _class. + /// _class public ClassModel(string _class = default) { - this.Class = _class; - this.AdditionalProperties = new Dictionary(); + Class = _class; } /// /// Gets or Sets Class /// - [DataMember(Name = "_class", EmitDefaultValue = false)] + [JsonPropertyName("_class")] public string Class { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index ab75994ddf5c..2ec6fa15f310 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// ComplexQuadrilateral /// - [DataContract(Name = "ComplexQuadrilateral")] public partial class ComplexQuadrilateral : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ComplexQuadrilateral() + /// + /// + public ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// quadrilateralType (required). - public ComplexQuadrilateral(string shapeType, string quadrilateralType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + QuadrilateralInterface = quadrilateralInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets QuadrilateralType + /// Gets or Sets QuadrilateralInterface /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] - public string QuadrilateralType { get; set; } + public QuadrilateralInterface QuadrilateralInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ComplexQuadrilateral {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type ComplexQuadrilateral + /// + public class ComplexQuadrilateralJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ComplexQuadrilateral).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ComplexQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader quadrilateralInterfaceReader = reader; + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new ComplexQuadrilateral(shapeInterface, quadrilateralInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs index 7314bf3a2140..fdcd66cce71f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// DanishPig /// - [DataContract(Name = "DanishPig")] public partial class DanishPig : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DanishPig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). + /// className (required) public DanishPig(string className) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); - } - this.ClassName = className; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for DanishPig and cannot be null."); + + ClassName = className; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs index a900bc224e49..d04aa0065507 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// DeprecatedObject /// - [DataContract(Name = "DeprecatedObject")] public partial class DeprecatedObject : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name. + /// name public DeprecatedObject(string name = default) { - this.Name = name; - this.AdditionalProperties = new Dictionary(); + Name = name; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs index d34b90a530d3..e00bc00421c1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,41 +27,23 @@ namespace Org.OpenAPITools.Model /// /// Dog /// - [DataContract(Name = "Dog")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - public partial class Dog : Animal, IEquatable, IValidatableObject + public partial class Dog : Animal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Dog() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required) (default to "Dog"). - /// breed. - /// color (default to "red"). - public Dog(string className = "Dog", string breed = default, string color = "red") : base(className, color) + /// + /// className (required) + /// color (default to "red") + public Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) { - this.Breed = breed; - this.AdditionalProperties = new Dictionary(); + DogAllOf = dogAllOf; } /// - /// Gets or Sets Breed + /// Gets or Sets DogAllOf /// - [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public DogAllOf DogAllOf { get; set; } /// /// Returns the string presentation of the object @@ -75,21 +54,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -119,41 +87,77 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) - { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type Dog + /// + public class DogJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Dog).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override Dog Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader dogAllOfReader = reader; + bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref dogAllOfReader, options, out DogAllOf dogAllOf); + + string className = default; + string color = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + } + } } - yield break; + + return new Dog(dogAllOf, className, color); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs index 7563294d9944..e35252fa2639 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// DogAllOf /// - [DataContract(Name = "Dog_allOf")] public partial class DogAllOf : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// breed. + /// breed public DogAllOf(string breed = default) { - this.Breed = breed; - this.AdditionalProperties = new Dictionary(); + Breed = breed; } /// /// Gets or Sets Breed /// - [DataMember(Name = "breed", EmitDefaultValue = false)] + [JsonPropertyName("breed")] public string Breed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs index bbec316ee186..4cb653c55d27 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,45 @@ namespace Org.OpenAPITools.Model /// /// Drawing /// - [DataContract(Name = "Drawing")] public partial class Drawing : Dictionary, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mainShape. - /// shapeOrNull. - /// nullableShape. - /// shapes. + /// mainShape + /// shapeOrNull + /// nullableShape + /// shapes public Drawing(Shape mainShape = default, ShapeOrNull shapeOrNull = default, NullableShape nullableShape = default, List shapes = default) : base() { - this.MainShape = mainShape; - this.ShapeOrNull = shapeOrNull; - this.NullableShape = nullableShape; - this.Shapes = shapes; + MainShape = mainShape; + ShapeOrNull = shapeOrNull; + NullableShape = nullableShape; + Shapes = shapes; } /// /// Gets or Sets MainShape /// - [DataMember(Name = "mainShape", EmitDefaultValue = false)] + [JsonPropertyName("mainShape")] public Shape MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// - [DataMember(Name = "shapeOrNull", EmitDefaultValue = false)] + [JsonPropertyName("shapeOrNull")] public ShapeOrNull ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// - [DataMember(Name = "nullableShape", EmitDefaultValue = true)] + [JsonPropertyName("nullableShape")] public NullableShape NullableShape { get; set; } /// /// Gets or Sets Shapes /// - [DataMember(Name = "shapes", EmitDefaultValue = false)] + [JsonPropertyName("shapes")] public List Shapes { get; set; } /// @@ -88,15 +85,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs index f8a52d1b5faf..95fff02c5688 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,22 @@ namespace Org.OpenAPITools.Model /// /// EnumArrays /// - [DataContract(Name = "EnumArrays")] public partial class EnumArrays : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// justSymbol + /// arrayEnum + public EnumArrays(JustSymbolEnum justSymbol = default, List arrayEnum = default) + { + JustSymbol = justSymbol; + ArrayEnum = arrayEnum; + } + /// /// Defines JustSymbol /// - [JsonConverter(typeof(StringEnumConverter))] public enum JustSymbolEnum { /// @@ -52,16 +59,15 @@ public enum JustSymbolEnum } - /// /// Gets or Sets JustSymbol /// - [DataMember(Name = "just_symbol", EmitDefaultValue = false)] + [JsonPropertyName("just_symbol")] public JustSymbolEnum JustSymbol { get; set; } + /// /// Defines ArrayEnum /// - [JsonConverter(typeof(StringEnumConverter))] public enum ArrayEnumEnum { /// @@ -79,29 +85,17 @@ public enum ArrayEnumEnum } - /// /// Gets or Sets ArrayEnum /// - [DataMember(Name = "array_enum", EmitDefaultValue = false)] + [JsonPropertyName("array_enum")] public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum justSymbol = default, List arrayEnum = default) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -118,15 +112,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs index 48b3d7d0e7e0..390f7f6ea5cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +27,6 @@ namespace Org.OpenAPITools.Model /// /// Defines EnumClass /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumClass { /// @@ -51,5 +48,4 @@ public enum EnumClass Xyz = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs index b1b8afaa9a60..273116bc0365 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,39 @@ namespace Org.OpenAPITools.Model /// /// EnumTest /// - [DataContract(Name = "Enum_Test")] public partial class EnumTest : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// enumStringRequired (required) + /// enumString + /// enumInteger + /// enumIntegerOnly + /// enumNumber + /// outerEnum + /// outerEnumInteger + /// outerEnumDefaultValue + /// outerEnumIntegerDefaultValue + public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum enumString = default, EnumIntegerEnum enumInteger = default, EnumIntegerOnlyEnum enumIntegerOnly = default, EnumNumberEnum enumNumber = default, OuterEnum outerEnum = default, OuterEnumInteger outerEnumInteger = default, OuterEnumDefaultValue outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default) + { + if (enumStringRequired == null) + throw new ArgumentNullException("enumStringRequired is a required property for EnumTest and cannot be null."); + + EnumStringRequired = enumStringRequired; + EnumString = enumString; + EnumInteger = enumInteger; + EnumIntegerOnly = enumIntegerOnly; + EnumNumber = enumNumber; + OuterEnum = outerEnum; + OuterEnumInteger = outerEnumInteger; + OuterEnumDefaultValue = outerEnumDefaultValue; + OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + } + /// /// Defines EnumStringRequired /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumStringRequiredEnum { /// @@ -58,16 +82,15 @@ public enum EnumStringRequiredEnum } - /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name = "enum_string_required", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("enum_string_required")] public EnumStringRequiredEnum EnumStringRequired { get; set; } + /// /// Defines EnumString /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumStringEnum { /// @@ -90,12 +113,12 @@ public enum EnumStringEnum } - /// /// Gets or Sets EnumString /// - [DataMember(Name = "enum_string", EmitDefaultValue = false)] + [JsonPropertyName("enum_string")] public EnumStringEnum EnumString { get; set; } + /// /// Defines EnumInteger /// @@ -113,12 +136,12 @@ public enum EnumIntegerEnum } - /// /// Gets or Sets EnumInteger /// - [DataMember(Name = "enum_integer", EmitDefaultValue = false)] + [JsonPropertyName("enum_integer")] public EnumIntegerEnum EnumInteger { get; set; } + /// /// Defines EnumIntegerOnly /// @@ -136,16 +159,15 @@ public enum EnumIntegerOnlyEnum } - /// /// Gets or Sets EnumIntegerOnly /// - [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] + [JsonPropertyName("enum_integer_only")] public EnumIntegerOnlyEnum EnumIntegerOnly { get; set; } + /// /// Defines EnumNumber /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumNumberEnum { /// @@ -162,75 +184,41 @@ public enum EnumNumberEnum } - /// /// Gets or Sets EnumNumber /// - [DataMember(Name = "enum_number", EmitDefaultValue = false)] + [JsonPropertyName("enum_number")] public EnumNumberEnum EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// - [DataMember(Name = "outerEnum", EmitDefaultValue = true)] + [JsonPropertyName("outerEnum")] public OuterEnum OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// - [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumInteger")] public OuterEnumInteger OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// - [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumDefaultValue")] public OuterEnumDefaultValue OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// - [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumIntegerDefaultValue")] public OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// enumStringRequired (required). - /// enumString. - /// enumInteger. - /// enumIntegerOnly. - /// enumNumber. - /// outerEnum. - /// outerEnumInteger. - /// outerEnumDefaultValue. - /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum enumString = default, EnumIntegerEnum enumInteger = default, EnumIntegerOnlyEnum enumIntegerOnly = default, EnumNumberEnum enumNumber = default, OuterEnum outerEnum = default, OuterEnumInteger outerEnumInteger = default, OuterEnumDefaultValue outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default) - { - this.EnumStringRequired = enumStringRequired; - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumIntegerOnly = enumIntegerOnly; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - this.OuterEnumInteger = outerEnumInteger; - this.OuterEnumDefaultValue = outerEnumDefaultValue; - this.OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -254,15 +242,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 43e72bd635aa..e6fc1aa4f310 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// EquilateralTriangle /// - [DataContract(Name = "EquilateralTriangle")] public partial class EquilateralTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected EquilateralTriangle() + /// + /// + public EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public EquilateralTriangle(string shapeType, string triangleType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EquilateralTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type EquilateralTriangle + /// + public class EquilateralTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(EquilateralTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EquilateralTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new EquilateralTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs index e4d0738adbf6..86163355eaf7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,31 +27,29 @@ namespace Org.OpenAPITools.Model /// /// Must be named `File` for test. /// - [DataContract(Name = "File")] public partial class File : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Test capitalization. + /// Test capitalization public File(string sourceURI = default) { - this.SourceURI = sourceURI; - this.AdditionalProperties = new Dictionary(); + SourceURI = sourceURI; } /// /// Test capitalization /// /// Test capitalization - [DataMember(Name = "sourceURI", EmitDefaultValue = false)] + [JsonPropertyName("sourceURI")] public string SourceURI { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,15 +65,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 423799cb24e8..366ead31ee14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// FileSchemaTestClass /// - [DataContract(Name = "FileSchemaTestClass")] public partial class FileSchemaTestClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// file. - /// files. + /// file + /// files public FileSchemaTestClass(File file = default, List files = default) { - this.File = file; - this.Files = files; - this.AdditionalProperties = new Dictionary(); + File = file; + Files = files; } /// /// Gets or Sets File /// - [DataMember(Name = "file", EmitDefaultValue = false)] + [JsonPropertyName("file")] public File File { get; set; } /// /// Gets or Sets Files /// - [DataMember(Name = "files", EmitDefaultValue = false)] + [JsonPropertyName("files")] public List Files { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs index e64aac7b6317..8be5cfe140bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,31 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Foo /// - [DataContract(Name = "Foo")] public partial class Foo : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bar (default to "bar"). + /// bar (default to "bar") public Foo(string bar = "bar") { - // use default value if no "bar" provided - this.Bar = bar ?? "bar"; - this.AdditionalProperties = new Dictionary(); + Bar = bar; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string Bar { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs index 8b846d403ffb..a767556f460f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,169 +27,162 @@ namespace Org.OpenAPITools.Model /// /// FormatTest /// - [DataContract(Name = "format_test")] public partial class FormatTest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected FormatTest() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// number (required). - /// _byte (required). - /// date (required). - /// password (required). - /// integer. - /// int32. - /// int64. - /// _float. - /// _double. - /// _decimal. - /// _string. - /// binary. - /// dateTime. - /// uuid. - /// A string that is a 10 digit number. Can have leading zeros.. - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. + /// number (required) + /// _byte (required) + /// date (required) + /// password (required) + /// integer + /// int32 + /// int64 + /// _float + /// _double + /// _decimal + /// _string + /// binary + /// dateTime + /// uuid + /// A string that is a 10 digit number. Can have leading zeros. + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int integer = default, int int32 = default, long int64 = default, float _float = default, double _double = default, decimal _decimal = default, string _string = default, System.IO.Stream binary = default, DateTime dateTime = default, Guid uuid = default, string patternWithDigits = default, string patternWithDigitsAndDelimiter = default) { - this.Number = number; - // to ensure "_byte" is required (not null) - if (_byte == null) { - throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); - } - this.Byte = _byte; - this.Date = date; - // to ensure "password" is required (not null) - if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); - } - this.Password = password; - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.Decimal = _decimal; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.PatternWithDigits = patternWithDigits; - this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - this.AdditionalProperties = new Dictionary(); + if (number == null) + throw new ArgumentNullException("number is a required property for FormatTest and cannot be null."); + + if (_byte == null) + throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null."); + + if (date == null) + throw new ArgumentNullException("date is a required property for FormatTest and cannot be null."); + + if (password == null) + throw new ArgumentNullException("password is a required property for FormatTest and cannot be null."); + + Number = number; + Byte = _byte; + Date = date; + Password = password; + Integer = integer; + Int32 = int32; + Int64 = int64; + Float = _float; + Double = _double; + Decimal = _decimal; + String = _string; + Binary = binary; + DateTime = dateTime; + Uuid = uuid; + PatternWithDigits = patternWithDigits; + PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } /// /// Gets or Sets Number /// - [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("number")] public decimal Number { get; set; } /// /// Gets or Sets Byte /// - [DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("byte")] public byte[] Byte { get; set; } /// /// Gets or Sets Date /// - [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] + [JsonPropertyName("date")] public DateTime Date { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("password")] public string Password { get; set; } /// /// Gets or Sets Integer /// - [DataMember(Name = "integer", EmitDefaultValue = false)] + [JsonPropertyName("integer")] public int Integer { get; set; } /// /// Gets or Sets Int32 /// - [DataMember(Name = "int32", EmitDefaultValue = false)] + [JsonPropertyName("int32")] public int Int32 { get; set; } /// /// Gets or Sets Int64 /// - [DataMember(Name = "int64", EmitDefaultValue = false)] + [JsonPropertyName("int64")] public long Int64 { get; set; } /// /// Gets or Sets Float /// - [DataMember(Name = "float", EmitDefaultValue = false)] + [JsonPropertyName("float")] public float Float { get; set; } /// /// Gets or Sets Double /// - [DataMember(Name = "double", EmitDefaultValue = false)] + [JsonPropertyName("double")] public double Double { get; set; } /// /// Gets or Sets Decimal /// - [DataMember(Name = "decimal", EmitDefaultValue = false)] + [JsonPropertyName("decimal")] public decimal Decimal { get; set; } /// /// Gets or Sets String /// - [DataMember(Name = "string", EmitDefaultValue = false)] + [JsonPropertyName("string")] public string String { get; set; } /// /// Gets or Sets Binary /// - [DataMember(Name = "binary", EmitDefaultValue = false)] + [JsonPropertyName("binary")] public System.IO.Stream Binary { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name = "dateTime", EmitDefaultValue = false)] + [JsonPropertyName("dateTime")] public DateTime DateTime { get; set; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public Guid Uuid { get; set; } /// /// A string that is a 10 digit number. Can have leading zeros. /// /// A string that is a 10 digit number. Can have leading zeros. - [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] + [JsonPropertyName("pattern_with_digits")] public string PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] + [JsonPropertyName("pattern_with_digits_and_delimiter")] public string PatternWithDigitsAndDelimiter { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -222,15 +213,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs index 726b1e8f72e7..95c524884469 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,95 +17,55 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Fruit /// - [JsonConverter(typeof(FruitJsonConverter))] - [DataContract(Name = "fruit")] - public partial class Fruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Fruit : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Apple. - public Fruit(Apple actualInstance) + /// + /// color + public Fruit(Apple apple, string color = default) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Apple = apple; + Color = color; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Banana. - public Fruit(Banana actualInstance) + /// + /// color + public Fruit(Banana banana, string color = default) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Banana = banana; + Color = color; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Apple /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Apple)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Banana)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); - } - } - } + public Apple Apple { get; set; } /// - /// Get the actual instance of `Apple`. If the actual instance is not `Apple`, - /// the InvalidClassException will be thrown + /// Gets or Sets Banana /// - /// An instance of Apple - public Apple GetApple() - { - return (Apple)this.ActualInstance; - } + public Banana Banana { get; set; } /// - /// Get the actual instance of `Banana`. If the actual instance is not `Banana`, - /// the InvalidClassException will be thrown + /// Gets or Sets Color /// - /// An instance of Banana - public Banana GetBanana() - { - return (Banana)this.ActualInstance; - } + [JsonPropertyName("color")] + public string Color { get; set; } /// /// Returns the string presentation of the object @@ -113,91 +73,13 @@ public Banana GetBanana() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Fruit {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Fruit.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Fruit - /// - /// JSON string - /// An instance of Fruit - public static Fruit FromJson(string jsonString) - { - Fruit newFruit = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newFruit; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Apple).GetProperty("AdditionalProperties") == null) - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); - } - else - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Apple"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Banana).GetProperty("AdditionalProperties") == null) - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); - } - else - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Banana"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newFruit; - } - /// /// Returns true if objects are equal /// @@ -227,8 +109,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.Color != null) + { + hashCode = (hashCode * 59) + this.Color.GetHashCode(); + } return hashCode; } } @@ -238,54 +122,82 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Fruit + /// A Json converter for type Fruit /// - public class FruitJsonConverter : JsonConverter + public class FruitJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Fruit).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Fruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReader = reader; + bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); + + Utf8JsonReader bananaReader = reader; + bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana banana); + + string color = default; + + while (reader.Read()) { - return Fruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "color": + color = reader.GetString(); + break; + } + } } - return null; + + if (appleDeserialized) + return new Fruit(apple, color); + + if (bananaDeserialized) + return new Fruit(banana, color); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs index 548da490def0..f5abf198758e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,104 +17,45 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// FruitReq /// - [JsonConverter(typeof(FruitReqJsonConverter))] - [DataContract(Name = "fruitReq")] - public partial class FruitReq : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class FruitReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public FruitReq() + /// + public FruitReq(AppleReq appleReq) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + AppleReq = appleReq; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of AppleReq. - public FruitReq(AppleReq actualInstance) + /// + public FruitReq(BananaReq bananaReq) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + BananaReq = bananaReq; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets AppleReq /// - /// An instance of BananaReq. - public FruitReq(BananaReq actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public AppleReq AppleReq { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets BananaReq /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AppleReq)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BananaReq)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AppleReq, BananaReq"); - } - } - } - - /// - /// Get the actual instance of `AppleReq`. If the actual instance is not `AppleReq`, - /// the InvalidClassException will be thrown - /// - /// An instance of AppleReq - public AppleReq GetAppleReq() - { - return (AppleReq)this.ActualInstance; - } - - /// - /// Get the actual instance of `BananaReq`. If the actual instance is not `BananaReq`, - /// the InvalidClassException will be thrown - /// - /// An instance of BananaReq - public BananaReq GetBananaReq() - { - return (BananaReq)this.ActualInstance; - } + public BananaReq BananaReq { get; set; } /// /// Returns the string presentation of the object @@ -122,91 +63,12 @@ public BananaReq GetBananaReq() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FruitReq {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, FruitReq.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of FruitReq - /// - /// JSON string - /// An instance of FruitReq - public static FruitReq FromJson(string jsonString) - { - FruitReq newFruitReq = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newFruitReq; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(AppleReq).GetProperty("AdditionalProperties") == null) - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); - } - else - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("AppleReq"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into AppleReq: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(BananaReq).GetProperty("AdditionalProperties") == null) - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); - } - else - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("BananaReq"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into BananaReq: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newFruitReq; - } - /// /// Returns true if objects are equal /// @@ -236,8 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); return hashCode; } } @@ -247,54 +107,78 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for FruitReq + /// A Json converter for type FruitReq /// - public class FruitReqJsonConverter : JsonConverter + public class FruitReqJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(FruitReq).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override FruitReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReqReader = reader; + bool appleReqDeserialized = Client.ClientUtils.TryDeserialize(ref appleReqReader, options, out AppleReq appleReq); + + Utf8JsonReader bananaReqReader = reader; + bool bananaReqDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReqReader, options, out BananaReq bananaReq); + + + while (reader.Read()) { - return FruitReq.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (appleReqDeserialized) + return new FruitReq(appleReq); + + if (bananaReqDeserialized) + return new FruitReq(bananaReq); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs index bd8f4435c92f..3b4ac3586735 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,82 +27,36 @@ namespace Org.OpenAPITools.Model /// /// GmFruit /// - [JsonConverter(typeof(GmFruitJsonConverter))] - [DataContract(Name = "gmFruit")] - public partial class GmFruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class GmFruit : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of Apple. - public GmFruit(Apple actualInstance) - { - this.IsNullable = false; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Banana. - public GmFruit(Banana actualInstance) + /// + /// + /// color + public GmFruit(Apple apple, Banana banana, string color = default) { - this.IsNullable = false; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Apple = Apple; + Banana = Banana; + Color = color; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Apple /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Apple)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Banana)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); - } - } - } + public Apple Apple { get; set; } /// - /// Get the actual instance of `Apple`. If the actual instance is not `Apple`, - /// the InvalidClassException will be thrown + /// Gets or Sets Banana /// - /// An instance of Apple - public Apple GetApple() - { - return (Apple)this.ActualInstance; - } + public Banana Banana { get; set; } /// - /// Get the actual instance of `Banana`. If the actual instance is not `Banana`, - /// the InvalidClassException will be thrown + /// Gets or Sets Color /// - /// An instance of Banana - public Banana GetBanana() - { - return (Banana)this.ActualInstance; - } + [JsonPropertyName("color")] + public string Color { get; set; } /// /// Returns the string presentation of the object @@ -112,64 +64,13 @@ public Banana GetBanana() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GmFruit {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of GmFruit - /// - /// JSON string - /// An instance of GmFruit - public static GmFruit FromJson(string jsonString) - { - GmFruit newGmFruit = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newGmFruit; - } - - try - { - newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); - // deserialization is considered successful at this point if no exception has been thrown. - return newGmFruit; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); - } - - try - { - newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); - // deserialization is considered successful at this point if no exception has been thrown. - return newGmFruit; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); - } - - // no match found, throw an exception - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - /// /// Returns true if objects are equal /// @@ -199,8 +100,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.Color != null) + { + hashCode = (hashCode * 59) + this.Color.GetHashCode(); + } return hashCode; } } @@ -210,54 +113,76 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for GmFruit + /// A Json converter for type GmFruit /// - public class GmFruitJsonConverter : JsonConverter + public class GmFruitJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(GmFruit).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override GmFruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReader = reader; + bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); + + Utf8JsonReader bananaReader = reader; + bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana banana); + + string color = default; + + while (reader.Read()) { - return GmFruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "color": + color = reader.GetString(); + break; + } + } } - return null; + + return new GmFruit(apple, banana, color); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 24b3df864e19..c880e6711ef3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,45 +27,31 @@ namespace Org.OpenAPITools.Model /// /// GrandparentAnimal /// - [DataContract(Name = "GrandparentAnimal")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] public partial class GrandparentAnimal : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected GrandparentAnimal() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// petType (required). + /// petType (required) public GrandparentAnimal(string petType) { - // to ensure "petType" is required (not null) - if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); - } - this.PetType = petType; - this.AdditionalProperties = new Dictionary(); + if (petType == null) + throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null."); + + PetType = petType; } /// /// Gets or Sets PetType /// - [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("pet_type")] public string PetType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -84,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 52099a7095e1..849a4886c318 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,51 +27,36 @@ namespace Org.OpenAPITools.Model /// /// HasOnlyReadOnly /// - [DataContract(Name = "hasOnlyReadOnly")] public partial class HasOnlyReadOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() + /// bar + /// foo + public HasOnlyReadOnly(string bar = default, string foo = default) { - this.AdditionalProperties = new Dictionary(); + Bar = bar; + Foo = foo; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string Bar { get; private set; } - /// - /// Returns false as Bar should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBar() - { - return false; - } /// /// Gets or Sets Foo /// - [DataMember(Name = "foo", EmitDefaultValue = false)] + [JsonPropertyName("foo")] public string Foo { get; private set; } - /// - /// Returns false as Foo should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeFoo() - { - return false; - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -90,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 616877a9f601..f66a3e132f44 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// - [DataContract(Name = "HealthCheckResult")] public partial class HealthCheckResult : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// nullableMessage. + /// nullableMessage public HealthCheckResult(string nullableMessage = default) { - this.NullableMessage = nullableMessage; - this.AdditionalProperties = new Dictionary(); + NullableMessage = nullableMessage; } /// /// Gets or Sets NullableMessage /// - [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] + [JsonPropertyName("NullableMessage")] public string NullableMessage { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs index fc8c0d066361..4dfd57402fe2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// InlineResponseDefault /// - [DataContract(Name = "inline_response_default")] public partial class InlineResponseDefault : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _string. + /// _string public InlineResponseDefault(Foo _string = default) { - this.String = _string; - this.AdditionalProperties = new Dictionary(); + String = _string; } /// /// Gets or Sets String /// - [DataMember(Name = "string", EmitDefaultValue = false)] + [JsonPropertyName("string")] public Foo String { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index d5ff97d769cc..d1371b46bf30 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,44 +27,28 @@ namespace Org.OpenAPITools.Model /// /// IsoscelesTriangle /// - [DataContract(Name = "IsoscelesTriangle")] public partial class IsoscelesTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected IsoscelesTriangle() { } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public IsoscelesTriangle(string shapeType, string triangleType) + /// + /// + public IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); - } - this.TriangleType = triangleType; + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Returns the string presentation of the object @@ -76,21 +58,10 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IsoscelesTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -120,14 +91,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } return hashCode; } } @@ -143,4 +106,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type IsoscelesTriangle + /// + public class IsoscelesTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(IsoscelesTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override IsoscelesTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new IsoscelesTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs index adaece91e886..7a3e133f6938 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// List /// - [DataContract(Name = "List")] public partial class List : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _123list. + /// _123list public List(string _123list = default) { - this._123List = _123list; - this.AdditionalProperties = new Dictionary(); + _123List = _123list; } /// /// Gets or Sets _123List /// - [DataMember(Name = "123-list", EmitDefaultValue = false)] + [JsonPropertyName("123-list")] public string _123List { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs index 68ac31619921..f29770cdfe97 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,122 +17,65 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Mammal /// - [JsonConverter(typeof(MammalJsonConverter))] - [DataContract(Name = "mammal")] - public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Mammal : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// + public Mammal(Whale whale) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Whale = whale; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// + public Mammal(Zebra zebra) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Zebra = zebra; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// + public Mammal(Pig pig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Pig = pig; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Whale /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Pig)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Whale)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Zebra)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Pig, Whale, Zebra"); - } - } - } + public Whale Whale { get; set; } /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown + /// Gets or Sets Zebra /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } + public Zebra Zebra { get; set; } /// - /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, - /// the InvalidClassException will be thrown + /// Gets or Sets Pig /// - /// An instance of Whale - public Whale GetWhale() - { - return (Whale)this.ActualInstance; - } + public Pig Pig { get; set; } /// - /// Get the actual instance of `Zebra`. If the actual instance is not `Zebra`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Zebra - public Zebra GetZebra() - { - return (Zebra)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -140,111 +83,13 @@ public Zebra GetZebra() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Mammal {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Mammal.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Mammal - /// - /// JSON string - /// An instance of Mammal - public static Mammal FromJson(string jsonString) - { - Mammal newMammal = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newMammal; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Pig).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Pig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Pig: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Whale).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Whale"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Whale: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Zebra).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Zebra"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Zebra: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newMammal; - } - /// /// Returns true if objects are equal /// @@ -274,8 +119,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -285,54 +132,94 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Mammal + /// A Json converter for type Mammal /// - public class MammalJsonConverter : JsonConverter + public class MammalJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Mammal).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Mammal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader whaleReader = reader; + bool whaleDeserialized = Client.ClientUtils.TryDeserialize(ref whaleReader, options, out Whale whale); + + Utf8JsonReader zebraReader = reader; + bool zebraDeserialized = Client.ClientUtils.TryDeserialize(ref zebraReader, options, out Zebra zebra); + + Utf8JsonReader pigReader = reader; + bool pigDeserialized = Client.ClientUtils.TryDeserialize(ref pigReader, options, out Pig pig); + + + while (reader.Read()) { - return Mammal.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (whaleDeserialized) + return new Mammal(whale); + + if (zebraDeserialized) + return new Mammal(zebra); + + if (pigDeserialized) + return new Mammal(pig); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs index b5ab56afe6ae..797a643b7e86 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,26 @@ namespace Org.OpenAPITools.Model /// /// MapTest /// - [DataContract(Name = "MapTest")] public partial class MapTest : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// mapMapOfString + /// mapOfEnumString + /// directMap + /// indirectMap + public MapTest(Dictionary> mapMapOfString = default, Dictionary mapOfEnumString = default, Dictionary directMap = default, Dictionary indirectMap = default) + { + MapMapOfString = mapMapOfString; + MapOfEnumString = mapOfEnumString; + DirectMap = directMap; + IndirectMap = indirectMap; + } + /// /// Defines Inner /// - [JsonConverter(typeof(StringEnumConverter))] public enum InnerEnum { /// @@ -53,51 +64,35 @@ public enum InnerEnum } - /// /// Gets or Sets MapOfEnumString /// - [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] + [JsonPropertyName("map_of_enum_string")] public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default, Dictionary mapOfEnumString = default, Dictionary directMap = default, Dictionary indirectMap = default) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets MapMapOfString /// - [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] + [JsonPropertyName("map_map_of_string")] public Dictionary> MapMapOfString { get; set; } /// /// Gets or Sets DirectMap /// - [DataMember(Name = "direct_map", EmitDefaultValue = false)] + [JsonPropertyName("direct_map")] public Dictionary DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// - [DataMember(Name = "indirect_map", EmitDefaultValue = false)] + [JsonPropertyName("indirect_map")] public Dictionary IndirectMap { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -116,15 +111,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 63145e93f888..68b2ea60b782 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// MixedPropertiesAndAdditionalPropertiesClass /// - [DataContract(Name = "MixedPropertiesAndAdditionalPropertiesClass")] public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid. - /// dateTime. - /// map. + /// uuid + /// dateTime + /// map public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default, DateTime dateTime = default, Dictionary map = default) { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - this.AdditionalProperties = new Dictionary(); + Uuid = uuid; + DateTime = dateTime; + Map = map; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public Guid Uuid { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name = "dateTime", EmitDefaultValue = false)] + [JsonPropertyName("dateTime")] public DateTime DateTime { get; set; } /// /// Gets or Sets Map /// - [DataMember(Name = "map", EmitDefaultValue = false)] + [JsonPropertyName("map")] public Dictionary Map { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs index 65d373b28745..6662b2edac44 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name starting with number /// - [DataContract(Name = "200_response")] public partial class Model200Response : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name. - /// _class. + /// name + /// _class public Model200Response(int name = default, string _class = default) { - this.Name = name; - this.Class = _class; - this.AdditionalProperties = new Dictionary(); + Name = name; + Class = _class; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public int Name { get; set; } /// /// Gets or Sets Class /// - [DataMember(Name = "class", EmitDefaultValue = false)] + [JsonPropertyName("class")] public string Class { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs index c1f5970e0328..7bc5c681bbee 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// ModelClient /// - [DataContract(Name = "_Client")] public partial class ModelClient : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _client. + /// _client public ModelClient(string _client = default) { - this._Client = _client; - this.AdditionalProperties = new Dictionary(); + _Client = _client; } /// /// Gets or Sets _Client /// - [DataMember(Name = "client", EmitDefaultValue = false)] + [JsonPropertyName("client")] public string _Client { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs index 9bb13253bc32..95d35d993b27 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,74 +27,55 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name same as property name /// - [DataContract(Name = "Name")] public partial class Name : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Name() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name, string property = default) + /// nameProperty (required) + /// snakeCase + /// property + /// _123number + public Name(int nameProperty, int snakeCase = default, string property = default, int _123number = default) { - this._Name = name; - this.Property = property; - this.AdditionalProperties = new Dictionary(); + if (nameProperty == null) + throw new ArgumentNullException("nameProperty is a required property for Name and cannot be null."); + + NameProperty = nameProperty; + SnakeCase = snakeCase; + Property = property; + _123Number = _123number; } /// - /// Gets or Sets _Name + /// Gets or Sets NameProperty /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public int _Name { get; set; } + [JsonPropertyName("name")] + public int NameProperty { get; set; } /// /// Gets or Sets SnakeCase /// - [DataMember(Name = "snake_case", EmitDefaultValue = false)] + [JsonPropertyName("snake_case")] public int SnakeCase { get; private set; } - /// - /// Returns false as SnakeCase should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeSnakeCase() - { - return false; - } /// /// Gets or Sets Property /// - [DataMember(Name = "property", EmitDefaultValue = false)] + [JsonPropertyName("property")] public string Property { get; set; } /// /// Gets or Sets _123Number /// - [DataMember(Name = "123Number", EmitDefaultValue = false)] + [JsonPropertyName("123Number")] public int _123Number { get; private set; } - /// - /// Returns false as _123Number should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize_123Number() - { - return false; - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -106,7 +85,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); + sb.Append(" NameProperty: ").Append(NameProperty).Append("\n"); sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" Property: ").Append(Property).Append("\n"); sb.Append(" _123Number: ").Append(_123Number).Append("\n"); @@ -115,15 +94,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -153,7 +123,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._Name.GetHashCode(); + hashCode = (hashCode * 59) + this.NameProperty.GetHashCode(); hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); if (this.Property != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs index fd0c90505e6a..9bc37488229e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,111 +27,109 @@ namespace Org.OpenAPITools.Model /// /// NullableClass /// - [DataContract(Name = "NullableClass")] public partial class NullableClass : Dictionary, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// integerProp. - /// numberProp. - /// booleanProp. - /// stringProp. - /// dateProp. - /// datetimeProp. - /// arrayNullableProp. - /// arrayAndItemsNullableProp. - /// arrayItemsNullable. - /// objectNullableProp. - /// objectAndItemsNullableProp. - /// objectItemsNullable. + /// integerProp + /// numberProp + /// booleanProp + /// stringProp + /// dateProp + /// datetimeProp + /// arrayNullableProp + /// arrayAndItemsNullableProp + /// arrayItemsNullable + /// objectNullableProp + /// objectAndItemsNullableProp + /// objectItemsNullable public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List arrayNullableProp = default, List arrayAndItemsNullableProp = default, List arrayItemsNullable = default, Dictionary objectNullableProp = default, Dictionary objectAndItemsNullableProp = default, Dictionary objectItemsNullable = default) : base() { - this.IntegerProp = integerProp; - this.NumberProp = numberProp; - this.BooleanProp = booleanProp; - this.StringProp = stringProp; - this.DateProp = dateProp; - this.DatetimeProp = datetimeProp; - this.ArrayNullableProp = arrayNullableProp; - this.ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - this.ArrayItemsNullable = arrayItemsNullable; - this.ObjectNullableProp = objectNullableProp; - this.ObjectAndItemsNullableProp = objectAndItemsNullableProp; - this.ObjectItemsNullable = objectItemsNullable; + IntegerProp = integerProp; + NumberProp = numberProp; + BooleanProp = booleanProp; + StringProp = stringProp; + DateProp = dateProp; + DatetimeProp = datetimeProp; + ArrayNullableProp = arrayNullableProp; + ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + ArrayItemsNullable = arrayItemsNullable; + ObjectNullableProp = objectNullableProp; + ObjectAndItemsNullableProp = objectAndItemsNullableProp; + ObjectItemsNullable = objectItemsNullable; } /// /// Gets or Sets IntegerProp /// - [DataMember(Name = "integer_prop", EmitDefaultValue = true)] + [JsonPropertyName("integer_prop")] public int? IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// - [DataMember(Name = "number_prop", EmitDefaultValue = true)] + [JsonPropertyName("number_prop")] public decimal? NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// - [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] + [JsonPropertyName("boolean_prop")] public bool? BooleanProp { get; set; } /// /// Gets or Sets StringProp /// - [DataMember(Name = "string_prop", EmitDefaultValue = true)] + [JsonPropertyName("string_prop")] public string StringProp { get; set; } /// /// Gets or Sets DateProp /// - [DataMember(Name = "date_prop", EmitDefaultValue = true)] - [JsonConverter(typeof(OpenAPIDateConverter))] + [JsonPropertyName("date_prop")] public DateTime? DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// - [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] + [JsonPropertyName("datetime_prop")] public DateTime? DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// - [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("array_nullable_prop")] public List ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// - [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("array_and_items_nullable_prop")] public List ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// - [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] + [JsonPropertyName("array_items_nullable")] public List ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// - [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("object_nullable_prop")] public Dictionary ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// - [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("object_and_items_nullable_prop")] public Dictionary ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// - [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] + [JsonPropertyName("object_items_nullable")] public Dictionary ObjectItemsNullable { get; set; } /// @@ -161,15 +157,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs index 5dd73a56ef76..5ef1763454a3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,105 +17,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. /// - [JsonConverter(typeof(NullableShapeJsonConverter))] - [DataContract(Name = "NullableShape")] - public partial class NullableShape : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class NullableShape : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public NullableShape() + /// + public NullableShape(Triangle triangle) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + Triangle = triangle; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// + public NullableShape(Quadrilateral quadrilateral) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + Quadrilateral = quadrilateral; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Triangle /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } - - /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown - /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -123,91 +69,13 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class NullableShape {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, NullableShape.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of NullableShape - /// - /// JSON string - /// An instance of NullableShape - public static NullableShape FromJson(string jsonString) - { - NullableShape newNullableShape = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newNullableShape; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); - } - else - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); - } - else - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newNullableShape; - } - /// /// Returns true if objects are equal /// @@ -237,8 +105,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -248,54 +118,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for NullableShape + /// A Json converter for type NullableShape /// - public class NullableShapeJsonConverter : JsonConverter + public class NullableShapeJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(NullableShape).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override NullableShape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral quadrilateral); + + + while (reader.Read()) { - return NullableShape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (triangleDeserialized) + return new NullableShape(triangle); + + if (quadrilateralDeserialized) + return new NullableShape(quadrilateral); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs index 7787cb03338d..64f6395b6038 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// NumberOnly /// - [DataContract(Name = "NumberOnly")] public partial class NumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// justNumber. + /// justNumber public NumberOnly(decimal justNumber = default) { - this.JustNumber = justNumber; - this.AdditionalProperties = new Dictionary(); + JustNumber = justNumber; } /// /// Gets or Sets JustNumber /// - [DataMember(Name = "JustNumber", EmitDefaultValue = false)] + [JsonPropertyName("JustNumber")] public decimal JustNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index de7d09291bfe..817af80674ce 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,49 +27,47 @@ namespace Org.OpenAPITools.Model /// /// ObjectWithDeprecatedFields /// - [DataContract(Name = "ObjectWithDeprecatedFields")] public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid. - /// id. - /// deprecatedRef. - /// bars. + /// uuid + /// id + /// deprecatedRef + /// bars public ObjectWithDeprecatedFields(string uuid = default, decimal id = default, DeprecatedObject deprecatedRef = default, List bars = default) { - this.Uuid = uuid; - this.Id = id; - this.DeprecatedRef = deprecatedRef; - this.Bars = bars; - this.AdditionalProperties = new Dictionary(); + Uuid = uuid; + Id = id; + DeprecatedRef = deprecatedRef; + Bars = bars; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public string Uuid { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] [Obsolete] public decimal Id { get; set; } /// /// Gets or Sets DeprecatedRef /// - [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] + [JsonPropertyName("deprecatedRef")] [Obsolete] public DeprecatedObject DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// - [DataMember(Name = "bars", EmitDefaultValue = false)] + [JsonPropertyName("bars")] [Obsolete] public List Bars { get; set; } @@ -79,7 +75,7 @@ public ObjectWithDeprecatedFields(string uuid = default, decimal id = default, D /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -98,15 +94,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs index 8c986b5f6763..2fef14a9c59d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,14 +27,31 @@ namespace Org.OpenAPITools.Model /// /// Order /// - [DataContract(Name = "Order")] public partial class Order : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// id + /// petId + /// quantity + /// shipDate + /// Order Status + /// complete (default to false) + public Order(long id = default, long petId = default, int quantity = default, DateTime shipDate = default, StatusEnum status = default, bool complete = false) + { + Id = id; + PetId = petId; + Quantity = quantity; + ShipDate = shipDate; + Status = status; + Complete = complete; + } + /// /// Order Status /// /// Order Status - [JsonConverter(typeof(StringEnumConverter))] public enum StatusEnum { /// @@ -59,68 +74,48 @@ public enum StatusEnum } - /// /// Order Status /// /// Order Status - [DataMember(Name = "status", EmitDefaultValue = false)] + [JsonPropertyName("status")] public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default, long petId = default, int quantity = default, DateTime shipDate = default, StatusEnum status = default, bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - this.Complete = complete; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets PetId /// - [DataMember(Name = "petId", EmitDefaultValue = false)] + [JsonPropertyName("petId")] public long PetId { get; set; } /// /// Gets or Sets Quantity /// - [DataMember(Name = "quantity", EmitDefaultValue = false)] + [JsonPropertyName("quantity")] public int Quantity { get; set; } /// /// Gets or Sets ShipDate /// - [DataMember(Name = "shipDate", EmitDefaultValue = false)] + [JsonPropertyName("shipDate")] public DateTime ShipDate { get; set; } /// /// Gets or Sets Complete /// - [DataMember(Name = "complete", EmitDefaultValue = true)] + [JsonPropertyName("complete")] public bool Complete { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -141,15 +136,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs index 7f4749fe8b5c..390b308657ef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// OuterComposite /// - [DataContract(Name = "OuterComposite")] public partial class OuterComposite : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// myNumber. - /// myString. - /// myBoolean. + /// myNumber + /// myString + /// myBoolean public OuterComposite(decimal myNumber = default, string myString = default, bool myBoolean = default) { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - this.AdditionalProperties = new Dictionary(); + MyNumber = myNumber; + MyString = myString; + MyBoolean = myBoolean; } /// /// Gets or Sets MyNumber /// - [DataMember(Name = "my_number", EmitDefaultValue = false)] + [JsonPropertyName("my_number")] public decimal MyNumber { get; set; } /// /// Gets or Sets MyString /// - [DataMember(Name = "my_string", EmitDefaultValue = false)] + [JsonPropertyName("my_string")] public string MyString { get; set; } /// /// Gets or Sets MyBoolean /// - [DataMember(Name = "my_boolean", EmitDefaultValue = true)] + [JsonPropertyName("my_boolean")] public bool MyBoolean { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs index 2aa496a2e074..8496c413326a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +27,6 @@ namespace Org.OpenAPITools.Model /// /// Defines OuterEnum /// - [JsonConverter(typeof(StringEnumConverter))] public enum OuterEnum { /// @@ -51,5 +48,4 @@ public enum OuterEnum Delivered = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index dd79c7010d6b..b0f9d099e27d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +27,6 @@ namespace Org.OpenAPITools.Model /// /// Defines OuterEnumDefaultValue /// - [JsonConverter(typeof(StringEnumConverter))] public enum OuterEnumDefaultValue { /// @@ -51,5 +48,4 @@ public enum OuterEnumDefaultValue Delivered = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 44dc91c700ad..56069346c2e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -47,5 +45,4 @@ public enum OuterEnumInteger NUMBER_2 = 2 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index b927507cf97a..e80f88f51f34 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -47,5 +45,4 @@ public enum OuterEnumIntegerDefaultValue NUMBER_2 = 2 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs index ac986b555efd..244b3b938402 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,33 +27,15 @@ namespace Org.OpenAPITools.Model /// /// ParentPet /// - [DataContract(Name = "ParentPet")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject + public partial class ParentPet : GrandparentAnimal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ParentPet() + /// petType (required) + public ParentPet(string petType) : base(petType) { - this.AdditionalProperties = new Dictionary(); } - /// - /// Initializes a new instance of the class. - /// - /// petType (required) (default to "ParentPet"). - public ParentPet(string petType = "ParentPet") : base(petType) - { - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } /// /// Returns the string presentation of the object @@ -67,20 +46,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ParentPet {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -110,37 +79,70 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type ParentPet + /// + public class ParentPetJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ParentPet).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override ParentPet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + string petType = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + } + } } - yield break; + + return new ParentPet(petType); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs index c7c27fb4e98d..0091def60e5f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,14 +27,37 @@ namespace Org.OpenAPITools.Model /// /// Pet /// - [DataContract(Name = "Pet")] public partial class Pet : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// name (required) + /// photoUrls (required) + /// id + /// category + /// tags + /// pet status in the store + public Pet(string name, List photoUrls, long id = default, Category category = default, List tags = default, StatusEnum status = default) + { + if (name == null) + throw new ArgumentNullException("name is a required property for Pet and cannot be null."); + + if (photoUrls == null) + throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null."); + + Name = name; + PhotoUrls = photoUrls; + Id = id; + Category = category; + Tags = tags; + Status = status; + } + /// /// pet status in the store /// /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] public enum StatusEnum { /// @@ -59,84 +80,48 @@ public enum StatusEnum } - /// /// pet status in the store /// /// pet status in the store - [DataMember(Name = "status", EmitDefaultValue = false)] + [JsonPropertyName("status")] public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// photoUrls (required). - /// id. - /// category. - /// tags. - /// pet status in the store. - public Pet(string name, List photoUrls, long id = default, Category category = default, List tags = default, StatusEnum status = default) - { - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); - } - this.Name = name; - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); - } - this.PhotoUrls = photoUrls; - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name = "photoUrls", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("photoUrls")] public List PhotoUrls { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets Category /// - [DataMember(Name = "category", EmitDefaultValue = false)] + [JsonPropertyName("category")] public Category Category { get; set; } /// /// Gets or Sets Tags /// - [DataMember(Name = "tags", EmitDefaultValue = false)] + [JsonPropertyName("tags")] public List Tags { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -157,15 +142,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs index b82c0899c27d..4eb947b0140c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,96 +17,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Pig /// - [JsonConverter(typeof(PigJsonConverter))] - [DataContract(Name = "Pig")] - public partial class Pig : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Pig : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of BasquePig. - public Pig(BasquePig actualInstance) + /// + public Pig(BasquePig basquePig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + BasquePig = basquePig; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of DanishPig. - public Pig(DanishPig actualInstance) + /// + public Pig(DanishPig danishPig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + DanishPig = danishPig; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets BasquePig /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(BasquePig)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DanishPig)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: BasquePig, DanishPig"); - } - } - } + public BasquePig BasquePig { get; set; } /// - /// Get the actual instance of `BasquePig`. If the actual instance is not `BasquePig`, - /// the InvalidClassException will be thrown + /// Gets or Sets DanishPig /// - /// An instance of BasquePig - public BasquePig GetBasquePig() - { - return (BasquePig)this.ActualInstance; - } + public DanishPig DanishPig { get; set; } /// - /// Get the actual instance of `DanishPig`. If the actual instance is not `DanishPig`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of DanishPig - public DanishPig GetDanishPig() - { - return (DanishPig)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,91 +69,13 @@ public DanishPig GetDanishPig() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Pig {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Pig.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Pig - /// - /// JSON string - /// An instance of Pig - public static Pig FromJson(string jsonString) - { - Pig newPig = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newPig; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(BasquePig).GetProperty("AdditionalProperties") == null) - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); - } - else - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("BasquePig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into BasquePig: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(DanishPig).GetProperty("AdditionalProperties") == null) - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); - } - else - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("DanishPig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DanishPig: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newPig; - } - /// /// Returns true if objects are equal /// @@ -228,8 +105,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +118,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Pig + /// A Json converter for type Pig /// - public class PigJsonConverter : JsonConverter + public class PigJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Pig).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Pig).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Pig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader basquePigReader = reader; + bool basquePigDeserialized = Client.ClientUtils.TryDeserialize(ref basquePigReader, options, out BasquePig basquePig); + + Utf8JsonReader danishPigReader = reader; + bool danishPigDeserialized = Client.ClientUtils.TryDeserialize(ref danishPigReader, options, out DanishPig danishPig); + + + while (reader.Read()) { - return Pig.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (basquePigDeserialized) + return new Pig(basquePig); + + if (danishPigDeserialized) + return new Pig(danishPig); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..1152b4e63f40 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,235 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + public partial class PolymorphicProperty : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(bool _bool) + { + Bool = _bool; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(string _string) + { + String = _string; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(Object _object) + { + Object = _object; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(List liststring) + { + Liststring = liststring; + } + + /// + /// Gets or Sets Bool + /// + public bool Bool { get; set; } + + /// + /// Gets or Sets String + /// + public string String { get; set; } + + /// + /// Gets or Sets Object + /// + public Object Object { get; set; } + + /// + /// Gets or Sets Liststring + /// + public List Liststring { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(PolymorphicProperty).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override PolymorphicProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader _boolReader = reader; + bool _boolDeserialized = Client.ClientUtils.TryDeserialize(ref _boolReader, options, out bool _bool); + + Utf8JsonReader _stringReader = reader; + bool _stringDeserialized = Client.ClientUtils.TryDeserialize(ref _stringReader, options, out string _string); + + Utf8JsonReader _objectReader = reader; + bool _objectDeserialized = Client.ClientUtils.TryDeserialize(ref _objectReader, options, out Object _object); + + Utf8JsonReader liststringReader = reader; + bool liststringDeserialized = Client.ClientUtils.TryDeserialize>(ref liststringReader, options, out List liststring); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + if (_boolDeserialized) + return new PolymorphicProperty(_bool); + + if (_stringDeserialized) + return new PolymorphicProperty(_string); + + if (_objectDeserialized) + return new PolymorphicProperty(_object); + + if (liststringDeserialized) + return new PolymorphicProperty(liststring); + + throw new JsonException(); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) => throw new NotImplementedException(); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs index a1a850f169e4..47e72d44ab64 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,96 +17,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Quadrilateral /// - [JsonConverter(typeof(QuadrilateralJsonConverter))] - [DataContract(Name = "Quadrilateral")] - public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Quadrilateral : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// + public Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + SimpleQuadrilateral = simpleQuadrilateral; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// + public Quadrilateral(ComplexQuadrilateral complexQuadrilateral) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + ComplexQuadrilateral = complexQuadrilateral; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets SimpleQuadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ComplexQuadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SimpleQuadrilateral)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ComplexQuadrilateral, SimpleQuadrilateral"); - } - } - } + public SimpleQuadrilateral SimpleQuadrilateral { get; set; } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets ComplexQuadrilateral /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() - { - return (ComplexQuadrilateral)this.ActualInstance; - } + public ComplexQuadrilateral ComplexQuadrilateral { get; set; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() - { - return (SimpleQuadrilateral)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,91 +69,13 @@ public SimpleQuadrilateral GetSimpleQuadrilateral() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Quadrilateral {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Quadrilateral.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Quadrilateral - /// - /// JSON string - /// An instance of Quadrilateral - public static Quadrilateral FromJson(string jsonString) - { - Quadrilateral newQuadrilateral = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newQuadrilateral; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(ComplexQuadrilateral).GetProperty("AdditionalProperties") == null) - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); - } - else - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("ComplexQuadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ComplexQuadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(SimpleQuadrilateral).GetProperty("AdditionalProperties") == null) - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); - } - else - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("SimpleQuadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into SimpleQuadrilateral: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newQuadrilateral; - } - /// /// Returns true if objects are equal /// @@ -228,8 +105,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +118,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Quadrilateral + /// A Json converter for type Quadrilateral /// - public class QuadrilateralJsonConverter : JsonConverter + public class QuadrilateralJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Quadrilateral).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Quadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader simpleQuadrilateralReader = reader; + bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral simpleQuadrilateral); + + Utf8JsonReader complexQuadrilateralReader = reader; + bool complexQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref complexQuadrilateralReader, options, out ComplexQuadrilateral complexQuadrilateral); + + + while (reader.Read()) { - return Quadrilateral.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (simpleQuadrilateralDeserialized) + return new Quadrilateral(simpleQuadrilateral); + + if (complexQuadrilateralDeserialized) + return new Quadrilateral(complexQuadrilateral); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index b29e2db36b6b..046b9050ba0d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// QuadrilateralInterface /// - [DataContract(Name = "QuadrilateralInterface")] public partial class QuadrilateralInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected QuadrilateralInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// quadrilateralType (required). + /// quadrilateralType (required) public QuadrilateralInterface(string quadrilateralType) { - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null."); + + QuadrilateralType = quadrilateralType; } /// /// Gets or Sets QuadrilateralType /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("quadrilateralType")] public string QuadrilateralType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6b4acaddf1b2..3589a97ed6c5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,44 +27,36 @@ namespace Org.OpenAPITools.Model /// /// ReadOnlyFirst /// - [DataContract(Name = "ReadOnlyFirst")] public partial class ReadOnlyFirst : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// baz. - public ReadOnlyFirst(string baz = default) + /// bar + /// baz + public ReadOnlyFirst(string bar = default, string baz = default) { - this.Baz = baz; - this.AdditionalProperties = new Dictionary(); + Bar = bar; + Baz = baz; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string Bar { get; private set; } - /// - /// Returns false as Bar should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBar() - { - return false; - } /// /// Gets or Sets Baz /// - [DataMember(Name = "baz", EmitDefaultValue = false)] + [JsonPropertyName("baz")] public string Baz { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -83,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs index c862011ba9de..2b73710ad81b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Model for testing reserved words /// - [DataContract(Name = "Return")] public partial class Return : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _return. - public Return(int _return = default) + /// returnProperty + public Return(int returnProperty = default) { - this._Return = _return; - this.AdditionalProperties = new Dictionary(); + ReturnProperty = returnProperty; } /// - /// Gets or Sets _Return + /// Gets or Sets ReturnProperty /// - [DataMember(Name = "return", EmitDefaultValue = false)] - public int _Return { get; set; } + [JsonPropertyName("return")] + public int ReturnProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -62,21 +58,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); + sb.Append(" ReturnProperty: ").Append(ReturnProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -106,7 +93,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._Return.GetHashCode(); + hashCode = (hashCode * 59) + this.ReturnProperty.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 206e0fbe3315..72568e1e01bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// ScaleneTriangle /// - [DataContract(Name = "ScaleneTriangle")] public partial class ScaleneTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ScaleneTriangle() + /// + /// + public ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public ScaleneTriangle(string shapeType, string triangleType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ScaleneTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type ScaleneTriangle + /// + public class ScaleneTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ScaleneTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ScaleneTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new ScaleneTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs index dd74fa4b7184..e2cf8fb7cce3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,96 +17,67 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Shape /// - [JsonConverter(typeof(ShapeJsonConverter))] - [DataContract(Name = "Shape")] - public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Shape : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// + /// quadrilateralType (required) + public Shape(Triangle triangle, string quadrilateralType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + + Triangle = triangle; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// + /// quadrilateralType (required) + public Shape(Quadrilateral quadrilateral, string quadrilateralType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + Quadrilateral = quadrilateral; + QuadrilateralType = quadrilateralType; + } - private Object _actualInstance; + /// + /// Gets or Sets Triangle + /// + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets QuadrilateralType /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + [JsonPropertyName("quadrilateralType")] + public string QuadrilateralType { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,91 +85,14 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Shape {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Shape.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Shape - /// - /// JSON string - /// An instance of Shape - public static Shape FromJson(string jsonString) - { - Shape newShape = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newShape; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); - } - else - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); - } - else - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newShape; - } - /// /// Returns true if objects are equal /// @@ -228,8 +122,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.QuadrilateralType != null) + { + hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +139,92 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Shape + /// A Json converter for type Shape /// - public class ShapeJsonConverter : JsonConverter + public class ShapeJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Shape).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Shape).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Shape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral quadrilateral); + + string quadrilateralType = default; + + while (reader.Read()) { - return Shape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + } + } } - return null; + + if (triangleDeserialized) + return new Shape(triangle, quadrilateralType); + + if (quadrilateralDeserialized) + return new Shape(quadrilateral, quadrilateralType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs index 55788e33f354..5d0ab8ec9c71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// ShapeInterface /// - [DataContract(Name = "ShapeInterface")] public partial class ShapeInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ShapeInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). + /// shapeType (required) public ShapeInterface(string shapeType) { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); - } - this.ShapeType = shapeType; - this.AdditionalProperties = new Dictionary(); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null."); + + ShapeType = shapeType; } /// /// Gets or Sets ShapeType /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("shapeType")] public string ShapeType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs index c6b87c89751a..375f4d490764 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,105 +17,67 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. /// - [JsonConverter(typeof(ShapeOrNullJsonConverter))] - [DataContract(Name = "ShapeOrNull")] - public partial class ShapeOrNull : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class ShapeOrNull : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public ShapeOrNull() + /// + /// quadrilateralType (required) + public ShapeOrNull(Triangle triangle, string quadrilateralType) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + + Triangle = triangle; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// + /// quadrilateralType (required) + public ShapeOrNull(Quadrilateral quadrilateral, string quadrilateralType) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + + Quadrilateral = quadrilateral; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Triangle /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets QuadrilateralType /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + [JsonPropertyName("quadrilateralType")] + public string QuadrilateralType { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -123,91 +85,14 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ShapeOrNull {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, ShapeOrNull.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of ShapeOrNull - /// - /// JSON string - /// An instance of ShapeOrNull - public static ShapeOrNull FromJson(string jsonString) - { - ShapeOrNull newShapeOrNull = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newShapeOrNull; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); - } - else - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); - } - else - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newShapeOrNull; - } - /// /// Returns true if objects are equal /// @@ -237,8 +122,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.QuadrilateralType != null) + { + hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -248,54 +139,92 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for ShapeOrNull + /// A Json converter for type ShapeOrNull /// - public class ShapeOrNullJsonConverter : JsonConverter + public class ShapeOrNullJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ShapeOrNull).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override ShapeOrNull Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral quadrilateral); + + string quadrilateralType = default; + + while (reader.Read()) { - return ShapeOrNull.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + } + } } - return null; + + if (triangleDeserialized) + return new ShapeOrNull(triangle, quadrilateralType); + + if (quadrilateralDeserialized) + return new ShapeOrNull(quadrilateral, quadrilateralType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 1398011e13f1..ee6d8ef18239 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// SimpleQuadrilateral /// - [DataContract(Name = "SimpleQuadrilateral")] public partial class SimpleQuadrilateral : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SimpleQuadrilateral() + /// + /// + public SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// quadrilateralType (required). - public SimpleQuadrilateral(string shapeType, string quadrilateralType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + QuadrilateralInterface = quadrilateralInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets QuadrilateralType + /// Gets or Sets QuadrilateralInterface /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] - public string QuadrilateralType { get; set; } + public QuadrilateralInterface QuadrilateralInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimpleQuadrilateral {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type SimpleQuadrilateral + /// + public class SimpleQuadrilateralJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(SimpleQuadrilateral).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override SimpleQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader quadrilateralInterfaceReader = reader; + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new SimpleQuadrilateral(shapeInterface, quadrilateralInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs index e24187da5be7..35fc0efd1c5b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// SpecialModelName /// - [DataContract(Name = "_special_model.name_")] public partial class SpecialModelName : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// specialPropertyName. - /// specialModelName. - public SpecialModelName(long specialPropertyName = default, string specialModelName = default) + /// specialPropertyName + /// specialModelNameProperty + public SpecialModelName(long specialPropertyName = default, string specialModelNameProperty = default) { - this.SpecialPropertyName = specialPropertyName; - this._SpecialModelName = specialModelName; - this.AdditionalProperties = new Dictionary(); + SpecialPropertyName = specialPropertyName; + SpecialModelNameProperty = specialModelNameProperty; } /// /// Gets or Sets SpecialPropertyName /// - [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] + [JsonPropertyName("$special[property.name]")] public long SpecialPropertyName { get; set; } /// - /// Gets or Sets _SpecialModelName + /// Gets or Sets SpecialModelNameProperty /// - [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string _SpecialModelName { get; set; } + [JsonPropertyName("_special_model.name_")] + public string SpecialModelNameProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -71,21 +67,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" _SpecialModelName: ").Append(_SpecialModelName).Append("\n"); + sb.Append(" SpecialModelNameProperty: ").Append(SpecialModelNameProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -116,9 +103,9 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this._SpecialModelName != null) + if (this.SpecialModelNameProperty != null) { - hashCode = (hashCode * 59) + this._SpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.SpecialModelNameProperty.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs index cca02fceb327..fcc38c0b3ac7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// Tag /// - [DataContract(Name = "Tag")] public partial class Tag : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id. - /// name. + /// id + /// name public Tag(long id = default, string name = default) { - this.Id = id; - this.Name = name; - this.AdditionalProperties = new Dictionary(); + Id = id; + Name = name; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs index c8cf49ef7f66..f799b7c43bba 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,122 +17,107 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Triangle /// - [JsonConverter(typeof(TriangleJsonConverter))] - [DataContract(Name = "Triangle")] - public partial class Triangle : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Triangle : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of EquilateralTriangle. - public Triangle(EquilateralTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(EquilateralTriangle equilateralTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + EquilateralTriangle = equilateralTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of IsoscelesTriangle. - public Triangle(IsoscelesTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(IsoscelesTriangle isoscelesTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + IsoscelesTriangle = isoscelesTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of ScaleneTriangle. - public Triangle(ScaleneTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + ScaleneTriangle = scaleneTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } + /// + /// Gets or Sets EquilateralTriangle + /// + public EquilateralTriangle EquilateralTriangle { get; set; } - private Object _actualInstance; + /// + /// Gets or Sets IsoscelesTriangle + /// + public IsoscelesTriangle IsoscelesTriangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets ScaleneTriangle /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(EquilateralTriangle)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IsoscelesTriangle)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ScaleneTriangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle"); - } - } - } + public ScaleneTriangle ScaleneTriangle { get; set; } /// - /// Get the actual instance of `EquilateralTriangle`. If the actual instance is not `EquilateralTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets ShapeType /// - /// An instance of EquilateralTriangle - public EquilateralTriangle GetEquilateralTriangle() - { - return (EquilateralTriangle)this.ActualInstance; - } + [JsonPropertyName("shapeType")] + public string ShapeType { get; set; } /// - /// Get the actual instance of `IsoscelesTriangle`. If the actual instance is not `IsoscelesTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets TriangleType /// - /// An instance of IsoscelesTriangle - public IsoscelesTriangle GetIsoscelesTriangle() - { - return (IsoscelesTriangle)this.ActualInstance; - } + [JsonPropertyName("triangleType")] + public string TriangleType { get; set; } /// - /// Get the actual instance of `ScaleneTriangle`. If the actual instance is not `ScaleneTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of ScaleneTriangle - public ScaleneTriangle GetScaleneTriangle() - { - return (ScaleneTriangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -140,111 +125,15 @@ public ScaleneTriangle GetScaleneTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Triangle {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Triangle.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Triangle - /// - /// JSON string - /// An instance of Triangle - public static Triangle FromJson(string jsonString) - { - Triangle newTriangle = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTriangle; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(EquilateralTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("EquilateralTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into EquilateralTriangle: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(IsoscelesTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("IsoscelesTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into IsoscelesTriangle: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(ScaleneTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("ScaleneTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ScaleneTriangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTriangle; - } - /// /// Returns true if objects are equal /// @@ -274,8 +163,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.ShapeType != null) + { + hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); + } + if (this.TriangleType != null) + { + hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -285,54 +184,102 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Triangle + /// A Json converter for type Triangle /// - public class TriangleJsonConverter : JsonConverter + public class TriangleJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Triangle).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Triangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader equilateralTriangleReader = reader; + bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref equilateralTriangleReader, options, out EquilateralTriangle equilateralTriangle); + + Utf8JsonReader isoscelesTriangleReader = reader; + bool isoscelesTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref isoscelesTriangleReader, options, out IsoscelesTriangle isoscelesTriangle); + + Utf8JsonReader scaleneTriangleReader = reader; + bool scaleneTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref scaleneTriangleReader, options, out ScaleneTriangle scaleneTriangle); + + string shapeType = default; + string triangleType = default; + + while (reader.Read()) { - return Triangle.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "shapeType": + shapeType = reader.GetString(); + break; + case "triangleType": + triangleType = reader.GetString(); + break; + } + } } - return null; + + if (equilateralTriangleDeserialized) + return new Triangle(equilateralTriangle, shapeType, triangleType); + + if (isoscelesTriangleDeserialized) + return new Triangle(isoscelesTriangle, shapeType, triangleType); + + if (scaleneTriangleDeserialized) + return new Triangle(scaleneTriangle, shapeType, triangleType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs index 8c62abd8c657..f7b06bf05a9d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// TriangleInterface /// - [DataContract(Name = "TriangleInterface")] public partial class TriangleInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TriangleInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// triangleType (required). + /// triangleType (required) public TriangleInterface(string triangleType) { - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null."); + + TriangleType = triangleType; } /// /// Gets or Sets TriangleType /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("triangleType")] public string TriangleType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs index 709d9397d872..38a79e975db9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,123 +27,121 @@ namespace Org.OpenAPITools.Model /// /// User /// - [DataContract(Name = "User")] public partial class User : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. - /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. - /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. + /// id + /// username + /// firstName + /// lastName + /// email + /// password + /// phone + /// User Status + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. public User(long id = default, string username = default, string firstName = default, string lastName = default, string email = default, string password = default, string phone = default, int userStatus = default, Object objectWithNoDeclaredProps = default, Object objectWithNoDeclaredPropsNullable = default, Object anyTypeProp = default, Object anyTypePropNullable = default) { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - this.ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - this.ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; - this.AnyTypeProp = anyTypeProp; - this.AnyTypePropNullable = anyTypePropNullable; - this.AdditionalProperties = new Dictionary(); + Id = id; + Username = username; + FirstName = firstName; + LastName = lastName; + Email = email; + Password = password; + Phone = phone; + UserStatus = userStatus; + ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; + ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + AnyTypeProp = anyTypeProp; + AnyTypePropNullable = anyTypePropNullable; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets Username /// - [DataMember(Name = "username", EmitDefaultValue = false)] + [JsonPropertyName("username")] public string Username { get; set; } /// /// Gets or Sets FirstName /// - [DataMember(Name = "firstName", EmitDefaultValue = false)] + [JsonPropertyName("firstName")] public string FirstName { get; set; } /// /// Gets or Sets LastName /// - [DataMember(Name = "lastName", EmitDefaultValue = false)] + [JsonPropertyName("lastName")] public string LastName { get; set; } /// /// Gets or Sets Email /// - [DataMember(Name = "email", EmitDefaultValue = false)] + [JsonPropertyName("email")] public string Email { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name = "password", EmitDefaultValue = false)] + [JsonPropertyName("password")] public string Password { get; set; } /// /// Gets or Sets Phone /// - [DataMember(Name = "phone", EmitDefaultValue = false)] + [JsonPropertyName("phone")] public string Phone { get; set; } /// /// User Status /// /// User Status - [DataMember(Name = "userStatus", EmitDefaultValue = false)] + [JsonPropertyName("userStatus")] public int UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] + [JsonPropertyName("objectWithNoDeclaredProps")] public Object ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] + [JsonPropertyName("objectWithNoDeclaredPropsNullable")] public Object ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 - [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] + [JsonPropertyName("anyTypeProp")] public Object AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. - [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] + [JsonPropertyName("anyTypePropNullable")] public Object AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -172,15 +168,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs index 2eb7fa28c7fb..57c3ddbd8dfa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,58 +27,47 @@ namespace Org.OpenAPITools.Model /// /// Whale /// - [DataContract(Name = "whale")] public partial class Whale : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Whale() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// hasBaleen. - /// hasTeeth. + /// className (required) + /// hasBaleen + /// hasTeeth public Whale(string className, bool hasBaleen = default, bool hasTeeth = default) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); - } - this.ClassName = className; - this.HasBaleen = hasBaleen; - this.HasTeeth = hasTeeth; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for Whale and cannot be null."); + + ClassName = className; + HasBaleen = hasBaleen; + HasTeeth = hasTeeth; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets HasBaleen /// - [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] + [JsonPropertyName("hasBaleen")] public bool HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// - [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] + [JsonPropertyName("hasTeeth")] public bool HasTeeth { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -98,15 +85,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs index ddb4196e8549..452c2fe8b71d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,25 @@ namespace Org.OpenAPITools.Model /// /// Zebra /// - [DataContract(Name = "zebra")] public partial class Zebra : Dictionary, IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// className (required) + /// type + public Zebra(string className, TypeEnum type = default) : base() + { + if (className == null) + throw new ArgumentNullException("className is a required property for Zebra and cannot be null."); + + ClassName = className; + Type = type; + } + /// /// Defines Type /// - [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { /// @@ -58,47 +68,23 @@ public enum TypeEnum } - /// /// Gets or Sets Type /// - [DataMember(Name = "type", EmitDefaultValue = false)] + [JsonPropertyName("type")] public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Zebra() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// type. - public Zebra(string className, TypeEnum type = default) : base() - { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); - } - this.ClassName = className; - this.Type = type; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -116,15 +102,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index d3e3c6136159..a14df8ce3878 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -21,8 +21,6 @@ - - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES index 2f141a0eb477..e19a38918ec9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES @@ -69,6 +69,7 @@ docs/models/OuterEnumIntegerDefaultValue.md docs/models/ParentPet.md docs/models/Pet.md docs/models/Pig.md +docs/models/PolymorphicProperty.md docs/models/Quadrilateral.md docs/models/QuadrilateralInterface.md docs/models/ReadOnlyFirst.md @@ -107,13 +108,13 @@ src/Org.OpenAPITools/Client/HostConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningToken.cs src/Org.OpenAPITools/Client/IApi.cs +src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs src/Org.OpenAPITools/Client/OAuthToken.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs -src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs @@ -174,6 +175,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md index 54d29ffb72a4..7aedac0df23a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md @@ -642,7 +642,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -680,14 +680,14 @@ namespace Example var _string = "_string_example"; // string | None (optional) var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); } catch (ApiException e) { @@ -715,9 +715,9 @@ Name | Type | Description | Notes **_string** | **string**| None | [optional] **binary** | **System.IO.Stream****System.IO.Stream**| None | [optional] **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] ### Return type @@ -743,7 +743,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -767,18 +767,18 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -796,11 +796,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] + **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] + **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Cat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Cat.md index 310a5e6575ec..16db4a55bd30 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Cat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Cat.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Declawed** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ChildCat.md index 48a3c7fd38d9..dae2ff760262 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ChildCat.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PetType** | **string** | | [default to PetTypeEnum.ChildCat] -**Name** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ComplexQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ComplexQuadrilateral.md index 14da4bba22ed..0926bb55e71c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ComplexQuadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ComplexQuadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Dog.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Dog.md index 70cdc80e83e0..b1e39dcf07c7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Dog.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Dog.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EquilateralTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EquilateralTriangle.md index 8360b5c16a5b..ddc9885fe560 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EquilateralTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EquilateralTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Fruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Fruit.md index cb095b74f324..b3bee18f7ba0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Fruit.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Fruit.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Color** | **string** | | [optional] -**Cultivar** | **string** | | [optional] -**Origin** | **string** | | [optional] -**LengthCm** | **decimal** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FruitReq.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FruitReq.md index 5217febc9b68..38ab0c1a6caa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FruitReq.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FruitReq.md @@ -4,10 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Cultivar** | **string** | | -**LengthCm** | **decimal** | | -**Mealy** | **bool** | | [optional] -**Sweet** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/GmFruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/GmFruit.md index 049f6f5c1574..584c4fd323d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/GmFruit.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/GmFruit.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Color** | **string** | | [optional] -**Cultivar** | **string** | | [optional] -**Origin** | **string** | | [optional] -**LengthCm** | **decimal** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/IsoscelesTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/IsoscelesTriangle.md index 07c62ac93382..ed481ad14486 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/IsoscelesTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/IsoscelesTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Mammal.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Mammal.md index 82a8ca6027b5..5546632e4d67 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Mammal.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Mammal.md @@ -4,10 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**HasBaleen** | **bool** | | [optional] -**HasTeeth** | **bool** | | [optional] -**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md index 1fbf5dd5e8b6..2ee782c0c542 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md @@ -5,7 +5,7 @@ Model for testing model name same as property name Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Name** | **int** | | +**NameProperty** | **int** | | **SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] **_123Number** | **int** | | [optional] [readonly] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableShape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableShape.md index 570ef48f98fc..0caa1aa5b9d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableShape.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableShape.md @@ -5,8 +5,6 @@ The value may be a shape or the 'null' value. The 'nullable' attribute was intro Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pig.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pig.md index fd7bb9359ac4..83e58b6098d8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pig.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pig.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/PolymorphicProperty.md new file mode 100644 index 000000000000..4507ec41cd51 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Quadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Quadrilateral.md index bb7507997a2f..4fd16b32ea58 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Quadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Quadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Return.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Return.md index a1dadccc421d..e11cdae8db98 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Return.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Return.md @@ -5,7 +5,7 @@ Model for testing reserved words Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Return** | **int** | | [optional] +**ReturnProperty** | **int** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ScaleneTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ScaleneTriangle.md index d3f15354bccc..a01c2edc0687 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ScaleneTriangle.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ScaleneTriangle.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**TriangleType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Shape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Shape.md index 5627c30bbfc7..2ec279cef3c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Shape.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Shape.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | **QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ShapeOrNull.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ShapeOrNull.md index a348f4f8bff5..056fcbfdbddc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ShapeOrNull.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ShapeOrNull.md @@ -5,7 +5,6 @@ The value may be a shape or the 'null' value. This is introduced in OAS schema > Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | **QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SimpleQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SimpleQuadrilateral.md index a36c9957a609..3bc21009b7e5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SimpleQuadrilateral.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SimpleQuadrilateral.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShapeType** | **string** | | -**QuadrilateralType** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md index fa146367bdea..662fa6f4a387 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SpecialPropertyName** | **long** | | [optional] -**_SpecialModelName** | **string** | | [optional] +**SpecialModelNameProperty** | **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/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index a730ebd21acf..b70f2a8adc7b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -164,10 +164,10 @@ public async Task TestEndpointParametersAsyncTest() string _string = default; System.IO.Stream binary = default; DateTime? date = default; - DateTime? dateTime = default; string password = default; string callback = default; - await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + DateTime? dateTime = default; + await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); } /// @@ -177,14 +177,14 @@ public async Task TestEndpointParametersAsyncTest() public async Task TestEnumParametersAsyncTest() { List enumHeaderStringArray = default; - string enumHeaderString = default; List enumQueryStringArray = default; - string enumQueryString = default; int? enumQueryInteger = default; double? enumQueryDouble = default; + string enumHeaderString = default; + string enumQueryString = default; List enumFormStringArray = default; string enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs index 701ba7602823..9c3c48ffefe3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -56,14 +56,6 @@ public void CatInstanceTest() } - /// - /// Test the property 'Declawed' - /// - [Fact] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 6ce48e601e47..621877aa9732 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -57,20 +57,20 @@ public void CategoryInstanceTest() /// - /// Test the property 'Id' + /// Test the property 'Name' /// [Fact] - public void IdTest() + public void NameTest() { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Id' /// [Fact] - public void NameTest() + public void IdTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Id' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs index 68566fd8d560..0fe3ebfa06ef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -56,22 +56,6 @@ public void ChildCatInstanceTest() } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PetType' - /// - [Fact] - public void PetTypeTest() - { - // TODO unit test for the property 'PetType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs index b3529280c8d6..6c50fe7aab5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -56,22 +56,6 @@ public void ComplexQuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs index 992f93a51fd5..bf906f01bc63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -56,14 +56,6 @@ public void DogInstanceTest() } - /// - /// Test the property 'Breed' - /// - [Fact] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index 4f81b845d493..a22c39ca845d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -57,20 +57,20 @@ public void EnumTestInstanceTest() /// - /// Test the property 'EnumString' + /// Test the property 'EnumStringRequired' /// [Fact] - public void EnumStringTest() + public void EnumStringRequiredTest() { - // TODO unit test for the property 'EnumString' + // TODO unit test for the property 'EnumStringRequired' } /// - /// Test the property 'EnumStringRequired' + /// Test the property 'EnumString' /// [Fact] - public void EnumStringRequiredTest() + public void EnumStringTest() { - // TODO unit test for the property 'EnumStringRequired' + // TODO unit test for the property 'EnumString' } /// /// Test the property 'EnumInteger' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs index 4663cb667de6..9ca755c4b070 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -56,22 +56,6 @@ public void EquilateralTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 97332800e9af..707847bbcd19 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -56,6 +56,38 @@ public void FormatTestInstanceTest() } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Byte' + /// + [Fact] + public void ByteTest() + { + // TODO unit test for the property 'Byte' + } + /// + /// Test the property 'Date' + /// + [Fact] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'Password' + /// + [Fact] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } /// /// Test the property 'Integer' /// @@ -81,14 +113,6 @@ public void Int64Test() // TODO unit test for the property 'Int64' } /// - /// Test the property 'Number' - /// - [Fact] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// /// Test the property 'Float' /// [Fact] @@ -121,14 +145,6 @@ public void StringTest() // TODO unit test for the property 'String' } /// - /// Test the property 'Byte' - /// - [Fact] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// /// Test the property 'Binary' /// [Fact] @@ -137,14 +153,6 @@ public void BinaryTest() // TODO unit test for the property 'Binary' } /// - /// Test the property 'Date' - /// - [Fact] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// /// Test the property 'DateTime' /// [Fact] @@ -161,14 +169,6 @@ public void UuidTest() // TODO unit test for the property 'Uuid' } /// - /// Test the property 'Password' - /// - [Fact] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// /// Test the property 'PatternWithDigits' /// [Fact] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs index 5ea9e3ffc1d5..3a0b55b93e3f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -56,38 +56,6 @@ public void FruitReqInstanceTest() } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Mealy' - /// - [Fact] - public void MealyTest() - { - // TODO unit test for the property 'Mealy' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } - /// - /// Test the property 'Sweet' - /// - [Fact] - public void SweetTest() - { - // TODO unit test for the property 'Sweet' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs index 91e069bb42fa..ddc424d56ead 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -64,30 +64,6 @@ public void ColorTest() { // TODO unit test for the property 'Color' } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Origin' - /// - [Fact] - public void OriginTest() - { - // TODO unit test for the property 'Origin' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs index 08fb0e07a1c8..cbd35f9173c7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -64,30 +64,6 @@ public void ColorTest() { // TODO unit test for the property 'Color' } - /// - /// Test the property 'Cultivar' - /// - [Fact] - public void CultivarTest() - { - // TODO unit test for the property 'Cultivar' - } - /// - /// Test the property 'Origin' - /// - [Fact] - public void OriginTest() - { - // TODO unit test for the property 'Origin' - } - /// - /// Test the property 'LengthCm' - /// - [Fact] - public void LengthCmTest() - { - // TODO unit test for the property 'LengthCm' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs index 755c417cc54f..8e0dae934202 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -56,22 +56,6 @@ public void IsoscelesTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs index 7b46cbf06450..6477ab950fae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -56,38 +56,6 @@ public void MammalInstanceTest() } - /// - /// Test the property 'HasBaleen' - /// - [Fact] - public void HasBaleenTest() - { - // TODO unit test for the property 'HasBaleen' - } - /// - /// Test the property 'HasTeeth' - /// - [Fact] - public void HasTeethTest() - { - // TODO unit test for the property 'HasTeeth' - } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs index c390049e66dc..61f8ad11379f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -57,12 +57,12 @@ public void NameInstanceTest() /// - /// Test the property '_Name' + /// Test the property 'NameProperty' /// [Fact] - public void _NameTest() + public void NamePropertyTest() { - // TODO unit test for the property '_Name' + // TODO unit test for the property 'NameProperty' } /// /// Test the property 'SnakeCase' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs index 5662f91d6e64..8202ef63914b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -56,22 +56,6 @@ public void NullableShapeInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs index 154e66f8dfc0..28ea4d8478da 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -57,36 +57,36 @@ public void PetInstanceTest() /// - /// Test the property 'Id' + /// Test the property 'Name' /// [Fact] - public void IdTest() + public void NameTest() { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Category' + /// Test the property 'PhotoUrls' /// [Fact] - public void CategoryTest() + public void PhotoUrlsTest() { - // TODO unit test for the property 'Category' + // TODO unit test for the property 'PhotoUrls' } /// - /// Test the property 'Name' + /// Test the property 'Id' /// [Fact] - public void NameTest() + public void IdTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Id' } /// - /// Test the property 'PhotoUrls' + /// Test the property 'Category' /// [Fact] - public void PhotoUrlsTest() + public void CategoryTest() { - // TODO unit test for the property 'PhotoUrls' + // TODO unit test for the property 'Category' } /// /// Test the property 'Tags' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs index 55cf2189046b..a66befe8f581 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -56,14 +56,6 @@ public void PigInstanceTest() } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs index 26826681a478..3d62673d093e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -56,22 +56,6 @@ public void QuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index c8c1d6510d2f..65fa199fe35e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -57,12 +57,12 @@ public void ReturnInstanceTest() /// - /// Test the property '_Return' + /// Test the property 'ReturnProperty' /// [Fact] - public void _ReturnTest() + public void ReturnPropertyTest() { - // TODO unit test for the property '_Return' + // TODO unit test for the property 'ReturnProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs index 04cb9f1ab6b1..018dffb59642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -56,22 +56,6 @@ public void ScaleneTriangleInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'TriangleType' - /// - [Fact] - public void TriangleTypeTest() - { - // TODO unit test for the property 'TriangleType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs index d0af114157c9..ef5643576485 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -56,14 +56,6 @@ public void ShapeOrNullInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } /// /// Test the property 'QuadrilateralType' /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs index b01bd531f857..783a9657ed42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -56,14 +56,6 @@ public void ShapeInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } /// /// Test the property 'QuadrilateralType' /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs index 6648e9809281..3bcd65e792d6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -56,22 +56,6 @@ public void SimpleQuadrilateralInstanceTest() } - /// - /// Test the property 'ShapeType' - /// - [Fact] - public void ShapeTypeTest() - { - // TODO unit test for the property 'ShapeType' - } - /// - /// Test the property 'QuadrilateralType' - /// - [Fact] - public void QuadrilateralTypeTest() - { - // TODO unit test for the property 'QuadrilateralType' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 0f0e1ff12a9e..91682a7afd6a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -65,12 +65,12 @@ public void SpecialPropertyNameTest() // TODO unit test for the property 'SpecialPropertyName' } /// - /// Test the property '_SpecialModelName' + /// Test the property 'SpecialModelNameProperty' /// [Fact] - public void _SpecialModelNameTest() + public void SpecialModelNamePropertyTest() { - // TODO unit test for the property '_SpecialModelName' + // TODO unit test for the property 'SpecialModelNameProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs index 09610791943c..9b82c29c8fd8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -56,6 +56,14 @@ public void WhaleInstanceTest() } + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } /// /// Test the property 'HasBaleen' /// @@ -72,14 +80,6 @@ public void HasTeethTest() { // TODO unit test for the property 'HasTeeth' } - /// - /// Test the property 'ClassName' - /// - [Fact] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs index f44e92131400..39e0561fe0f8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -57,20 +57,20 @@ public void ZebraInstanceTest() /// - /// Test the property 'Type' + /// Test the property 'ClassName' /// [Fact] - public void TypeTest() + public void ClassNameTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'ClassName' } /// - /// Test the property 'ClassName' + /// Test the property 'Type' /// [Fact] - public void ClassNameTest() + public void TypeTest() { - // TODO unit test for the property 'ClassName' + // TODO unit test for the property 'Type' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index ddd804975cd2..d5ea224e605b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IAnotherFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient>> Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test special tags /// @@ -49,14 +48,15 @@ public interface IAnotherFakeApi : IApi /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - } + Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class AnotherFakeApi : IAnotherFakeApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -77,22 +77,22 @@ public partial class AnotherFakeApi : IAnotherFakeApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -102,13 +102,14 @@ public partial class AnotherFakeApi : IAnotherFakeApi /// Initializes a new instance of the class. /// /// - public AnotherFakeApi(ILogger logger, HttpClient httpClient, + public AnotherFakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -128,12 +129,13 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, public async Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -156,7 +158,6 @@ public async Task Call123TestSpecialTagsOrDefaultAsync(ModelClient ? result.Content : null; } - /// /// To test special tags To test special tags and operation ID starting with number @@ -170,45 +171,44 @@ public async Task> Call123TestSpecialTagsWithHttpInfoAs try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/another-fake/dummy"; - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("PATCH"); + request.Method = new HttpMethod("PATCH"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -231,7 +231,7 @@ public async Task> Call123TestSpecialTagsWithHttpInfoAs ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -242,6 +242,5 @@ public async Task> Call123TestSpecialTagsWithHttpInfoAs Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs index 0ad710171be3..f7675836cf08 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -37,7 +36,7 @@ public interface IDefaultApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<InlineResponseDefault>> Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -47,14 +46,15 @@ public interface IDefaultApi : IApi /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<InlineResponseDefault> - Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); - } + Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class DefaultApi : IDefaultApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -75,22 +75,22 @@ public partial class DefaultApi : IDefaultApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -100,13 +100,14 @@ public partial class DefaultApi : IDefaultApi /// Initializes a new instance of the class. /// /// - public DefaultApi(ILogger logger, HttpClient httpClient, + public DefaultApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -125,12 +126,13 @@ public DefaultApi(ILogger logger, HttpClient httpClient, public async Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// /// @@ -152,7 +154,6 @@ public async Task FooGetOrDefaultAsync(System.Threading.C ? result.Content : null; } - /// /// @@ -172,17 +173,17 @@ public async Task> FooGetWithHttpInfoAsync(Sy uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/foo"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -205,7 +206,7 @@ public async Task> FooGetWithHttpInfoAsync(Sy ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -216,6 +217,5 @@ public async Task> FooGetWithHttpInfoAsync(Sy Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs index b777bb7a18b4..ac878f7656f2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -37,7 +36,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<HealthCheckResult>> Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Health check endpoint /// @@ -48,8 +47,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<HealthCheckResult> Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -60,7 +58,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<bool>> Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -72,8 +70,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<bool> Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -84,7 +81,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<OuterComposite>> Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -96,8 +93,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<OuterComposite> Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -108,7 +104,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<decimal>> Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -120,8 +116,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<decimal> Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -132,7 +127,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<string>> Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -144,8 +139,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task FakeOuterStringSerializeAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Array of Enums /// /// @@ -155,7 +149,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<OuterEnum>>> Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Array of Enums /// @@ -166,8 +160,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<OuterEnum>> Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -178,7 +171,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -190,8 +183,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -203,7 +195,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -216,8 +208,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// To test \"client\" model /// /// @@ -228,7 +219,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient>> Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test \"client\" model /// @@ -240,8 +231,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// @@ -259,13 +249,13 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> - Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null); - + Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -284,14 +274,13 @@ public interface IFakeApi : IApi /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test enum parameters /// /// @@ -299,17 +288,17 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> - Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - + Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test enum parameters /// @@ -318,18 +307,17 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEnumParametersAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Fake endpoint to test group parameters (optional) /// /// @@ -345,7 +333,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Fake endpoint to test group parameters (optional) /// @@ -362,8 +350,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// test inline additionalProperties /// /// @@ -374,7 +361,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test inline additionalProperties /// @@ -386,8 +373,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// test json serialization of form data /// /// @@ -399,7 +385,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - + /// /// test json serialization of form data /// @@ -412,8 +398,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// /// /// @@ -428,7 +413,7 @@ public interface IFakeApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - + /// /// /// @@ -443,14 +428,15 @@ public interface IFakeApi : IApi /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); - } + Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FakeApi : IFakeApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -471,22 +457,22 @@ public partial class FakeApi : IFakeApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -496,13 +482,14 @@ public partial class FakeApi : IFakeApi /// Initializes a new instance of the class. /// /// - public FakeApi(ILogger logger, HttpClient httpClient, + public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -521,12 +508,13 @@ public FakeApi(ILogger logger, HttpClient httpClient, public async Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Health check endpoint /// @@ -548,7 +536,6 @@ public async Task FakeHealthGetOrDefaultAsync(System.Threadin ? result.Content : null; } - /// /// Health check endpoint @@ -568,17 +555,17 @@ public async Task> FakeHealthGetWithHttpInfoAsync uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/health"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -601,7 +588,7 @@ public async Task> FakeHealthGetWithHttpInfoAsync ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -624,7 +611,7 @@ public async Task> FakeHealthGetWithHttpInfoAsync public async Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -650,33 +637,32 @@ public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync( uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/boolean"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -699,7 +685,7 @@ public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync( ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -722,12 +708,13 @@ public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync( public async Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Test serialization of object with outer number type /// @@ -750,7 +737,6 @@ public async Task FakeOuterCompositeSerializeOrDefaultAsync(Oute ? result.Content : null; } - /// /// Test serialization of object with outer number type @@ -769,33 +755,32 @@ public async Task> FakeOuterCompositeSerializeWithHt uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/composite"; - - if ((outerComposite as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(outerComposite, ClientUtils.JsonSerializerSettings)); + + request.Content = (outerComposite as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(outerComposite, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -818,7 +803,7 @@ public async Task> FakeOuterCompositeSerializeWithHt ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -841,7 +826,7 @@ public async Task> FakeOuterCompositeSerializeWithHt public async Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -867,33 +852,32 @@ public async Task> FakeOuterNumberSerializeWithHttpInfoAsyn uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/number"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -916,7 +900,7 @@ public async Task> FakeOuterNumberSerializeWithHttpInfoAsyn ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -939,7 +923,7 @@ public async Task> FakeOuterNumberSerializeWithHttpInfoAsyn public async Task FakeOuterStringSerializeAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -965,33 +949,32 @@ public async Task> FakeOuterStringSerializeWithHttpInfoAsync uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/outer/string"; - - if ((body as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, ClientUtils.JsonSerializerSettings)); + + request.Content = (body as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "*/*" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1014,7 +997,7 @@ public async Task> FakeOuterStringSerializeWithHttpInfoAsync ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1036,12 +1019,13 @@ public async Task> FakeOuterStringSerializeWithHttpInfoAsync public async Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Array of Enums /// @@ -1063,7 +1047,6 @@ public async Task> GetArrayOfEnumsOrDefaultAsync(System.Threadin ? result.Content : null; } - /// /// Array of Enums @@ -1083,17 +1066,17 @@ public async Task>> GetArrayOfEnumsWithHttpInfoAsync uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/array-of-enums"; request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1116,7 +1099,7 @@ public async Task>> GetArrayOfEnumsWithHttpInfoAsync ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1139,12 +1122,13 @@ public async Task>> GetArrayOfEnumsWithHttpInfoAsync public async Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// For this test, the body for this request much reference a schema named `File`. /// @@ -1167,7 +1151,6 @@ public async Task TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestCla ? result.Content : null; } - /// /// For this test, the body for this request much reference a schema named `File`. @@ -1181,36 +1164,35 @@ public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(F try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (fileSchemaTestClass == null) throw new ArgumentNullException(nameof(fileSchemaTestClass)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/body-with-file-schema"; - - if ((fileSchemaTestClass as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(fileSchemaTestClass, ClientUtils.JsonSerializerSettings)); + + request.Content = (fileSchemaTestClass as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(fileSchemaTestClass, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("PUT"); + request.Method = new HttpMethod("PUT"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1233,7 +1215,7 @@ public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(F ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1257,12 +1239,13 @@ public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(F public async Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// /// @@ -1286,7 +1269,6 @@ public async Task TestBodyWithQueryParamsOrDefaultAsync(string query, Us ? result.Content : null; } - /// /// @@ -1301,15 +1283,15 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (query == null) throw new ArgumentNullException(nameof(query)); - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1322,24 +1304,23 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( parseQueryString["query"] = Uri.EscapeDataString(query.ToString()); uriBuilder.Query = parseQueryString.ToString(); - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("PUT"); + request.Method = new HttpMethod("PUT"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1362,7 +1343,7 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1385,12 +1366,13 @@ public async Task> TestBodyWithQueryParamsWithHttpInfoAsync( public async Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test \"client\" model To test \"client\" model /// @@ -1413,7 +1395,6 @@ public async Task TestClientModelOrDefaultAsync(ModelClient modelCl ? result.Content : null; } - /// /// To test \"client\" model To test \"client\" model @@ -1427,45 +1408,44 @@ public async Task> TestClientModelWithHttpInfoAsync(Mod try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake"; - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("PATCH"); + request.Method = new HttpMethod("PATCH"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1488,7 +1468,7 @@ public async Task> TestClientModelWithHttpInfoAsync(Mod ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1516,20 +1496,21 @@ public async Task> TestClientModelWithHttpInfoAsync(Mod /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); - + ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -1545,17 +1526,17 @@ public async Task TestEndpointParametersAsync(decimal number, double _do /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1565,7 +1546,6 @@ public async Task TestEndpointParametersOrDefaultAsync(decimal number, d ? result.Content : null; } - /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1582,25 +1562,25 @@ public async Task TestEndpointParametersOrDefaultAsync(decimal number, d /// None (optional) /// None (optional) /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); - + if (_byte == null) throw new ArgumentNullException(nameof(_byte)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1611,11 +1591,19 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); + formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); + + formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); + + formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); + + formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + if (integer != null) formParams.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer))); @@ -1624,36 +1612,28 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d if (int64 != null) formParams.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64))); - - formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); if (_float != null) formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); - - formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); if (_string != null) formParams.Add(new KeyValuePair("string", ClientUtils.ParameterToString(_string))); - - formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); - - formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); - + if (binary != null) multipartContent.Add(new StreamContent(binary)); if (date != null) formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); - if (dateTime != null) - formParams.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime))); - if (password != null) formParams.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password))); if (callback != null) formParams.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback))); + if (dateTime != null) + formParams.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime))); + List tokens = new List(); request.RequestUri = uriBuilder.Uri; @@ -1661,19 +1641,19 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(basicToken); - + basicToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1696,7 +1676,7 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1717,44 +1697,45 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); - + ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1764,23 +1745,22 @@ public async Task TestEnumParametersOrDefaultAsync(List enumHead ? result.Content : null; } - /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { try { @@ -1795,27 +1775,27 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< if (enumQueryStringArray != null) parseQueryString["enum_query_string_array"] = Uri.EscapeDataString(enumQueryStringArray.ToString()); - if (enumQueryString != null) - parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()); - if (enumQueryInteger != null) parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()); if (enumQueryDouble != null) parseQueryString["enum_query_double"] = Uri.EscapeDataString(enumQueryDouble.ToString()); + if (enumQueryString != null) + parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()); + uriBuilder.Query = parseQueryString.ToString(); - + if (enumHeaderStringArray != null) request.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray)); - + if (enumHeaderString != null) request.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString)); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); @@ -1827,17 +1807,17 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< formParams.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString))); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1860,7 +1840,7 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1888,12 +1868,13 @@ public async Task> TestEnumParametersWithHttpInfoAsync(List< public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// @@ -1921,7 +1902,6 @@ public async Task TestGroupParametersOrDefaultAsync(int requiredStringGr ? result.Content : null; } - /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -1940,9 +1920,9 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1962,9 +1942,9 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int parseQueryString["int64_group"] = Uri.EscapeDataString(int64Group.ToString()); uriBuilder.Query = parseQueryString.ToString(); - + request.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); - + if (booleanGroup != null) request.Headers.Add("boolean_group", ClientUtils.ParameterToString(booleanGroup)); @@ -1975,10 +1955,10 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(bearerToken); - + bearerToken.UseInHeader(request, ""); - request.Method = new HttpMethod("DELETE"); + request.Method = new HttpMethod("DELETE"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2001,7 +1981,7 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -2027,12 +2007,13 @@ public async Task> TestGroupParametersWithHttpInfoAsync(int public async Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// test inline additionalProperties /// @@ -2055,7 +2036,6 @@ public async Task TestInlineAdditionalPropertiesOrDefaultAsync(Dictionar ? result.Content : null; } - /// /// test inline additionalProperties @@ -2069,36 +2049,35 @@ public async Task> TestInlineAdditionalPropertiesWithHttpInf try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (requestBody == null) throw new ArgumentNullException(nameof(requestBody)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-additionalProperties"; - - if ((requestBody as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestBody, ClientUtils.JsonSerializerSettings)); + + request.Content = (requestBody as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2121,7 +2100,7 @@ public async Task> TestInlineAdditionalPropertiesWithHttpInf ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2145,12 +2124,13 @@ public async Task> TestInlineAdditionalPropertiesWithHttpInf public async Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// test json serialization of form data /// @@ -2174,7 +2154,6 @@ public async Task TestJsonFormDataOrDefaultAsync(string param, string pa ? result.Content : null; } - /// /// test json serialization of form data @@ -2189,15 +2168,15 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (param == null) throw new ArgumentNullException(nameof(param)); - + if (param2 == null) throw new ArgumentNullException(nameof(param2)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2208,27 +2187,27 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); - + formParams.Add(new KeyValuePair("param", ClientUtils.ParameterToString(param))); - + formParams.Add(new KeyValuePair("param2", ClientUtils.ParameterToString(param2))); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2251,7 +2230,7 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2278,12 +2257,13 @@ public async Task> TestJsonFormDataWithHttpInfoAsync(string public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test the collection format in query parameters /// @@ -2310,7 +2290,6 @@ public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List< ? result.Content : null; } - /// /// To test the collection format in query parameters @@ -2328,24 +2307,24 @@ public async Task> TestQueryParameterCollectionFormatWithHtt try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (pipe == null) throw new ArgumentNullException(nameof(pipe)); - + if (ioutil == null) throw new ArgumentNullException(nameof(ioutil)); - + if (http == null) throw new ArgumentNullException(nameof(http)); - + if (url == null) throw new ArgumentNullException(nameof(url)); - + if (context == null) throw new ArgumentNullException(nameof(context)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -2365,7 +2344,7 @@ public async Task> TestQueryParameterCollectionFormatWithHtt request.RequestUri = uriBuilder.Uri; - request.Method = new HttpMethod("PUT"); + request.Method = new HttpMethod("PUT"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -2388,7 +2367,7 @@ public async Task> TestQueryParameterCollectionFormatWithHtt ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -2399,6 +2378,5 @@ public async Task> TestQueryParameterCollectionFormatWithHtt Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 9181cf2a8f4b..56f3ffe6a88e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IFakeClassnameTags123Api : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ModelClient>> Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - + /// /// To test class name in snake case /// @@ -49,14 +48,15 @@ public interface IFakeClassnameTags123Api : IApi /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - } + Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -77,22 +77,22 @@ public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -102,13 +102,14 @@ public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// Initializes a new instance of the class. /// /// - public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, + public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -128,12 +129,13 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie public async Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// To test class name in snake case To test class name in snake case /// @@ -156,7 +158,6 @@ public async Task TestClassnameOrDefaultAsync(ModelClient modelClie ? result.Content : null; } - /// /// To test class name in snake case To test class name in snake case @@ -170,57 +171,56 @@ public async Task> TestClassnameWithHttpInfoAsync(Model try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (modelClient == null) throw new ArgumentNullException(nameof(modelClient)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake_classname_test"; - + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); - - if ((modelClient as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(modelClient, ClientUtils.JsonSerializerSettings)); + + request.Content = (modelClient as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInQuery(request, uriBuilder, parseQueryString, "api_key_query"); - + uriBuilder.Query = parseQueryString.ToString(); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("PATCH"); + request.Method = new HttpMethod("PATCH"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -243,7 +243,7 @@ public async Task> TestClassnameWithHttpInfoAsync(Model ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -257,6 +257,5 @@ public async Task> TestClassnameWithHttpInfoAsync(Model Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs index a2296da32f7f..6239ae756bd0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Add a new pet to the store /// @@ -50,8 +49,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Deletes a pet /// /// @@ -63,7 +61,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Deletes a pet /// @@ -76,8 +74,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeletePetAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Finds Pets by status /// /// @@ -88,7 +85,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<Pet>>> Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by status /// @@ -100,8 +97,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Finds Pets by tags /// /// @@ -112,7 +108,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<List<Pet>>> Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Finds Pets by tags /// @@ -124,8 +120,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Find pet by ID /// /// @@ -136,7 +131,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Pet>> Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find pet by ID /// @@ -148,8 +143,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Pet> Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Update an existing pet /// /// @@ -160,7 +154,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Update an existing pet /// @@ -172,8 +166,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Updates a pet in the store with form data /// /// @@ -186,7 +179,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updates a pet in the store with form data /// @@ -200,8 +193,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetWithFormAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// uploads an image /// /// @@ -214,7 +206,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse>> Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image /// @@ -228,8 +220,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// uploads an image (required) /// /// @@ -242,7 +233,7 @@ public interface IPetApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse>> Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - + /// /// uploads an image (required) /// @@ -255,14 +246,15 @@ public interface IPetApi : IApi /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> - Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - } + Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class PetApi : IPetApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -283,22 +275,22 @@ public partial class PetApi : IPetApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -308,13 +300,14 @@ public partial class PetApi : IPetApi /// Initializes a new instance of the class. /// /// - public PetApi(ILogger logger, HttpClient httpClient, + public PetApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -334,12 +327,13 @@ public PetApi(ILogger logger, HttpClient httpClient, public async Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Add a new pet to the store /// @@ -362,7 +356,6 @@ public async Task AddPetOrDefaultAsync(Pet pet, System.Threading.Cancell ? result.Content : null; } - /// /// Add a new pet to the store @@ -376,28 +369,27 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (pet == null) throw new ArgumentNullException(nameof(pet)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; - - if ((pet as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(pet, ClientUtils.JsonSerializerSettings)); + + request.Content = (pet as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(pet, _jsonSerializerOptions)); List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -409,20 +401,20 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/json", "application/xml" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -445,7 +437,7 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -475,12 +467,13 @@ public async Task> AddPetWithHttpInfoAsync(Pet pet, System.T public async Task DeletePetAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Deletes a pet /// @@ -504,7 +497,6 @@ public async Task DeletePetOrDefaultAsync(long petId, string apiKey = nu ? result.Content : null; } - /// /// Deletes a pet @@ -519,9 +511,9 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -529,7 +521,7 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - + if (apiKey != null) request.Headers.Add("api_key", ClientUtils.ParameterToString(apiKey)); @@ -540,10 +532,10 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - request.Method = new HttpMethod("DELETE"); + request.Method = new HttpMethod("DELETE"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -566,7 +558,7 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -592,12 +584,13 @@ public async Task> DeletePetWithHttpInfoAsync(long petId, st public async Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// @@ -620,7 +613,6 @@ public async Task> FindPetsByStatusOrDefaultAsync(List status, ? result.Content : null; } - /// /// Finds Pets by status Multiple status values can be provided with comma separated strings @@ -634,12 +626,12 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (status == null) throw new ArgumentNullException(nameof(status)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -656,7 +648,7 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -668,20 +660,20 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -704,7 +696,7 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -733,12 +725,13 @@ public async Task>> FindPetsByStatusWithHttpInfoAsync(List public async Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// @@ -761,7 +754,6 @@ public async Task> FindPetsByTagsOrDefaultAsync(List tags, Sys ? result.Content : null; } - /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -775,12 +767,12 @@ public async Task>> FindPetsByTagsWithHttpInfoAsync(List>> FindPetsByTagsWithHttpInfoAsync(List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -809,20 +801,20 @@ public async Task>> FindPetsByTagsWithHttpInfoAsync(List>> FindPetsByTagsWithHttpInfoAsync(List> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -874,12 +866,13 @@ public async Task>> FindPetsByTagsWithHttpInfoAsync(List GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Find pet by ID Returns a single pet /// @@ -902,7 +895,6 @@ public async Task GetPetByIdOrDefaultAsync(long petId, System.Threading.Can ? result.Content : null; } - /// /// Find pet by ID Returns a single pet @@ -916,9 +908,9 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -928,26 +920,26 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInHeader(request, "api_key"); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -970,7 +962,7 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -996,12 +988,13 @@ public async Task> GetPetByIdWithHttpInfoAsync(long petId, Syst public async Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Update an existing pet /// @@ -1024,7 +1017,6 @@ public async Task UpdatePetOrDefaultAsync(Pet pet, System.Threading.Canc ? result.Content : null; } - /// /// Update an existing pet @@ -1038,28 +1030,27 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (pet == null) throw new ArgumentNullException(nameof(pet)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; - - if ((pet as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(pet, ClientUtils.JsonSerializerSettings)); + + request.Content = (pet as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(pet, _jsonSerializerOptions)); List tokens = new List(); request.RequestUri = uriBuilder.Uri; - + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(signatureToken); @@ -1071,20 +1062,20 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/json", "application/xml" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("PUT"); + request.Method = new HttpMethod("PUT"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1107,7 +1098,7 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1138,12 +1129,13 @@ public async Task> UpdatePetWithHttpInfoAsync(Pet pet, Syste public async Task UpdatePetWithFormAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Updates a pet in the store with form data /// @@ -1168,7 +1160,6 @@ public async Task UpdatePetWithFormOrDefaultAsync(long petId, string nam ? result.Content : null; } - /// /// Updates a pet in the store with form data @@ -1184,9 +1175,9 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1198,7 +1189,7 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); @@ -1216,19 +1207,19 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "application/x-www-form-urlencoded" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1251,7 +1242,7 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1279,12 +1270,13 @@ public async Task> UpdatePetWithFormWithHttpInfoAsync(long p public async Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// uploads an image /// @@ -1309,7 +1301,6 @@ public async Task UploadFileOrDefaultAsync(long petId, string addit ? result.Content : null; } - /// /// uploads an image @@ -1325,9 +1316,9 @@ public async Task> UploadFileWithHttpInfoAsync(long pet try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1339,14 +1330,14 @@ public async Task> UploadFileWithHttpInfoAsync(long pet MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - + if (file != null) multipartContent.Add(new StreamContent(file)); @@ -1357,28 +1348,28 @@ public async Task> UploadFileWithHttpInfoAsync(long pet OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "multipart/form-data" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1401,7 +1392,7 @@ public async Task> UploadFileWithHttpInfoAsync(long pet ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1429,12 +1420,13 @@ public async Task> UploadFileWithHttpInfoAsync(long pet public async Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// uploads an image (required) /// @@ -1459,7 +1451,6 @@ public async Task UploadFileWithRequiredFileOrDefaultAsync(long pet ? result.Content : null; } - /// /// uploads an image (required) @@ -1475,12 +1466,12 @@ public async Task> UploadFileWithRequiredFileWithHttpIn try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (requiredFile == null) throw new ArgumentNullException(nameof(requiredFile)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1492,15 +1483,15 @@ public async Task> UploadFileWithRequiredFileWithHttpIn MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; - + List> formParams = new List>(); multipartContent.Add(new FormUrlEncodedContent(formParams)); + multipartContent.Add(new StreamContent(requiredFile)); + if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - - multipartContent.Add(new StreamContent(requiredFile)); List tokens = new List(); @@ -1509,28 +1500,28 @@ public async Task> UploadFileWithRequiredFileWithHttpIn OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(oauthToken); - + oauthToken.UseInHeader(request, ""); - + string[] contentTypes = new string[] { "multipart/form-data" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1553,7 +1544,7 @@ public async Task> UploadFileWithRequiredFileWithHttpIn ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1567,6 +1558,5 @@ public async Task> UploadFileWithRequiredFileWithHttpIn Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs index f6f88257047b..fa62385b0a90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete purchase order by ID /// @@ -50,8 +49,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Returns pet inventories by status /// /// @@ -61,7 +59,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Dictionary<string, int>>> Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Returns pet inventories by status /// @@ -72,8 +70,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Dictionary<string, int>> Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Find purchase order by ID /// /// @@ -84,7 +81,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Order>> Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Find purchase order by ID /// @@ -96,8 +93,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Place an order for a pet /// /// @@ -108,7 +104,7 @@ public interface IStoreApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<Order>> Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Place an order for a pet /// @@ -119,14 +115,15 @@ public interface IStoreApi : IApi /// order placed for purchasing the pet /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> - Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); - } + Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class StoreApi : IStoreApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -147,22 +144,22 @@ public partial class StoreApi : IStoreApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -172,13 +169,14 @@ public partial class StoreApi : IStoreApi /// Initializes a new instance of the class. /// /// - public StoreApi(ILogger logger, HttpClient httpClient, + public StoreApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -198,12 +196,13 @@ public StoreApi(ILogger logger, HttpClient httpClient, public async Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -226,7 +225,6 @@ public async Task DeleteOrderOrDefaultAsync(string orderId, System.Threa ? result.Content : null; } - /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -240,12 +238,12 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (orderId == null) throw new ArgumentNullException(nameof(orderId)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -256,7 +254,7 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order request.RequestUri = uriBuilder.Uri; - request.Method = new HttpMethod("DELETE"); + request.Method = new HttpMethod("DELETE"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -279,7 +277,7 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -301,7 +299,7 @@ public async Task> DeleteOrderWithHttpInfoAsync(string order public async Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse> result = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -328,25 +326,25 @@ public async Task>> GetInventoryWithHttpInfo uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/inventory"; List tokens = new List(); - + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - + tokens.Add(apiKey); - + apiKey.UseInHeader(request, "api_key"); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -369,7 +367,7 @@ public async Task>> GetInventoryWithHttpInfo ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -395,12 +393,13 @@ public async Task>> GetInventoryWithHttpInfo public async Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// @@ -423,7 +422,6 @@ public async Task GetOrderByIdOrDefaultAsync(long orderId, System.Threadi ? result.Content : null; } - /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -437,9 +435,9 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -449,18 +447,18 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -483,7 +481,7 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -506,12 +504,13 @@ public async Task> GetOrderByIdWithHttpInfoAsync(long orderId public async Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Place an order for a pet /// @@ -534,7 +533,6 @@ public async Task PlaceOrderOrDefaultAsync(Order order, System.Threading. ? result.Content : null; } - /// /// Place an order for a pet @@ -548,46 +546,45 @@ public async Task> PlaceOrderWithHttpInfoAsync(Order order, S try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (order == null) throw new ArgumentNullException(nameof(order)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order"; - - if ((order as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(order, ClientUtils.JsonSerializerSettings)); + + request.Content = (order as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(order, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -610,7 +607,7 @@ public async Task> PlaceOrderWithHttpInfoAsync(Order order, S ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -621,6 +618,5 @@ public async Task> PlaceOrderWithHttpInfoAsync(Order order, S Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs index a8a10871b53d..77fb592021a3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; @@ -17,6 +15,7 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; +using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; @@ -38,7 +37,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Create user /// @@ -50,8 +49,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Creates list of users with given input array /// /// @@ -62,7 +60,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -74,8 +72,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Creates list of users with given input array /// /// @@ -86,7 +83,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Creates list of users with given input array /// @@ -98,8 +95,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Delete user /// /// @@ -110,7 +106,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Delete user /// @@ -122,8 +118,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Get user by user name /// /// @@ -134,7 +129,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<User>> Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Get user by user name /// @@ -146,8 +141,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<User> Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Logs user into the system /// /// @@ -159,7 +153,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<string>> Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs user into the system /// @@ -172,8 +166,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Logs out current logged in user session /// /// @@ -183,7 +176,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null); - + /// /// Logs out current logged in user session /// @@ -194,8 +187,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); - - /// + /// /// Updated user /// /// @@ -207,7 +199,7 @@ public interface IUserApi : IApi /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - + /// /// Updated user /// @@ -219,14 +211,15 @@ public interface IUserApi : IApi /// Updated user object /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - } + Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class UserApi : IUserApi { + private JsonSerializerOptions _jsonSerializerOptions; + /// /// An event to track the health of the server. /// If you store these event args, be sure to purge old event args to prevent a memory leak. @@ -247,22 +240,22 @@ public partial class UserApi : IUserApi /// A token provider of type /// public TokenProvider ApiKeyProvider { get; } - + /// /// A token provider of type /// public TokenProvider BearerTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider BasicTokenProvider { get; } - + /// /// A token provider of type /// public TokenProvider HttpSignatureTokenProvider { get; } - + /// /// A token provider of type /// @@ -272,13 +265,14 @@ public partial class UserApi : IUserApi /// Initializes a new instance of the class. /// /// - public UserApi(ILogger logger, HttpClient httpClient, + public UserApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, TokenProvider httpSignatureTokenProvider, TokenProvider oauthTokenProvider) { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; Logger = logger; HttpClient = httpClient; ApiKeyProvider = apiKeyProvider; @@ -298,12 +292,13 @@ public UserApi(ILogger logger, HttpClient httpClient, public async Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Create user This can only be done by the logged in user. /// @@ -326,7 +321,6 @@ public async Task CreateUserOrDefaultAsync(User user, System.Threading.C ? result.Content : null; } - /// /// Create user This can only be done by the logged in user. @@ -340,36 +334,35 @@ public async Task> CreateUserWithHttpInfoAsync(User user, Sy try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -392,7 +385,7 @@ public async Task> CreateUserWithHttpInfoAsync(User user, Sy ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -415,12 +408,13 @@ public async Task> CreateUserWithHttpInfoAsync(User user, Sy public async Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Creates list of users with given input array /// @@ -443,7 +437,6 @@ public async Task CreateUsersWithArrayInputOrDefaultAsync(List use ? result.Content : null; } - /// /// Creates list of users with given input array @@ -457,36 +450,35 @@ public async Task> CreateUsersWithArrayInputWithHttpInfoAsyn try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/createWithArray"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -509,7 +501,7 @@ public async Task> CreateUsersWithArrayInputWithHttpInfoAsyn ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -532,12 +524,13 @@ public async Task> CreateUsersWithArrayInputWithHttpInfoAsyn public async Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Creates list of users with given input array /// @@ -560,7 +553,6 @@ public async Task CreateUsersWithListInputOrDefaultAsync(List user ? result.Content : null; } - /// /// Creates list of users with given input array @@ -574,36 +566,35 @@ public async Task> CreateUsersWithListInputWithHttpInfoAsync try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/createWithList"; - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("POST"); + request.Method = new HttpMethod("POST"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -626,7 +617,7 @@ public async Task> CreateUsersWithListInputWithHttpInfoAsync ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -649,12 +640,13 @@ public async Task> CreateUsersWithListInputWithHttpInfoAsync public async Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Delete user This can only be done by the logged in user. /// @@ -677,7 +669,6 @@ public async Task DeleteUserOrDefaultAsync(string username, System.Threa ? result.Content : null; } - /// /// Delete user This can only be done by the logged in user. @@ -691,12 +682,12 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -707,7 +698,7 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna request.RequestUri = uriBuilder.Uri; - request.Method = new HttpMethod("DELETE"); + request.Method = new HttpMethod("DELETE"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -730,7 +721,7 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -753,12 +744,13 @@ public async Task> DeleteUserWithHttpInfoAsync(string userna public async Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Get user by user name /// @@ -781,7 +773,6 @@ public async Task GetUserByNameOrDefaultAsync(string username, System.Thre ? result.Content : null; } - /// /// Get user by user name @@ -795,12 +786,12 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -810,18 +801,18 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -844,7 +835,7 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -868,7 +859,7 @@ public async Task> GetUserByNameWithHttpInfoAsync(string usern public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' if (result.Content == null) #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' @@ -890,15 +881,15 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + if (password == null) throw new ArgumentNullException(nameof(password)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -914,18 +905,18 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam uriBuilder.Query = parseQueryString.ToString(); request.RequestUri = uriBuilder.Uri; - + string[] accepts = new string[] { "application/xml", "application/json" }; - + string accept = ClientUtils.SelectHeaderAccept(accepts); if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -948,7 +939,7 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -970,12 +961,13 @@ public async Task> LoginUserWithHttpInfoAsync(string usernam public async Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Logs out current logged in user session /// @@ -997,7 +989,6 @@ public async Task LogoutUserOrDefaultAsync(System.Threading.Cancellation ? result.Content : null; } - /// /// Logs out current logged in user session @@ -1018,7 +1009,7 @@ public async Task> LogoutUserWithHttpInfoAsync(System.Thread request.RequestUri = uriBuilder.Uri; - request.Method = new HttpMethod("GET"); + request.Method = new HttpMethod("GET"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1041,7 +1032,7 @@ public async Task> LogoutUserWithHttpInfoAsync(System.Thread ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1065,12 +1056,13 @@ public async Task> LogoutUserWithHttpInfoAsync(System.Thread public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); - + if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); return result.Content; } + /// /// Updated user This can only be done by the logged in user. /// @@ -1094,7 +1086,6 @@ public async Task UpdateUserOrDefaultAsync(string username, User user, S ? result.Content : null; } - /// /// Updated user This can only be done by the logged in user. @@ -1109,15 +1100,15 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna try { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + if (username == null) throw new ArgumentNullException(nameof(username)); - + if (user == null) throw new ArgumentNullException(nameof(user)); - + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - + using (HttpRequestMessage request = new HttpRequestMessage()) { UriBuilder uriBuilder = new UriBuilder(); @@ -1125,24 +1116,23 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); - - if ((user as object) is System.IO.Stream stream) - request.Content = new StreamContent(stream); - else - request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(user, ClientUtils.JsonSerializerSettings)); + + request.Content = (user as object) is System.IO.Stream stream + ? request.Content = new StreamContent(stream) + : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); request.RequestUri = uriBuilder.Uri; - + string[] contentTypes = new string[] { "application/json" }; - + string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) request.Content.Headers.Add("ContentType", contentType); - request.Method = new HttpMethod("PUT"); + request.Method = new HttpMethod("PUT"); using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { @@ -1165,7 +1155,7 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject(apiResponse.RawContent, ClientUtils.JsonSerializerSettings); + apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); return apiResponse; } @@ -1176,6 +1166,5 @@ public async Task> UpdateUserWithHttpInfoAsync(string userna Logger.LogError(e, "An error occured while sending the request to the server."); throw; } - } - } + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs index 7d4a463a9657..5728b5976d90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; namespace Org.OpenAPITools.Client diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs index a364874a105c..f63fd5933291 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs @@ -1,7 +1,5 @@ // - - using System; namespace Org.OpenAPITools.Client diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 04e92f7b19eb..85b2801ccbfb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -8,12 +8,9 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.Net; -using Newtonsoft.Json; namespace Org.OpenAPITools.Client { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BasicToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BasicToken.cs index 66cc12da4f66..c58c0563231f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BasicToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BasicToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BearerToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BearerToken.cs index 16f90e96c149..df5c2310bacd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BearerToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/BearerToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 7a500bb08964..8be839fed648 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -7,18 +7,18 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.IO; using System.Linq; +using System.Net.Http; using System.Text; +using System.Text.Json; using System.Text.RegularExpressions; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using Polly.Timeout; using Polly.Extensions.Http; using Polly; -using System.Net.Http; using Org.OpenAPITools.Api; using KellermanSoftware.CompareNetObjects; @@ -52,21 +52,48 @@ static ClientUtils() public delegate void EventHandler(object sender, T e) where T : EventArgs; /// - /// Custom JSON serializer + /// Returns true when deserialization succeeds. /// - public static Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; set; } = new Newtonsoft.Json.JsonSerializerSettings + /// + /// + /// + /// + /// + public static bool TryDeserialize(string json, JsonSerializerOptions options, out T result) { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = Newtonsoft.Json.ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore, - ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver + try { - NamingStrategy = new Newtonsoft.Json.Serialization.CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } + result = JsonSerializer.Deserialize(json, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; } - }; + } + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, out T result) + { + try + { + result = JsonSerializer.Deserialize(ref reader, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } /// /// Sanitize filename by removing the path diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs index 7581b3998404..e3200ba23917 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -7,13 +7,15 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Client { @@ -23,6 +25,8 @@ namespace Org.OpenAPITools.Client public class HostConfiguration { private readonly IServiceCollection _services; + private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + internal bool HttpClientsAdded { get; private set; } /// @@ -32,13 +36,36 @@ public class HostConfiguration public HostConfiguration(IServiceCollection services) { _services = services; - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + _jsonOptions.Converters.Add(new JsonStringEnumConverter()); + _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); + _jsonOptions.Converters.Add(new CatJsonConverter()); + _jsonOptions.Converters.Add(new ChildCatJsonConverter()); + _jsonOptions.Converters.Add(new ComplexQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new DogJsonConverter()); + _jsonOptions.Converters.Add(new EquilateralTriangleJsonConverter()); + _jsonOptions.Converters.Add(new FruitJsonConverter()); + _jsonOptions.Converters.Add(new FruitReqJsonConverter()); + _jsonOptions.Converters.Add(new GmFruitJsonConverter()); + _jsonOptions.Converters.Add(new IsoscelesTriangleJsonConverter()); + _jsonOptions.Converters.Add(new MammalJsonConverter()); + _jsonOptions.Converters.Add(new NullableShapeJsonConverter()); + _jsonOptions.Converters.Add(new ParentPetJsonConverter()); + _jsonOptions.Converters.Add(new PigJsonConverter()); + _jsonOptions.Converters.Add(new PolymorphicPropertyJsonConverter()); + _jsonOptions.Converters.Add(new QuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); + _jsonOptions.Converters.Add(new ShapeJsonConverter()); + _jsonOptions.Converters.Add(new ShapeOrNullJsonConverter()); + _jsonOptions.Converters.Add(new SimpleQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new TriangleJsonConverter()); + _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddSingleton(); } /// @@ -86,8 +113,7 @@ public HostConfiguration AddApiHttpClients /// /// - public HostConfiguration AddApiHttpClients( - Action client = null, Action builder = null) + public HostConfiguration AddApiHttpClients(Action client = null, Action builder = null) { AddApiHttpClients(client, builder); @@ -99,9 +125,9 @@ public HostConfiguration AddApiHttpClients( /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { - options(Client.ClientUtils.JsonSerializerSettings); + options(_jsonOptions); return this; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index 22d8834f4cb6..c06ba4c50a0e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Generic; using System.IO; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs index 7cc2dc394d7c..478d60e66756 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs new file mode 100644 index 000000000000..8fd6b68578f0 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs @@ -0,0 +1,25 @@ +// + +using System.Text.Json; + +namespace Org.OpenAPITools.Client +{ + /// + /// Provides the JsonSerializerOptions + /// + public class JsonSerializerOptionsProvider + { + /// + /// the JsonSerializerOptions + /// + public JsonSerializerOptions Options { get; } + + /// + /// Instantiates a JsonSerializerOptionsProvider + /// + public JsonSerializerOptionsProvider(JsonSerializerOptions options) + { + Options = options; + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OAuthToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OAuthToken.cs index 530e8211d821..ec4d08e9c99a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OAuthToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OAuthToken.cs @@ -1,7 +1,5 @@ // - - using System; using System.Linq; using System.Threading; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a5253e582013..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs new file mode 100644 index 000000000000..a280076c5a94 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs @@ -0,0 +1,42 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateJsonConverter : JsonConverter + { + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + DateTime.ParseExact(reader.GetString(), "yyyy-MM-dd", CultureInfo.InvariantCulture); + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs index 57dcc52ded37..02c1bde6ab70 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/RateLimitProvider`1.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Collections.Concurrent; using System.Linq; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenBase.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenBase.cs index 7098850e99e2..ec843104cafe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenBase.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenBase.cs @@ -1,7 +1,5 @@ // - - using System; namespace Org.OpenAPITools.Client diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs index 1be1b27f2a9f..ab372352e217 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenContainer`1.cs @@ -1,7 +1,5 @@ // - - using System.Linq; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs index cc3135247d17..7a9c7743e114 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/TokenProvider`1.cs @@ -8,8 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - - using System; using System.Linq; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs deleted file mode 100644 index b3fc4c3c7a3a..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Org.OpenAPITools.Model -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Custom JSON serializer for objects with additional properties - /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 14d0e92eaa29..25b11f890faa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,87 +27,85 @@ namespace Org.OpenAPITools.Model /// /// AdditionalPropertiesClass /// - [DataContract(Name = "AdditionalPropertiesClass")] public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapProperty. - /// mapOfMapProperty. - /// anytype1. - /// mapWithUndeclaredPropertiesAnytype1. - /// mapWithUndeclaredPropertiesAnytype2. - /// mapWithUndeclaredPropertiesAnytype3. - /// an object with no declared properties and no undeclared properties, hence it's an empty map.. - /// mapWithUndeclaredPropertiesString. + /// mapProperty + /// mapOfMapProperty + /// anytype1 + /// mapWithUndeclaredPropertiesAnytype1 + /// mapWithUndeclaredPropertiesAnytype2 + /// mapWithUndeclaredPropertiesAnytype3 + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + /// mapWithUndeclaredPropertiesString public AdditionalPropertiesClass(Dictionary mapProperty = default, Dictionary> mapOfMapProperty = default, Object anytype1 = default, Object mapWithUndeclaredPropertiesAnytype1 = default, Object mapWithUndeclaredPropertiesAnytype2 = default, Dictionary mapWithUndeclaredPropertiesAnytype3 = default, Object emptyMap = default, Dictionary mapWithUndeclaredPropertiesString = default) { - this.MapProperty = mapProperty; - this.MapOfMapProperty = mapOfMapProperty; - this.Anytype1 = anytype1; - this.MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; - this.MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; - this.MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - this.EmptyMap = emptyMap; - this.MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; - this.AdditionalProperties = new Dictionary(); + MapProperty = mapProperty; + MapOfMapProperty = mapOfMapProperty; + Anytype1 = anytype1; + MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + EmptyMap = emptyMap; + MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; } /// /// Gets or Sets MapProperty /// - [DataMember(Name = "map_property", EmitDefaultValue = false)] + [JsonPropertyName("map_property")] public Dictionary MapProperty { get; set; } /// /// Gets or Sets MapOfMapProperty /// - [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] + [JsonPropertyName("map_of_map_property")] public Dictionary> MapOfMapProperty { get; set; } /// /// Gets or Sets Anytype1 /// - [DataMember(Name = "anytype_1", EmitDefaultValue = true)] + [JsonPropertyName("anytype_1")] public Object Anytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_1")] public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_2")] public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 /// - [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_anytype_3")] public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// /// an object with no declared properties and no undeclared properties, hence it's an empty map. - [DataMember(Name = "empty_map", EmitDefaultValue = false)] + [JsonPropertyName("empty_map")] public Object EmptyMap { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesString /// - [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] + [JsonPropertyName("map_with_undeclared_properties_string")] public Dictionary MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -132,15 +128,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs index 73eef4704068..4d287b1d2fdc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,54 +27,39 @@ namespace Org.OpenAPITools.Model /// /// Animal /// - [DataContract(Name = "Animal")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] public partial class Animal : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Animal() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). + /// className (required) + /// color (default to "red") public Animal(string className, string color = "red") { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Animal and cannot be null"); - } - this.ClassName = className; - // use default value if no "color" provided - this.Color = color ?? "red"; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for Animal and cannot be null."); + + ClassName = className; + Color = color; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets Color /// - [DataMember(Name = "color", EmitDefaultValue = false)] + [JsonPropertyName("color")] public string Color { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -94,15 +76,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs index e5fee65b6bc2..9410088a4138 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// ApiResponse /// - [DataContract(Name = "ApiResponse")] public partial class ApiResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// code. - /// type. - /// message. + /// code + /// type + /// message public ApiResponse(int code = default, string type = default, string message = default) { - this.Code = code; - this.Type = type; - this.Message = message; - this.AdditionalProperties = new Dictionary(); + Code = code; + Type = type; + Message = message; } /// /// Gets or Sets Code /// - [DataMember(Name = "code", EmitDefaultValue = false)] + [JsonPropertyName("code")] public int Code { get; set; } /// /// Gets or Sets Type /// - [DataMember(Name = "type", EmitDefaultValue = false)] + [JsonPropertyName("type")] public string Type { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name = "message", EmitDefaultValue = false)] + [JsonPropertyName("message")] public string Message { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs index adf8438c5912..d6a9cf50290a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// Apple /// - [DataContract(Name = "apple")] public partial class Apple : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cultivar. - /// origin. + /// cultivar + /// origin public Apple(string cultivar = default, string origin = default) { - this.Cultivar = cultivar; - this.Origin = origin; - this.AdditionalProperties = new Dictionary(); + Cultivar = cultivar; + Origin = origin; } /// /// Gets or Sets Cultivar /// - [DataMember(Name = "cultivar", EmitDefaultValue = false)] + [JsonPropertyName("cultivar")] public string Cultivar { get; set; } /// /// Gets or Sets Origin /// - [DataMember(Name = "origin", EmitDefaultValue = false)] + [JsonPropertyName("origin")] public string Origin { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs index 28ce313d0b60..48e37cc0aa88 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,39 +27,32 @@ namespace Org.OpenAPITools.Model /// /// AppleReq /// - [DataContract(Name = "appleReq")] public partial class AppleReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AppleReq() { } - /// - /// Initializes a new instance of the class. - /// - /// cultivar (required). - /// mealy. + /// cultivar (required) + /// mealy public AppleReq(string cultivar, bool mealy = default) { - // to ensure "cultivar" is required (not null) - if (cultivar == null) { - throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); - } - this.Cultivar = cultivar; - this.Mealy = mealy; + if (cultivar == null) + throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null."); + + Cultivar = cultivar; + Mealy = mealy; } /// /// Gets or Sets Cultivar /// - [DataMember(Name = "cultivar", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("cultivar")] public string Cultivar { get; set; } /// /// Gets or Sets Mealy /// - [DataMember(Name = "mealy", EmitDefaultValue = true)] + [JsonPropertyName("mealy")] public bool Mealy { get; set; } /// @@ -78,15 +69,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index a342794fafaa..256a6b596ad2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfArrayOfNumberOnly /// - [DataContract(Name = "ArrayOfArrayOfNumberOnly")] public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayArrayNumber. + /// arrayArrayNumber public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default) { - this.ArrayArrayNumber = arrayArrayNumber; - this.AdditionalProperties = new Dictionary(); + ArrayArrayNumber = arrayArrayNumber; } /// /// Gets or Sets ArrayArrayNumber /// - [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] + [JsonPropertyName("ArrayArrayNumber")] public List> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 349fc7ef5a1d..6c462dddf1e2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfNumberOnly /// - [DataContract(Name = "ArrayOfNumberOnly")] public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayNumber. + /// arrayNumber public ArrayOfNumberOnly(List arrayNumber = default) { - this.ArrayNumber = arrayNumber; - this.AdditionalProperties = new Dictionary(); + ArrayNumber = arrayNumber; } /// /// Gets or Sets ArrayNumber /// - [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] + [JsonPropertyName("ArrayNumber")] public List ArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs index b7f6f3cd1779..f9872d701057 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// ArrayTest /// - [DataContract(Name = "ArrayTest")] public partial class ArrayTest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. + /// arrayOfString + /// arrayArrayOfInteger + /// arrayArrayOfModel public ArrayTest(List arrayOfString = default, List> arrayArrayOfInteger = default, List> arrayArrayOfModel = default) { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - this.AdditionalProperties = new Dictionary(); + ArrayOfString = arrayOfString; + ArrayArrayOfInteger = arrayArrayOfInteger; + ArrayArrayOfModel = arrayArrayOfModel; } /// /// Gets or Sets ArrayOfString /// - [DataMember(Name = "array_of_string", EmitDefaultValue = false)] + [JsonPropertyName("array_of_string")] public List ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// - [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] + [JsonPropertyName("array_array_of_integer")] public List> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// - [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] + [JsonPropertyName("array_array_of_model")] public List> ArrayArrayOfModel { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs index bb1962fc2b2f..3192691eb715 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Banana /// - [DataContract(Name = "banana")] public partial class Banana : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// lengthCm. + /// lengthCm public Banana(decimal lengthCm = default) { - this.LengthCm = lengthCm; - this.AdditionalProperties = new Dictionary(); + LengthCm = lengthCm; } /// /// Gets or Sets LengthCm /// - [DataMember(Name = "lengthCm", EmitDefaultValue = false)] + [JsonPropertyName("lengthCm")] public decimal LengthCm { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs index 812c91b012fe..95ea0488f230 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,35 +27,32 @@ namespace Org.OpenAPITools.Model /// /// BananaReq /// - [DataContract(Name = "bananaReq")] public partial class BananaReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected BananaReq() { } - /// - /// Initializes a new instance of the class. - /// - /// lengthCm (required). - /// sweet. + /// lengthCm (required) + /// sweet public BananaReq(decimal lengthCm, bool sweet = default) { - this.LengthCm = lengthCm; - this.Sweet = sweet; + if (lengthCm == null) + throw new ArgumentNullException("lengthCm is a required property for BananaReq and cannot be null."); + + LengthCm = lengthCm; + Sweet = sweet; } /// /// Gets or Sets LengthCm /// - [DataMember(Name = "lengthCm", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("lengthCm")] public decimal LengthCm { get; set; } /// /// Gets or Sets Sweet /// - [DataMember(Name = "sweet", EmitDefaultValue = true)] + [JsonPropertyName("sweet")] public bool Sweet { get; set; } /// @@ -74,15 +69,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs index 0706a3e8196b..fc19bc19279c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// BasquePig /// - [DataContract(Name = "BasquePig")] public partial class BasquePig : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected BasquePig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). + /// className (required) public BasquePig(string className) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); - } - this.ClassName = className; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for BasquePig and cannot be null."); + + ClassName = className; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs index 377781227e62..92d924949679 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,71 +27,69 @@ namespace Org.OpenAPITools.Model /// /// Capitalization /// - [DataContract(Name = "Capitalization")] public partial class Capitalization : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . + /// smallCamel + /// capitalCamel + /// smallSnake + /// capitalSnake + /// sCAETHFlowPoints + /// Name of the pet public Capitalization(string smallCamel = default, string capitalCamel = default, string smallSnake = default, string capitalSnake = default, string sCAETHFlowPoints = default, string aTTNAME = default) { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - this.AdditionalProperties = new Dictionary(); + SmallCamel = smallCamel; + CapitalCamel = capitalCamel; + SmallSnake = smallSnake; + CapitalSnake = capitalSnake; + SCAETHFlowPoints = sCAETHFlowPoints; + ATT_NAME = aTTNAME; } /// /// Gets or Sets SmallCamel /// - [DataMember(Name = "smallCamel", EmitDefaultValue = false)] + [JsonPropertyName("smallCamel")] public string SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// - [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] + [JsonPropertyName("CapitalCamel")] public string CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// - [DataMember(Name = "small_Snake", EmitDefaultValue = false)] + [JsonPropertyName("small_Snake")] public string SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// - [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] + [JsonPropertyName("Capital_Snake")] public string CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// - [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] + [JsonPropertyName("SCA_ETH_Flow_Points")] public string SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet - [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] + [JsonPropertyName("ATT_NAME")] public string ATT_NAME { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,15 +110,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs index d7c0634c555a..b8c35dd406ab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,41 +27,30 @@ namespace Org.OpenAPITools.Model /// /// Cat /// - [DataContract(Name = "Cat")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - public partial class Cat : Animal, IEquatable, IValidatableObject + public partial class Cat : Animal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Cat() + /// + /// + /// className (required) + /// color (default to "red") + public Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required) (default to "Cat"). - /// declawed. - /// color (default to "red"). - public Cat(string className = "Cat", bool declawed = default, string color = "red") : base(className, color) - { - this.Declawed = declawed; - this.AdditionalProperties = new Dictionary(); + Dictionary = dictionary; + CatAllOf = catAllOf; } /// - /// Gets or Sets Declawed + /// Gets or Sets Dictionary /// - [DataMember(Name = "declawed", EmitDefaultValue = true)] - public bool Declawed { get; set; } + public Dictionary Dictionary { get; set; } /// - /// Gets or Sets additional properties + /// Gets or Sets CatAllOf /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public CatAllOf CatAllOf { get; set; } /// /// Returns the string presentation of the object @@ -75,21 +61,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -119,38 +94,80 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type Cat + /// + public class CatJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Cat).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override Cat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader dictionaryReader = reader; + bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref dictionaryReader, options, out Dictionary dictionary); + + Utf8JsonReader catAllOfReader = reader; + bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref catAllOfReader, options, out CatAllOf catAllOf); + + string className = default; + string color = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + } + } } - yield break; + + return new Cat(dictionary, catAllOf, className, color); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs index 5aa226e03f6e..f1f19c6c88d6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// CatAllOf /// - [DataContract(Name = "Cat_allOf")] public partial class CatAllOf : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// declawed. + /// declawed public CatAllOf(bool declawed = default) { - this.Declawed = declawed; - this.AdditionalProperties = new Dictionary(); + Declawed = declawed; } /// /// Gets or Sets Declawed /// - [DataMember(Name = "declawed", EmitDefaultValue = true)] + [JsonPropertyName("declawed")] public bool Declawed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs index 8cd4fe7e9ac9..be6a1620b10b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,50 +27,39 @@ namespace Org.OpenAPITools.Model /// /// Category /// - [DataContract(Name = "Category")] public partial class Category : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Category() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required) (default to "default-name"). - /// id. + /// name (required) (default to "default-name") + /// id public Category(string name = "default-name", long id = default) { - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for Category and cannot be null"); - } - this.Name = name; - this.Id = id; - this.AdditionalProperties = new Dictionary(); + if (name == null) + throw new ArgumentNullException("name is a required property for Category and cannot be null."); + + Name = name; + Id = id; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -89,15 +76,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs index 991717f25912..5245528adb8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,61 +27,22 @@ namespace Org.OpenAPITools.Model /// /// ChildCat /// - [DataContract(Name = "ChildCat")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - public partial class ChildCat : ParentPet, IEquatable, IValidatableObject + public partial class ChildCat : ParentPet, IEquatable { - /// - /// Defines PetType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PetTypeEnum - { - /// - /// Enum ChildCat for value: ChildCat - /// - [EnumMember(Value = "ChildCat")] - ChildCat = 1 - - } - - - /// - /// Gets or Sets PetType - /// - [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] - public PetTypeEnum PetType { get; set; } /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ChildCat() + /// + /// petType (required) + public ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) { - this.AdditionalProperties = new Dictionary(); + ChildCatAllOf = childCatAllOf; } - /// - /// Initializes a new instance of the class. - /// - /// petType (required) (default to PetTypeEnum.ChildCat). - /// name. - public ChildCat(PetTypeEnum petType = PetTypeEnum.ChildCat, string name = default) : base() - { - this.PetType = petType; - this.Name = name; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } /// - /// Gets or Sets additional properties + /// Gets or Sets ChildCatAllOf /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public ChildCatAllOf ChildCatAllOf { get; set; } /// /// Returns the string presentation of the object @@ -95,22 +53,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ChildCat {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" PetType: ").Append(PetType).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -140,42 +86,73 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type ChildCat + /// + public class ChildCatJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ChildCat).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override ChildCat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader childCatAllOfReader = reader; + bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref childCatAllOfReader, options, out ChildCatAllOf childCatAllOf); + + string petType = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + } + } } - yield break; + + return new ChildCat(childCatAllOf, petType); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index 483062ead25b..bc601c217baa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,22 @@ namespace Org.OpenAPITools.Model /// /// ChildCatAllOf /// - [DataContract(Name = "ChildCat_allOf")] public partial class ChildCatAllOf : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// name + /// petType (default to PetTypeEnum.ChildCat) + public ChildCatAllOf(string name = default, PetTypeEnum petType = PetTypeEnum.ChildCat) + { + Name = name; + PetType = petType; + } + /// /// Defines PetType /// - [JsonConverter(typeof(StringEnumConverter))] public enum PetTypeEnum { /// @@ -46,35 +53,23 @@ public enum PetTypeEnum } - /// /// Gets or Sets PetType /// - [DataMember(Name = "pet_type", EmitDefaultValue = false)] + [JsonPropertyName("pet_type")] public PetTypeEnum PetType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// name. - /// petType (default to PetTypeEnum.ChildCat). - public ChildCatAllOf(string name = default, PetTypeEnum petType = PetTypeEnum.ChildCat) - { - this.Name = name; - this.PetType = petType; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -91,15 +86,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs index fa446f3a33ff..84a40d948990 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model with \"_class\" property /// - [DataContract(Name = "ClassModel")] public partial class ClassModel : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _class. + /// _class public ClassModel(string _class = default) { - this.Class = _class; - this.AdditionalProperties = new Dictionary(); + Class = _class; } /// /// Gets or Sets Class /// - [DataMember(Name = "_class", EmitDefaultValue = false)] + [JsonPropertyName("_class")] public string Class { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index ab75994ddf5c..2ec6fa15f310 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// ComplexQuadrilateral /// - [DataContract(Name = "ComplexQuadrilateral")] public partial class ComplexQuadrilateral : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ComplexQuadrilateral() + /// + /// + public ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// quadrilateralType (required). - public ComplexQuadrilateral(string shapeType, string quadrilateralType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + QuadrilateralInterface = quadrilateralInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets QuadrilateralType + /// Gets or Sets QuadrilateralInterface /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] - public string QuadrilateralType { get; set; } + public QuadrilateralInterface QuadrilateralInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ComplexQuadrilateral {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type ComplexQuadrilateral + /// + public class ComplexQuadrilateralJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ComplexQuadrilateral).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ComplexQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader quadrilateralInterfaceReader = reader; + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new ComplexQuadrilateral(shapeInterface, quadrilateralInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs index 7314bf3a2140..fdcd66cce71f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// DanishPig /// - [DataContract(Name = "DanishPig")] public partial class DanishPig : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DanishPig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). + /// className (required) public DanishPig(string className) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); - } - this.ClassName = className; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for DanishPig and cannot be null."); + + ClassName = className; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs index a900bc224e49..d04aa0065507 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// DeprecatedObject /// - [DataContract(Name = "DeprecatedObject")] public partial class DeprecatedObject : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name. + /// name public DeprecatedObject(string name = default) { - this.Name = name; - this.AdditionalProperties = new Dictionary(); + Name = name; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs index d34b90a530d3..e00bc00421c1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,41 +27,23 @@ namespace Org.OpenAPITools.Model /// /// Dog /// - [DataContract(Name = "Dog")] - [JsonConverter(typeof(JsonSubtypes), "ClassName")] - public partial class Dog : Animal, IEquatable, IValidatableObject + public partial class Dog : Animal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Dog() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required) (default to "Dog"). - /// breed. - /// color (default to "red"). - public Dog(string className = "Dog", string breed = default, string color = "red") : base(className, color) + /// + /// className (required) + /// color (default to "red") + public Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) { - this.Breed = breed; - this.AdditionalProperties = new Dictionary(); + DogAllOf = dogAllOf; } /// - /// Gets or Sets Breed + /// Gets or Sets DogAllOf /// - [DataMember(Name = "breed", EmitDefaultValue = false)] - public string Breed { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public DogAllOf DogAllOf { get; set; } /// /// Returns the string presentation of the object @@ -75,21 +54,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -119,41 +87,77 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.Breed != null) - { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type Dog + /// + public class DogJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Dog).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override Dog Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader dogAllOfReader = reader; + bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref dogAllOfReader, options, out DogAllOf dogAllOf); + + string className = default; + string color = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + } + } } - yield break; + + return new Dog(dogAllOf, className, color); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs index 7563294d9944..e35252fa2639 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// DogAllOf /// - [DataContract(Name = "Dog_allOf")] public partial class DogAllOf : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// breed. + /// breed public DogAllOf(string breed = default) { - this.Breed = breed; - this.AdditionalProperties = new Dictionary(); + Breed = breed; } /// /// Gets or Sets Breed /// - [DataMember(Name = "breed", EmitDefaultValue = false)] + [JsonPropertyName("breed")] public string Breed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs index bbec316ee186..4cb653c55d27 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,45 @@ namespace Org.OpenAPITools.Model /// /// Drawing /// - [DataContract(Name = "Drawing")] public partial class Drawing : Dictionary, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mainShape. - /// shapeOrNull. - /// nullableShape. - /// shapes. + /// mainShape + /// shapeOrNull + /// nullableShape + /// shapes public Drawing(Shape mainShape = default, ShapeOrNull shapeOrNull = default, NullableShape nullableShape = default, List shapes = default) : base() { - this.MainShape = mainShape; - this.ShapeOrNull = shapeOrNull; - this.NullableShape = nullableShape; - this.Shapes = shapes; + MainShape = mainShape; + ShapeOrNull = shapeOrNull; + NullableShape = nullableShape; + Shapes = shapes; } /// /// Gets or Sets MainShape /// - [DataMember(Name = "mainShape", EmitDefaultValue = false)] + [JsonPropertyName("mainShape")] public Shape MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// - [DataMember(Name = "shapeOrNull", EmitDefaultValue = false)] + [JsonPropertyName("shapeOrNull")] public ShapeOrNull ShapeOrNull { get; set; } /// /// Gets or Sets NullableShape /// - [DataMember(Name = "nullableShape", EmitDefaultValue = true)] + [JsonPropertyName("nullableShape")] public NullableShape NullableShape { get; set; } /// /// Gets or Sets Shapes /// - [DataMember(Name = "shapes", EmitDefaultValue = false)] + [JsonPropertyName("shapes")] public List Shapes { get; set; } /// @@ -88,15 +85,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs index f8a52d1b5faf..95fff02c5688 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,22 @@ namespace Org.OpenAPITools.Model /// /// EnumArrays /// - [DataContract(Name = "EnumArrays")] public partial class EnumArrays : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// justSymbol + /// arrayEnum + public EnumArrays(JustSymbolEnum justSymbol = default, List arrayEnum = default) + { + JustSymbol = justSymbol; + ArrayEnum = arrayEnum; + } + /// /// Defines JustSymbol /// - [JsonConverter(typeof(StringEnumConverter))] public enum JustSymbolEnum { /// @@ -52,16 +59,15 @@ public enum JustSymbolEnum } - /// /// Gets or Sets JustSymbol /// - [DataMember(Name = "just_symbol", EmitDefaultValue = false)] + [JsonPropertyName("just_symbol")] public JustSymbolEnum JustSymbol { get; set; } + /// /// Defines ArrayEnum /// - [JsonConverter(typeof(StringEnumConverter))] public enum ArrayEnumEnum { /// @@ -79,29 +85,17 @@ public enum ArrayEnumEnum } - /// /// Gets or Sets ArrayEnum /// - [DataMember(Name = "array_enum", EmitDefaultValue = false)] + [JsonPropertyName("array_enum")] public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum justSymbol = default, List arrayEnum = default) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -118,15 +112,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs index 48b3d7d0e7e0..390f7f6ea5cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +27,6 @@ namespace Org.OpenAPITools.Model /// /// Defines EnumClass /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumClass { /// @@ -51,5 +48,4 @@ public enum EnumClass Xyz = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs index b1b8afaa9a60..273116bc0365 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,39 @@ namespace Org.OpenAPITools.Model /// /// EnumTest /// - [DataContract(Name = "Enum_Test")] public partial class EnumTest : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// enumStringRequired (required) + /// enumString + /// enumInteger + /// enumIntegerOnly + /// enumNumber + /// outerEnum + /// outerEnumInteger + /// outerEnumDefaultValue + /// outerEnumIntegerDefaultValue + public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum enumString = default, EnumIntegerEnum enumInteger = default, EnumIntegerOnlyEnum enumIntegerOnly = default, EnumNumberEnum enumNumber = default, OuterEnum outerEnum = default, OuterEnumInteger outerEnumInteger = default, OuterEnumDefaultValue outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default) + { + if (enumStringRequired == null) + throw new ArgumentNullException("enumStringRequired is a required property for EnumTest and cannot be null."); + + EnumStringRequired = enumStringRequired; + EnumString = enumString; + EnumInteger = enumInteger; + EnumIntegerOnly = enumIntegerOnly; + EnumNumber = enumNumber; + OuterEnum = outerEnum; + OuterEnumInteger = outerEnumInteger; + OuterEnumDefaultValue = outerEnumDefaultValue; + OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + } + /// /// Defines EnumStringRequired /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumStringRequiredEnum { /// @@ -58,16 +82,15 @@ public enum EnumStringRequiredEnum } - /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name = "enum_string_required", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("enum_string_required")] public EnumStringRequiredEnum EnumStringRequired { get; set; } + /// /// Defines EnumString /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumStringEnum { /// @@ -90,12 +113,12 @@ public enum EnumStringEnum } - /// /// Gets or Sets EnumString /// - [DataMember(Name = "enum_string", EmitDefaultValue = false)] + [JsonPropertyName("enum_string")] public EnumStringEnum EnumString { get; set; } + /// /// Defines EnumInteger /// @@ -113,12 +136,12 @@ public enum EnumIntegerEnum } - /// /// Gets or Sets EnumInteger /// - [DataMember(Name = "enum_integer", EmitDefaultValue = false)] + [JsonPropertyName("enum_integer")] public EnumIntegerEnum EnumInteger { get; set; } + /// /// Defines EnumIntegerOnly /// @@ -136,16 +159,15 @@ public enum EnumIntegerOnlyEnum } - /// /// Gets or Sets EnumIntegerOnly /// - [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] + [JsonPropertyName("enum_integer_only")] public EnumIntegerOnlyEnum EnumIntegerOnly { get; set; } + /// /// Defines EnumNumber /// - [JsonConverter(typeof(StringEnumConverter))] public enum EnumNumberEnum { /// @@ -162,75 +184,41 @@ public enum EnumNumberEnum } - /// /// Gets or Sets EnumNumber /// - [DataMember(Name = "enum_number", EmitDefaultValue = false)] + [JsonPropertyName("enum_number")] public EnumNumberEnum EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// - [DataMember(Name = "outerEnum", EmitDefaultValue = true)] + [JsonPropertyName("outerEnum")] public OuterEnum OuterEnum { get; set; } /// /// Gets or Sets OuterEnumInteger /// - [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumInteger")] public OuterEnumInteger OuterEnumInteger { get; set; } /// /// Gets or Sets OuterEnumDefaultValue /// - [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumDefaultValue")] public OuterEnumDefaultValue OuterEnumDefaultValue { get; set; } /// /// Gets or Sets OuterEnumIntegerDefaultValue /// - [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] + [JsonPropertyName("outerEnumIntegerDefaultValue")] public OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// enumStringRequired (required). - /// enumString. - /// enumInteger. - /// enumIntegerOnly. - /// enumNumber. - /// outerEnum. - /// outerEnumInteger. - /// outerEnumDefaultValue. - /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum enumString = default, EnumIntegerEnum enumInteger = default, EnumIntegerOnlyEnum enumIntegerOnly = default, EnumNumberEnum enumNumber = default, OuterEnum outerEnum = default, OuterEnumInteger outerEnumInteger = default, OuterEnumDefaultValue outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default) - { - this.EnumStringRequired = enumStringRequired; - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumIntegerOnly = enumIntegerOnly; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - this.OuterEnumInteger = outerEnumInteger; - this.OuterEnumDefaultValue = outerEnumDefaultValue; - this.OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -254,15 +242,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 43e72bd635aa..e6fc1aa4f310 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// EquilateralTriangle /// - [DataContract(Name = "EquilateralTriangle")] public partial class EquilateralTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected EquilateralTriangle() + /// + /// + public EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public EquilateralTriangle(string shapeType, string triangleType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EquilateralTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type EquilateralTriangle + /// + public class EquilateralTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(EquilateralTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EquilateralTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new EquilateralTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs index e4d0738adbf6..86163355eaf7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,31 +27,29 @@ namespace Org.OpenAPITools.Model /// /// Must be named `File` for test. /// - [DataContract(Name = "File")] public partial class File : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Test capitalization. + /// Test capitalization public File(string sourceURI = default) { - this.SourceURI = sourceURI; - this.AdditionalProperties = new Dictionary(); + SourceURI = sourceURI; } /// /// Test capitalization /// /// Test capitalization - [DataMember(Name = "sourceURI", EmitDefaultValue = false)] + [JsonPropertyName("sourceURI")] public string SourceURI { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,15 +65,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 423799cb24e8..366ead31ee14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// FileSchemaTestClass /// - [DataContract(Name = "FileSchemaTestClass")] public partial class FileSchemaTestClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// file. - /// files. + /// file + /// files public FileSchemaTestClass(File file = default, List files = default) { - this.File = file; - this.Files = files; - this.AdditionalProperties = new Dictionary(); + File = file; + Files = files; } /// /// Gets or Sets File /// - [DataMember(Name = "file", EmitDefaultValue = false)] + [JsonPropertyName("file")] public File File { get; set; } /// /// Gets or Sets Files /// - [DataMember(Name = "files", EmitDefaultValue = false)] + [JsonPropertyName("files")] public List Files { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs index e64aac7b6317..8be5cfe140bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,31 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Foo /// - [DataContract(Name = "Foo")] public partial class Foo : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bar (default to "bar"). + /// bar (default to "bar") public Foo(string bar = "bar") { - // use default value if no "bar" provided - this.Bar = bar ?? "bar"; - this.AdditionalProperties = new Dictionary(); + Bar = bar; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string Bar { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs index 8b846d403ffb..a767556f460f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,169 +27,162 @@ namespace Org.OpenAPITools.Model /// /// FormatTest /// - [DataContract(Name = "format_test")] public partial class FormatTest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected FormatTest() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// number (required). - /// _byte (required). - /// date (required). - /// password (required). - /// integer. - /// int32. - /// int64. - /// _float. - /// _double. - /// _decimal. - /// _string. - /// binary. - /// dateTime. - /// uuid. - /// A string that is a 10 digit number. Can have leading zeros.. - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. + /// number (required) + /// _byte (required) + /// date (required) + /// password (required) + /// integer + /// int32 + /// int64 + /// _float + /// _double + /// _decimal + /// _string + /// binary + /// dateTime + /// uuid + /// A string that is a 10 digit number. Can have leading zeros. + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int integer = default, int int32 = default, long int64 = default, float _float = default, double _double = default, decimal _decimal = default, string _string = default, System.IO.Stream binary = default, DateTime dateTime = default, Guid uuid = default, string patternWithDigits = default, string patternWithDigitsAndDelimiter = default) { - this.Number = number; - // to ensure "_byte" is required (not null) - if (_byte == null) { - throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); - } - this.Byte = _byte; - this.Date = date; - // to ensure "password" is required (not null) - if (password == null) { - throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); - } - this.Password = password; - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.Decimal = _decimal; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.PatternWithDigits = patternWithDigits; - this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - this.AdditionalProperties = new Dictionary(); + if (number == null) + throw new ArgumentNullException("number is a required property for FormatTest and cannot be null."); + + if (_byte == null) + throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null."); + + if (date == null) + throw new ArgumentNullException("date is a required property for FormatTest and cannot be null."); + + if (password == null) + throw new ArgumentNullException("password is a required property for FormatTest and cannot be null."); + + Number = number; + Byte = _byte; + Date = date; + Password = password; + Integer = integer; + Int32 = int32; + Int64 = int64; + Float = _float; + Double = _double; + Decimal = _decimal; + String = _string; + Binary = binary; + DateTime = dateTime; + Uuid = uuid; + PatternWithDigits = patternWithDigits; + PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } /// /// Gets or Sets Number /// - [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("number")] public decimal Number { get; set; } /// /// Gets or Sets Byte /// - [DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("byte")] public byte[] Byte { get; set; } /// /// Gets or Sets Date /// - [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] + [JsonPropertyName("date")] public DateTime Date { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("password")] public string Password { get; set; } /// /// Gets or Sets Integer /// - [DataMember(Name = "integer", EmitDefaultValue = false)] + [JsonPropertyName("integer")] public int Integer { get; set; } /// /// Gets or Sets Int32 /// - [DataMember(Name = "int32", EmitDefaultValue = false)] + [JsonPropertyName("int32")] public int Int32 { get; set; } /// /// Gets or Sets Int64 /// - [DataMember(Name = "int64", EmitDefaultValue = false)] + [JsonPropertyName("int64")] public long Int64 { get; set; } /// /// Gets or Sets Float /// - [DataMember(Name = "float", EmitDefaultValue = false)] + [JsonPropertyName("float")] public float Float { get; set; } /// /// Gets or Sets Double /// - [DataMember(Name = "double", EmitDefaultValue = false)] + [JsonPropertyName("double")] public double Double { get; set; } /// /// Gets or Sets Decimal /// - [DataMember(Name = "decimal", EmitDefaultValue = false)] + [JsonPropertyName("decimal")] public decimal Decimal { get; set; } /// /// Gets or Sets String /// - [DataMember(Name = "string", EmitDefaultValue = false)] + [JsonPropertyName("string")] public string String { get; set; } /// /// Gets or Sets Binary /// - [DataMember(Name = "binary", EmitDefaultValue = false)] + [JsonPropertyName("binary")] public System.IO.Stream Binary { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name = "dateTime", EmitDefaultValue = false)] + [JsonPropertyName("dateTime")] public DateTime DateTime { get; set; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public Guid Uuid { get; set; } /// /// A string that is a 10 digit number. Can have leading zeros. /// /// A string that is a 10 digit number. Can have leading zeros. - [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] + [JsonPropertyName("pattern_with_digits")] public string PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] + [JsonPropertyName("pattern_with_digits_and_delimiter")] public string PatternWithDigitsAndDelimiter { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -222,15 +213,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs index 726b1e8f72e7..95c524884469 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,95 +17,55 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Fruit /// - [JsonConverter(typeof(FruitJsonConverter))] - [DataContract(Name = "fruit")] - public partial class Fruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Fruit : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Apple. - public Fruit(Apple actualInstance) + /// + /// color + public Fruit(Apple apple, string color = default) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Apple = apple; + Color = color; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Banana. - public Fruit(Banana actualInstance) + /// + /// color + public Fruit(Banana banana, string color = default) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Banana = banana; + Color = color; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Apple /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Apple)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Banana)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); - } - } - } + public Apple Apple { get; set; } /// - /// Get the actual instance of `Apple`. If the actual instance is not `Apple`, - /// the InvalidClassException will be thrown + /// Gets or Sets Banana /// - /// An instance of Apple - public Apple GetApple() - { - return (Apple)this.ActualInstance; - } + public Banana Banana { get; set; } /// - /// Get the actual instance of `Banana`. If the actual instance is not `Banana`, - /// the InvalidClassException will be thrown + /// Gets or Sets Color /// - /// An instance of Banana - public Banana GetBanana() - { - return (Banana)this.ActualInstance; - } + [JsonPropertyName("color")] + public string Color { get; set; } /// /// Returns the string presentation of the object @@ -113,91 +73,13 @@ public Banana GetBanana() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Fruit {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Fruit.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Fruit - /// - /// JSON string - /// An instance of Fruit - public static Fruit FromJson(string jsonString) - { - Fruit newFruit = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newFruit; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Apple).GetProperty("AdditionalProperties") == null) - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); - } - else - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Apple"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Banana).GetProperty("AdditionalProperties") == null) - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); - } - else - { - newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Banana"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newFruit; - } - /// /// Returns true if objects are equal /// @@ -227,8 +109,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.Color != null) + { + hashCode = (hashCode * 59) + this.Color.GetHashCode(); + } return hashCode; } } @@ -238,54 +122,82 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Fruit + /// A Json converter for type Fruit /// - public class FruitJsonConverter : JsonConverter + public class FruitJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Fruit).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Fruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReader = reader; + bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); + + Utf8JsonReader bananaReader = reader; + bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana banana); + + string color = default; + + while (reader.Read()) { - return Fruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "color": + color = reader.GetString(); + break; + } + } } - return null; + + if (appleDeserialized) + return new Fruit(apple, color); + + if (bananaDeserialized) + return new Fruit(banana, color); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs index 548da490def0..f5abf198758e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,104 +17,45 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// FruitReq /// - [JsonConverter(typeof(FruitReqJsonConverter))] - [DataContract(Name = "fruitReq")] - public partial class FruitReq : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class FruitReq : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public FruitReq() + /// + public FruitReq(AppleReq appleReq) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + AppleReq = appleReq; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of AppleReq. - public FruitReq(AppleReq actualInstance) + /// + public FruitReq(BananaReq bananaReq) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + BananaReq = bananaReq; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets AppleReq /// - /// An instance of BananaReq. - public FruitReq(BananaReq actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public AppleReq AppleReq { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets BananaReq /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AppleReq)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BananaReq)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AppleReq, BananaReq"); - } - } - } - - /// - /// Get the actual instance of `AppleReq`. If the actual instance is not `AppleReq`, - /// the InvalidClassException will be thrown - /// - /// An instance of AppleReq - public AppleReq GetAppleReq() - { - return (AppleReq)this.ActualInstance; - } - - /// - /// Get the actual instance of `BananaReq`. If the actual instance is not `BananaReq`, - /// the InvalidClassException will be thrown - /// - /// An instance of BananaReq - public BananaReq GetBananaReq() - { - return (BananaReq)this.ActualInstance; - } + public BananaReq BananaReq { get; set; } /// /// Returns the string presentation of the object @@ -122,91 +63,12 @@ public BananaReq GetBananaReq() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FruitReq {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, FruitReq.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of FruitReq - /// - /// JSON string - /// An instance of FruitReq - public static FruitReq FromJson(string jsonString) - { - FruitReq newFruitReq = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newFruitReq; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(AppleReq).GetProperty("AdditionalProperties") == null) - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); - } - else - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("AppleReq"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into AppleReq: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(BananaReq).GetProperty("AdditionalProperties") == null) - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); - } - else - { - newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("BananaReq"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into BananaReq: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newFruitReq; - } - /// /// Returns true if objects are equal /// @@ -236,8 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); return hashCode; } } @@ -247,54 +107,78 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for FruitReq + /// A Json converter for type FruitReq /// - public class FruitReqJsonConverter : JsonConverter + public class FruitReqJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(FruitReq).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override FruitReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReqReader = reader; + bool appleReqDeserialized = Client.ClientUtils.TryDeserialize(ref appleReqReader, options, out AppleReq appleReq); + + Utf8JsonReader bananaReqReader = reader; + bool bananaReqDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReqReader, options, out BananaReq bananaReq); + + + while (reader.Read()) { - return FruitReq.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (appleReqDeserialized) + return new FruitReq(appleReq); + + if (bananaReqDeserialized) + return new FruitReq(bananaReq); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs index bd8f4435c92f..3b4ac3586735 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,82 +27,36 @@ namespace Org.OpenAPITools.Model /// /// GmFruit /// - [JsonConverter(typeof(GmFruitJsonConverter))] - [DataContract(Name = "gmFruit")] - public partial class GmFruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class GmFruit : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of Apple. - public GmFruit(Apple actualInstance) - { - this.IsNullable = false; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Banana. - public GmFruit(Banana actualInstance) + /// + /// + /// color + public GmFruit(Apple apple, Banana banana, string color = default) { - this.IsNullable = false; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Apple = Apple; + Banana = Banana; + Color = color; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Apple /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Apple)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Banana)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); - } - } - } + public Apple Apple { get; set; } /// - /// Get the actual instance of `Apple`. If the actual instance is not `Apple`, - /// the InvalidClassException will be thrown + /// Gets or Sets Banana /// - /// An instance of Apple - public Apple GetApple() - { - return (Apple)this.ActualInstance; - } + public Banana Banana { get; set; } /// - /// Get the actual instance of `Banana`. If the actual instance is not `Banana`, - /// the InvalidClassException will be thrown + /// Gets or Sets Color /// - /// An instance of Banana - public Banana GetBanana() - { - return (Banana)this.ActualInstance; - } + [JsonPropertyName("color")] + public string Color { get; set; } /// /// Returns the string presentation of the object @@ -112,64 +64,13 @@ public Banana GetBanana() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GmFruit {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of GmFruit - /// - /// JSON string - /// An instance of GmFruit - public static GmFruit FromJson(string jsonString) - { - GmFruit newGmFruit = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newGmFruit; - } - - try - { - newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); - // deserialization is considered successful at this point if no exception has been thrown. - return newGmFruit; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); - } - - try - { - newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); - // deserialization is considered successful at this point if no exception has been thrown. - return newGmFruit; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); - } - - // no match found, throw an exception - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - /// /// Returns true if objects are equal /// @@ -199,8 +100,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.Color != null) + { + hashCode = (hashCode * 59) + this.Color.GetHashCode(); + } return hashCode; } } @@ -210,54 +113,76 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for GmFruit + /// A Json converter for type GmFruit /// - public class GmFruitJsonConverter : JsonConverter + public class GmFruitJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(GmFruit).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override GmFruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader appleReader = reader; + bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); + + Utf8JsonReader bananaReader = reader; + bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana banana); + + string color = default; + + while (reader.Read()) { - return GmFruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "color": + color = reader.GetString(); + break; + } + } } - return null; + + return new GmFruit(apple, banana, color); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 24b3df864e19..c880e6711ef3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,45 +27,31 @@ namespace Org.OpenAPITools.Model /// /// GrandparentAnimal /// - [DataContract(Name = "GrandparentAnimal")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] public partial class GrandparentAnimal : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected GrandparentAnimal() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// petType (required). + /// petType (required) public GrandparentAnimal(string petType) { - // to ensure "petType" is required (not null) - if (petType == null) { - throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); - } - this.PetType = petType; - this.AdditionalProperties = new Dictionary(); + if (petType == null) + throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null."); + + PetType = petType; } /// /// Gets or Sets PetType /// - [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("pet_type")] public string PetType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -84,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 52099a7095e1..849a4886c318 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,51 +27,36 @@ namespace Org.OpenAPITools.Model /// /// HasOnlyReadOnly /// - [DataContract(Name = "hasOnlyReadOnly")] public partial class HasOnlyReadOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() + /// bar + /// foo + public HasOnlyReadOnly(string bar = default, string foo = default) { - this.AdditionalProperties = new Dictionary(); + Bar = bar; + Foo = foo; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string Bar { get; private set; } - /// - /// Returns false as Bar should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBar() - { - return false; - } /// /// Gets or Sets Foo /// - [DataMember(Name = "foo", EmitDefaultValue = false)] + [JsonPropertyName("foo")] public string Foo { get; private set; } - /// - /// Returns false as Foo should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeFoo() - { - return false; - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -90,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 616877a9f601..f66a3e132f44 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// - [DataContract(Name = "HealthCheckResult")] public partial class HealthCheckResult : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// nullableMessage. + /// nullableMessage public HealthCheckResult(string nullableMessage = default) { - this.NullableMessage = nullableMessage; - this.AdditionalProperties = new Dictionary(); + NullableMessage = nullableMessage; } /// /// Gets or Sets NullableMessage /// - [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] + [JsonPropertyName("NullableMessage")] public string NullableMessage { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs index fc8c0d066361..4dfd57402fe2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// InlineResponseDefault /// - [DataContract(Name = "inline_response_default")] public partial class InlineResponseDefault : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _string. + /// _string public InlineResponseDefault(Foo _string = default) { - this.String = _string; - this.AdditionalProperties = new Dictionary(); + String = _string; } /// /// Gets or Sets String /// - [DataMember(Name = "string", EmitDefaultValue = false)] + [JsonPropertyName("string")] public Foo String { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index d5ff97d769cc..d1371b46bf30 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,44 +27,28 @@ namespace Org.OpenAPITools.Model /// /// IsoscelesTriangle /// - [DataContract(Name = "IsoscelesTriangle")] public partial class IsoscelesTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected IsoscelesTriangle() { } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public IsoscelesTriangle(string shapeType, string triangleType) + /// + /// + public IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); - } - this.TriangleType = triangleType; + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Returns the string presentation of the object @@ -76,21 +58,10 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IsoscelesTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -120,14 +91,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } return hashCode; } } @@ -143,4 +106,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type IsoscelesTriangle + /// + public class IsoscelesTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(IsoscelesTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override IsoscelesTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new IsoscelesTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs index adaece91e886..7a3e133f6938 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// List /// - [DataContract(Name = "List")] public partial class List : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _123list. + /// _123list public List(string _123list = default) { - this._123List = _123list; - this.AdditionalProperties = new Dictionary(); + _123List = _123list; } /// /// Gets or Sets _123List /// - [DataMember(Name = "123-list", EmitDefaultValue = false)] + [JsonPropertyName("123-list")] public string _123List { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs index 68ac31619921..f29770cdfe97 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,122 +17,65 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Mammal /// - [JsonConverter(typeof(MammalJsonConverter))] - [DataContract(Name = "mammal")] - public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Mammal : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// + public Mammal(Whale whale) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Whale = whale; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// + public Mammal(Zebra zebra) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Zebra = zebra; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// + public Mammal(Pig pig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + Pig = pig; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets Whale /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Pig)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Whale)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Zebra)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Pig, Whale, Zebra"); - } - } - } + public Whale Whale { get; set; } /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown + /// Gets or Sets Zebra /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } + public Zebra Zebra { get; set; } /// - /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, - /// the InvalidClassException will be thrown + /// Gets or Sets Pig /// - /// An instance of Whale - public Whale GetWhale() - { - return (Whale)this.ActualInstance; - } + public Pig Pig { get; set; } /// - /// Get the actual instance of `Zebra`. If the actual instance is not `Zebra`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Zebra - public Zebra GetZebra() - { - return (Zebra)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -140,111 +83,13 @@ public Zebra GetZebra() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Mammal {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Mammal.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Mammal - /// - /// JSON string - /// An instance of Mammal - public static Mammal FromJson(string jsonString) - { - Mammal newMammal = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newMammal; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Pig).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Pig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Pig: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Whale).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Whale"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Whale: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Zebra).GetProperty("AdditionalProperties") == null) - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); - } - else - { - newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Zebra"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Zebra: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newMammal; - } - /// /// Returns true if objects are equal /// @@ -274,8 +119,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -285,54 +132,94 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Mammal + /// A Json converter for type Mammal /// - public class MammalJsonConverter : JsonConverter + public class MammalJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Mammal).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Mammal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader whaleReader = reader; + bool whaleDeserialized = Client.ClientUtils.TryDeserialize(ref whaleReader, options, out Whale whale); + + Utf8JsonReader zebraReader = reader; + bool zebraDeserialized = Client.ClientUtils.TryDeserialize(ref zebraReader, options, out Zebra zebra); + + Utf8JsonReader pigReader = reader; + bool pigDeserialized = Client.ClientUtils.TryDeserialize(ref pigReader, options, out Pig pig); + + + while (reader.Read()) { - return Mammal.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (whaleDeserialized) + return new Mammal(whale); + + if (zebraDeserialized) + return new Mammal(zebra); + + if (pigDeserialized) + return new Mammal(pig); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs index b5ab56afe6ae..797a643b7e86 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,26 @@ namespace Org.OpenAPITools.Model /// /// MapTest /// - [DataContract(Name = "MapTest")] public partial class MapTest : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// mapMapOfString + /// mapOfEnumString + /// directMap + /// indirectMap + public MapTest(Dictionary> mapMapOfString = default, Dictionary mapOfEnumString = default, Dictionary directMap = default, Dictionary indirectMap = default) + { + MapMapOfString = mapMapOfString; + MapOfEnumString = mapOfEnumString; + DirectMap = directMap; + IndirectMap = indirectMap; + } + /// /// Defines Inner /// - [JsonConverter(typeof(StringEnumConverter))] public enum InnerEnum { /// @@ -53,51 +64,35 @@ public enum InnerEnum } - /// /// Gets or Sets MapOfEnumString /// - [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] + [JsonPropertyName("map_of_enum_string")] public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default, Dictionary mapOfEnumString = default, Dictionary directMap = default, Dictionary indirectMap = default) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets MapMapOfString /// - [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] + [JsonPropertyName("map_map_of_string")] public Dictionary> MapMapOfString { get; set; } /// /// Gets or Sets DirectMap /// - [DataMember(Name = "direct_map", EmitDefaultValue = false)] + [JsonPropertyName("direct_map")] public Dictionary DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// - [DataMember(Name = "indirect_map", EmitDefaultValue = false)] + [JsonPropertyName("indirect_map")] public Dictionary IndirectMap { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -116,15 +111,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 63145e93f888..68b2ea60b782 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// MixedPropertiesAndAdditionalPropertiesClass /// - [DataContract(Name = "MixedPropertiesAndAdditionalPropertiesClass")] public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid. - /// dateTime. - /// map. + /// uuid + /// dateTime + /// map public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default, DateTime dateTime = default, Dictionary map = default) { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - this.AdditionalProperties = new Dictionary(); + Uuid = uuid; + DateTime = dateTime; + Map = map; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public Guid Uuid { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name = "dateTime", EmitDefaultValue = false)] + [JsonPropertyName("dateTime")] public DateTime DateTime { get; set; } /// /// Gets or Sets Map /// - [DataMember(Name = "map", EmitDefaultValue = false)] + [JsonPropertyName("map")] public Dictionary Map { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs index 65d373b28745..6662b2edac44 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name starting with number /// - [DataContract(Name = "200_response")] public partial class Model200Response : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name. - /// _class. + /// name + /// _class public Model200Response(int name = default, string _class = default) { - this.Name = name; - this.Class = _class; - this.AdditionalProperties = new Dictionary(); + Name = name; + Class = _class; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public int Name { get; set; } /// /// Gets or Sets Class /// - [DataMember(Name = "class", EmitDefaultValue = false)] + [JsonPropertyName("class")] public string Class { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs index c1f5970e0328..7bc5c681bbee 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// ModelClient /// - [DataContract(Name = "_Client")] public partial class ModelClient : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _client. + /// _client public ModelClient(string _client = default) { - this._Client = _client; - this.AdditionalProperties = new Dictionary(); + _Client = _client; } /// /// Gets or Sets _Client /// - [DataMember(Name = "client", EmitDefaultValue = false)] + [JsonPropertyName("client")] public string _Client { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs index 9bb13253bc32..95d35d993b27 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,74 +27,55 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name same as property name /// - [DataContract(Name = "Name")] public partial class Name : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Name() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name, string property = default) + /// nameProperty (required) + /// snakeCase + /// property + /// _123number + public Name(int nameProperty, int snakeCase = default, string property = default, int _123number = default) { - this._Name = name; - this.Property = property; - this.AdditionalProperties = new Dictionary(); + if (nameProperty == null) + throw new ArgumentNullException("nameProperty is a required property for Name and cannot be null."); + + NameProperty = nameProperty; + SnakeCase = snakeCase; + Property = property; + _123Number = _123number; } /// - /// Gets or Sets _Name + /// Gets or Sets NameProperty /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public int _Name { get; set; } + [JsonPropertyName("name")] + public int NameProperty { get; set; } /// /// Gets or Sets SnakeCase /// - [DataMember(Name = "snake_case", EmitDefaultValue = false)] + [JsonPropertyName("snake_case")] public int SnakeCase { get; private set; } - /// - /// Returns false as SnakeCase should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeSnakeCase() - { - return false; - } /// /// Gets or Sets Property /// - [DataMember(Name = "property", EmitDefaultValue = false)] + [JsonPropertyName("property")] public string Property { get; set; } /// /// Gets or Sets _123Number /// - [DataMember(Name = "123Number", EmitDefaultValue = false)] + [JsonPropertyName("123Number")] public int _123Number { get; private set; } - /// - /// Returns false as _123Number should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize_123Number() - { - return false; - } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -106,7 +85,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); + sb.Append(" NameProperty: ").Append(NameProperty).Append("\n"); sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" Property: ").Append(Property).Append("\n"); sb.Append(" _123Number: ").Append(_123Number).Append("\n"); @@ -115,15 +94,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -153,7 +123,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._Name.GetHashCode(); + hashCode = (hashCode * 59) + this.NameProperty.GetHashCode(); hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); if (this.Property != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs index fd0c90505e6a..9bc37488229e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,111 +27,109 @@ namespace Org.OpenAPITools.Model /// /// NullableClass /// - [DataContract(Name = "NullableClass")] public partial class NullableClass : Dictionary, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// integerProp. - /// numberProp. - /// booleanProp. - /// stringProp. - /// dateProp. - /// datetimeProp. - /// arrayNullableProp. - /// arrayAndItemsNullableProp. - /// arrayItemsNullable. - /// objectNullableProp. - /// objectAndItemsNullableProp. - /// objectItemsNullable. + /// integerProp + /// numberProp + /// booleanProp + /// stringProp + /// dateProp + /// datetimeProp + /// arrayNullableProp + /// arrayAndItemsNullableProp + /// arrayItemsNullable + /// objectNullableProp + /// objectAndItemsNullableProp + /// objectItemsNullable public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List arrayNullableProp = default, List arrayAndItemsNullableProp = default, List arrayItemsNullable = default, Dictionary objectNullableProp = default, Dictionary objectAndItemsNullableProp = default, Dictionary objectItemsNullable = default) : base() { - this.IntegerProp = integerProp; - this.NumberProp = numberProp; - this.BooleanProp = booleanProp; - this.StringProp = stringProp; - this.DateProp = dateProp; - this.DatetimeProp = datetimeProp; - this.ArrayNullableProp = arrayNullableProp; - this.ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - this.ArrayItemsNullable = arrayItemsNullable; - this.ObjectNullableProp = objectNullableProp; - this.ObjectAndItemsNullableProp = objectAndItemsNullableProp; - this.ObjectItemsNullable = objectItemsNullable; + IntegerProp = integerProp; + NumberProp = numberProp; + BooleanProp = booleanProp; + StringProp = stringProp; + DateProp = dateProp; + DatetimeProp = datetimeProp; + ArrayNullableProp = arrayNullableProp; + ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + ArrayItemsNullable = arrayItemsNullable; + ObjectNullableProp = objectNullableProp; + ObjectAndItemsNullableProp = objectAndItemsNullableProp; + ObjectItemsNullable = objectItemsNullable; } /// /// Gets or Sets IntegerProp /// - [DataMember(Name = "integer_prop", EmitDefaultValue = true)] + [JsonPropertyName("integer_prop")] public int? IntegerProp { get; set; } /// /// Gets or Sets NumberProp /// - [DataMember(Name = "number_prop", EmitDefaultValue = true)] + [JsonPropertyName("number_prop")] public decimal? NumberProp { get; set; } /// /// Gets or Sets BooleanProp /// - [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] + [JsonPropertyName("boolean_prop")] public bool? BooleanProp { get; set; } /// /// Gets or Sets StringProp /// - [DataMember(Name = "string_prop", EmitDefaultValue = true)] + [JsonPropertyName("string_prop")] public string StringProp { get; set; } /// /// Gets or Sets DateProp /// - [DataMember(Name = "date_prop", EmitDefaultValue = true)] - [JsonConverter(typeof(OpenAPIDateConverter))] + [JsonPropertyName("date_prop")] public DateTime? DateProp { get; set; } /// /// Gets or Sets DatetimeProp /// - [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] + [JsonPropertyName("datetime_prop")] public DateTime? DatetimeProp { get; set; } /// /// Gets or Sets ArrayNullableProp /// - [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("array_nullable_prop")] public List ArrayNullableProp { get; set; } /// /// Gets or Sets ArrayAndItemsNullableProp /// - [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("array_and_items_nullable_prop")] public List ArrayAndItemsNullableProp { get; set; } /// /// Gets or Sets ArrayItemsNullable /// - [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] + [JsonPropertyName("array_items_nullable")] public List ArrayItemsNullable { get; set; } /// /// Gets or Sets ObjectNullableProp /// - [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("object_nullable_prop")] public Dictionary ObjectNullableProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp /// - [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] + [JsonPropertyName("object_and_items_nullable_prop")] public Dictionary ObjectAndItemsNullableProp { get; set; } /// /// Gets or Sets ObjectItemsNullable /// - [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] + [JsonPropertyName("object_items_nullable")] public Dictionary ObjectItemsNullable { get; set; } /// @@ -161,15 +157,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs index 5dd73a56ef76..5ef1763454a3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,105 +17,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. /// - [JsonConverter(typeof(NullableShapeJsonConverter))] - [DataContract(Name = "NullableShape")] - public partial class NullableShape : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class NullableShape : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public NullableShape() + /// + public NullableShape(Triangle triangle) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + Triangle = triangle; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// + public NullableShape(Quadrilateral quadrilateral) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + Quadrilateral = quadrilateral; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Triangle /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } - - /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown - /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -123,91 +69,13 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class NullableShape {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, NullableShape.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of NullableShape - /// - /// JSON string - /// An instance of NullableShape - public static NullableShape FromJson(string jsonString) - { - NullableShape newNullableShape = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newNullableShape; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); - } - else - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); - } - else - { - newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newNullableShape; - } - /// /// Returns true if objects are equal /// @@ -237,8 +105,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -248,54 +118,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for NullableShape + /// A Json converter for type NullableShape /// - public class NullableShapeJsonConverter : JsonConverter + public class NullableShapeJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(NullableShape).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override NullableShape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral quadrilateral); + + + while (reader.Read()) { - return NullableShape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (triangleDeserialized) + return new NullableShape(triangle); + + if (quadrilateralDeserialized) + return new NullableShape(quadrilateral); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs index 7787cb03338d..64f6395b6038 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// NumberOnly /// - [DataContract(Name = "NumberOnly")] public partial class NumberOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// justNumber. + /// justNumber public NumberOnly(decimal justNumber = default) { - this.JustNumber = justNumber; - this.AdditionalProperties = new Dictionary(); + JustNumber = justNumber; } /// /// Gets or Sets JustNumber /// - [DataMember(Name = "JustNumber", EmitDefaultValue = false)] + [JsonPropertyName("JustNumber")] public decimal JustNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,15 +64,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index de7d09291bfe..817af80674ce 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,49 +27,47 @@ namespace Org.OpenAPITools.Model /// /// ObjectWithDeprecatedFields /// - [DataContract(Name = "ObjectWithDeprecatedFields")] public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid. - /// id. - /// deprecatedRef. - /// bars. + /// uuid + /// id + /// deprecatedRef + /// bars public ObjectWithDeprecatedFields(string uuid = default, decimal id = default, DeprecatedObject deprecatedRef = default, List bars = default) { - this.Uuid = uuid; - this.Id = id; - this.DeprecatedRef = deprecatedRef; - this.Bars = bars; - this.AdditionalProperties = new Dictionary(); + Uuid = uuid; + Id = id; + DeprecatedRef = deprecatedRef; + Bars = bars; } /// /// Gets or Sets Uuid /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] + [JsonPropertyName("uuid")] public string Uuid { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] [Obsolete] public decimal Id { get; set; } /// /// Gets or Sets DeprecatedRef /// - [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] + [JsonPropertyName("deprecatedRef")] [Obsolete] public DeprecatedObject DeprecatedRef { get; set; } /// /// Gets or Sets Bars /// - [DataMember(Name = "bars", EmitDefaultValue = false)] + [JsonPropertyName("bars")] [Obsolete] public List Bars { get; set; } @@ -79,7 +75,7 @@ public ObjectWithDeprecatedFields(string uuid = default, decimal id = default, D /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -98,15 +94,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs index 8c986b5f6763..2fef14a9c59d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,14 +27,31 @@ namespace Org.OpenAPITools.Model /// /// Order /// - [DataContract(Name = "Order")] public partial class Order : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// id + /// petId + /// quantity + /// shipDate + /// Order Status + /// complete (default to false) + public Order(long id = default, long petId = default, int quantity = default, DateTime shipDate = default, StatusEnum status = default, bool complete = false) + { + Id = id; + PetId = petId; + Quantity = quantity; + ShipDate = shipDate; + Status = status; + Complete = complete; + } + /// /// Order Status /// /// Order Status - [JsonConverter(typeof(StringEnumConverter))] public enum StatusEnum { /// @@ -59,68 +74,48 @@ public enum StatusEnum } - /// /// Order Status /// /// Order Status - [DataMember(Name = "status", EmitDefaultValue = false)] + [JsonPropertyName("status")] public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default, long petId = default, int quantity = default, DateTime shipDate = default, StatusEnum status = default, bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - this.Complete = complete; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets PetId /// - [DataMember(Name = "petId", EmitDefaultValue = false)] + [JsonPropertyName("petId")] public long PetId { get; set; } /// /// Gets or Sets Quantity /// - [DataMember(Name = "quantity", EmitDefaultValue = false)] + [JsonPropertyName("quantity")] public int Quantity { get; set; } /// /// Gets or Sets ShipDate /// - [DataMember(Name = "shipDate", EmitDefaultValue = false)] + [JsonPropertyName("shipDate")] public DateTime ShipDate { get; set; } /// /// Gets or Sets Complete /// - [DataMember(Name = "complete", EmitDefaultValue = true)] + [JsonPropertyName("complete")] public bool Complete { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -141,15 +136,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs index 7f4749fe8b5c..390b308657ef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,46 +27,44 @@ namespace Org.OpenAPITools.Model /// /// OuterComposite /// - [DataContract(Name = "OuterComposite")] public partial class OuterComposite : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// myNumber. - /// myString. - /// myBoolean. + /// myNumber + /// myString + /// myBoolean public OuterComposite(decimal myNumber = default, string myString = default, bool myBoolean = default) { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - this.AdditionalProperties = new Dictionary(); + MyNumber = myNumber; + MyString = myString; + MyBoolean = myBoolean; } /// /// Gets or Sets MyNumber /// - [DataMember(Name = "my_number", EmitDefaultValue = false)] + [JsonPropertyName("my_number")] public decimal MyNumber { get; set; } /// /// Gets or Sets MyString /// - [DataMember(Name = "my_string", EmitDefaultValue = false)] + [JsonPropertyName("my_string")] public string MyString { get; set; } /// /// Gets or Sets MyBoolean /// - [DataMember(Name = "my_boolean", EmitDefaultValue = true)] + [JsonPropertyName("my_boolean")] public bool MyBoolean { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,15 +82,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs index 2aa496a2e074..8496c413326a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +27,6 @@ namespace Org.OpenAPITools.Model /// /// Defines OuterEnum /// - [JsonConverter(typeof(StringEnumConverter))] public enum OuterEnum { /// @@ -51,5 +48,4 @@ public enum OuterEnum Delivered = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index dd79c7010d6b..b0f9d099e27d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,7 +27,6 @@ namespace Org.OpenAPITools.Model /// /// Defines OuterEnumDefaultValue /// - [JsonConverter(typeof(StringEnumConverter))] public enum OuterEnumDefaultValue { /// @@ -51,5 +48,4 @@ public enum OuterEnumDefaultValue Delivered = 3 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 44dc91c700ad..56069346c2e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -47,5 +45,4 @@ public enum OuterEnumInteger NUMBER_2 = 2 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index b927507cf97a..e80f88f51f34 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -47,5 +45,4 @@ public enum OuterEnumIntegerDefaultValue NUMBER_2 = 2 } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs index ac986b555efd..244b3b938402 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -30,33 +27,15 @@ namespace Org.OpenAPITools.Model /// /// ParentPet /// - [DataContract(Name = "ParentPet")] - [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject + public partial class ParentPet : GrandparentAnimal, IEquatable { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ParentPet() + /// petType (required) + public ParentPet(string petType) : base(petType) { - this.AdditionalProperties = new Dictionary(); } - /// - /// Initializes a new instance of the class. - /// - /// petType (required) (default to "ParentPet"). - public ParentPet(string petType = "ParentPet") : base(petType) - { - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } /// /// Returns the string presentation of the object @@ -67,20 +46,10 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ParentPet {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -110,37 +79,70 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } return hashCode; } } + } + + /// + /// A Json converter for type ParentPet + /// + public class ParentPetJsonConverter : JsonConverter + { /// - /// To validate all properties of the instance + /// Returns a boolean if the type is compatible with this converter. /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ParentPet).IsAssignableFrom(typeToConvert); /// - /// To validate all properties of the instance + /// A Json reader. /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + /// + public override ParentPet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - foreach (var x in BaseValidate(validationContext)) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + string petType = default; + + while (reader.Read()) { - yield return x; + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + } + } } - yield break; + + return new ParentPet(petType); } - } + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs index c7c27fb4e98d..0091def60e5f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,14 +27,37 @@ namespace Org.OpenAPITools.Model /// /// Pet /// - [DataContract(Name = "Pet")] public partial class Pet : IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// name (required) + /// photoUrls (required) + /// id + /// category + /// tags + /// pet status in the store + public Pet(string name, List photoUrls, long id = default, Category category = default, List tags = default, StatusEnum status = default) + { + if (name == null) + throw new ArgumentNullException("name is a required property for Pet and cannot be null."); + + if (photoUrls == null) + throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null."); + + Name = name; + PhotoUrls = photoUrls; + Id = id; + Category = category; + Tags = tags; + Status = status; + } + /// /// pet status in the store /// /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] public enum StatusEnum { /// @@ -59,84 +80,48 @@ public enum StatusEnum } - /// /// pet status in the store /// /// pet status in the store - [DataMember(Name = "status", EmitDefaultValue = false)] + [JsonPropertyName("status")] public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// photoUrls (required). - /// id. - /// category. - /// tags. - /// pet status in the store. - public Pet(string name, List photoUrls, long id = default, Category category = default, List tags = default, StatusEnum status = default) - { - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for Pet and cannot be null"); - } - this.Name = name; - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { - throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); - } - this.PhotoUrls = photoUrls; - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name = "photoUrls", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("photoUrls")] public List PhotoUrls { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets Category /// - [DataMember(Name = "category", EmitDefaultValue = false)] + [JsonPropertyName("category")] public Category Category { get; set; } /// /// Gets or Sets Tags /// - [DataMember(Name = "tags", EmitDefaultValue = false)] + [JsonPropertyName("tags")] public List Tags { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -157,15 +142,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs index b82c0899c27d..4eb947b0140c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,96 +17,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Pig /// - [JsonConverter(typeof(PigJsonConverter))] - [DataContract(Name = "Pig")] - public partial class Pig : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Pig : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of BasquePig. - public Pig(BasquePig actualInstance) + /// + public Pig(BasquePig basquePig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + BasquePig = basquePig; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of DanishPig. - public Pig(DanishPig actualInstance) + /// + public Pig(DanishPig danishPig) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + DanishPig = danishPig; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets BasquePig /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(BasquePig)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DanishPig)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: BasquePig, DanishPig"); - } - } - } + public BasquePig BasquePig { get; set; } /// - /// Get the actual instance of `BasquePig`. If the actual instance is not `BasquePig`, - /// the InvalidClassException will be thrown + /// Gets or Sets DanishPig /// - /// An instance of BasquePig - public BasquePig GetBasquePig() - { - return (BasquePig)this.ActualInstance; - } + public DanishPig DanishPig { get; set; } /// - /// Get the actual instance of `DanishPig`. If the actual instance is not `DanishPig`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of DanishPig - public DanishPig GetDanishPig() - { - return (DanishPig)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,91 +69,13 @@ public DanishPig GetDanishPig() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Pig {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Pig.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Pig - /// - /// JSON string - /// An instance of Pig - public static Pig FromJson(string jsonString) - { - Pig newPig = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newPig; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(BasquePig).GetProperty("AdditionalProperties") == null) - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); - } - else - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("BasquePig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into BasquePig: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(DanishPig).GetProperty("AdditionalProperties") == null) - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); - } - else - { - newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("DanishPig"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DanishPig: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newPig; - } - /// /// Returns true if objects are equal /// @@ -228,8 +105,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +118,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Pig + /// A Json converter for type Pig /// - public class PigJsonConverter : JsonConverter + public class PigJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Pig).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Pig).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Pig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader basquePigReader = reader; + bool basquePigDeserialized = Client.ClientUtils.TryDeserialize(ref basquePigReader, options, out BasquePig basquePig); + + Utf8JsonReader danishPigReader = reader; + bool danishPigDeserialized = Client.ClientUtils.TryDeserialize(ref danishPigReader, options, out DanishPig danishPig); + + + while (reader.Read()) { - return Pig.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (basquePigDeserialized) + return new Pig(basquePig); + + if (danishPigDeserialized) + return new Pig(danishPig); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..1152b4e63f40 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,235 @@ +// +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + public partial class PolymorphicProperty : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(bool _bool) + { + Bool = _bool; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(string _string) + { + String = _string; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(Object _object) + { + Object = _object; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PolymorphicProperty(List liststring) + { + Liststring = liststring; + } + + /// + /// Gets or Sets Bool + /// + public bool Bool { get; set; } + + /// + /// Gets or Sets String + /// + public string String { get; set; } + + /// + /// Gets or Sets Object + /// + public Object Object { get; set; } + + /// + /// Gets or Sets Liststring + /// + public List Liststring { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(PolymorphicProperty).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override PolymorphicProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader _boolReader = reader; + bool _boolDeserialized = Client.ClientUtils.TryDeserialize(ref _boolReader, options, out bool _bool); + + Utf8JsonReader _stringReader = reader; + bool _stringDeserialized = Client.ClientUtils.TryDeserialize(ref _stringReader, options, out string _string); + + Utf8JsonReader _objectReader = reader; + bool _objectDeserialized = Client.ClientUtils.TryDeserialize(ref _objectReader, options, out Object _object); + + Utf8JsonReader liststringReader = reader; + bool liststringDeserialized = Client.ClientUtils.TryDeserialize>(ref liststringReader, options, out List liststring); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + if (_boolDeserialized) + return new PolymorphicProperty(_bool); + + if (_stringDeserialized) + return new PolymorphicProperty(_string); + + if (_objectDeserialized) + return new PolymorphicProperty(_object); + + if (liststringDeserialized) + return new PolymorphicProperty(liststring); + + throw new JsonException(); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) => throw new NotImplementedException(); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs index a1a850f169e4..47e72d44ab64 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,96 +17,51 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Quadrilateral /// - [JsonConverter(typeof(QuadrilateralJsonConverter))] - [DataContract(Name = "Quadrilateral")] - public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Quadrilateral : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// + public Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + SimpleQuadrilateral = simpleQuadrilateral; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// + public Quadrilateral(ComplexQuadrilateral complexQuadrilateral) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + ComplexQuadrilateral = complexQuadrilateral; } - - private Object _actualInstance; - /// - /// Gets or Sets ActualInstance + /// Gets or Sets SimpleQuadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ComplexQuadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SimpleQuadrilateral)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ComplexQuadrilateral, SimpleQuadrilateral"); - } - } - } + public SimpleQuadrilateral SimpleQuadrilateral { get; set; } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets ComplexQuadrilateral /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() - { - return (ComplexQuadrilateral)this.ActualInstance; - } + public ComplexQuadrilateral ComplexQuadrilateral { get; set; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() - { - return (SimpleQuadrilateral)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,91 +69,13 @@ public SimpleQuadrilateral GetSimpleQuadrilateral() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Quadrilateral {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Quadrilateral.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Quadrilateral - /// - /// JSON string - /// An instance of Quadrilateral - public static Quadrilateral FromJson(string jsonString) - { - Quadrilateral newQuadrilateral = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newQuadrilateral; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(ComplexQuadrilateral).GetProperty("AdditionalProperties") == null) - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); - } - else - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("ComplexQuadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ComplexQuadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(SimpleQuadrilateral).GetProperty("AdditionalProperties") == null) - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); - } - else - { - newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("SimpleQuadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into SimpleQuadrilateral: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newQuadrilateral; - } - /// /// Returns true if objects are equal /// @@ -228,8 +105,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +118,88 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Quadrilateral + /// A Json converter for type Quadrilateral /// - public class QuadrilateralJsonConverter : JsonConverter + public class QuadrilateralJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Quadrilateral).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Quadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader simpleQuadrilateralReader = reader; + bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral simpleQuadrilateral); + + Utf8JsonReader complexQuadrilateralReader = reader; + bool complexQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref complexQuadrilateralReader, options, out ComplexQuadrilateral complexQuadrilateral); + + + while (reader.Read()) { - return Quadrilateral.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } } - return null; + + if (simpleQuadrilateralDeserialized) + return new Quadrilateral(simpleQuadrilateral); + + if (complexQuadrilateralDeserialized) + return new Quadrilateral(complexQuadrilateral); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index b29e2db36b6b..046b9050ba0d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// QuadrilateralInterface /// - [DataContract(Name = "QuadrilateralInterface")] public partial class QuadrilateralInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected QuadrilateralInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// quadrilateralType (required). + /// quadrilateralType (required) public QuadrilateralInterface(string quadrilateralType) { - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null."); + + QuadrilateralType = quadrilateralType; } /// /// Gets or Sets QuadrilateralType /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("quadrilateralType")] public string QuadrilateralType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6b4acaddf1b2..3589a97ed6c5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,44 +27,36 @@ namespace Org.OpenAPITools.Model /// /// ReadOnlyFirst /// - [DataContract(Name = "ReadOnlyFirst")] public partial class ReadOnlyFirst : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// baz. - public ReadOnlyFirst(string baz = default) + /// bar + /// baz + public ReadOnlyFirst(string bar = default, string baz = default) { - this.Baz = baz; - this.AdditionalProperties = new Dictionary(); + Bar = bar; + Baz = baz; } /// /// Gets or Sets Bar /// - [DataMember(Name = "bar", EmitDefaultValue = false)] + [JsonPropertyName("bar")] public string Bar { get; private set; } - /// - /// Returns false as Bar should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBar() - { - return false; - } /// /// Gets or Sets Baz /// - [DataMember(Name = "baz", EmitDefaultValue = false)] + [JsonPropertyName("baz")] public string Baz { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -83,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs index c862011ba9de..2b73710ad81b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,30 +27,28 @@ namespace Org.OpenAPITools.Model /// /// Model for testing reserved words /// - [DataContract(Name = "Return")] public partial class Return : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _return. - public Return(int _return = default) + /// returnProperty + public Return(int returnProperty = default) { - this._Return = _return; - this.AdditionalProperties = new Dictionary(); + ReturnProperty = returnProperty; } /// - /// Gets or Sets _Return + /// Gets or Sets ReturnProperty /// - [DataMember(Name = "return", EmitDefaultValue = false)] - public int _Return { get; set; } + [JsonPropertyName("return")] + public int ReturnProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -62,21 +58,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); + sb.Append(" ReturnProperty: ").Append(ReturnProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -106,7 +93,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._Return.GetHashCode(); + hashCode = (hashCode * 59) + this.ReturnProperty.GetHashCode(); if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 206e0fbe3315..72568e1e01bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// ScaleneTriangle /// - [DataContract(Name = "ScaleneTriangle")] public partial class ScaleneTriangle : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ScaleneTriangle() + /// + /// + public ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// triangleType (required). - public ScaleneTriangle(string shapeType, string triangleType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + TriangleInterface = triangleInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets TriangleType + /// Gets or Sets TriangleInterface /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] - public string TriangleType { get; set; } + public TriangleInterface TriangleInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ScaleneTriangle {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type ScaleneTriangle + /// + public class ScaleneTriangleJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ScaleneTriangle).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ScaleneTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader triangleInterfaceReader = reader; + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new ScaleneTriangle(shapeInterface, triangleInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs index dd74fa4b7184..e2cf8fb7cce3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,96 +17,67 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Shape /// - [JsonConverter(typeof(ShapeJsonConverter))] - [DataContract(Name = "Shape")] - public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Shape : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// + /// quadrilateralType (required) + public Shape(Triangle triangle, string quadrilateralType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + + Triangle = triangle; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// + /// quadrilateralType (required) + public Shape(Quadrilateral quadrilateral, string quadrilateralType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + Quadrilateral = quadrilateral; + QuadrilateralType = quadrilateralType; + } - private Object _actualInstance; + /// + /// Gets or Sets Triangle + /// + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets QuadrilateralType /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + [JsonPropertyName("quadrilateralType")] + public string QuadrilateralType { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -114,91 +85,14 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Shape {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Shape.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Shape - /// - /// JSON string - /// An instance of Shape - public static Shape FromJson(string jsonString) - { - Shape newShape = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newShape; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); - } - else - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); - } - else - { - newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newShape; - } - /// /// Returns true if objects are equal /// @@ -228,8 +122,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.QuadrilateralType != null) + { + hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -239,54 +139,92 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Shape + /// A Json converter for type Shape /// - public class ShapeJsonConverter : JsonConverter + public class ShapeJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Shape).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Shape).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Shape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral quadrilateral); + + string quadrilateralType = default; + + while (reader.Read()) { - return Shape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + } + } } - return null; + + if (triangleDeserialized) + return new Shape(triangle, quadrilateralType); + + if (quadrilateralDeserialized) + return new Shape(quadrilateral, quadrilateralType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs index 55788e33f354..5d0ab8ec9c71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// ShapeInterface /// - [DataContract(Name = "ShapeInterface")] public partial class ShapeInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ShapeInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). + /// shapeType (required) public ShapeInterface(string shapeType) { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); - } - this.ShapeType = shapeType; - this.AdditionalProperties = new Dictionary(); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null."); + + ShapeType = shapeType; } /// /// Gets or Sets ShapeType /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("shapeType")] public string ShapeType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs index c6b87c89751a..375f4d490764 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,105 +17,67 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. /// - [JsonConverter(typeof(ShapeOrNullJsonConverter))] - [DataContract(Name = "ShapeOrNull")] - public partial class ShapeOrNull : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class ShapeOrNull : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - public ShapeOrNull() + /// + /// quadrilateralType (required) + public ShapeOrNull(Triangle triangle, string quadrilateralType) { - this.IsNullable = true; - this.SchemaType= "oneOf"; + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + + Triangle = triangle; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// + /// quadrilateralType (required) + public ShapeOrNull(Quadrilateral quadrilateral, string quadrilateralType) { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; + if (quadrilateralType == null) + throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + + Quadrilateral = quadrilateral; + QuadrilateralType = quadrilateralType; } /// - /// Initializes a new instance of the class - /// with the class + /// Gets or Sets Triangle /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; + public Triangle Triangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets Quadrilateral /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(Quadrilateral)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(Triangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); - } - } - } + public Quadrilateral Quadrilateral { get; set; } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, - /// the InvalidClassException will be thrown + /// Gets or Sets QuadrilateralType /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() - { - return (Quadrilateral)this.ActualInstance; - } + [JsonPropertyName("quadrilateralType")] + public string QuadrilateralType { get; set; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of Triangle - public Triangle GetTriangle() - { - return (Triangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -123,91 +85,14 @@ public Triangle GetTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ShapeOrNull {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, ShapeOrNull.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of ShapeOrNull - /// - /// JSON string - /// An instance of ShapeOrNull - public static ShapeOrNull FromJson(string jsonString) - { - ShapeOrNull newShapeOrNull = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newShapeOrNull; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Quadrilateral).GetProperty("AdditionalProperties") == null) - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); - } - else - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Quadrilateral"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(Triangle).GetProperty("AdditionalProperties") == null) - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); - } - else - { - newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("Triangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newShapeOrNull; - } - /// /// Returns true if objects are equal /// @@ -237,8 +122,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.QuadrilateralType != null) + { + hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -248,54 +139,92 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for ShapeOrNull + /// A Json converter for type ShapeOrNull /// - public class ShapeOrNullJsonConverter : JsonConverter + public class ShapeOrNullJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(ShapeOrNull).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override ShapeOrNull Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader triangleReader = reader; + bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); + + Utf8JsonReader quadrilateralReader = reader; + bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral quadrilateral); + + string quadrilateralType = default; + + while (reader.Read()) { - return ShapeOrNull.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + } + } } - return null; + + if (triangleDeserialized) + return new ShapeOrNull(triangle, quadrilateralType); + + if (quadrilateralDeserialized) + return new ShapeOrNull(quadrilateral, quadrilateralType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 1398011e13f1..ee6d8ef18239 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,54 +27,34 @@ namespace Org.OpenAPITools.Model /// /// SimpleQuadrilateral /// - [DataContract(Name = "SimpleQuadrilateral")] public partial class SimpleQuadrilateral : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SimpleQuadrilateral() + /// + /// + public SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// shapeType (required). - /// quadrilateralType (required). - public SimpleQuadrilateral(string shapeType, string quadrilateralType) - { - // to ensure "shapeType" is required (not null) - if (shapeType == null) { - throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); - } - this.ShapeType = shapeType; - // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { - throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); - } - this.QuadrilateralType = quadrilateralType; - this.AdditionalProperties = new Dictionary(); + ShapeInterface = shapeInterface; + QuadrilateralInterface = quadrilateralInterface; } /// - /// Gets or Sets ShapeType + /// Gets or Sets ShapeInterface /// - [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] - public string ShapeType { get; set; } + public ShapeInterface ShapeInterface { get; set; } /// - /// Gets or Sets QuadrilateralType + /// Gets or Sets QuadrilateralInterface /// - [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] - public string QuadrilateralType { get; set; } + public QuadrilateralInterface QuadrilateralInterface { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,22 +64,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimpleQuadrilateral {\n"); - sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); - sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -131,14 +98,6 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); @@ -158,4 +117,66 @@ public override int GetHashCode() } } + /// + /// A Json converter for type SimpleQuadrilateral + /// + public class SimpleQuadrilateralJsonConverter : JsonConverter + { + /// + /// Returns a boolean if the type is compatible with this converter. + /// + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(SimpleQuadrilateral).IsAssignableFrom(typeToConvert); + + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override SimpleQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader shapeInterfaceReader = reader; + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + + Utf8JsonReader quadrilateralInterfaceReader = reader; + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + } + } + } + + return new SimpleQuadrilateral(shapeInterface, quadrilateralInterface); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs index e24187da5be7..35fc0efd1c5b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// SpecialModelName /// - [DataContract(Name = "_special_model.name_")] public partial class SpecialModelName : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// specialPropertyName. - /// specialModelName. - public SpecialModelName(long specialPropertyName = default, string specialModelName = default) + /// specialPropertyName + /// specialModelNameProperty + public SpecialModelName(long specialPropertyName = default, string specialModelNameProperty = default) { - this.SpecialPropertyName = specialPropertyName; - this._SpecialModelName = specialModelName; - this.AdditionalProperties = new Dictionary(); + SpecialPropertyName = specialPropertyName; + SpecialModelNameProperty = specialModelNameProperty; } /// /// Gets or Sets SpecialPropertyName /// - [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] + [JsonPropertyName("$special[property.name]")] public long SpecialPropertyName { get; set; } /// - /// Gets or Sets _SpecialModelName + /// Gets or Sets SpecialModelNameProperty /// - [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] - public string _SpecialModelName { get; set; } + [JsonPropertyName("_special_model.name_")] + public string SpecialModelNameProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -71,21 +67,12 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append(" _SpecialModelName: ").Append(_SpecialModelName).Append("\n"); + sb.Append(" SpecialModelNameProperty: ").Append(SpecialModelNameProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// @@ -116,9 +103,9 @@ public override int GetHashCode() { int hashCode = 41; hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this._SpecialModelName != null) + if (this.SpecialModelNameProperty != null) { - hashCode = (hashCode * 59) + this._SpecialModelName.GetHashCode(); + hashCode = (hashCode * 59) + this.SpecialModelNameProperty.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs index cca02fceb327..fcc38c0b3ac7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,38 +27,36 @@ namespace Org.OpenAPITools.Model /// /// Tag /// - [DataContract(Name = "Tag")] public partial class Tag : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id. - /// name. + /// id + /// name public Tag(long id = default, string name = default) { - this.Id = id; - this.Name = name; - this.AdditionalProperties = new Dictionary(); + Id = id; + Name = name; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,15 +73,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs index c8cf49ef7f66..f799b7c43bba 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,122 +17,107 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; -using System.Reflection; namespace Org.OpenAPITools.Model { /// /// Triangle /// - [JsonConverter(typeof(TriangleJsonConverter))] - [DataContract(Name = "Triangle")] - public partial class Triangle : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class Triangle : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of EquilateralTriangle. - public Triangle(EquilateralTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(EquilateralTriangle equilateralTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + EquilateralTriangle = equilateralTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of IsoscelesTriangle. - public Triangle(IsoscelesTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(IsoscelesTriangle isoscelesTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + IsoscelesTriangle = isoscelesTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } /// - /// Initializes a new instance of the class - /// with the class + /// Initializes a new instance of the class. /// - /// An instance of ScaleneTriangle. - public Triangle(ScaleneTriangle actualInstance) + /// + /// shapeType (required) + /// triangleType (required) + public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + if (shapeType == null) + throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + + ScaleneTriangle = scaleneTriangle; + ShapeType = shapeType; + TriangleType = triangleType; } + /// + /// Gets or Sets EquilateralTriangle + /// + public EquilateralTriangle EquilateralTriangle { get; set; } - private Object _actualInstance; + /// + /// Gets or Sets IsoscelesTriangle + /// + public IsoscelesTriangle IsoscelesTriangle { get; set; } /// - /// Gets or Sets ActualInstance + /// Gets or Sets ScaleneTriangle /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(EquilateralTriangle)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IsoscelesTriangle)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ScaleneTriangle)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle"); - } - } - } + public ScaleneTriangle ScaleneTriangle { get; set; } /// - /// Get the actual instance of `EquilateralTriangle`. If the actual instance is not `EquilateralTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets ShapeType /// - /// An instance of EquilateralTriangle - public EquilateralTriangle GetEquilateralTriangle() - { - return (EquilateralTriangle)this.ActualInstance; - } + [JsonPropertyName("shapeType")] + public string ShapeType { get; set; } /// - /// Get the actual instance of `IsoscelesTriangle`. If the actual instance is not `IsoscelesTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets TriangleType /// - /// An instance of IsoscelesTriangle - public IsoscelesTriangle GetIsoscelesTriangle() - { - return (IsoscelesTriangle)this.ActualInstance; - } + [JsonPropertyName("triangleType")] + public string TriangleType { get; set; } /// - /// Get the actual instance of `ScaleneTriangle`. If the actual instance is not `ScaleneTriangle`, - /// the InvalidClassException will be thrown + /// Gets or Sets additional properties /// - /// An instance of ScaleneTriangle - public ScaleneTriangle GetScaleneTriangle() - { - return (ScaleneTriangle)this.ActualInstance; - } + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -140,111 +125,15 @@ public ScaleneTriangle GetScaleneTriangle() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Triangle {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, Triangle.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of Triangle - /// - /// JSON string - /// An instance of Triangle - public static Triangle FromJson(string jsonString) - { - Triangle newTriangle = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTriangle; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(EquilateralTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("EquilateralTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into EquilateralTriangle: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(IsoscelesTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("IsoscelesTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into IsoscelesTriangle: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(ScaleneTriangle).GetProperty("AdditionalProperties") == null) - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); - } - else - { - newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("ScaleneTriangle"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ScaleneTriangle: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTriangle; - } - /// /// Returns true if objects are equal /// @@ -274,8 +163,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (this.ShapeType != null) + { + hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); + } + if (this.TriangleType != null) + { + hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } return hashCode; } } @@ -285,54 +184,102 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } /// - /// Custom JSON converter for Triangle + /// A Json converter for type Triangle /// - public class TriangleJsonConverter : JsonConverter + public class TriangleJsonConverter : JsonConverter { /// - /// To write the JSON string + /// Returns a boolean if the type is compatible with this converter. /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null))); - } + /// + /// + public override bool CanConvert(Type typeToConvert) => typeof(Triangle).IsAssignableFrom(typeToConvert); /// - /// To convert a JSON string into an object + /// A Json reader. /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + /// + /// + /// + /// + /// + public override Triangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if(reader.TokenType != JsonToken.Null) + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException(); + + Utf8JsonReader equilateralTriangleReader = reader; + bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref equilateralTriangleReader, options, out EquilateralTriangle equilateralTriangle); + + Utf8JsonReader isoscelesTriangleReader = reader; + bool isoscelesTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref isoscelesTriangleReader, options, out IsoscelesTriangle isoscelesTriangle); + + Utf8JsonReader scaleneTriangleReader = reader; + bool scaleneTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref scaleneTriangleReader, options, out ScaleneTriangle scaleneTriangle); + + string shapeType = default; + string triangleType = default; + + while (reader.Read()) { - return Triangle.FromJson(JObject.Load(reader).ToString(Formatting.None)); + if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "shapeType": + shapeType = reader.GetString(); + break; + case "triangleType": + triangleType = reader.GetString(); + break; + } + } } - return null; + + if (equilateralTriangleDeserialized) + return new Triangle(equilateralTriangle, shapeType, triangleType); + + if (isoscelesTriangleDeserialized) + return new Triangle(isoscelesTriangle, shapeType, triangleType); + + if (scaleneTriangleDeserialized) + return new Triangle(scaleneTriangle, shapeType, triangleType); + + throw new JsonException(); } /// - /// Check if the object can be converted + /// A Json writer /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) => throw new NotImplementedException(); } - } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs index 8c62abd8c657..f7b06bf05a9d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,42 +27,31 @@ namespace Org.OpenAPITools.Model /// /// TriangleInterface /// - [DataContract(Name = "TriangleInterface")] public partial class TriangleInterface : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TriangleInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// triangleType (required). + /// triangleType (required) public TriangleInterface(string triangleType) { - // to ensure "triangleType" is required (not null) - if (triangleType == null) { - throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); - } - this.TriangleType = triangleType; - this.AdditionalProperties = new Dictionary(); + if (triangleType == null) + throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null."); + + TriangleType = triangleType; } /// /// Gets or Sets TriangleType /// - [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("triangleType")] public string TriangleType { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -80,15 +67,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs index 709d9397d872..38a79e975db9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,123 +27,121 @@ namespace Org.OpenAPITools.Model /// /// User /// - [DataContract(Name = "User")] public partial class User : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. - /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. - /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. + /// id + /// username + /// firstName + /// lastName + /// email + /// password + /// phone + /// User Status + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. public User(long id = default, string username = default, string firstName = default, string lastName = default, string email = default, string password = default, string phone = default, int userStatus = default, Object objectWithNoDeclaredProps = default, Object objectWithNoDeclaredPropsNullable = default, Object anyTypeProp = default, Object anyTypePropNullable = default) { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - this.ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - this.ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; - this.AnyTypeProp = anyTypeProp; - this.AnyTypePropNullable = anyTypePropNullable; - this.AdditionalProperties = new Dictionary(); + Id = id; + Username = username; + FirstName = firstName; + LastName = lastName; + Email = email; + Password = password; + Phone = phone; + UserStatus = userStatus; + ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; + ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + AnyTypeProp = anyTypeProp; + AnyTypePropNullable = anyTypePropNullable; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", EmitDefaultValue = false)] + [JsonPropertyName("id")] public long Id { get; set; } /// /// Gets or Sets Username /// - [DataMember(Name = "username", EmitDefaultValue = false)] + [JsonPropertyName("username")] public string Username { get; set; } /// /// Gets or Sets FirstName /// - [DataMember(Name = "firstName", EmitDefaultValue = false)] + [JsonPropertyName("firstName")] public string FirstName { get; set; } /// /// Gets or Sets LastName /// - [DataMember(Name = "lastName", EmitDefaultValue = false)] + [JsonPropertyName("lastName")] public string LastName { get; set; } /// /// Gets or Sets Email /// - [DataMember(Name = "email", EmitDefaultValue = false)] + [JsonPropertyName("email")] public string Email { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name = "password", EmitDefaultValue = false)] + [JsonPropertyName("password")] public string Password { get; set; } /// /// Gets or Sets Phone /// - [DataMember(Name = "phone", EmitDefaultValue = false)] + [JsonPropertyName("phone")] public string Phone { get; set; } /// /// User Status /// /// User Status - [DataMember(Name = "userStatus", EmitDefaultValue = false)] + [JsonPropertyName("userStatus")] public int UserStatus { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] + [JsonPropertyName("objectWithNoDeclaredProps")] public Object ObjectWithNoDeclaredProps { get; set; } /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. /// /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] + [JsonPropertyName("objectWithNoDeclaredPropsNullable")] public Object ObjectWithNoDeclaredPropsNullable { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 - [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] + [JsonPropertyName("anyTypeProp")] public Object AnyTypeProp { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. - [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] + [JsonPropertyName("anyTypePropNullable")] public Object AnyTypePropNullable { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -172,15 +168,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs index 2eb7fa28c7fb..57c3ddbd8dfa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,58 +27,47 @@ namespace Org.OpenAPITools.Model /// /// Whale /// - [DataContract(Name = "whale")] public partial class Whale : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Whale() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// hasBaleen. - /// hasTeeth. + /// className (required) + /// hasBaleen + /// hasTeeth public Whale(string className, bool hasBaleen = default, bool hasTeeth = default) { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Whale and cannot be null"); - } - this.ClassName = className; - this.HasBaleen = hasBaleen; - this.HasTeeth = hasTeeth; - this.AdditionalProperties = new Dictionary(); + if (className == null) + throw new ArgumentNullException("className is a required property for Whale and cannot be null."); + + ClassName = className; + HasBaleen = hasBaleen; + HasTeeth = hasTeeth; } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets HasBaleen /// - [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] + [JsonPropertyName("hasBaleen")] public bool HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// - [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] + [JsonPropertyName("hasTeeth")] public bool HasTeeth { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -98,15 +85,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs index ddb4196e8549..452c2fe8b71d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs @@ -1,3 +1,4 @@ +// /* * OpenAPI Petstore * @@ -7,7 +8,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ - using System; using System.Collections; using System.Collections.Generic; @@ -17,11 +17,9 @@ using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model @@ -29,13 +27,25 @@ namespace Org.OpenAPITools.Model /// /// Zebra /// - [DataContract(Name = "zebra")] public partial class Zebra : Dictionary, IEquatable, IValidatableObject { + /// + /// Initializes a new instance of the class. + /// + /// className (required) + /// type + public Zebra(string className, TypeEnum type = default) : base() + { + if (className == null) + throw new ArgumentNullException("className is a required property for Zebra and cannot be null."); + + ClassName = className; + Type = type; + } + /// /// Defines Type /// - [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { /// @@ -58,47 +68,23 @@ public enum TypeEnum } - /// /// Gets or Sets Type /// - [DataMember(Name = "type", EmitDefaultValue = false)] + [JsonPropertyName("type")] public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Zebra() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// type. - public Zebra(string className, TypeEnum type = default) : base() - { - // to ensure "className" is required (not null) - if (className == null) { - throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); - } - this.ClassName = className; - this.Type = type; - this.AdditionalProperties = new Dictionary(); - } /// /// Gets or Sets ClassName /// - [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + [JsonPropertyName("className")] public string ClassName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public Dictionary AdditionalProperties { get; set; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -116,15 +102,6 @@ public override string ToString() return sb.ToString(); } - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - /// /// Returns true if objects are equal /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 93b0e35e2c57..5cbefcd8fba7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -21,8 +21,6 @@ - - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES index 62435eabea3a..b43cb6126ecd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES @@ -67,6 +67,7 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Pig.md +docs/PolymorphicProperty.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -172,6 +173,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md index 6023fbef8d7c..336d0b69ce09 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md @@ -232,6 +232,7 @@ Class | Method | HTTP request | Description - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) - [Model.Pig](docs/Pig.md) + - [Model.PolymorphicProperty](docs/PolymorphicProperty.md) - [Model.Quadrilateral](docs/Quadrilateral.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PolymorphicProperty.md new file mode 100644 index 000000000000..8262a41c50d5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs index 997930301f65..a794d9cdfc29 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -100,6 +100,10 @@ internal async Task Deserialize(HttpResponseMessage response, Type type) { return await response.Content.ReadAsByteArrayAsync(); } + else if (type == typeof(FileParameter)) + { + return new FileParameter(await response.Content.ReadAsStreamAsync()); + } // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) if (type == typeof(Stream)) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/Configuration.cs index 992454bacf6d..a67ad721ed47 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/Configuration.cs @@ -91,6 +91,13 @@ public class Configuration : IReadableConfiguration /// The servers private IList> _servers; + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + /// /// HttpSigning configuration /// @@ -177,6 +184,47 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + { + "PetApi.AddPet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + { + "PetApi.UpdatePet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -436,6 +484,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -444,7 +509,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -455,9 +520,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -465,31 +570,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -578,7 +686,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration AccessToken = second.AccessToken ?? first.AccessToken, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 2c22d47296f9..b99a151e5bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Animal.cs index 4363ebe1138c..6aef494833d2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Animal.cs @@ -53,7 +53,8 @@ protected Animal() public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Animal and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/AppleReq.cs index 33fca86a4116..0c1a6aad6e93 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/AppleReq.cs @@ -46,7 +46,8 @@ protected AppleReq() { } public AppleReq(string cultivar = default(string), bool mealy = default(bool)) { // to ensure "cultivar" is required (not null) - if (cultivar == null) { + if (cultivar == null) + { throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); } this.Cultivar = cultivar; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/BasquePig.cs index 56ee53e80a85..f412b304283c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/BasquePig.cs @@ -48,7 +48,8 @@ protected BasquePig() public BasquePig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Category.cs index 59a4fbad51bd..b5a4f8a12019 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Category.cs @@ -49,7 +49,8 @@ protected Category() public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Category and cannot be null"); } this.Name = name; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 98f8f19c014a..e694ec30fe17 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -49,12 +49,14 @@ protected ComplexQuadrilateral() public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/DanishPig.cs index 08cc2665dde0..f894ecd6f2b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/DanishPig.cs @@ -48,7 +48,8 @@ protected DanishPig() public DanishPig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index c76a4adf9c09..94138f9d00ee 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -49,12 +49,14 @@ protected EquilateralTriangle() public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs index 6b2fa36ee3d7..5ca55acea978 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -64,13 +64,15 @@ protected FormatTest() { this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) { + if (_byte == null) + { throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); } this.Byte = _byte; this.Date = date; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); } this.Password = password; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 7b1b41d58afb..b5fdfc6ebd7d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -52,7 +52,8 @@ protected GrandparentAnimal() public GrandparentAnimal(string petType = default(string)) { // to ensure "petType" is required (not null) - if (petType == null) { + if (petType == null) + { throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); } this.PetType = petType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 2f93e58d26d0..d543995430b8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -46,12 +46,14 @@ protected IsoscelesTriangle() { } public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Mammal.cs index 299b49075218..54658b775421 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Mammal.cs @@ -38,10 +38,10 @@ public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValida { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// An instance of Whale. + public Mammal(Whale actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -50,10 +50,10 @@ public Mammal(Pig actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// An instance of Zebra. + public Mammal(Zebra actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -62,10 +62,10 @@ public Mammal(Whale actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// An instance of Pig. + public Mammal(Pig actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -105,16 +105,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown - /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } - /// /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, /// the InvalidClassException will be thrown @@ -135,6 +125,16 @@ public Zebra GetZebra() return (Zebra)this.ActualInstance; } + /// + /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableShape.cs index 9a8c9a1bbd18..c834e87cb482 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/NullableShape.cs @@ -47,10 +47,10 @@ public NullableShape() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -59,10 +59,10 @@ public NullableShape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -99,23 +99,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Pet.cs index 8df973cda4e1..f4875fadc07c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Pet.cs @@ -87,12 +87,14 @@ protected Pet() public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this.Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this.PhotoUrls = photoUrls; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..4e8c938e2e97 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,384 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Org.OpenAPITools.Client.FileParameter; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + [JsonConverter(typeof(PolymorphicPropertyJsonConverter))] + [DataContract(Name = "PolymorphicProperty")] + public partial class PolymorphicProperty : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of bool. + public PolymorphicProperty(bool actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of string. + public PolymorphicProperty(string actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Object. + public PolymorphicProperty(Object actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of List<string>. + public PolymorphicProperty(List actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(List)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Object)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(bool)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(string)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: List, Object, bool, string"); + } + } + } + + /// + /// Get the actual instance of `bool`. If the actual instance is not `bool`, + /// the InvalidClassException will be thrown + /// + /// An instance of bool + public bool GetBool() + { + return (bool)this.ActualInstance; + } + + /// + /// Get the actual instance of `string`. If the actual instance is not `string`, + /// the InvalidClassException will be thrown + /// + /// An instance of string + public string GetString() + { + return (string)this.ActualInstance; + } + + /// + /// Get the actual instance of `Object`. If the actual instance is not `Object`, + /// the InvalidClassException will be thrown + /// + /// An instance of Object + public Object GetObject() + { + return (Object)this.ActualInstance; + } + + /// + /// Get the actual instance of `List<string>`. If the actual instance is not `List<string>`, + /// the InvalidClassException will be thrown + /// + /// An instance of List<string> + public List GetListString() + { + return (List)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PolymorphicProperty.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PolymorphicProperty + /// + /// JSON string + /// An instance of PolymorphicProperty + public static PolymorphicProperty FromJson(string jsonString) + { + PolymorphicProperty newPolymorphicProperty = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPolymorphicProperty; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(List).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("List"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into List: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(Object).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("Object"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Object: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(bool).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("bool"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into bool: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(string).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("string"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPolymorphicProperty; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PolymorphicProperty).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PolymorphicProperty.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Quadrilateral.cs index 8be0ba506100..6eccb8dc5bf7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -38,10 +38,10 @@ public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -50,10 +50,10 @@ public Quadrilateral(ComplexQuadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -90,23 +90,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() { - return (ComplexQuadrilateral)this.ActualInstance; + return (SimpleQuadrilateral)this.ActualInstance; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() { - return (SimpleQuadrilateral)this.ActualInstance; + return (ComplexQuadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index c9f98c3a79f0..1ca6e54bed3a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -48,7 +48,8 @@ protected QuadrilateralInterface() public QuadrilateralInterface(string quadrilateralType = default(string)) { // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 5ae953e4f60e..f02d7bfe6393 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -49,12 +49,14 @@ protected ScaleneTriangle() public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Shape.cs index efff624cb7f0..c4e07ffc29ae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Shape.cs @@ -38,10 +38,10 @@ public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidata { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// An instance of Triangle. + public Shape(Triangle actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -50,10 +50,10 @@ public Shape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -90,23 +90,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeInterface.cs index a723696e0aae..f88d1ff9f39b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -48,7 +48,8 @@ protected ShapeInterface() public ShapeInterface(string shapeType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeOrNull.cs index eaf1f574b414..e76229e9e618 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -47,10 +47,10 @@ public ShapeOrNull() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -59,10 +59,10 @@ public ShapeOrNull(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -99,23 +99,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index b706f718758b..744e07913673 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -49,12 +49,14 @@ protected SimpleQuadrilateral() public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/TriangleInterface.cs index 3438ca5aabb2..60fd3123b5bd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -48,7 +48,8 @@ protected TriangleInterface() public TriangleInterface(string triangleType = default(string)) { // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Whale.cs index 2c77472b9d2c..3963386a7d9c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Whale.cs @@ -50,7 +50,8 @@ protected Whale() public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Whale and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Zebra.cs index 7ab15adf8802..ccf404fb3a6a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Zebra.cs @@ -81,7 +81,8 @@ protected Zebra() public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES index 2ea9b2919963..72c57beb6cff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES @@ -67,6 +67,7 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Pig.md +docs/PolymorphicProperty.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -172,6 +173,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md index 9bc66067f7af..dd3f6f9e5206 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/README.md @@ -219,6 +219,7 @@ Class | Method | HTTP request | Description - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) - [Model.Pig](docs/Pig.md) + - [Model.PolymorphicProperty](docs/PolymorphicProperty.md) - [Model.Quadrilateral](docs/Quadrilateral.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PolymorphicProperty.md new file mode 100644 index 000000000000..8262a41c50d5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index ac8fbdcdc946..e04c8df5fdde 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -34,8 +34,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient Call123TestSpecialTags(ModelClient modelClient); + ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0); /// /// To test special tags @@ -45,8 +46,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient); + ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test special tags @@ -76,9 +79,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient Call123TestSpecialTags(ModelClient modelClient) + public ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient Call123TestSpecialTags(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/another-fake/dummy", localVarRequestOptions, this.Configuration); @@ -270,11 +279,12 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -283,9 +293,10 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -319,6 +330,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/DefaultApi.cs index a9e5cfb9c4d2..af9619134ea6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -30,8 +30,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - InlineResponseDefault FooGet(); + InlineResponseDefault FooGet(int operationIndex = 0); /// /// @@ -40,8 +41,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - ApiResponse FooGetWithHttpInfo(); + ApiResponse FooGetWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -58,9 +60,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -69,9 +72,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -196,8 +200,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - public InlineResponseDefault FooGet() + public InlineResponseDefault FooGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FooGetWithHttpInfo(); return localVarResponse.Data; @@ -207,8 +212,9 @@ public InlineResponseDefault FooGet() /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -233,6 +239,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/foo", localVarRequestOptions, this.Configuration); @@ -252,11 +261,12 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -264,9 +274,10 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -292,6 +303,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs index 5f1dae74c24d..421f93ed0441 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs @@ -30,8 +30,9 @@ public interface IFakeApiSync : IApiAccessor /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - HealthCheckResult FakeHealthGet(); + HealthCheckResult FakeHealthGet(int operationIndex = 0); /// /// Health check endpoint @@ -40,8 +41,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - ApiResponse FakeHealthGetWithHttpInfo(); + ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0); /// /// /// @@ -50,8 +52,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); /// /// @@ -61,8 +64,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); /// /// /// @@ -71,8 +75,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// @@ -82,8 +87,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// /// @@ -92,8 +98,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); /// /// @@ -103,8 +110,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); /// /// /// @@ -113,8 +121,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - string FakeOuterStringSerialize(string body = default(string)); + string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0); /// /// @@ -124,14 +133,16 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0); /// /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - List GetArrayOfEnums(); + List GetArrayOfEnums(int operationIndex = 0); /// /// Array of Enums @@ -140,8 +151,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - ApiResponse> GetArrayOfEnumsWithHttpInfo(); + ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0); /// /// /// @@ -150,8 +162,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); + void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// @@ -161,16 +174,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass); + ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// /// /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - void TestBodyWithQueryParams(string query, User user); + void TestBodyWithQueryParams(string query, User user, int operationIndex = 0); /// /// @@ -181,8 +196,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user); + ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0); /// /// To test \"client\" model /// @@ -191,8 +207,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClientModel(ModelClient modelClient); + ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0); /// /// To test \"client\" model @@ -202,8 +219,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient); + ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -225,8 +243,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -249,8 +268,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// To test enum parameters /// @@ -266,8 +286,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// To test enum parameters @@ -284,8 +305,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -299,8 +321,9 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -315,15 +338,17 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// test inline additionalProperties /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - void TestInlineAdditionalProperties(Dictionary requestBody); + void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0); /// /// test inline additionalProperties @@ -333,16 +358,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody); + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0); /// /// test json serialization of form data /// /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - void TestJsonFormData(string param, string param2); + void TestJsonFormData(string param, string param2, int operationIndex = 0); /// /// test json serialization of form data @@ -353,8 +380,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2); + ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0); /// /// /// @@ -367,8 +395,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); /// /// @@ -382,8 +411,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); #endregion Synchronous Operations } @@ -400,9 +430,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Health check endpoint @@ -411,9 +442,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -422,9 +454,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -434,9 +467,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -445,9 +479,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -457,9 +492,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -468,9 +504,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -480,9 +517,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -491,9 +529,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -503,9 +542,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -513,9 +553,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums @@ -524,9 +565,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -535,9 +577,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -547,9 +590,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -559,9 +603,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -572,9 +617,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model /// @@ -583,9 +629,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model @@ -595,9 +642,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -619,9 +667,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -644,9 +693,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -662,9 +712,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -681,9 +732,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -697,9 +749,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -714,9 +767,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -725,9 +779,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties @@ -737,9 +792,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data /// @@ -749,9 +805,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data @@ -762,9 +819,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -777,9 +835,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -793,9 +852,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -920,8 +980,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - public HealthCheckResult FakeHealthGet() + public HealthCheckResult FakeHealthGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); return localVarResponse.Data; @@ -931,8 +992,9 @@ public HealthCheckResult FakeHealthGet() /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -957,6 +1019,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/health", localVarRequestOptions, this.Configuration); @@ -976,11 +1041,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -988,9 +1054,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1016,6 +1083,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1037,8 +1107,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1049,8 +1120,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1077,6 +1149,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/boolean", localVarRequestOptions, this.Configuration); @@ -1097,11 +1172,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1110,9 +1186,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1140,6 +1217,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1161,8 +1241,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1173,8 +1254,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1201,6 +1283,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/composite", localVarRequestOptions, this.Configuration); @@ -1221,11 +1306,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1234,9 +1320,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1264,6 +1351,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1285,8 +1375,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1297,8 +1388,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,6 +1417,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/number", localVarRequestOptions, this.Configuration); @@ -1345,11 +1440,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1358,9 +1454,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1388,6 +1485,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1409,8 +1509,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(string body = default(string)) + public string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1421,8 +1522,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1449,6 +1551,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/string", localVarRequestOptions, this.Configuration); @@ -1469,11 +1574,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1482,9 +1588,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1512,6 +1619,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1532,8 +1642,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - public List GetArrayOfEnums() + public List GetArrayOfEnums(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetArrayOfEnumsWithHttpInfo(); return localVarResponse.Data; @@ -1543,8 +1654,9 @@ public List GetArrayOfEnums() /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1569,6 +1681,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/fake/array-of-enums", localVarRequestOptions, this.Configuration); @@ -1588,11 +1703,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1600,9 +1716,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1628,6 +1745,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/fake/array-of-enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1649,8 +1769,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -1660,8 +1781,9 @@ public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1693,6 +1815,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); @@ -1713,11 +1838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1725,9 +1851,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1760,6 +1887,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1782,8 +1912,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - public void TestBodyWithQueryParams(string query, User user) + public void TestBodyWithQueryParams(string query, User user, int operationIndex = 0) { TestBodyWithQueryParamsWithHttpInfo(query, user); } @@ -1794,8 +1925,9 @@ public void TestBodyWithQueryParams(string query, User user) /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0) { // verify the required parameter 'query' is set if (query == null) @@ -1834,6 +1966,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); @@ -1855,11 +1990,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1868,9 +2004,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'query' is set if (query == null) @@ -1910,6 +2047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1931,8 +2071,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClientModel(ModelClient modelClient) + public ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); return localVarResponse.Data; @@ -1943,8 +2084,9 @@ public ModelClient TestClientModel(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -1977,6 +2119,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/fake", localVarRequestOptions, this.Configuration); @@ -1997,11 +2142,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2010,9 +2156,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -2046,6 +2193,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2080,8 +2230,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2104,8 +2255,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2186,6 +2338,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2225,11 +2380,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2250,9 +2406,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2334,6 +2491,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2368,8 +2528,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2386,8 +2547,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2444,6 +2606,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); @@ -2471,11 +2636,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2490,9 +2656,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2550,6 +2717,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2576,8 +2746,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2592,8 +2763,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2632,6 +2804,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2663,11 +2838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2680,9 +2856,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2722,6 +2899,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2749,8 +2929,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - public void TestInlineAdditionalProperties(Dictionary requestBody) + public void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0) { TestInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -2760,8 +2941,9 @@ public void TestInlineAdditionalProperties(Dictionary requestBod /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody) + public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2793,6 +2975,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); @@ -2813,11 +2998,12 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2825,9 +3011,10 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2860,6 +3047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2882,8 +3072,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - public void TestJsonFormData(string param, string param2) + public void TestJsonFormData(string param, string param2, int operationIndex = 0) { TestJsonFormDataWithHttpInfo(param, param2); } @@ -2894,8 +3085,9 @@ public void TestJsonFormData(string param, string param2) /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2) + public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0) { // verify the required parameter 'param' is set if (param == null) @@ -2934,6 +3126,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); @@ -2955,11 +3150,12 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); + await TestJsonFormDataWithHttpInfoAsync(param, param2, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2968,9 +3164,10 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'param' is set if (param == null) @@ -3010,6 +3207,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3035,8 +3235,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// /// /// + /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -3050,8 +3251,9 @@ public void TestQueryParameterCollectionFormat(List pipe, List i /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3110,6 +3312,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/test-query-parameters", localVarRequestOptions, this.Configuration); @@ -3134,11 +3339,12 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -3150,9 +3356,10 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3212,6 +3419,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-parameters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index c2852b36a44b..6b665775253f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -34,8 +34,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClassname(ModelClient modelClient); + ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0); /// /// To test class name in snake case @@ -45,8 +46,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient); + ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test class name in snake case @@ -76,9 +79,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClassname(ModelClient modelClient) + public ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient TestClassname(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { @@ -275,11 +284,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -288,9 +298,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -324,6 +335,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs index b42f2c168bae..562c0f4807f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs @@ -31,8 +31,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void AddPet(Pet pet); + void AddPet(Pet pet, int operationIndex = 0); /// /// Add a new pet to the store @@ -42,16 +43,18 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo(Pet pet); + ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Deletes a pet /// /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Deletes a pet @@ -62,8 +65,9 @@ public interface IPetApiSync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Finds Pets by status /// @@ -72,8 +76,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - List FindPetsByStatus(List status); + List FindPetsByStatus(List status, int operationIndex = 0); /// /// Finds Pets by status @@ -83,8 +88,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo(List status); + ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0); /// /// Finds Pets by tags /// @@ -93,9 +99,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - List FindPetsByTags(List tags); + List FindPetsByTags(List tags, int operationIndex = 0); /// /// Finds Pets by tags @@ -105,9 +112,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo(List tags); + ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0); /// /// Find pet by ID /// @@ -116,8 +124,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - Pet GetPetById(long petId); + Pet GetPetById(long petId, int operationIndex = 0); /// /// Find pet by ID @@ -127,15 +136,17 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo(long petId); + ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0); /// /// Update an existing pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void UpdatePet(Pet pet); + void UpdatePet(Pet pet, int operationIndex = 0); /// /// Update an existing pet @@ -145,8 +156,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo(Pet pet); + ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Updates a pet in the store with form data /// @@ -154,8 +166,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -167,8 +180,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// uploads an image /// @@ -176,8 +190,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image @@ -189,8 +204,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image (required) /// @@ -198,8 +214,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); /// /// uploads an image (required) @@ -211,8 +228,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); #endregion Synchronous Operations } @@ -230,9 +248,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -242,9 +261,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -254,9 +274,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -267,9 +288,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -278,9 +300,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status @@ -290,9 +313,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags /// @@ -301,10 +325,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags @@ -314,10 +339,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID /// @@ -326,9 +352,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID @@ -338,9 +365,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet /// @@ -349,9 +377,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -361,9 +390,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -374,9 +404,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -388,9 +419,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -401,9 +433,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -415,9 +448,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -428,9 +462,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -442,9 +477,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -570,8 +606,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void AddPet(Pet pet) + public void AddPet(Pet pet, int operationIndex = 0) { AddPetWithHttpInfo(pet); } @@ -581,8 +618,9 @@ public void AddPet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -615,6 +653,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -657,11 +698,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await AddPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -669,9 +711,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -705,6 +748,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -749,8 +795,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -761,8 +808,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -791,6 +839,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -818,11 +869,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); + await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -831,9 +883,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -863,6 +916,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -890,8 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - public List FindPetsByStatus(List status) + public List FindPetsByStatus(List status, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); return localVarResponse.Data; @@ -902,8 +959,9 @@ public List FindPetsByStatus(List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0) { // verify the required parameter 'status' is set if (status == null) @@ -936,6 +994,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -978,11 +1039,12 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -991,9 +1053,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'status' is set if (status == null) @@ -1027,6 +1090,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1070,9 +1136,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - public List FindPetsByTags(List tags) + public List FindPetsByTags(List tags, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); return localVarResponse.Data; @@ -1083,9 +1150,10 @@ public List FindPetsByTags(List tags) /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0) { // verify the required parameter 'tags' is set if (tags == null) @@ -1118,6 +1186,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1160,12 +1231,13 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1174,10 +1246,11 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'tags' is set if (tags == null) @@ -1211,6 +1284,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1254,8 +1330,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - public Pet GetPetById(long petId) + public Pet GetPetById(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1266,8 +1343,9 @@ public Pet GetPetById(long petId) /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId) + public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1294,6 +1372,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1319,11 +1400,12 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1332,9 +1414,10 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1362,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1388,8 +1474,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void UpdatePet(Pet pet) + public void UpdatePet(Pet pet, int operationIndex = 0) { UpdatePetWithHttpInfo(pet); } @@ -1399,8 +1486,9 @@ public void UpdatePet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -1433,6 +1521,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1475,11 +1566,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await UpdatePetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1487,9 +1579,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1523,6 +1616,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1568,8 +1664,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1581,8 +1678,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1616,6 +1714,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1644,11 +1745,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1658,9 +1760,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1695,6 +1798,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1724,8 +1830,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1738,8 +1845,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1774,6 +1882,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1802,11 +1913,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1817,9 +1929,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1855,6 +1968,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1884,8 +2000,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1898,8 +2015,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -1937,6 +2055,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1965,11 +2086,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1980,9 +2102,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -2021,6 +2144,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs index 7cda385b3b40..63403e7dcdfd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs @@ -34,8 +34,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - void DeleteOrder(string orderId); + void DeleteOrder(string orderId, int operationIndex = 0); /// /// Delete purchase order by ID @@ -45,8 +46,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo(string orderId); + ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0); /// /// Returns pet inventories by status /// @@ -54,8 +56,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - Dictionary GetInventory(); + Dictionary GetInventory(int operationIndex = 0); /// /// Returns pet inventories by status @@ -64,8 +67,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo(); + ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0); /// /// Find purchase order by ID /// @@ -74,8 +78,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - Order GetOrderById(long orderId); + Order GetOrderById(long orderId, int operationIndex = 0); /// /// Find purchase order by ID @@ -85,15 +90,17 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo(long orderId); + ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0); /// /// Place an order for a pet /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - Order PlaceOrder(Order order); + Order PlaceOrder(Order order, int operationIndex = 0); /// /// Place an order for a pet @@ -103,8 +110,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo(Order order); + ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0); #endregion Synchronous Operations } @@ -122,9 +130,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete purchase order by ID @@ -134,9 +143,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status /// @@ -144,9 +154,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status @@ -155,9 +166,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID /// @@ -166,9 +178,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID @@ -178,9 +191,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet /// @@ -189,9 +203,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet @@ -201,9 +216,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -329,8 +345,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - public void DeleteOrder(string orderId) + public void DeleteOrder(string orderId, int operationIndex = 0) { DeleteOrderWithHttpInfo(orderId); } @@ -340,8 +357,9 @@ public void DeleteOrder(string orderId) /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId) + public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -372,6 +390,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -392,11 +413,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + await DeleteOrderWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -404,9 +426,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -438,6 +461,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -458,8 +484,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - public Dictionary GetInventory() + public Dictionary GetInventory(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; @@ -469,8 +496,9 @@ public Dictionary GetInventory() /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -495,6 +523,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -519,11 +550,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -531,9 +563,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -559,6 +592,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -585,8 +621,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - public Order GetOrderById(long orderId) + public Order GetOrderById(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -597,8 +634,9 @@ public Order GetOrderById(long orderId) /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId) + public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -625,6 +663,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -645,11 +686,12 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -658,9 +700,10 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -688,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -709,8 +755,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - public Order PlaceOrder(Order order) + public Order PlaceOrder(Order order, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; @@ -721,8 +768,9 @@ public Order PlaceOrder(Order order) /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order) + public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0) { // verify the required parameter 'order' is set if (order == null) @@ -756,6 +804,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/store/order", localVarRequestOptions, this.Configuration); @@ -776,11 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -789,9 +841,10 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'order' is set if (order == null) @@ -826,6 +879,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/UserApi.cs index a1716303f6f3..c37a6501c68a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/UserApi.cs @@ -34,8 +34,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - void CreateUser(User user); + void CreateUser(User user, int operationIndex = 0); /// /// Create user @@ -45,15 +46,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(User user); + ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithArrayInput(List user); + void CreateUsersWithArrayInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -63,15 +66,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user); + ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithListInput(List user); + void CreateUsersWithListInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -81,8 +86,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo(List user); + ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0); /// /// Delete user /// @@ -91,8 +97,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - void DeleteUser(string username); + void DeleteUser(string username, int operationIndex = 0); /// /// Delete user @@ -102,15 +109,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo(string username); + ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0); /// /// Get user by user name /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - User GetUserByName(string username); + User GetUserByName(string username, int operationIndex = 0); /// /// Get user by user name @@ -120,16 +129,18 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo(string username); + ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); /// /// Logs user into the system /// /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - string LoginUser(string username, string password); + string LoginUser(string username, string password, int operationIndex = 0); /// /// Logs user into the system @@ -140,14 +151,16 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo(string username, string password); + ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0); /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void LogoutUser(); + void LogoutUser(int operationIndex = 0); /// /// Logs out current logged in user session @@ -156,8 +169,9 @@ public interface IUserApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo(); + ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0); /// /// Updated user /// @@ -167,8 +181,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - void UpdateUser(string username, User user); + void UpdateUser(string username, User user, int operationIndex = 0); /// /// Updated user @@ -179,8 +194,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo(string username, User user); + ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0); #endregion Synchronous Operations } @@ -198,9 +214,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create user @@ -210,9 +227,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -221,9 +239,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -233,9 +252,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -244,9 +264,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -256,9 +277,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user /// @@ -267,9 +289,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user @@ -279,9 +302,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name /// @@ -290,9 +314,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name @@ -302,9 +327,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system /// @@ -314,9 +340,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system @@ -327,9 +354,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session /// @@ -337,9 +365,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session @@ -348,9 +377,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user /// @@ -360,9 +390,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user @@ -373,9 +404,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -501,8 +533,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - public void CreateUser(User user) + public void CreateUser(User user, int operationIndex = 0) { CreateUserWithHttpInfo(user); } @@ -512,8 +545,9 @@ public void CreateUser(User user) /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user) + public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -545,6 +579,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); @@ -565,11 +602,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUserWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -577,9 +615,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -612,6 +651,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -633,8 +675,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithArrayInput(List user) + public void CreateUsersWithArrayInput(List user, int operationIndex = 0) { CreateUsersWithArrayInputWithHttpInfo(user); } @@ -644,8 +687,9 @@ public void CreateUsersWithArrayInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -677,6 +721,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); @@ -697,11 +744,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -709,9 +757,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -744,6 +793,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -765,8 +817,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithListInput(List user) + public void CreateUsersWithListInput(List user, int operationIndex = 0) { CreateUsersWithListInputWithHttpInfo(user); } @@ -776,8 +829,9 @@ public void CreateUsersWithListInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -809,6 +863,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); @@ -829,11 +886,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithListInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -841,9 +899,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -876,6 +935,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -897,8 +959,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - public void DeleteUser(string username) + public void DeleteUser(string username, int operationIndex = 0) { DeleteUserWithHttpInfo(username); } @@ -908,8 +971,9 @@ public void DeleteUser(string username) /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -940,6 +1004,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); @@ -960,11 +1027,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + await DeleteUserWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -972,9 +1040,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1006,6 +1075,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1027,8 +1099,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - public User GetUserByName(string username) + public User GetUserByName(string username, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -1039,8 +1112,9 @@ public User GetUserByName(string username) /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1073,6 +1147,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1093,11 +1170,12 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1106,9 +1184,10 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1142,6 +1221,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1164,8 +1246,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - public string LoginUser(string username, string password) + public string LoginUser(string username, string password, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); return localVarResponse.Data; @@ -1177,8 +1260,9 @@ public string LoginUser(string username, string password) /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password) + public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1218,6 +1302,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/login", localVarRequestOptions, this.Configuration); @@ -1239,11 +1326,12 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1253,9 +1341,10 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1296,6 +1385,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1316,8 +1408,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void LogoutUser() + public void LogoutUser(int operationIndex = 0) { LogoutUserWithHttpInfo(); } @@ -1326,8 +1419,9 @@ public void LogoutUser() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1351,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); @@ -1370,20 +1467,22 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await LogoutUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1408,6 +1507,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1430,8 +1532,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - public void UpdateUser(string username, User user) + public void UpdateUser(string username, User user, int operationIndex = 0) { UpdateUserWithHttpInfo(username, user); } @@ -1442,8 +1545,9 @@ public void UpdateUser(string username, User user) /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user) + public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1482,6 +1586,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1503,11 +1610,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + await UpdateUserWithHttpInfoAsync(username, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1516,9 +1624,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1558,6 +1667,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs index ffb05840d5bb..ca82a98d1902 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs @@ -430,9 +430,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -549,9 +550,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -674,7 +676,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -689,7 +691,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -704,7 +706,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -719,7 +721,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -734,7 +736,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -749,7 +751,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -764,7 +766,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -780,7 +782,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -794,7 +796,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -808,7 +810,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -822,7 +824,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -836,7 +838,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -850,7 +852,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -864,7 +866,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/Configuration.cs index 8b731bfdc812..56e3a9d13eb5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/Configuration.cs @@ -96,6 +96,13 @@ public class Configuration : IReadableConfiguration /// The servers private IList> _servers; + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + /// /// HttpSigning configuration /// @@ -182,6 +189,47 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + { + "PetApi.AddPet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + { + "PetApi.UpdatePet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -441,6 +489,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -449,7 +514,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -460,9 +525,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -470,31 +575,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -583,7 +691,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration AccessToken = second.AccessToken ?? first.AccessToken, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 2c22d47296f9..b99a151e5bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs index 68cd16375903..3932047e027a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs index e8ea00bb46a8..f5150493c8ec 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs @@ -52,7 +52,8 @@ protected Animal() public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Animal and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/AppleReq.cs index 1d6d42dc9b3a..2c77cf1c4142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/AppleReq.cs @@ -45,7 +45,8 @@ protected AppleReq() { } public AppleReq(string cultivar = default(string), bool mealy = default(bool)) { // to ensure "cultivar" is required (not null) - if (cultivar == null) { + if (cultivar == null) + { throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); } this.Cultivar = cultivar; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/BasquePig.cs index ea4ff737c89a..e0c780a14bc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/BasquePig.cs @@ -47,7 +47,8 @@ protected BasquePig() public BasquePig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Category.cs index 0cc23f5f6c23..35732f998d6c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Category.cs @@ -48,7 +48,8 @@ protected Category() public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Category and cannot be null"); } this.Name = name; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 807f0eb26bf8..dc78561c0db6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -48,12 +48,14 @@ protected ComplexQuadrilateral() public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/DanishPig.cs index a27b1db39297..38628258d1d0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/DanishPig.cs @@ -47,7 +47,8 @@ protected DanishPig() public DanishPig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index a931c0d6327a..6565b7b6f312 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -48,12 +48,14 @@ protected EquilateralTriangle() public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs index eb38d586bbb7..4ae624cb612c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs @@ -63,13 +63,15 @@ protected FormatTest() { this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) { + if (_byte == null) + { throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); } this.Byte = _byte; this.Date = date; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); } this.Password = password; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index cee75f3f8157..eddfcf60113c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -51,7 +51,8 @@ protected GrandparentAnimal() public GrandparentAnimal(string petType = default(string)) { // to ensure "petType" is required (not null) - if (petType == null) { + if (petType == null) + { throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); } this.PetType = petType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 50e7ce4aaa8d..55c607598a6d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -45,12 +45,14 @@ protected IsoscelesTriangle() { } public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Mammal.cs index 841b9ba43e92..8630f21bba49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Mammal.cs @@ -37,10 +37,10 @@ public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValida { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// An instance of Whale. + public Mammal(Whale actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Mammal(Pig actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// An instance of Zebra. + public Mammal(Zebra actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +61,10 @@ public Mammal(Whale actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// An instance of Pig. + public Mammal(Pig actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -104,16 +104,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown - /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } - /// /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, /// the InvalidClassException will be thrown @@ -134,6 +124,16 @@ public Zebra GetZebra() return (Zebra)this.ActualInstance; } + /// + /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableShape.cs index ab311baedd65..01cedb8807b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/NullableShape.cs @@ -46,10 +46,10 @@ public NullableShape() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public NullableShape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Pet.cs index 31fd118f4f68..472382726474 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Pet.cs @@ -86,12 +86,14 @@ protected Pet() public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this.Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this.PhotoUrls = photoUrls; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..0ce4e18eb2ea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,383 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + [JsonConverter(typeof(PolymorphicPropertyJsonConverter))] + [DataContract(Name = "PolymorphicProperty")] + public partial class PolymorphicProperty : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of bool. + public PolymorphicProperty(bool actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of string. + public PolymorphicProperty(string actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Object. + public PolymorphicProperty(Object actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of List<string>. + public PolymorphicProperty(List actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(List)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Object)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(bool)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(string)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: List, Object, bool, string"); + } + } + } + + /// + /// Get the actual instance of `bool`. If the actual instance is not `bool`, + /// the InvalidClassException will be thrown + /// + /// An instance of bool + public bool GetBool() + { + return (bool)this.ActualInstance; + } + + /// + /// Get the actual instance of `string`. If the actual instance is not `string`, + /// the InvalidClassException will be thrown + /// + /// An instance of string + public string GetString() + { + return (string)this.ActualInstance; + } + + /// + /// Get the actual instance of `Object`. If the actual instance is not `Object`, + /// the InvalidClassException will be thrown + /// + /// An instance of Object + public Object GetObject() + { + return (Object)this.ActualInstance; + } + + /// + /// Get the actual instance of `List<string>`. If the actual instance is not `List<string>`, + /// the InvalidClassException will be thrown + /// + /// An instance of List<string> + public List GetListString() + { + return (List)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PolymorphicProperty.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PolymorphicProperty + /// + /// JSON string + /// An instance of PolymorphicProperty + public static PolymorphicProperty FromJson(string jsonString) + { + PolymorphicProperty newPolymorphicProperty = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPolymorphicProperty; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(List).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("List"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into List: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(Object).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("Object"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Object: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(bool).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("bool"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into bool: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(string).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("string"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPolymorphicProperty; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PolymorphicProperty).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PolymorphicProperty.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Quadrilateral.cs index 7e232c39f0a4..2e4fc5cb0419 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -37,10 +37,10 @@ public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Quadrilateral(ComplexQuadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() { - return (ComplexQuadrilateral)this.ActualInstance; + return (SimpleQuadrilateral)this.ActualInstance; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() { - return (SimpleQuadrilateral)this.ActualInstance; + return (ComplexQuadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 4d7c39c4364d..cb2a5dc1691b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -47,7 +47,8 @@ protected QuadrilateralInterface() public QuadrilateralInterface(string quadrilateralType = default(string)) { // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 236839471475..e54c58468834 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -48,12 +48,14 @@ protected ScaleneTriangle() public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Shape.cs index fd3d6cb439f4..bc73c0d68a71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Shape.cs @@ -37,10 +37,10 @@ public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidata { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// An instance of Triangle. + public Shape(Triangle actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Shape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeInterface.cs index 92774561aaa5..6225f8888a03 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -47,7 +47,8 @@ protected ShapeInterface() public ShapeInterface(string shapeType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeOrNull.cs index f378c1e3b7b6..a6d3624c26f3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -46,10 +46,10 @@ public ShapeOrNull() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public ShapeOrNull(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index fc9b37ce01fb..b8fbc0c24074 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -48,12 +48,14 @@ protected SimpleQuadrilateral() public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/TriangleInterface.cs index 7f7abb5bc85b..17571e4514d4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -47,7 +47,8 @@ protected TriangleInterface() public TriangleInterface(string triangleType = default(string)) { // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Whale.cs index c30b6dbfabed..10ceda658b39 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Whale.cs @@ -49,7 +49,8 @@ protected Whale() public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Whale and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Zebra.cs index 4fb60ed8ddf2..aab75e9cd568 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Zebra.cs @@ -80,7 +80,8 @@ protected Zebra() public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES index 2ea9b2919963..72c57beb6cff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES @@ -67,6 +67,7 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Pig.md +docs/PolymorphicProperty.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -172,6 +173,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md index 9bc66067f7af..dd3f6f9e5206 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md @@ -219,6 +219,7 @@ Class | Method | HTTP request | Description - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) - [Model.Pig](docs/Pig.md) + - [Model.PolymorphicProperty](docs/PolymorphicProperty.md) - [Model.Quadrilateral](docs/Quadrilateral.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PolymorphicProperty.md new file mode 100644 index 000000000000..8262a41c50d5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index ac8fbdcdc946..e04c8df5fdde 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -34,8 +34,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient Call123TestSpecialTags(ModelClient modelClient); + ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0); /// /// To test special tags @@ -45,8 +46,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient); + ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test special tags @@ -76,9 +79,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient Call123TestSpecialTags(ModelClient modelClient) + public ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient Call123TestSpecialTags(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/another-fake/dummy", localVarRequestOptions, this.Configuration); @@ -270,11 +279,12 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -283,9 +293,10 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -319,6 +330,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs index a9e5cfb9c4d2..af9619134ea6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -30,8 +30,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - InlineResponseDefault FooGet(); + InlineResponseDefault FooGet(int operationIndex = 0); /// /// @@ -40,8 +41,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - ApiResponse FooGetWithHttpInfo(); + ApiResponse FooGetWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -58,9 +60,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -69,9 +72,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -196,8 +200,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - public InlineResponseDefault FooGet() + public InlineResponseDefault FooGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FooGetWithHttpInfo(); return localVarResponse.Data; @@ -207,8 +212,9 @@ public InlineResponseDefault FooGet() /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -233,6 +239,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/foo", localVarRequestOptions, this.Configuration); @@ -252,11 +261,12 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -264,9 +274,10 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -292,6 +303,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs index 5f1dae74c24d..421f93ed0441 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -30,8 +30,9 @@ public interface IFakeApiSync : IApiAccessor /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - HealthCheckResult FakeHealthGet(); + HealthCheckResult FakeHealthGet(int operationIndex = 0); /// /// Health check endpoint @@ -40,8 +41,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - ApiResponse FakeHealthGetWithHttpInfo(); + ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0); /// /// /// @@ -50,8 +52,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); /// /// @@ -61,8 +64,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); /// /// /// @@ -71,8 +75,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// @@ -82,8 +87,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// /// @@ -92,8 +98,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); /// /// @@ -103,8 +110,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); /// /// /// @@ -113,8 +121,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - string FakeOuterStringSerialize(string body = default(string)); + string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0); /// /// @@ -124,14 +133,16 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0); /// /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - List GetArrayOfEnums(); + List GetArrayOfEnums(int operationIndex = 0); /// /// Array of Enums @@ -140,8 +151,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - ApiResponse> GetArrayOfEnumsWithHttpInfo(); + ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0); /// /// /// @@ -150,8 +162,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); + void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// @@ -161,16 +174,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass); + ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// /// /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - void TestBodyWithQueryParams(string query, User user); + void TestBodyWithQueryParams(string query, User user, int operationIndex = 0); /// /// @@ -181,8 +196,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user); + ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0); /// /// To test \"client\" model /// @@ -191,8 +207,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClientModel(ModelClient modelClient); + ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0); /// /// To test \"client\" model @@ -202,8 +219,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient); + ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -225,8 +243,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -249,8 +268,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// To test enum parameters /// @@ -266,8 +286,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// To test enum parameters @@ -284,8 +305,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -299,8 +321,9 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -315,15 +338,17 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// test inline additionalProperties /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - void TestInlineAdditionalProperties(Dictionary requestBody); + void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0); /// /// test inline additionalProperties @@ -333,16 +358,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody); + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0); /// /// test json serialization of form data /// /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - void TestJsonFormData(string param, string param2); + void TestJsonFormData(string param, string param2, int operationIndex = 0); /// /// test json serialization of form data @@ -353,8 +380,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2); + ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0); /// /// /// @@ -367,8 +395,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); /// /// @@ -382,8 +411,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); #endregion Synchronous Operations } @@ -400,9 +430,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Health check endpoint @@ -411,9 +442,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -422,9 +454,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -434,9 +467,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -445,9 +479,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -457,9 +492,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -468,9 +504,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -480,9 +517,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -491,9 +529,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -503,9 +542,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -513,9 +553,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums @@ -524,9 +565,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -535,9 +577,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -547,9 +590,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -559,9 +603,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -572,9 +617,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model /// @@ -583,9 +629,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model @@ -595,9 +642,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -619,9 +667,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -644,9 +693,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -662,9 +712,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -681,9 +732,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -697,9 +749,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -714,9 +767,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -725,9 +779,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties @@ -737,9 +792,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data /// @@ -749,9 +805,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data @@ -762,9 +819,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -777,9 +835,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -793,9 +852,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -920,8 +980,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - public HealthCheckResult FakeHealthGet() + public HealthCheckResult FakeHealthGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); return localVarResponse.Data; @@ -931,8 +992,9 @@ public HealthCheckResult FakeHealthGet() /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -957,6 +1019,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/health", localVarRequestOptions, this.Configuration); @@ -976,11 +1041,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -988,9 +1054,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1016,6 +1083,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1037,8 +1107,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1049,8 +1120,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1077,6 +1149,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/boolean", localVarRequestOptions, this.Configuration); @@ -1097,11 +1172,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1110,9 +1186,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1140,6 +1217,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1161,8 +1241,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1173,8 +1254,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1201,6 +1283,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/composite", localVarRequestOptions, this.Configuration); @@ -1221,11 +1306,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1234,9 +1320,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1264,6 +1351,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1285,8 +1375,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1297,8 +1388,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,6 +1417,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/number", localVarRequestOptions, this.Configuration); @@ -1345,11 +1440,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1358,9 +1454,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1388,6 +1485,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1409,8 +1509,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(string body = default(string)) + public string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1421,8 +1522,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1449,6 +1551,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/string", localVarRequestOptions, this.Configuration); @@ -1469,11 +1574,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1482,9 +1588,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1512,6 +1619,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1532,8 +1642,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - public List GetArrayOfEnums() + public List GetArrayOfEnums(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetArrayOfEnumsWithHttpInfo(); return localVarResponse.Data; @@ -1543,8 +1654,9 @@ public List GetArrayOfEnums() /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1569,6 +1681,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/fake/array-of-enums", localVarRequestOptions, this.Configuration); @@ -1588,11 +1703,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1600,9 +1716,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1628,6 +1745,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/fake/array-of-enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1649,8 +1769,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -1660,8 +1781,9 @@ public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1693,6 +1815,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); @@ -1713,11 +1838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1725,9 +1851,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1760,6 +1887,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1782,8 +1912,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - public void TestBodyWithQueryParams(string query, User user) + public void TestBodyWithQueryParams(string query, User user, int operationIndex = 0) { TestBodyWithQueryParamsWithHttpInfo(query, user); } @@ -1794,8 +1925,9 @@ public void TestBodyWithQueryParams(string query, User user) /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0) { // verify the required parameter 'query' is set if (query == null) @@ -1834,6 +1966,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); @@ -1855,11 +1990,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1868,9 +2004,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'query' is set if (query == null) @@ -1910,6 +2047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1931,8 +2071,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClientModel(ModelClient modelClient) + public ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); return localVarResponse.Data; @@ -1943,8 +2084,9 @@ public ModelClient TestClientModel(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -1977,6 +2119,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/fake", localVarRequestOptions, this.Configuration); @@ -1997,11 +2142,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2010,9 +2156,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -2046,6 +2193,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2080,8 +2230,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2104,8 +2255,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2186,6 +2338,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2225,11 +2380,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2250,9 +2406,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2334,6 +2491,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2368,8 +2528,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2386,8 +2547,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2444,6 +2606,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); @@ -2471,11 +2636,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2490,9 +2656,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2550,6 +2717,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2576,8 +2746,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2592,8 +2763,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2632,6 +2804,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2663,11 +2838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2680,9 +2856,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2722,6 +2899,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2749,8 +2929,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - public void TestInlineAdditionalProperties(Dictionary requestBody) + public void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0) { TestInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -2760,8 +2941,9 @@ public void TestInlineAdditionalProperties(Dictionary requestBod /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody) + public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2793,6 +2975,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); @@ -2813,11 +2998,12 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2825,9 +3011,10 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2860,6 +3047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2882,8 +3072,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - public void TestJsonFormData(string param, string param2) + public void TestJsonFormData(string param, string param2, int operationIndex = 0) { TestJsonFormDataWithHttpInfo(param, param2); } @@ -2894,8 +3085,9 @@ public void TestJsonFormData(string param, string param2) /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2) + public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0) { // verify the required parameter 'param' is set if (param == null) @@ -2934,6 +3126,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); @@ -2955,11 +3150,12 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); + await TestJsonFormDataWithHttpInfoAsync(param, param2, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2968,9 +3164,10 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'param' is set if (param == null) @@ -3010,6 +3207,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3035,8 +3235,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// /// /// + /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -3050,8 +3251,9 @@ public void TestQueryParameterCollectionFormat(List pipe, List i /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3110,6 +3312,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/test-query-parameters", localVarRequestOptions, this.Configuration); @@ -3134,11 +3339,12 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -3150,9 +3356,10 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3212,6 +3419,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-parameters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index c2852b36a44b..6b665775253f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -34,8 +34,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClassname(ModelClient modelClient); + ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0); /// /// To test class name in snake case @@ -45,8 +46,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient); + ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test class name in snake case @@ -76,9 +79,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClassname(ModelClient modelClient) + public ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient TestClassname(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { @@ -275,11 +284,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -288,9 +298,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -324,6 +335,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs index b42f2c168bae..562c0f4807f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -31,8 +31,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void AddPet(Pet pet); + void AddPet(Pet pet, int operationIndex = 0); /// /// Add a new pet to the store @@ -42,16 +43,18 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo(Pet pet); + ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Deletes a pet /// /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Deletes a pet @@ -62,8 +65,9 @@ public interface IPetApiSync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Finds Pets by status /// @@ -72,8 +76,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - List FindPetsByStatus(List status); + List FindPetsByStatus(List status, int operationIndex = 0); /// /// Finds Pets by status @@ -83,8 +88,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo(List status); + ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0); /// /// Finds Pets by tags /// @@ -93,9 +99,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - List FindPetsByTags(List tags); + List FindPetsByTags(List tags, int operationIndex = 0); /// /// Finds Pets by tags @@ -105,9 +112,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo(List tags); + ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0); /// /// Find pet by ID /// @@ -116,8 +124,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - Pet GetPetById(long petId); + Pet GetPetById(long petId, int operationIndex = 0); /// /// Find pet by ID @@ -127,15 +136,17 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo(long petId); + ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0); /// /// Update an existing pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void UpdatePet(Pet pet); + void UpdatePet(Pet pet, int operationIndex = 0); /// /// Update an existing pet @@ -145,8 +156,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo(Pet pet); + ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Updates a pet in the store with form data /// @@ -154,8 +166,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -167,8 +180,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// uploads an image /// @@ -176,8 +190,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image @@ -189,8 +204,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image (required) /// @@ -198,8 +214,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); /// /// uploads an image (required) @@ -211,8 +228,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); #endregion Synchronous Operations } @@ -230,9 +248,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -242,9 +261,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -254,9 +274,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -267,9 +288,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -278,9 +300,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status @@ -290,9 +313,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags /// @@ -301,10 +325,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags @@ -314,10 +339,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID /// @@ -326,9 +352,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID @@ -338,9 +365,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet /// @@ -349,9 +377,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -361,9 +390,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -374,9 +404,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -388,9 +419,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -401,9 +433,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -415,9 +448,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -428,9 +462,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -442,9 +477,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -570,8 +606,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void AddPet(Pet pet) + public void AddPet(Pet pet, int operationIndex = 0) { AddPetWithHttpInfo(pet); } @@ -581,8 +618,9 @@ public void AddPet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -615,6 +653,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -657,11 +698,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await AddPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -669,9 +711,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -705,6 +748,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -749,8 +795,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -761,8 +808,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -791,6 +839,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -818,11 +869,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); + await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -831,9 +883,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -863,6 +916,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -890,8 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - public List FindPetsByStatus(List status) + public List FindPetsByStatus(List status, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); return localVarResponse.Data; @@ -902,8 +959,9 @@ public List FindPetsByStatus(List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0) { // verify the required parameter 'status' is set if (status == null) @@ -936,6 +994,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -978,11 +1039,12 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -991,9 +1053,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'status' is set if (status == null) @@ -1027,6 +1090,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1070,9 +1136,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - public List FindPetsByTags(List tags) + public List FindPetsByTags(List tags, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); return localVarResponse.Data; @@ -1083,9 +1150,10 @@ public List FindPetsByTags(List tags) /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0) { // verify the required parameter 'tags' is set if (tags == null) @@ -1118,6 +1186,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1160,12 +1231,13 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1174,10 +1246,11 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'tags' is set if (tags == null) @@ -1211,6 +1284,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1254,8 +1330,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - public Pet GetPetById(long petId) + public Pet GetPetById(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1266,8 +1343,9 @@ public Pet GetPetById(long petId) /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId) + public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1294,6 +1372,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1319,11 +1400,12 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1332,9 +1414,10 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1362,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1388,8 +1474,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void UpdatePet(Pet pet) + public void UpdatePet(Pet pet, int operationIndex = 0) { UpdatePetWithHttpInfo(pet); } @@ -1399,8 +1486,9 @@ public void UpdatePet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -1433,6 +1521,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1475,11 +1566,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await UpdatePetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1487,9 +1579,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1523,6 +1616,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1568,8 +1664,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1581,8 +1678,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1616,6 +1714,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1644,11 +1745,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1658,9 +1760,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1695,6 +1798,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1724,8 +1830,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1738,8 +1845,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1774,6 +1882,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1802,11 +1913,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1817,9 +1929,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1855,6 +1968,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1884,8 +2000,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1898,8 +2015,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -1937,6 +2055,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1965,11 +2086,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1980,9 +2102,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -2021,6 +2144,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs index 7cda385b3b40..63403e7dcdfd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -34,8 +34,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - void DeleteOrder(string orderId); + void DeleteOrder(string orderId, int operationIndex = 0); /// /// Delete purchase order by ID @@ -45,8 +46,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo(string orderId); + ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0); /// /// Returns pet inventories by status /// @@ -54,8 +56,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - Dictionary GetInventory(); + Dictionary GetInventory(int operationIndex = 0); /// /// Returns pet inventories by status @@ -64,8 +67,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo(); + ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0); /// /// Find purchase order by ID /// @@ -74,8 +78,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - Order GetOrderById(long orderId); + Order GetOrderById(long orderId, int operationIndex = 0); /// /// Find purchase order by ID @@ -85,15 +90,17 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo(long orderId); + ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0); /// /// Place an order for a pet /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - Order PlaceOrder(Order order); + Order PlaceOrder(Order order, int operationIndex = 0); /// /// Place an order for a pet @@ -103,8 +110,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo(Order order); + ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0); #endregion Synchronous Operations } @@ -122,9 +130,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete purchase order by ID @@ -134,9 +143,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status /// @@ -144,9 +154,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status @@ -155,9 +166,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID /// @@ -166,9 +178,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID @@ -178,9 +191,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet /// @@ -189,9 +203,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet @@ -201,9 +216,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -329,8 +345,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - public void DeleteOrder(string orderId) + public void DeleteOrder(string orderId, int operationIndex = 0) { DeleteOrderWithHttpInfo(orderId); } @@ -340,8 +357,9 @@ public void DeleteOrder(string orderId) /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId) + public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -372,6 +390,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -392,11 +413,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + await DeleteOrderWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -404,9 +426,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -438,6 +461,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -458,8 +484,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - public Dictionary GetInventory() + public Dictionary GetInventory(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; @@ -469,8 +496,9 @@ public Dictionary GetInventory() /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -495,6 +523,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -519,11 +550,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -531,9 +563,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -559,6 +592,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -585,8 +621,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - public Order GetOrderById(long orderId) + public Order GetOrderById(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -597,8 +634,9 @@ public Order GetOrderById(long orderId) /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId) + public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -625,6 +663,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -645,11 +686,12 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -658,9 +700,10 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -688,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -709,8 +755,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - public Order PlaceOrder(Order order) + public Order PlaceOrder(Order order, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; @@ -721,8 +768,9 @@ public Order PlaceOrder(Order order) /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order) + public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0) { // verify the required parameter 'order' is set if (order == null) @@ -756,6 +804,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/store/order", localVarRequestOptions, this.Configuration); @@ -776,11 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -789,9 +841,10 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'order' is set if (order == null) @@ -826,6 +879,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs index a1716303f6f3..c37a6501c68a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -34,8 +34,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - void CreateUser(User user); + void CreateUser(User user, int operationIndex = 0); /// /// Create user @@ -45,15 +46,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(User user); + ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithArrayInput(List user); + void CreateUsersWithArrayInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -63,15 +66,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user); + ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithListInput(List user); + void CreateUsersWithListInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -81,8 +86,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo(List user); + ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0); /// /// Delete user /// @@ -91,8 +97,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - void DeleteUser(string username); + void DeleteUser(string username, int operationIndex = 0); /// /// Delete user @@ -102,15 +109,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo(string username); + ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0); /// /// Get user by user name /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - User GetUserByName(string username); + User GetUserByName(string username, int operationIndex = 0); /// /// Get user by user name @@ -120,16 +129,18 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo(string username); + ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); /// /// Logs user into the system /// /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - string LoginUser(string username, string password); + string LoginUser(string username, string password, int operationIndex = 0); /// /// Logs user into the system @@ -140,14 +151,16 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo(string username, string password); + ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0); /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void LogoutUser(); + void LogoutUser(int operationIndex = 0); /// /// Logs out current logged in user session @@ -156,8 +169,9 @@ public interface IUserApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo(); + ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0); /// /// Updated user /// @@ -167,8 +181,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - void UpdateUser(string username, User user); + void UpdateUser(string username, User user, int operationIndex = 0); /// /// Updated user @@ -179,8 +194,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo(string username, User user); + ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0); #endregion Synchronous Operations } @@ -198,9 +214,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create user @@ -210,9 +227,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -221,9 +239,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -233,9 +252,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -244,9 +264,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -256,9 +277,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user /// @@ -267,9 +289,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user @@ -279,9 +302,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name /// @@ -290,9 +314,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name @@ -302,9 +327,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system /// @@ -314,9 +340,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system @@ -327,9 +354,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session /// @@ -337,9 +365,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session @@ -348,9 +377,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user /// @@ -360,9 +390,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user @@ -373,9 +404,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -501,8 +533,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - public void CreateUser(User user) + public void CreateUser(User user, int operationIndex = 0) { CreateUserWithHttpInfo(user); } @@ -512,8 +545,9 @@ public void CreateUser(User user) /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user) + public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -545,6 +579,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); @@ -565,11 +602,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUserWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -577,9 +615,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -612,6 +651,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -633,8 +675,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithArrayInput(List user) + public void CreateUsersWithArrayInput(List user, int operationIndex = 0) { CreateUsersWithArrayInputWithHttpInfo(user); } @@ -644,8 +687,9 @@ public void CreateUsersWithArrayInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -677,6 +721,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); @@ -697,11 +744,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -709,9 +757,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -744,6 +793,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -765,8 +817,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithListInput(List user) + public void CreateUsersWithListInput(List user, int operationIndex = 0) { CreateUsersWithListInputWithHttpInfo(user); } @@ -776,8 +829,9 @@ public void CreateUsersWithListInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -809,6 +863,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); @@ -829,11 +886,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithListInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -841,9 +899,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -876,6 +935,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -897,8 +959,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - public void DeleteUser(string username) + public void DeleteUser(string username, int operationIndex = 0) { DeleteUserWithHttpInfo(username); } @@ -908,8 +971,9 @@ public void DeleteUser(string username) /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -940,6 +1004,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); @@ -960,11 +1027,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + await DeleteUserWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -972,9 +1040,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1006,6 +1075,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1027,8 +1099,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - public User GetUserByName(string username) + public User GetUserByName(string username, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -1039,8 +1112,9 @@ public User GetUserByName(string username) /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1073,6 +1147,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1093,11 +1170,12 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1106,9 +1184,10 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1142,6 +1221,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1164,8 +1246,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - public string LoginUser(string username, string password) + public string LoginUser(string username, string password, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); return localVarResponse.Data; @@ -1177,8 +1260,9 @@ public string LoginUser(string username, string password) /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password) + public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1218,6 +1302,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/login", localVarRequestOptions, this.Configuration); @@ -1239,11 +1326,12 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1253,9 +1341,10 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1296,6 +1385,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1316,8 +1408,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void LogoutUser() + public void LogoutUser(int operationIndex = 0) { LogoutUserWithHttpInfo(); } @@ -1326,8 +1419,9 @@ public void LogoutUser() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1351,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); @@ -1370,20 +1467,22 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await LogoutUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1408,6 +1507,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1430,8 +1532,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - public void UpdateUser(string username, User user) + public void UpdateUser(string username, User user, int operationIndex = 0) { UpdateUserWithHttpInfo(username, user); } @@ -1442,8 +1545,9 @@ public void UpdateUser(string username, User user) /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user) + public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1482,6 +1586,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1503,11 +1610,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + await UpdateUserWithHttpInfoAsync(username, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1516,9 +1624,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1558,6 +1667,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs index ffb05840d5bb..ca82a98d1902 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs @@ -430,9 +430,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -549,9 +550,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -674,7 +676,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -689,7 +691,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -704,7 +706,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -719,7 +721,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -734,7 +736,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -749,7 +751,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -764,7 +766,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -780,7 +782,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -794,7 +796,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -808,7 +810,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -822,7 +824,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -836,7 +838,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -850,7 +852,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -864,7 +866,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs index 8b731bfdc812..56e3a9d13eb5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs @@ -96,6 +96,13 @@ public class Configuration : IReadableConfiguration /// The servers private IList> _servers; + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + /// /// HttpSigning configuration /// @@ -182,6 +189,47 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + { + "PetApi.AddPet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + { + "PetApi.UpdatePet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -441,6 +489,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -449,7 +514,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -460,9 +525,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -470,31 +575,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -583,7 +691,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration AccessToken = second.AccessToken ?? first.AccessToken, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 2c22d47296f9..b99a151e5bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs index 68cd16375903..3932047e027a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs index e8ea00bb46a8..f5150493c8ec 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs @@ -52,7 +52,8 @@ protected Animal() public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Animal and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs index 1d6d42dc9b3a..2c77cf1c4142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs @@ -45,7 +45,8 @@ protected AppleReq() { } public AppleReq(string cultivar = default(string), bool mealy = default(bool)) { // to ensure "cultivar" is required (not null) - if (cultivar == null) { + if (cultivar == null) + { throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); } this.Cultivar = cultivar; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs index ea4ff737c89a..e0c780a14bc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs @@ -47,7 +47,8 @@ protected BasquePig() public BasquePig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs index 0cc23f5f6c23..35732f998d6c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs @@ -48,7 +48,8 @@ protected Category() public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Category and cannot be null"); } this.Name = name; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 807f0eb26bf8..dc78561c0db6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -48,12 +48,14 @@ protected ComplexQuadrilateral() public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs index a27b1db39297..38628258d1d0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs @@ -47,7 +47,8 @@ protected DanishPig() public DanishPig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index a931c0d6327a..6565b7b6f312 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -48,12 +48,14 @@ protected EquilateralTriangle() public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs index eb38d586bbb7..4ae624cb612c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -63,13 +63,15 @@ protected FormatTest() { this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) { + if (_byte == null) + { throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); } this.Byte = _byte; this.Date = date; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); } this.Password = password; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index cee75f3f8157..eddfcf60113c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -51,7 +51,8 @@ protected GrandparentAnimal() public GrandparentAnimal(string petType = default(string)) { // to ensure "petType" is required (not null) - if (petType == null) { + if (petType == null) + { throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); } this.PetType = petType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 50e7ce4aaa8d..55c607598a6d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -45,12 +45,14 @@ protected IsoscelesTriangle() { } public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs index 841b9ba43e92..8630f21bba49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs @@ -37,10 +37,10 @@ public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValida { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// An instance of Whale. + public Mammal(Whale actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Mammal(Pig actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// An instance of Zebra. + public Mammal(Zebra actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +61,10 @@ public Mammal(Whale actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// An instance of Pig. + public Mammal(Pig actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -104,16 +104,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown - /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } - /// /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, /// the InvalidClassException will be thrown @@ -134,6 +124,16 @@ public Zebra GetZebra() return (Zebra)this.ActualInstance; } + /// + /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs index ab311baedd65..01cedb8807b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs @@ -46,10 +46,10 @@ public NullableShape() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public NullableShape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs index 31fd118f4f68..472382726474 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs @@ -86,12 +86,14 @@ protected Pet() public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this.Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this.PhotoUrls = photoUrls; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..0ce4e18eb2ea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,383 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + [JsonConverter(typeof(PolymorphicPropertyJsonConverter))] + [DataContract(Name = "PolymorphicProperty")] + public partial class PolymorphicProperty : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of bool. + public PolymorphicProperty(bool actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of string. + public PolymorphicProperty(string actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Object. + public PolymorphicProperty(Object actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of List<string>. + public PolymorphicProperty(List actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(List)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Object)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(bool)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(string)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: List, Object, bool, string"); + } + } + } + + /// + /// Get the actual instance of `bool`. If the actual instance is not `bool`, + /// the InvalidClassException will be thrown + /// + /// An instance of bool + public bool GetBool() + { + return (bool)this.ActualInstance; + } + + /// + /// Get the actual instance of `string`. If the actual instance is not `string`, + /// the InvalidClassException will be thrown + /// + /// An instance of string + public string GetString() + { + return (string)this.ActualInstance; + } + + /// + /// Get the actual instance of `Object`. If the actual instance is not `Object`, + /// the InvalidClassException will be thrown + /// + /// An instance of Object + public Object GetObject() + { + return (Object)this.ActualInstance; + } + + /// + /// Get the actual instance of `List<string>`. If the actual instance is not `List<string>`, + /// the InvalidClassException will be thrown + /// + /// An instance of List<string> + public List GetListString() + { + return (List)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PolymorphicProperty.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PolymorphicProperty + /// + /// JSON string + /// An instance of PolymorphicProperty + public static PolymorphicProperty FromJson(string jsonString) + { + PolymorphicProperty newPolymorphicProperty = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPolymorphicProperty; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(List).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("List"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into List: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(Object).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("Object"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Object: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(bool).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("bool"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into bool: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(string).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("string"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPolymorphicProperty; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PolymorphicProperty).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PolymorphicProperty.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs index 7e232c39f0a4..2e4fc5cb0419 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -37,10 +37,10 @@ public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Quadrilateral(ComplexQuadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() { - return (ComplexQuadrilateral)this.ActualInstance; + return (SimpleQuadrilateral)this.ActualInstance; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() { - return (SimpleQuadrilateral)this.ActualInstance; + return (ComplexQuadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 4d7c39c4364d..cb2a5dc1691b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -47,7 +47,8 @@ protected QuadrilateralInterface() public QuadrilateralInterface(string quadrilateralType = default(string)) { // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 236839471475..e54c58468834 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -48,12 +48,14 @@ protected ScaleneTriangle() public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs index fd3d6cb439f4..bc73c0d68a71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs @@ -37,10 +37,10 @@ public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidata { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// An instance of Triangle. + public Shape(Triangle actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Shape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs index 92774561aaa5..6225f8888a03 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -47,7 +47,8 @@ protected ShapeInterface() public ShapeInterface(string shapeType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs index f378c1e3b7b6..a6d3624c26f3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -46,10 +46,10 @@ public ShapeOrNull() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public ShapeOrNull(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index fc9b37ce01fb..b8fbc0c24074 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -48,12 +48,14 @@ protected SimpleQuadrilateral() public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs index 7f7abb5bc85b..17571e4514d4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -47,7 +47,8 @@ protected TriangleInterface() public TriangleInterface(string triangleType = default(string)) { // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs index c30b6dbfabed..10ceda658b39 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs @@ -49,7 +49,8 @@ protected Whale() public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Whale and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs index 4fb60ed8ddf2..aab75e9cd568 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs @@ -80,7 +80,8 @@ protected Zebra() public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES index a18de634f5b0..ea091f5fa4e9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES @@ -67,6 +67,7 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Pig.md +docs/PolymorphicProperty.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -171,6 +172,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md index 6afaf65b95ac..7c9507fb6106 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md @@ -207,6 +207,7 @@ Class | Method | HTTP request | Description - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) - [Model.Pig](docs/Pig.md) + - [Model.PolymorphicProperty](docs/PolymorphicProperty.md) - [Model.Quadrilateral](docs/Quadrilateral.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PolymorphicProperty.md new file mode 100644 index 000000000000..8262a41c50d5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index ac8fbdcdc946..e04c8df5fdde 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -34,8 +34,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient Call123TestSpecialTags(ModelClient modelClient); + ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0); /// /// To test special tags @@ -45,8 +46,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient); + ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test special tags @@ -76,9 +79,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient Call123TestSpecialTags(ModelClient modelClient) + public ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient Call123TestSpecialTags(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/another-fake/dummy", localVarRequestOptions, this.Configuration); @@ -270,11 +279,12 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -283,9 +293,10 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -319,6 +330,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs index a9e5cfb9c4d2..af9619134ea6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -30,8 +30,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - InlineResponseDefault FooGet(); + InlineResponseDefault FooGet(int operationIndex = 0); /// /// @@ -40,8 +41,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - ApiResponse FooGetWithHttpInfo(); + ApiResponse FooGetWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -58,9 +60,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -69,9 +72,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -196,8 +200,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - public InlineResponseDefault FooGet() + public InlineResponseDefault FooGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FooGetWithHttpInfo(); return localVarResponse.Data; @@ -207,8 +212,9 @@ public InlineResponseDefault FooGet() /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -233,6 +239,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/foo", localVarRequestOptions, this.Configuration); @@ -252,11 +261,12 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -264,9 +274,10 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -292,6 +303,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index 5f1dae74c24d..421f93ed0441 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -30,8 +30,9 @@ public interface IFakeApiSync : IApiAccessor /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - HealthCheckResult FakeHealthGet(); + HealthCheckResult FakeHealthGet(int operationIndex = 0); /// /// Health check endpoint @@ -40,8 +41,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - ApiResponse FakeHealthGetWithHttpInfo(); + ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0); /// /// /// @@ -50,8 +52,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); /// /// @@ -61,8 +64,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); /// /// /// @@ -71,8 +75,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// @@ -82,8 +87,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// /// @@ -92,8 +98,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); /// /// @@ -103,8 +110,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); /// /// /// @@ -113,8 +121,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - string FakeOuterStringSerialize(string body = default(string)); + string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0); /// /// @@ -124,14 +133,16 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0); /// /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - List GetArrayOfEnums(); + List GetArrayOfEnums(int operationIndex = 0); /// /// Array of Enums @@ -140,8 +151,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - ApiResponse> GetArrayOfEnumsWithHttpInfo(); + ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0); /// /// /// @@ -150,8 +162,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); + void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// @@ -161,16 +174,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass); + ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// /// /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - void TestBodyWithQueryParams(string query, User user); + void TestBodyWithQueryParams(string query, User user, int operationIndex = 0); /// /// @@ -181,8 +196,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user); + ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0); /// /// To test \"client\" model /// @@ -191,8 +207,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClientModel(ModelClient modelClient); + ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0); /// /// To test \"client\" model @@ -202,8 +219,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient); + ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -225,8 +243,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -249,8 +268,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// To test enum parameters /// @@ -266,8 +286,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// To test enum parameters @@ -284,8 +305,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -299,8 +321,9 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -315,15 +338,17 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// test inline additionalProperties /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - void TestInlineAdditionalProperties(Dictionary requestBody); + void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0); /// /// test inline additionalProperties @@ -333,16 +358,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody); + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0); /// /// test json serialization of form data /// /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - void TestJsonFormData(string param, string param2); + void TestJsonFormData(string param, string param2, int operationIndex = 0); /// /// test json serialization of form data @@ -353,8 +380,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2); + ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0); /// /// /// @@ -367,8 +395,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); /// /// @@ -382,8 +411,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); #endregion Synchronous Operations } @@ -400,9 +430,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Health check endpoint @@ -411,9 +442,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -422,9 +454,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -434,9 +467,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -445,9 +479,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -457,9 +492,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -468,9 +504,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -480,9 +517,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -491,9 +529,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -503,9 +542,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -513,9 +553,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums @@ -524,9 +565,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -535,9 +577,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -547,9 +590,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -559,9 +603,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -572,9 +617,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model /// @@ -583,9 +629,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model @@ -595,9 +642,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -619,9 +667,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -644,9 +693,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -662,9 +712,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -681,9 +732,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -697,9 +749,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -714,9 +767,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -725,9 +779,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties @@ -737,9 +792,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data /// @@ -749,9 +805,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data @@ -762,9 +819,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -777,9 +835,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -793,9 +852,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -920,8 +980,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - public HealthCheckResult FakeHealthGet() + public HealthCheckResult FakeHealthGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); return localVarResponse.Data; @@ -931,8 +992,9 @@ public HealthCheckResult FakeHealthGet() /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -957,6 +1019,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/health", localVarRequestOptions, this.Configuration); @@ -976,11 +1041,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -988,9 +1054,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1016,6 +1083,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1037,8 +1107,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1049,8 +1120,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1077,6 +1149,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/boolean", localVarRequestOptions, this.Configuration); @@ -1097,11 +1172,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1110,9 +1186,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1140,6 +1217,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1161,8 +1241,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1173,8 +1254,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1201,6 +1283,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/composite", localVarRequestOptions, this.Configuration); @@ -1221,11 +1306,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1234,9 +1320,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1264,6 +1351,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1285,8 +1375,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1297,8 +1388,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,6 +1417,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/number", localVarRequestOptions, this.Configuration); @@ -1345,11 +1440,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1358,9 +1454,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1388,6 +1485,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1409,8 +1509,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(string body = default(string)) + public string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1421,8 +1522,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1449,6 +1551,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/string", localVarRequestOptions, this.Configuration); @@ -1469,11 +1574,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1482,9 +1588,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1512,6 +1619,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1532,8 +1642,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - public List GetArrayOfEnums() + public List GetArrayOfEnums(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetArrayOfEnumsWithHttpInfo(); return localVarResponse.Data; @@ -1543,8 +1654,9 @@ public List GetArrayOfEnums() /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1569,6 +1681,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/fake/array-of-enums", localVarRequestOptions, this.Configuration); @@ -1588,11 +1703,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1600,9 +1716,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1628,6 +1745,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/fake/array-of-enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1649,8 +1769,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -1660,8 +1781,9 @@ public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1693,6 +1815,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); @@ -1713,11 +1838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1725,9 +1851,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1760,6 +1887,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1782,8 +1912,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - public void TestBodyWithQueryParams(string query, User user) + public void TestBodyWithQueryParams(string query, User user, int operationIndex = 0) { TestBodyWithQueryParamsWithHttpInfo(query, user); } @@ -1794,8 +1925,9 @@ public void TestBodyWithQueryParams(string query, User user) /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0) { // verify the required parameter 'query' is set if (query == null) @@ -1834,6 +1966,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); @@ -1855,11 +1990,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1868,9 +2004,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'query' is set if (query == null) @@ -1910,6 +2047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1931,8 +2071,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClientModel(ModelClient modelClient) + public ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); return localVarResponse.Data; @@ -1943,8 +2084,9 @@ public ModelClient TestClientModel(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -1977,6 +2119,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/fake", localVarRequestOptions, this.Configuration); @@ -1997,11 +2142,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2010,9 +2156,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -2046,6 +2193,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2080,8 +2230,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2104,8 +2255,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2186,6 +2338,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2225,11 +2380,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2250,9 +2406,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2334,6 +2491,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2368,8 +2528,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2386,8 +2547,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2444,6 +2606,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); @@ -2471,11 +2636,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2490,9 +2656,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2550,6 +2717,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2576,8 +2746,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2592,8 +2763,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2632,6 +2804,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2663,11 +2838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2680,9 +2856,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2722,6 +2899,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2749,8 +2929,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - public void TestInlineAdditionalProperties(Dictionary requestBody) + public void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0) { TestInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -2760,8 +2941,9 @@ public void TestInlineAdditionalProperties(Dictionary requestBod /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody) + public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2793,6 +2975,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); @@ -2813,11 +2998,12 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2825,9 +3011,10 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2860,6 +3047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2882,8 +3072,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - public void TestJsonFormData(string param, string param2) + public void TestJsonFormData(string param, string param2, int operationIndex = 0) { TestJsonFormDataWithHttpInfo(param, param2); } @@ -2894,8 +3085,9 @@ public void TestJsonFormData(string param, string param2) /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2) + public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0) { // verify the required parameter 'param' is set if (param == null) @@ -2934,6 +3126,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); @@ -2955,11 +3150,12 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); + await TestJsonFormDataWithHttpInfoAsync(param, param2, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2968,9 +3164,10 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'param' is set if (param == null) @@ -3010,6 +3207,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3035,8 +3235,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// /// /// + /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -3050,8 +3251,9 @@ public void TestQueryParameterCollectionFormat(List pipe, List i /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3110,6 +3312,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/test-query-parameters", localVarRequestOptions, this.Configuration); @@ -3134,11 +3339,12 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -3150,9 +3356,10 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3212,6 +3419,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-parameters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index c2852b36a44b..6b665775253f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -34,8 +34,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClassname(ModelClient modelClient); + ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0); /// /// To test class name in snake case @@ -45,8 +46,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient); + ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test class name in snake case @@ -76,9 +79,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClassname(ModelClient modelClient) + public ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient TestClassname(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { @@ -275,11 +284,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -288,9 +298,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -324,6 +335,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index b42f2c168bae..562c0f4807f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -31,8 +31,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void AddPet(Pet pet); + void AddPet(Pet pet, int operationIndex = 0); /// /// Add a new pet to the store @@ -42,16 +43,18 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo(Pet pet); + ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Deletes a pet /// /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Deletes a pet @@ -62,8 +65,9 @@ public interface IPetApiSync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Finds Pets by status /// @@ -72,8 +76,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - List FindPetsByStatus(List status); + List FindPetsByStatus(List status, int operationIndex = 0); /// /// Finds Pets by status @@ -83,8 +88,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo(List status); + ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0); /// /// Finds Pets by tags /// @@ -93,9 +99,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - List FindPetsByTags(List tags); + List FindPetsByTags(List tags, int operationIndex = 0); /// /// Finds Pets by tags @@ -105,9 +112,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo(List tags); + ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0); /// /// Find pet by ID /// @@ -116,8 +124,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - Pet GetPetById(long petId); + Pet GetPetById(long petId, int operationIndex = 0); /// /// Find pet by ID @@ -127,15 +136,17 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo(long petId); + ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0); /// /// Update an existing pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void UpdatePet(Pet pet); + void UpdatePet(Pet pet, int operationIndex = 0); /// /// Update an existing pet @@ -145,8 +156,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo(Pet pet); + ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Updates a pet in the store with form data /// @@ -154,8 +166,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -167,8 +180,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// uploads an image /// @@ -176,8 +190,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image @@ -189,8 +204,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image (required) /// @@ -198,8 +214,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); /// /// uploads an image (required) @@ -211,8 +228,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); #endregion Synchronous Operations } @@ -230,9 +248,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -242,9 +261,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -254,9 +274,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -267,9 +288,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -278,9 +300,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status @@ -290,9 +313,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags /// @@ -301,10 +325,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags @@ -314,10 +339,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID /// @@ -326,9 +352,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID @@ -338,9 +365,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet /// @@ -349,9 +377,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -361,9 +390,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -374,9 +404,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -388,9 +419,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -401,9 +433,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -415,9 +448,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -428,9 +462,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -442,9 +477,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -570,8 +606,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void AddPet(Pet pet) + public void AddPet(Pet pet, int operationIndex = 0) { AddPetWithHttpInfo(pet); } @@ -581,8 +618,9 @@ public void AddPet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -615,6 +653,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -657,11 +698,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await AddPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -669,9 +711,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -705,6 +748,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -749,8 +795,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -761,8 +808,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -791,6 +839,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -818,11 +869,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); + await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -831,9 +883,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -863,6 +916,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -890,8 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - public List FindPetsByStatus(List status) + public List FindPetsByStatus(List status, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); return localVarResponse.Data; @@ -902,8 +959,9 @@ public List FindPetsByStatus(List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0) { // verify the required parameter 'status' is set if (status == null) @@ -936,6 +994,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -978,11 +1039,12 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -991,9 +1053,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'status' is set if (status == null) @@ -1027,6 +1090,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1070,9 +1136,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - public List FindPetsByTags(List tags) + public List FindPetsByTags(List tags, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); return localVarResponse.Data; @@ -1083,9 +1150,10 @@ public List FindPetsByTags(List tags) /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0) { // verify the required parameter 'tags' is set if (tags == null) @@ -1118,6 +1186,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1160,12 +1231,13 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1174,10 +1246,11 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'tags' is set if (tags == null) @@ -1211,6 +1284,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1254,8 +1330,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - public Pet GetPetById(long petId) + public Pet GetPetById(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1266,8 +1343,9 @@ public Pet GetPetById(long petId) /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId) + public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1294,6 +1372,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1319,11 +1400,12 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1332,9 +1414,10 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1362,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1388,8 +1474,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void UpdatePet(Pet pet) + public void UpdatePet(Pet pet, int operationIndex = 0) { UpdatePetWithHttpInfo(pet); } @@ -1399,8 +1486,9 @@ public void UpdatePet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -1433,6 +1521,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1475,11 +1566,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await UpdatePetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1487,9 +1579,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1523,6 +1616,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1568,8 +1664,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1581,8 +1678,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1616,6 +1714,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1644,11 +1745,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1658,9 +1760,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1695,6 +1798,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1724,8 +1830,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1738,8 +1845,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1774,6 +1882,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1802,11 +1913,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1817,9 +1929,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1855,6 +1968,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1884,8 +2000,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1898,8 +2015,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -1937,6 +2055,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1965,11 +2086,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1980,9 +2102,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -2021,6 +2144,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index 7cda385b3b40..63403e7dcdfd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -34,8 +34,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - void DeleteOrder(string orderId); + void DeleteOrder(string orderId, int operationIndex = 0); /// /// Delete purchase order by ID @@ -45,8 +46,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo(string orderId); + ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0); /// /// Returns pet inventories by status /// @@ -54,8 +56,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - Dictionary GetInventory(); + Dictionary GetInventory(int operationIndex = 0); /// /// Returns pet inventories by status @@ -64,8 +67,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo(); + ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0); /// /// Find purchase order by ID /// @@ -74,8 +78,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - Order GetOrderById(long orderId); + Order GetOrderById(long orderId, int operationIndex = 0); /// /// Find purchase order by ID @@ -85,15 +90,17 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo(long orderId); + ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0); /// /// Place an order for a pet /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - Order PlaceOrder(Order order); + Order PlaceOrder(Order order, int operationIndex = 0); /// /// Place an order for a pet @@ -103,8 +110,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo(Order order); + ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0); #endregion Synchronous Operations } @@ -122,9 +130,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete purchase order by ID @@ -134,9 +143,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status /// @@ -144,9 +154,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status @@ -155,9 +166,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID /// @@ -166,9 +178,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID @@ -178,9 +191,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet /// @@ -189,9 +203,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet @@ -201,9 +216,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -329,8 +345,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - public void DeleteOrder(string orderId) + public void DeleteOrder(string orderId, int operationIndex = 0) { DeleteOrderWithHttpInfo(orderId); } @@ -340,8 +357,9 @@ public void DeleteOrder(string orderId) /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId) + public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -372,6 +390,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -392,11 +413,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + await DeleteOrderWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -404,9 +426,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -438,6 +461,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -458,8 +484,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - public Dictionary GetInventory() + public Dictionary GetInventory(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; @@ -469,8 +496,9 @@ public Dictionary GetInventory() /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -495,6 +523,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -519,11 +550,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -531,9 +563,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -559,6 +592,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -585,8 +621,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - public Order GetOrderById(long orderId) + public Order GetOrderById(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -597,8 +634,9 @@ public Order GetOrderById(long orderId) /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId) + public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -625,6 +663,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -645,11 +686,12 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -658,9 +700,10 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -688,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -709,8 +755,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - public Order PlaceOrder(Order order) + public Order PlaceOrder(Order order, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; @@ -721,8 +768,9 @@ public Order PlaceOrder(Order order) /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order) + public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0) { // verify the required parameter 'order' is set if (order == null) @@ -756,6 +804,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/store/order", localVarRequestOptions, this.Configuration); @@ -776,11 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -789,9 +841,10 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'order' is set if (order == null) @@ -826,6 +879,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs index a1716303f6f3..c37a6501c68a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs @@ -34,8 +34,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - void CreateUser(User user); + void CreateUser(User user, int operationIndex = 0); /// /// Create user @@ -45,15 +46,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(User user); + ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithArrayInput(List user); + void CreateUsersWithArrayInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -63,15 +66,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user); + ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithListInput(List user); + void CreateUsersWithListInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -81,8 +86,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo(List user); + ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0); /// /// Delete user /// @@ -91,8 +97,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - void DeleteUser(string username); + void DeleteUser(string username, int operationIndex = 0); /// /// Delete user @@ -102,15 +109,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo(string username); + ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0); /// /// Get user by user name /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - User GetUserByName(string username); + User GetUserByName(string username, int operationIndex = 0); /// /// Get user by user name @@ -120,16 +129,18 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo(string username); + ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); /// /// Logs user into the system /// /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - string LoginUser(string username, string password); + string LoginUser(string username, string password, int operationIndex = 0); /// /// Logs user into the system @@ -140,14 +151,16 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo(string username, string password); + ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0); /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void LogoutUser(); + void LogoutUser(int operationIndex = 0); /// /// Logs out current logged in user session @@ -156,8 +169,9 @@ public interface IUserApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo(); + ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0); /// /// Updated user /// @@ -167,8 +181,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - void UpdateUser(string username, User user); + void UpdateUser(string username, User user, int operationIndex = 0); /// /// Updated user @@ -179,8 +194,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo(string username, User user); + ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0); #endregion Synchronous Operations } @@ -198,9 +214,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create user @@ -210,9 +227,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -221,9 +239,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -233,9 +252,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -244,9 +264,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -256,9 +277,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user /// @@ -267,9 +289,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user @@ -279,9 +302,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name /// @@ -290,9 +314,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name @@ -302,9 +327,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system /// @@ -314,9 +340,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system @@ -327,9 +354,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session /// @@ -337,9 +365,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session @@ -348,9 +377,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user /// @@ -360,9 +390,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user @@ -373,9 +404,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -501,8 +533,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - public void CreateUser(User user) + public void CreateUser(User user, int operationIndex = 0) { CreateUserWithHttpInfo(user); } @@ -512,8 +545,9 @@ public void CreateUser(User user) /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user) + public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -545,6 +579,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); @@ -565,11 +602,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUserWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -577,9 +615,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -612,6 +651,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -633,8 +675,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithArrayInput(List user) + public void CreateUsersWithArrayInput(List user, int operationIndex = 0) { CreateUsersWithArrayInputWithHttpInfo(user); } @@ -644,8 +687,9 @@ public void CreateUsersWithArrayInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -677,6 +721,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); @@ -697,11 +744,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -709,9 +757,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -744,6 +793,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -765,8 +817,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithListInput(List user) + public void CreateUsersWithListInput(List user, int operationIndex = 0) { CreateUsersWithListInputWithHttpInfo(user); } @@ -776,8 +829,9 @@ public void CreateUsersWithListInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -809,6 +863,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); @@ -829,11 +886,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithListInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -841,9 +899,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -876,6 +935,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -897,8 +959,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - public void DeleteUser(string username) + public void DeleteUser(string username, int operationIndex = 0) { DeleteUserWithHttpInfo(username); } @@ -908,8 +971,9 @@ public void DeleteUser(string username) /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -940,6 +1004,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); @@ -960,11 +1027,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + await DeleteUserWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -972,9 +1040,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1006,6 +1075,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1027,8 +1099,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - public User GetUserByName(string username) + public User GetUserByName(string username, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -1039,8 +1112,9 @@ public User GetUserByName(string username) /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1073,6 +1147,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1093,11 +1170,12 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1106,9 +1184,10 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1142,6 +1221,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1164,8 +1246,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - public string LoginUser(string username, string password) + public string LoginUser(string username, string password, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); return localVarResponse.Data; @@ -1177,8 +1260,9 @@ public string LoginUser(string username, string password) /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password) + public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1218,6 +1302,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/login", localVarRequestOptions, this.Configuration); @@ -1239,11 +1326,12 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1253,9 +1341,10 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1296,6 +1385,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1316,8 +1408,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void LogoutUser() + public void LogoutUser(int operationIndex = 0) { LogoutUserWithHttpInfo(); } @@ -1326,8 +1419,9 @@ public void LogoutUser() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1351,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); @@ -1370,20 +1467,22 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await LogoutUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1408,6 +1507,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1430,8 +1532,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - public void UpdateUser(string username, User user) + public void UpdateUser(string username, User user, int operationIndex = 0) { UpdateUserWithHttpInfo(username, user); } @@ -1442,8 +1545,9 @@ public void UpdateUser(string username, User user) /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user) + public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1482,6 +1586,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1503,11 +1610,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + await UpdateUserWithHttpInfoAsync(username, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1516,9 +1624,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1558,6 +1667,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index 96ed4f895950..66ec18ddf578 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -429,9 +429,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -548,9 +549,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -673,7 +675,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -688,7 +690,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -703,7 +705,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -718,7 +720,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -733,7 +735,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -748,7 +750,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -763,7 +765,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -779,7 +781,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -793,7 +795,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -807,7 +809,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -821,7 +823,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -835,7 +837,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -849,7 +851,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -863,7 +865,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs index 992454bacf6d..a67ad721ed47 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs @@ -91,6 +91,13 @@ public class Configuration : IReadableConfiguration /// The servers private IList> _servers; + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + /// /// HttpSigning configuration /// @@ -177,6 +184,47 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + { + "PetApi.AddPet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + { + "PetApi.UpdatePet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -436,6 +484,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -444,7 +509,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -455,9 +520,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -465,31 +570,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -578,7 +686,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration AccessToken = second.AccessToken ?? first.AccessToken, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 2c22d47296f9..b99a151e5bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs index 68cd16375903..3932047e027a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs index e8ea00bb46a8..f5150493c8ec 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs @@ -52,7 +52,8 @@ protected Animal() public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Animal and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AppleReq.cs index 1d6d42dc9b3a..2c77cf1c4142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/AppleReq.cs @@ -45,7 +45,8 @@ protected AppleReq() { } public AppleReq(string cultivar = default(string), bool mealy = default(bool)) { // to ensure "cultivar" is required (not null) - if (cultivar == null) { + if (cultivar == null) + { throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); } this.Cultivar = cultivar; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BasquePig.cs index ea4ff737c89a..e0c780a14bc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/BasquePig.cs @@ -47,7 +47,8 @@ protected BasquePig() public BasquePig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs index 0cc23f5f6c23..35732f998d6c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs @@ -48,7 +48,8 @@ protected Category() public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Category and cannot be null"); } this.Name = name; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 807f0eb26bf8..dc78561c0db6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -48,12 +48,14 @@ protected ComplexQuadrilateral() public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DanishPig.cs index a27b1db39297..38628258d1d0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/DanishPig.cs @@ -47,7 +47,8 @@ protected DanishPig() public DanishPig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index a931c0d6327a..6565b7b6f312 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -48,12 +48,14 @@ protected EquilateralTriangle() public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index eb38d586bbb7..4ae624cb612c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -63,13 +63,15 @@ protected FormatTest() { this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) { + if (_byte == null) + { throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); } this.Byte = _byte; this.Date = date; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); } this.Password = password; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index cee75f3f8157..eddfcf60113c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -51,7 +51,8 @@ protected GrandparentAnimal() public GrandparentAnimal(string petType = default(string)) { // to ensure "petType" is required (not null) - if (petType == null) { + if (petType == null) + { throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); } this.PetType = petType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 50e7ce4aaa8d..55c607598a6d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -45,12 +45,14 @@ protected IsoscelesTriangle() { } public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Mammal.cs index 841b9ba43e92..8630f21bba49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Mammal.cs @@ -37,10 +37,10 @@ public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValida { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// An instance of Whale. + public Mammal(Whale actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Mammal(Pig actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// An instance of Zebra. + public Mammal(Zebra actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +61,10 @@ public Mammal(Whale actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// An instance of Pig. + public Mammal(Pig actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -104,16 +104,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown - /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } - /// /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, /// the InvalidClassException will be thrown @@ -134,6 +124,16 @@ public Zebra GetZebra() return (Zebra)this.ActualInstance; } + /// + /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableShape.cs index ab311baedd65..01cedb8807b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/NullableShape.cs @@ -46,10 +46,10 @@ public NullableShape() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public NullableShape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs index 31fd118f4f68..472382726474 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs @@ -86,12 +86,14 @@ protected Pet() public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this.Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this.PhotoUrls = photoUrls; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..0ce4e18eb2ea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,383 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + [JsonConverter(typeof(PolymorphicPropertyJsonConverter))] + [DataContract(Name = "PolymorphicProperty")] + public partial class PolymorphicProperty : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of bool. + public PolymorphicProperty(bool actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of string. + public PolymorphicProperty(string actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Object. + public PolymorphicProperty(Object actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of List<string>. + public PolymorphicProperty(List actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(List)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Object)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(bool)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(string)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: List, Object, bool, string"); + } + } + } + + /// + /// Get the actual instance of `bool`. If the actual instance is not `bool`, + /// the InvalidClassException will be thrown + /// + /// An instance of bool + public bool GetBool() + { + return (bool)this.ActualInstance; + } + + /// + /// Get the actual instance of `string`. If the actual instance is not `string`, + /// the InvalidClassException will be thrown + /// + /// An instance of string + public string GetString() + { + return (string)this.ActualInstance; + } + + /// + /// Get the actual instance of `Object`. If the actual instance is not `Object`, + /// the InvalidClassException will be thrown + /// + /// An instance of Object + public Object GetObject() + { + return (Object)this.ActualInstance; + } + + /// + /// Get the actual instance of `List<string>`. If the actual instance is not `List<string>`, + /// the InvalidClassException will be thrown + /// + /// An instance of List<string> + public List GetListString() + { + return (List)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PolymorphicProperty.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PolymorphicProperty + /// + /// JSON string + /// An instance of PolymorphicProperty + public static PolymorphicProperty FromJson(string jsonString) + { + PolymorphicProperty newPolymorphicProperty = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPolymorphicProperty; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(List).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("List"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into List: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(Object).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("Object"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Object: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(bool).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("bool"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into bool: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(string).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("string"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPolymorphicProperty; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PolymorphicProperty).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PolymorphicProperty.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Quadrilateral.cs index 7e232c39f0a4..2e4fc5cb0419 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -37,10 +37,10 @@ public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Quadrilateral(ComplexQuadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() { - return (ComplexQuadrilateral)this.ActualInstance; + return (SimpleQuadrilateral)this.ActualInstance; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() { - return (SimpleQuadrilateral)this.ActualInstance; + return (ComplexQuadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 4d7c39c4364d..cb2a5dc1691b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -47,7 +47,8 @@ protected QuadrilateralInterface() public QuadrilateralInterface(string quadrilateralType = default(string)) { // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 236839471475..e54c58468834 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -48,12 +48,14 @@ protected ScaleneTriangle() public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Shape.cs index fd3d6cb439f4..bc73c0d68a71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Shape.cs @@ -37,10 +37,10 @@ public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidata { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// An instance of Triangle. + public Shape(Triangle actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Shape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeInterface.cs index 92774561aaa5..6225f8888a03 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -47,7 +47,8 @@ protected ShapeInterface() public ShapeInterface(string shapeType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeOrNull.cs index f378c1e3b7b6..a6d3624c26f3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -46,10 +46,10 @@ public ShapeOrNull() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public ShapeOrNull(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index fc9b37ce01fb..b8fbc0c24074 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -48,12 +48,14 @@ protected SimpleQuadrilateral() public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TriangleInterface.cs index 7f7abb5bc85b..17571e4514d4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -47,7 +47,8 @@ protected TriangleInterface() public TriangleInterface(string triangleType = default(string)) { // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Whale.cs index c30b6dbfabed..10ceda658b39 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Whale.cs @@ -49,7 +49,8 @@ protected Whale() public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Whale and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Zebra.cs index 4fb60ed8ddf2..aab75e9cd568 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Zebra.cs @@ -80,7 +80,8 @@ protected Zebra() public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES index a18de634f5b0..ea091f5fa4e9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES @@ -67,6 +67,7 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Pig.md +docs/PolymorphicProperty.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -171,6 +172,7 @@ src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/PolymorphicProperty.cs src/Org.OpenAPITools/Model/Quadrilateral.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md index 9bc66067f7af..dd3f6f9e5206 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md @@ -219,6 +219,7 @@ Class | Method | HTTP request | Description - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) - [Model.Pig](docs/Pig.md) + - [Model.PolymorphicProperty](docs/PolymorphicProperty.md) - [Model.Quadrilateral](docs/Quadrilateral.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PolymorphicProperty.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PolymorphicProperty.md new file mode 100644 index 000000000000..8262a41c50d5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PolymorphicProperty.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.PolymorphicProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs new file mode 100644 index 000000000000..eff3c6ddc9bb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing PolymorphicProperty + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PolymorphicPropertyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PolymorphicProperty + //private PolymorphicProperty instance; + + public PolymorphicPropertyTests() + { + // TODO uncomment below to create an instance of PolymorphicProperty + //instance = new PolymorphicProperty(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PolymorphicProperty + /// + [Fact] + public void PolymorphicPropertyInstanceTest() + { + // TODO uncomment below to test "IsType" PolymorphicProperty + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index ac8fbdcdc946..e04c8df5fdde 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -34,8 +34,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient Call123TestSpecialTags(ModelClient modelClient); + ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0); /// /// To test special tags @@ -45,8 +46,9 @@ public interface IAnotherFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient); + ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test special tags @@ -76,9 +79,10 @@ public interface IAnotherFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient Call123TestSpecialTags(ModelClient modelClient) + public ModelClient Call123TestSpecialTags(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient Call123TestSpecialTags(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/another-fake/dummy", localVarRequestOptions, this.Configuration); @@ -270,11 +279,12 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -283,9 +293,10 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -319,6 +330,9 @@ public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWi localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "AnotherFakeApi.Call123TestSpecialTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs index a9e5cfb9c4d2..af9619134ea6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -30,8 +30,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - InlineResponseDefault FooGet(); + InlineResponseDefault FooGet(int operationIndex = 0); /// /// @@ -40,8 +41,9 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - ApiResponse FooGetWithHttpInfo(); + ApiResponse FooGetWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -58,9 +60,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -69,9 +72,10 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -196,8 +200,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// InlineResponseDefault - public InlineResponseDefault FooGet() + public InlineResponseDefault FooGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FooGetWithHttpInfo(); return localVarResponse.Data; @@ -207,8 +212,9 @@ public InlineResponseDefault FooGet() /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of InlineResponseDefault - public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -233,6 +239,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/foo", localVarRequestOptions, this.Configuration); @@ -252,11 +261,12 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of InlineResponseDefault - public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -264,9 +274,10 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InlineResponseDefault) - public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -292,6 +303,9 @@ public Org.OpenAPITools.Client.ApiResponse FooGetWithHttp } + localVarRequestOptions.Operation = "DefaultApi.FooGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs index 5f1dae74c24d..421f93ed0441 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -30,8 +30,9 @@ public interface IFakeApiSync : IApiAccessor /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - HealthCheckResult FakeHealthGet(); + HealthCheckResult FakeHealthGet(int operationIndex = 0); /// /// Health check endpoint @@ -40,8 +41,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - ApiResponse FakeHealthGetWithHttpInfo(); + ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0); /// /// /// @@ -50,8 +52,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0); /// /// @@ -61,8 +64,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0); /// /// /// @@ -71,8 +75,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// @@ -82,8 +87,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); /// /// /// @@ -92,8 +98,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0); /// /// @@ -103,8 +110,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0); /// /// /// @@ -113,8 +121,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - string FakeOuterStringSerialize(string body = default(string)); + string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0); /// /// @@ -124,14 +133,16 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)); + ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0); /// /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - List GetArrayOfEnums(); + List GetArrayOfEnums(int operationIndex = 0); /// /// Array of Enums @@ -140,8 +151,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - ApiResponse> GetArrayOfEnumsWithHttpInfo(); + ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0); /// /// /// @@ -150,8 +162,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); + void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// @@ -161,16 +174,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass); + ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0); /// /// /// /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - void TestBodyWithQueryParams(string query, User user); + void TestBodyWithQueryParams(string query, User user, int operationIndex = 0); /// /// @@ -181,8 +196,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user); + ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0); /// /// To test \"client\" model /// @@ -191,8 +207,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClientModel(ModelClient modelClient); + ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0); /// /// To test \"client\" model @@ -202,8 +219,9 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient); + ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -225,8 +243,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -249,8 +268,9 @@ public interface IFakeApiSync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); /// /// To test enum parameters /// @@ -266,8 +286,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// To test enum parameters @@ -284,8 +305,9 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -299,8 +321,9 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) @@ -315,15 +338,17 @@ public interface IFakeApiSync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0); /// /// test inline additionalProperties /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - void TestInlineAdditionalProperties(Dictionary requestBody); + void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0); /// /// test inline additionalProperties @@ -333,16 +358,18 @@ public interface IFakeApiSync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody); + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0); /// /// test json serialization of form data /// /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - void TestJsonFormData(string param, string param2); + void TestJsonFormData(string param, string param2, int operationIndex = 0); /// /// test json serialization of form data @@ -353,8 +380,9 @@ public interface IFakeApiSync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2); + ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0); /// /// /// @@ -367,8 +395,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// - void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context); + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); /// /// @@ -382,8 +411,9 @@ public interface IFakeApiSync : IApiAccessor /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context); + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0); #endregion Synchronous Operations } @@ -400,9 +430,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Health check endpoint @@ -411,9 +442,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -422,9 +454,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -434,9 +467,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -445,9 +479,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -457,9 +492,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -468,9 +504,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -480,9 +517,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -491,9 +529,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -503,9 +542,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -513,9 +553,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums @@ -524,9 +565,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -535,9 +577,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -547,9 +590,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -559,9 +603,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -572,9 +617,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model /// @@ -583,9 +629,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test \"client\" model @@ -595,9 +642,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -619,9 +667,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -644,9 +693,10 @@ public interface IFakeApiAsync : IApiAccessor /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -662,9 +712,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -681,9 +732,10 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -697,9 +749,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) @@ -714,9 +767,10 @@ public interface IFakeApiAsync : IApiAccessor /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties /// @@ -725,9 +779,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test inline additionalProperties @@ -737,9 +792,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data /// @@ -749,9 +805,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// test json serialization of form data @@ -762,9 +819,10 @@ public interface IFakeApiAsync : IApiAccessor /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -777,9 +835,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -793,9 +852,10 @@ public interface IFakeApiAsync : IApiAccessor /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -920,8 +980,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HealthCheckResult - public HealthCheckResult FakeHealthGet() + public HealthCheckResult FakeHealthGet(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); return localVarResponse.Data; @@ -931,8 +992,9 @@ public HealthCheckResult FakeHealthGet() /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HealthCheckResult - public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -957,6 +1019,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/health", localVarRequestOptions, this.Configuration); @@ -976,11 +1041,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HealthCheckResult - public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeHealthGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -988,9 +1054,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Health check endpoint /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HealthCheckResult) - public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1016,6 +1083,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH } + localVarRequestOptions.Operation = "FakeApi.FakeHealthGet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1037,8 +1107,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// bool - public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + public bool FakeOuterBooleanSerialize(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1049,8 +1120,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1077,6 +1149,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/boolean", localVarRequestOptions, this.Configuration); @@ -1097,11 +1172,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1110,9 +1186,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input boolean as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1140,6 +1217,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterBooleanSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1161,8 +1241,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1173,8 +1254,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1201,6 +1283,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/composite", localVarRequestOptions, this.Configuration); @@ -1221,11 +1306,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1234,9 +1320,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input composite as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1264,6 +1351,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = outerComposite; + localVarRequestOptions.Operation = "FakeApi.FakeOuterCompositeSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1285,8 +1375,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// decimal - public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1297,8 +1388,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1325,6 +1417,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/number", localVarRequestOptions, this.Configuration); @@ -1345,11 +1440,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1358,9 +1454,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input number as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1388,6 +1485,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterNumberSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1409,8 +1509,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(string body = default(string)) + public string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1421,8 +1522,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1449,6 +1551,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/outer/string", localVarRequestOptions, this.Configuration); @@ -1469,11 +1574,12 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1482,9 +1588,10 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// /// Thrown when fails to make API call /// Input string as post body (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1512,6 +1619,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH localVarRequestOptions.Data = body; + localVarRequestOptions.Operation = "FakeApi.FakeOuterStringSerialize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1532,8 +1642,9 @@ public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// List<OuterEnum> - public List GetArrayOfEnums() + public List GetArrayOfEnums(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetArrayOfEnumsWithHttpInfo(); return localVarResponse.Data; @@ -1543,8 +1654,9 @@ public List GetArrayOfEnums() /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of List<OuterEnum> - public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1569,6 +1681,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/fake/array-of-enums", localVarRequestOptions, this.Configuration); @@ -1588,11 +1703,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<OuterEnum> - public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1600,9 +1716,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// Array of Enums /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<OuterEnum>) - public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1628,6 +1745,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH } + localVarRequestOptions.Operation = "FakeApi.GetArrayOfEnums"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/fake/array-of-enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1649,8 +1769,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithH /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -1660,8 +1781,9 @@ public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1693,6 +1815,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); @@ -1713,11 +1838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1725,9 +1851,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) @@ -1760,6 +1887,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt localVarRequestOptions.Data = fileSchemaTestClass; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithFileSchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1782,8 +1912,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHtt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// - public void TestBodyWithQueryParams(string query, User user) + public void TestBodyWithQueryParams(string query, User user, int operationIndex = 0) { TestBodyWithQueryParamsWithHttpInfo(query, user); } @@ -1794,8 +1925,9 @@ public void TestBodyWithQueryParams(string query, User user) /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user, int operationIndex = 0) { // verify the required parameter 'query' is set if (query == null) @@ -1834,6 +1966,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); @@ -1855,11 +1990,12 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1868,9 +2004,10 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// Thrown when fails to make API call /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'query' is set if (query == null) @@ -1910,6 +2047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "FakeApi.TestBodyWithQueryParams"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1931,8 +2071,9 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClientModel(ModelClient modelClient) + public ModelClient TestClientModel(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); return localVarResponse.Data; @@ -1943,8 +2084,9 @@ public ModelClient TestClientModel(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -1977,6 +2119,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/fake", localVarRequestOptions, this.Configuration); @@ -1997,11 +2142,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2010,9 +2156,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -2046,6 +2193,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeApi.TestClientModel"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2080,8 +2230,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2104,8 +2255,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2186,6 +2338,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2225,11 +2380,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2250,9 +2406,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// None (optional) /// None (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2334,6 +2491,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEndpointParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_basic_test) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2368,8 +2528,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2386,8 +2547,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2444,6 +2606,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); @@ -2471,11 +2636,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2490,9 +2656,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2550,6 +2717,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } + localVarRequestOptions.Operation = "FakeApi.TestEnumParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2576,8 +2746,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// - public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2592,8 +2763,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2632,6 +2804,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2663,11 +2838,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2680,9 +2856,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// String in group parameters (optional) /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2722,6 +2899,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter } + localVarRequestOptions.Operation = "FakeApi.TestGroupParameters"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer_test) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -2749,8 +2929,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// - public void TestInlineAdditionalProperties(Dictionary requestBody) + public void TestInlineAdditionalProperties(Dictionary requestBody, int operationIndex = 0) { TestInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -2760,8 +2941,9 @@ public void TestInlineAdditionalProperties(Dictionary requestBod /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody) + public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody, int operationIndex = 0) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2793,6 +2975,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); @@ -2813,11 +2998,12 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2825,9 +3011,10 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// /// Thrown when fails to make API call /// request body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requestBody' is set if (requestBody == null) @@ -2860,6 +3047,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie localVarRequestOptions.Data = requestBody; + localVarRequestOptions.Operation = "FakeApi.TestInlineAdditionalProperties"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2882,8 +3072,9 @@ public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertie /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// - public void TestJsonFormData(string param, string param2) + public void TestJsonFormData(string param, string param2, int operationIndex = 0) { TestJsonFormDataWithHttpInfo(param, param2); } @@ -2894,8 +3085,9 @@ public void TestJsonFormData(string param, string param2) /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2) + public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2, int operationIndex = 0) { // verify the required parameter 'param' is set if (param == null) @@ -2934,6 +3126,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); @@ -2955,11 +3150,12 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); + await TestJsonFormDataWithHttpInfoAsync(param, param2, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2968,9 +3164,10 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// Thrown when fails to make API call /// field1 /// field2 + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'param' is set if (param == null) @@ -3010,6 +3207,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.Operation = "FakeApi.TestJsonFormData"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3035,8 +3235,9 @@ public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo( /// /// /// + /// Index associated with the operation. /// - public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -3050,8 +3251,9 @@ public void TestQueryParameterCollectionFormat(List pipe, List i /// /// /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3110,6 +3312,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/fake/test-query-parameters", localVarRequestOptions, this.Configuration); @@ -3134,11 +3339,12 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -3150,9 +3356,10 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF /// /// /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pipe' is set if (pipe == null) @@ -3212,6 +3419,9 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + localVarRequestOptions.Operation = "FakeApi.TestQueryParameterCollectionFormat"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-parameters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index c2852b36a44b..6b665775253f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -34,8 +34,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - ModelClient TestClassname(ModelClient modelClient); + ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0); /// /// To test class name in snake case @@ -45,8 +46,9 @@ public interface IFakeClassnameTags123ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient); + ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0); #endregion Synchronous Operations } @@ -64,9 +66,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test class name in snake case @@ -76,9 +79,10 @@ public interface IFakeClassnameTags123ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -204,8 +208,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ModelClient - public ModelClient TestClassname(ModelClient modelClient) + public ModelClient TestClassname(ModelClient modelClient, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); return localVarResponse.Data; @@ -216,8 +221,9 @@ public ModelClient TestClassname(ModelClient modelClient) /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// ApiResponse of ModelClient - public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient) + public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient, int operationIndex = 0) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -250,6 +256,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { @@ -275,11 +284,12 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -288,9 +298,10 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf /// /// Thrown when fails to make API call /// client model + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'modelClient' is set if (modelClient == null) @@ -324,6 +335,9 @@ public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInf localVarRequestOptions.Data = modelClient; + localVarRequestOptions.Operation = "FakeClassnameTags123Api.TestClassname"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key_query) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs index b42f2c168bae..562c0f4807f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs @@ -31,8 +31,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void AddPet(Pet pet); + void AddPet(Pet pet, int operationIndex = 0); /// /// Add a new pet to the store @@ -42,16 +43,18 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo(Pet pet); + ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Deletes a pet /// /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Deletes a pet @@ -62,8 +65,9 @@ public interface IPetApiSync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Finds Pets by status /// @@ -72,8 +76,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - List FindPetsByStatus(List status); + List FindPetsByStatus(List status, int operationIndex = 0); /// /// Finds Pets by status @@ -83,8 +88,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo(List status); + ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0); /// /// Finds Pets by tags /// @@ -93,9 +99,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - List FindPetsByTags(List tags); + List FindPetsByTags(List tags, int operationIndex = 0); /// /// Finds Pets by tags @@ -105,9 +112,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo(List tags); + ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0); /// /// Find pet by ID /// @@ -116,8 +124,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - Pet GetPetById(long petId); + Pet GetPetById(long petId, int operationIndex = 0); /// /// Find pet by ID @@ -127,15 +136,17 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo(long petId); + ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0); /// /// Update an existing pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - void UpdatePet(Pet pet); + void UpdatePet(Pet pet, int operationIndex = 0); /// /// Update an existing pet @@ -145,8 +156,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo(Pet pet); + ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Updates a pet in the store with form data /// @@ -154,8 +166,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -167,8 +180,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// uploads an image /// @@ -176,8 +190,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image @@ -189,8 +204,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image (required) /// @@ -198,8 +214,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); /// /// uploads an image (required) @@ -211,8 +228,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); #endregion Synchronous Operations } @@ -230,9 +248,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -242,9 +261,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -254,9 +274,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -267,9 +288,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -278,9 +300,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status @@ -290,9 +313,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags /// @@ -301,10 +325,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags @@ -314,10 +339,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID /// @@ -326,9 +352,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID @@ -338,9 +365,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet /// @@ -349,9 +377,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -361,9 +390,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -374,9 +404,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -388,9 +419,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -401,9 +433,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -415,9 +448,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -428,9 +462,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -442,9 +477,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -570,8 +606,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void AddPet(Pet pet) + public void AddPet(Pet pet, int operationIndex = 0) { AddPetWithHttpInfo(pet); } @@ -581,8 +618,9 @@ public void AddPet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -615,6 +653,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -657,11 +698,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await AddPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -669,9 +711,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -705,6 +748,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -749,8 +795,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -761,8 +808,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -791,6 +839,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -818,11 +869,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); + await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -831,9 +883,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -863,6 +916,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -890,8 +946,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - public List FindPetsByStatus(List status) + public List FindPetsByStatus(List status, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); return localVarResponse.Data; @@ -902,8 +959,9 @@ public List FindPetsByStatus(List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0) { // verify the required parameter 'status' is set if (status == null) @@ -936,6 +994,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -978,11 +1039,12 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -991,9 +1053,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'status' is set if (status == null) @@ -1027,6 +1090,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1070,9 +1136,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - public List FindPetsByTags(List tags) + public List FindPetsByTags(List tags, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); return localVarResponse.Data; @@ -1083,9 +1150,10 @@ public List FindPetsByTags(List tags) /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0) { // verify the required parameter 'tags' is set if (tags == null) @@ -1118,6 +1186,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1160,12 +1231,13 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1174,10 +1246,11 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'tags' is set if (tags == null) @@ -1211,6 +1284,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1254,8 +1330,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - public Pet GetPetById(long petId) + public Pet GetPetById(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1266,8 +1343,9 @@ public Pet GetPetById(long petId) /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId) + public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1294,6 +1372,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1319,11 +1400,12 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1332,9 +1414,10 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1362,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1388,8 +1474,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// - public void UpdatePet(Pet pet) + public void UpdatePet(Pet pet, int operationIndex = 0) { UpdatePetWithHttpInfo(pet); } @@ -1399,8 +1486,9 @@ public void UpdatePet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -1433,6 +1521,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1475,11 +1566,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + await UpdatePetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1487,9 +1579,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1523,6 +1616,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (http_signature_test) required if (this.Configuration.HttpSigningConfiguration != null) { @@ -1568,8 +1664,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1581,8 +1678,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1616,6 +1714,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1644,11 +1745,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1658,9 +1760,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1695,6 +1798,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1724,8 +1830,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1738,8 +1845,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1774,6 +1882,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1802,11 +1913,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1817,9 +1929,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1855,6 +1968,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1884,8 +2000,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1898,8 +2015,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -1937,6 +2055,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1965,11 +2086,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1980,9 +2102,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet /// ID of pet to update /// file to upload /// Additional data to pass to server (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -2021,6 +2144,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.Operation = "PetApi.UploadFileWithRequiredFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs index 7cda385b3b40..63403e7dcdfd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -34,8 +34,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - void DeleteOrder(string orderId); + void DeleteOrder(string orderId, int operationIndex = 0); /// /// Delete purchase order by ID @@ -45,8 +46,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo(string orderId); + ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0); /// /// Returns pet inventories by status /// @@ -54,8 +56,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - Dictionary GetInventory(); + Dictionary GetInventory(int operationIndex = 0); /// /// Returns pet inventories by status @@ -64,8 +67,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo(); + ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0); /// /// Find purchase order by ID /// @@ -74,8 +78,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - Order GetOrderById(long orderId); + Order GetOrderById(long orderId, int operationIndex = 0); /// /// Find purchase order by ID @@ -85,15 +90,17 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo(long orderId); + ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0); /// /// Place an order for a pet /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - Order PlaceOrder(Order order); + Order PlaceOrder(Order order, int operationIndex = 0); /// /// Place an order for a pet @@ -103,8 +110,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo(Order order); + ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0); #endregion Synchronous Operations } @@ -122,9 +130,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete purchase order by ID @@ -134,9 +143,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status /// @@ -144,9 +154,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status @@ -155,9 +166,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID /// @@ -166,9 +178,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID @@ -178,9 +191,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet /// @@ -189,9 +203,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet @@ -201,9 +216,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -329,8 +345,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - public void DeleteOrder(string orderId) + public void DeleteOrder(string orderId, int operationIndex = 0) { DeleteOrderWithHttpInfo(orderId); } @@ -340,8 +357,9 @@ public void DeleteOrder(string orderId) /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId) + public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -372,6 +390,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -392,11 +413,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + await DeleteOrderWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -404,9 +426,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -438,6 +461,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -458,8 +484,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - public Dictionary GetInventory() + public Dictionary GetInventory(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; @@ -469,8 +496,9 @@ public Dictionary GetInventory() /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -495,6 +523,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -519,11 +550,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -531,9 +563,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -559,6 +592,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -585,8 +621,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - public Order GetOrderById(long orderId) + public Order GetOrderById(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -597,8 +634,9 @@ public Order GetOrderById(long orderId) /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId) + public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -625,6 +663,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/store/order/{order_id}", localVarRequestOptions, this.Configuration); @@ -645,11 +686,12 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -658,9 +700,10 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -688,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -709,8 +755,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - public Order PlaceOrder(Order order) + public Order PlaceOrder(Order order, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; @@ -721,8 +768,9 @@ public Order PlaceOrder(Order order) /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order) + public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0) { // verify the required parameter 'order' is set if (order == null) @@ -756,6 +804,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/store/order", localVarRequestOptions, this.Configuration); @@ -776,11 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -789,9 +841,10 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'order' is set if (order == null) @@ -826,6 +879,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs index a1716303f6f3..c37a6501c68a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs @@ -34,8 +34,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - void CreateUser(User user); + void CreateUser(User user, int operationIndex = 0); /// /// Create user @@ -45,15 +46,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(User user); + ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithArrayInput(List user); + void CreateUsersWithArrayInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -63,15 +66,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user); + ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithListInput(List user); + void CreateUsersWithListInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -81,8 +86,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo(List user); + ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0); /// /// Delete user /// @@ -91,8 +97,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - void DeleteUser(string username); + void DeleteUser(string username, int operationIndex = 0); /// /// Delete user @@ -102,15 +109,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo(string username); + ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0); /// /// Get user by user name /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - User GetUserByName(string username); + User GetUserByName(string username, int operationIndex = 0); /// /// Get user by user name @@ -120,16 +129,18 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo(string username); + ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); /// /// Logs user into the system /// /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - string LoginUser(string username, string password); + string LoginUser(string username, string password, int operationIndex = 0); /// /// Logs user into the system @@ -140,14 +151,16 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo(string username, string password); + ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0); /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void LogoutUser(); + void LogoutUser(int operationIndex = 0); /// /// Logs out current logged in user session @@ -156,8 +169,9 @@ public interface IUserApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo(); + ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0); /// /// Updated user /// @@ -167,8 +181,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - void UpdateUser(string username, User user); + void UpdateUser(string username, User user, int operationIndex = 0); /// /// Updated user @@ -179,8 +194,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo(string username, User user); + ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0); #endregion Synchronous Operations } @@ -198,9 +214,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create user @@ -210,9 +227,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -221,9 +239,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -233,9 +252,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -244,9 +264,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -256,9 +277,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user /// @@ -267,9 +289,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user @@ -279,9 +302,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name /// @@ -290,9 +314,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name @@ -302,9 +327,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system /// @@ -314,9 +340,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system @@ -327,9 +354,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session /// @@ -337,9 +365,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session @@ -348,9 +377,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user /// @@ -360,9 +390,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user @@ -373,9 +404,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -501,8 +533,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - public void CreateUser(User user) + public void CreateUser(User user, int operationIndex = 0) { CreateUserWithHttpInfo(user); } @@ -512,8 +545,9 @@ public void CreateUser(User user) /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user) + public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -545,6 +579,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); @@ -565,11 +602,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUserWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -577,9 +615,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -612,6 +651,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -633,8 +675,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithArrayInput(List user) + public void CreateUsersWithArrayInput(List user, int operationIndex = 0) { CreateUsersWithArrayInputWithHttpInfo(user); } @@ -644,8 +687,9 @@ public void CreateUsersWithArrayInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -677,6 +721,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); @@ -697,11 +744,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -709,9 +757,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -744,6 +793,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -765,8 +817,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithListInput(List user) + public void CreateUsersWithListInput(List user, int operationIndex = 0) { CreateUsersWithListInputWithHttpInfo(user); } @@ -776,8 +829,9 @@ public void CreateUsersWithListInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -809,6 +863,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); @@ -829,11 +886,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithListInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -841,9 +899,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -876,6 +935,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -897,8 +959,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - public void DeleteUser(string username) + public void DeleteUser(string username, int operationIndex = 0) { DeleteUserWithHttpInfo(username); } @@ -908,8 +971,9 @@ public void DeleteUser(string username) /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -940,6 +1004,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); @@ -960,11 +1027,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + await DeleteUserWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -972,9 +1040,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1006,6 +1075,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1027,8 +1099,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - public User GetUserByName(string username) + public User GetUserByName(string username, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -1039,8 +1112,9 @@ public User GetUserByName(string username) /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1073,6 +1147,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1093,11 +1170,12 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1106,9 +1184,10 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1142,6 +1221,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1164,8 +1246,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - public string LoginUser(string username, string password) + public string LoginUser(string username, string password, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); return localVarResponse.Data; @@ -1177,8 +1260,9 @@ public string LoginUser(string username, string password) /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password) + public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1218,6 +1302,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/login", localVarRequestOptions, this.Configuration); @@ -1239,11 +1326,12 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1253,9 +1341,10 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1296,6 +1385,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1316,8 +1408,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void LogoutUser() + public void LogoutUser(int operationIndex = 0) { LogoutUserWithHttpInfo(); } @@ -1326,8 +1419,9 @@ public void LogoutUser() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1351,6 +1445,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); @@ -1370,20 +1467,22 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await LogoutUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1408,6 +1507,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1430,8 +1532,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - public void UpdateUser(string username, User user) + public void UpdateUser(string username, User user, int operationIndex = 0) { UpdateUserWithHttpInfo(username, user); } @@ -1442,8 +1545,9 @@ public void UpdateUser(string username, User user) /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user) + public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1482,6 +1586,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1503,11 +1610,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + await UpdateUserWithHttpInfoAsync(username, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1516,9 +1624,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1558,6 +1667,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs index ffb05840d5bb..ca82a98d1902 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -430,9 +430,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -549,9 +550,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -674,7 +676,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -689,7 +691,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -704,7 +706,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -719,7 +721,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -734,7 +736,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -749,7 +751,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -764,7 +766,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -780,7 +782,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -794,7 +796,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -808,7 +810,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -822,7 +824,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -836,7 +838,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -850,7 +852,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -864,7 +866,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Configuration.cs index 8b731bfdc812..56e3a9d13eb5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Configuration.cs @@ -96,6 +96,13 @@ public class Configuration : IReadableConfiguration /// The servers private IList> _servers; + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + /// /// HttpSigning configuration /// @@ -182,6 +189,47 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + { + "PetApi.AddPet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + { + "PetApi.UpdatePet", new List> + { + { + new Dictionary + { + {"url", "http://petstore.swagger.io/v2"}, + {"description", "No description provided"} + } + }, + { + new Dictionary + { + {"url", "http://path-server-test.petstore.local/v2"}, + {"description", "No description provided"} + } + }, + } + }, + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -441,6 +489,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -449,7 +514,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -460,9 +525,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -470,31 +575,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -583,7 +691,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration AccessToken = second.AccessToken ?? first.AccessToken, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 2c22d47296f9..b99a151e5bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs index 68cd16375903..3932047e027a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs index c86eb126fa7f..1a40232b0a9a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs @@ -49,7 +49,8 @@ protected Animal() { } public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Animal and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/AppleReq.cs index 1d6d42dc9b3a..2c77cf1c4142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -45,7 +45,8 @@ protected AppleReq() { } public AppleReq(string cultivar = default(string), bool mealy = default(bool)) { // to ensure "cultivar" is required (not null) - if (cultivar == null) { + if (cultivar == null) + { throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); } this.Cultivar = cultivar; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/BasquePig.cs index 58c8bebce5ec..3be036bde53d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -44,7 +44,8 @@ protected BasquePig() { } public BasquePig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs index fb7778939b46..bb359da38ffc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs @@ -45,7 +45,8 @@ protected Category() { } public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Category and cannot be null"); } this.Name = name; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index ea5a8782d2ae..87cce8a2f1c2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -45,12 +45,14 @@ protected ComplexQuadrilateral() { } public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/DanishPig.cs index 1718d7d43397..d5ae07855103 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -44,7 +44,8 @@ protected DanishPig() { } public DanishPig(string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 48f12495bbf0..bbd3bbdbdf3d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -45,12 +45,14 @@ protected EquilateralTriangle() { } public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs index 586cdcb33db7..551fa8519493 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -60,13 +60,15 @@ protected FormatTest() { } { this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) { + if (_byte == null) + { throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); } this.Byte = _byte; this.Date = date; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); } this.Password = password; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 579beb9a18de..46971ef73d32 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -48,7 +48,8 @@ protected GrandparentAnimal() { } public GrandparentAnimal(string petType = default(string)) { // to ensure "petType" is required (not null) - if (petType == null) { + if (petType == null) + { throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); } this.PetType = petType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 50e7ce4aaa8d..55c607598a6d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -45,12 +45,14 @@ protected IsoscelesTriangle() { } public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Mammal.cs index 68ac31619921..2319eee19d79 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Mammal.cs @@ -37,10 +37,10 @@ public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValida { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Pig. - public Mammal(Pig actualInstance) + /// An instance of Whale. + public Mammal(Whale actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Mammal(Pig actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Whale. - public Mammal(Whale actualInstance) + /// An instance of Zebra. + public Mammal(Zebra actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +61,10 @@ public Mammal(Whale actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Zebra. - public Mammal(Zebra actualInstance) + /// An instance of Pig. + public Mammal(Pig actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -104,16 +104,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, - /// the InvalidClassException will be thrown - /// - /// An instance of Pig - public Pig GetPig() - { - return (Pig)this.ActualInstance; - } - /// /// Get the actual instance of `Whale`. If the actual instance is not `Whale`, /// the InvalidClassException will be thrown @@ -134,6 +124,16 @@ public Zebra GetZebra() return (Zebra)this.ActualInstance; } + /// + /// Get the actual instance of `Pig`. If the actual instance is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableShape.cs index 5dd73a56ef76..fe2057b6bad9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -46,10 +46,10 @@ public NullableShape() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public NullableShape(Quadrilateral actualInstance) + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public NullableShape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public NullableShape(Triangle actualInstance) + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs index f540c101ec6a..dd1651330b89 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs @@ -83,12 +83,14 @@ protected Pet() { } public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this.Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this.PhotoUrls = photoUrls; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs new file mode 100644 index 000000000000..0ce4e18eb2ea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -0,0 +1,383 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// PolymorphicProperty + /// + [JsonConverter(typeof(PolymorphicPropertyJsonConverter))] + [DataContract(Name = "PolymorphicProperty")] + public partial class PolymorphicProperty : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of bool. + public PolymorphicProperty(bool actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of string. + public PolymorphicProperty(string actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Object. + public PolymorphicProperty(Object actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of List<string>. + public PolymorphicProperty(List actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(List)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Object)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(bool)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(string)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: List, Object, bool, string"); + } + } + } + + /// + /// Get the actual instance of `bool`. If the actual instance is not `bool`, + /// the InvalidClassException will be thrown + /// + /// An instance of bool + public bool GetBool() + { + return (bool)this.ActualInstance; + } + + /// + /// Get the actual instance of `string`. If the actual instance is not `string`, + /// the InvalidClassException will be thrown + /// + /// An instance of string + public string GetString() + { + return (string)this.ActualInstance; + } + + /// + /// Get the actual instance of `Object`. If the actual instance is not `Object`, + /// the InvalidClassException will be thrown + /// + /// An instance of Object + public Object GetObject() + { + return (Object)this.ActualInstance; + } + + /// + /// Get the actual instance of `List<string>`. If the actual instance is not `List<string>`, + /// the InvalidClassException will be thrown + /// + /// An instance of List<string> + public List GetListString() + { + return (List)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PolymorphicProperty {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PolymorphicProperty.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PolymorphicProperty + /// + /// JSON string + /// An instance of PolymorphicProperty + public static PolymorphicProperty FromJson(string jsonString) + { + PolymorphicProperty newPolymorphicProperty = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPolymorphicProperty; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(List).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject>(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("List"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into List: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(Object).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("Object"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into Object: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(bool).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("bool"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into bool: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(string).GetProperty("AdditionalProperties") == null) + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.SerializerSettings)); + } + else + { + newPolymorphicProperty = new PolymorphicProperty(JsonConvert.DeserializeObject(jsonString, PolymorphicProperty.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("string"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPolymorphicProperty; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; + } + + /// + /// Returns true if PolymorphicProperty instances are equal + /// + /// Instance of PolymorphicProperty to be compared + /// Boolean + public bool Equals(PolymorphicProperty input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PolymorphicProperty + /// + public class PolymorphicPropertyJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PolymorphicProperty).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PolymorphicProperty.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Quadrilateral.cs index a1a850f169e4..c140a82d6cc3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -37,10 +37,10 @@ public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of ComplexQuadrilateral. - public Quadrilateral(ComplexQuadrilateral actualInstance) + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Quadrilateral(ComplexQuadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of SimpleQuadrilateral. - public Quadrilateral(SimpleQuadrilateral actualInstance) + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of ComplexQuadrilateral - public ComplexQuadrilateral GetComplexQuadrilateral() + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() { - return (ComplexQuadrilateral)this.ActualInstance; + return (SimpleQuadrilateral)this.ActualInstance; } /// - /// Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of SimpleQuadrilateral - public SimpleQuadrilateral GetSimpleQuadrilateral() + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() { - return (SimpleQuadrilateral)this.ActualInstance; + return (ComplexQuadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 09312553eca0..b01295ccc83f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -44,7 +44,8 @@ protected QuadrilateralInterface() { } public QuadrilateralInterface(string quadrilateralType = default(string)) { // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index f9dd3abd817d..660acca3ff21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -45,12 +45,14 @@ protected ScaleneTriangle() { } public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); } this.ShapeType = shapeType; // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Shape.cs index dd74fa4b7184..3e719b226cb7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Shape.cs @@ -37,10 +37,10 @@ public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidata { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public Shape(Quadrilateral actualInstance) + /// An instance of Triangle. + public Shape(Triangle actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +49,10 @@ public Shape(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public Shape(Triangle actualInstance) + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +89,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 00642181a1fc..61c346de3460 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -44,7 +44,8 @@ protected ShapeInterface() { } public ShapeInterface(string shapeType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); } this.ShapeType = shapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index c6b87c89751a..b615fc43dd86 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -46,10 +46,10 @@ public ShapeOrNull() /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Quadrilateral. - public ShapeOrNull(Quadrilateral actualInstance) + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -58,10 +58,10 @@ public ShapeOrNull(Quadrilateral actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of Triangle. - public ShapeOrNull(Triangle actualInstance) + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) { this.IsNullable = true; this.SchemaType= "oneOf"; @@ -98,23 +98,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, /// the InvalidClassException will be thrown /// - /// An instance of Quadrilateral - public Quadrilateral GetQuadrilateral() + /// An instance of Triangle + public Triangle GetTriangle() { - return (Quadrilateral)this.ActualInstance; + return (Triangle)this.ActualInstance; } /// - /// Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + /// Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, /// the InvalidClassException will be thrown /// - /// An instance of Triangle - public Triangle GetTriangle() + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() { - return (Triangle)this.ActualInstance; + return (Quadrilateral)this.ActualInstance; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 14fe11a65296..916bb0972a7d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -45,12 +45,14 @@ protected SimpleQuadrilateral() { } public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) { // to ensure "shapeType" is required (not null) - if (shapeType == null) { + if (shapeType == null) + { throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); } this.ShapeType = shapeType; // to ensure "quadrilateralType" is required (not null) - if (quadrilateralType == null) { + if (quadrilateralType == null) + { throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); } this.QuadrilateralType = quadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TriangleInterface.cs index 6eec5e9b9359..260ec9b60375 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -44,7 +44,8 @@ protected TriangleInterface() { } public TriangleInterface(string triangleType = default(string)) { // to ensure "triangleType" is required (not null) - if (triangleType == null) { + if (triangleType == null) + { throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); } this.TriangleType = triangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Whale.cs index 74df24d5a8f5..fa418f0c131e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Whale.cs @@ -46,7 +46,8 @@ protected Whale() { } public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Whale and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs index 4fb60ed8ddf2..aab75e9cd568 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Zebra.cs @@ -80,7 +80,8 @@ protected Zebra() public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() { // to ensure "className" is required (not null) - if (className == null) { + if (className == null) + { throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); } this.ClassName = className; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs index 3912ab8d5f76..b872f7a24968 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs @@ -31,8 +31,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Pet - Pet AddPet(Pet pet); + Pet AddPet(Pet pet, int operationIndex = 0); /// /// Add a new pet to the store @@ -42,16 +43,18 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse AddPetWithHttpInfo(Pet pet); + ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Deletes a pet /// /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string)); + void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Deletes a pet @@ -62,8 +65,9 @@ public interface IPetApiSync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)); + ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); /// /// Finds Pets by status /// @@ -72,8 +76,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - List FindPetsByStatus(List status); + List FindPetsByStatus(List status, int operationIndex = 0); /// /// Finds Pets by status @@ -83,8 +88,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo(List status); + ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0); /// /// Finds Pets by tags /// @@ -93,9 +99,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - List FindPetsByTags(List tags); + List FindPetsByTags(List tags, int operationIndex = 0); /// /// Finds Pets by tags @@ -105,9 +112,10 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo(List tags); + ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0); /// /// Find pet by ID /// @@ -116,8 +124,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - Pet GetPetById(long petId); + Pet GetPetById(long petId, int operationIndex = 0); /// /// Find pet by ID @@ -127,15 +136,17 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo(long petId); + ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0); /// /// Update an existing pet /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Pet - Pet UpdatePet(Pet pet); + Pet UpdatePet(Pet pet, int operationIndex = 0); /// /// Update an existing pet @@ -145,8 +156,9 @@ public interface IPetApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Pet - ApiResponse UpdatePetWithHttpInfo(Pet pet); + ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0); /// /// Updates a pet in the store with form data /// @@ -154,8 +166,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)); + void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -167,8 +180,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); /// /// uploads an image /// @@ -176,8 +190,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); /// /// uploads an image @@ -189,8 +204,9 @@ public interface IPetApiSync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); #endregion Synchronous Operations } @@ -208,9 +224,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -220,9 +237,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -232,9 +250,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -245,9 +264,10 @@ public interface IPetApiAsync : IApiAccessor /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -256,9 +276,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status @@ -268,9 +289,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags /// @@ -279,10 +301,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by tags @@ -292,10 +315,11 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID /// @@ -304,9 +328,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find pet by ID @@ -316,9 +341,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet /// @@ -327,9 +353,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -339,9 +366,10 @@ public interface IPetApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -352,9 +380,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -366,9 +395,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -379,9 +409,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -393,9 +424,10 @@ public interface IPetApiAsync : IApiAccessor /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -521,8 +553,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Pet - public Pet AddPet(Pet pet) + public Pet AddPet(Pet pet, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = AddPetWithHttpInfo(pet); return localVarResponse.Data; @@ -533,8 +566,9 @@ public Pet AddPet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -569,6 +603,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -595,11 +632,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await AddPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -608,9 +646,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -646,6 +685,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.AddPet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -674,8 +716,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string)) + public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -686,8 +729,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string)) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -716,6 +760,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -743,11 +790,12 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); + await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -756,9 +804,10 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// Thrown when fails to make API call /// Pet id to delete /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -788,6 +837,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter } + localVarRequestOptions.Operation = "PetApi.DeletePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -815,8 +867,9 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// List<Pet> - public List FindPetsByStatus(List status) + public List FindPetsByStatus(List status, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); return localVarResponse.Data; @@ -827,8 +880,9 @@ public List FindPetsByStatus(List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// ApiResponse of List<Pet> - public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpInfo(List status, int operationIndex = 0) { // verify the required parameter 'status' is set if (status == null) @@ -861,6 +915,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -887,11 +944,12 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -900,9 +958,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync(List status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'status' is set if (status == null) @@ -936,6 +995,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + localVarRequestOptions.Operation = "PetApi.FindPetsByStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -963,9 +1025,10 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// List<Pet> [Obsolete] - public List FindPetsByTags(List tags) + public List FindPetsByTags(List tags, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); return localVarResponse.Data; @@ -976,9 +1039,10 @@ public List FindPetsByTags(List tags) /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// ApiResponse of List<Pet> [Obsolete] - public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags) + public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo(List tags, int operationIndex = 0) { // verify the required parameter 'tags' is set if (tags == null) @@ -1011,6 +1075,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1037,12 +1104,13 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Pet> [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1051,10 +1119,11 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// Tags to filter by + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Pet>) [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync(List tags, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'tags' is set if (tags == null) @@ -1088,6 +1157,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + localVarRequestOptions.Operation = "PetApi.FindPetsByTags"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1115,8 +1187,9 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Pet - public Pet GetPetById(long petId) + public Pet GetPetById(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1127,8 +1200,9 @@ public Pet GetPetById(long petId) /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId) + public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1155,6 +1229,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1180,11 +1257,12 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1193,9 +1271,10 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// ID of pet to return + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync(long petId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1223,6 +1302,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.Operation = "PetApi.GetPetById"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1249,8 +1331,9 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Pet - public Pet UpdatePet(Pet pet) + public Pet UpdatePet(Pet pet, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UpdatePetWithHttpInfo(pet); return localVarResponse.Data; @@ -1261,8 +1344,9 @@ public Pet UpdatePet(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet, int operationIndex = 0) { // verify the required parameter 'pet' is set if (pet == null) @@ -1297,6 +1381,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1323,11 +1410,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Pet - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UpdatePetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1336,9 +1424,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1374,6 +1463,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) localVarRequestOptions.Data = pet; + localVarRequestOptions.Operation = "PetApi.UpdatePet"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1403,8 +1495,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string)) + public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1416,8 +1509,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string)) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1451,6 +1545,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1479,11 +1576,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1493,9 +1591,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet that needs to be updated /// Updated name of the pet (optional) /// Updated status of the pet (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1530,6 +1629,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } + localVarRequestOptions.Operation = "PetApi.UpdatePetWithForm"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1559,8 +1661,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1573,8 +1676,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1609,6 +1713,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1637,11 +1744,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1652,9 +1760,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) /// ID of pet to update /// Additional data to pass to server (optional) /// file to upload (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1690,6 +1799,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) localVarRequestOptions.FileParameters.Add("file", file); } + localVarRequestOptions.Operation = "PetApi.UploadFile"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (petstore_auth) required // oauth required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs index 81a9795bedf9..7cc9c9610a24 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs @@ -34,8 +34,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - void DeleteOrder(string orderId); + void DeleteOrder(string orderId, int operationIndex = 0); /// /// Delete purchase order by ID @@ -45,8 +46,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo(string orderId); + ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0); /// /// Returns pet inventories by status /// @@ -54,8 +56,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - Dictionary GetInventory(); + Dictionary GetInventory(int operationIndex = 0); /// /// Returns pet inventories by status @@ -64,8 +67,9 @@ public interface IStoreApiSync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo(); + ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0); /// /// Find purchase order by ID /// @@ -74,8 +78,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - Order GetOrderById(long orderId); + Order GetOrderById(long orderId, int operationIndex = 0); /// /// Find purchase order by ID @@ -85,15 +90,17 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo(long orderId); + ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0); /// /// Place an order for a pet /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - Order PlaceOrder(Order order); + Order PlaceOrder(Order order, int operationIndex = 0); /// /// Place an order for a pet @@ -103,8 +110,9 @@ public interface IStoreApiSync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo(Order order); + ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0); #endregion Synchronous Operations } @@ -122,9 +130,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete purchase order by ID @@ -134,9 +143,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status /// @@ -144,9 +154,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Returns pet inventories by status @@ -155,9 +166,10 @@ public interface IStoreApiAsync : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID /// @@ -166,9 +178,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Find purchase order by ID @@ -178,9 +191,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet /// @@ -189,9 +203,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Place an order for a pet @@ -201,9 +216,10 @@ public interface IStoreApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -329,8 +345,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// - public void DeleteOrder(string orderId) + public void DeleteOrder(string orderId, int operationIndex = 0) { DeleteOrderWithHttpInfo(orderId); } @@ -340,8 +357,9 @@ public void DeleteOrder(string orderId) /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId) + public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(string orderId, int operationIndex = 0) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -372,6 +390,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/store/order/{orderId}", localVarRequestOptions, this.Configuration); @@ -392,11 +413,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + await DeleteOrderWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -404,9 +426,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync(string orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -438,6 +461,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.DeleteOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{orderId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -458,8 +484,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteOrderWithHttpInfo(strin /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Dictionary<string, int> - public Dictionary GetInventory() + public Dictionary GetInventory(int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; @@ -469,8 +496,9 @@ public Dictionary GetInventory() /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Dictionary<string, int> - public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse> GetInventoryWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -495,6 +523,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -519,11 +550,12 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInventoryAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -531,9 +563,10 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -559,6 +592,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory } + localVarRequestOptions.Operation = "StoreApi.GetInventory"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -585,8 +621,9 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Order - public Order GetOrderById(long orderId) + public Order GetOrderById(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -597,8 +634,9 @@ public Order GetOrderById(long orderId) /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId) + public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -625,6 +663,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/store/order/{orderId}", localVarRequestOptions, this.Configuration); @@ -645,11 +686,12 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -658,9 +700,10 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -688,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.Operation = "StoreApi.GetOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{orderId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -709,8 +755,9 @@ public Org.OpenAPITools.Client.ApiResponse GetOrderByIdWithHttpInfo(long /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Order - public Order PlaceOrder(Order order) + public Order PlaceOrder(Order order, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); return localVarResponse.Data; @@ -721,8 +768,9 @@ public Order PlaceOrder(Order order) /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order) + public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order order, int operationIndex = 0) { // verify the required parameter 'order' is set if (order == null) @@ -756,6 +804,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/store/order", localVarRequestOptions, this.Configuration); @@ -776,11 +827,12 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -789,9 +841,10 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o /// /// Thrown when fails to make API call /// order placed for purchasing the pet + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync(Order order, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'order' is set if (order == null) @@ -826,6 +879,9 @@ public Org.OpenAPITools.Client.ApiResponse PlaceOrderWithHttpInfo(Order o localVarRequestOptions.Data = order; + localVarRequestOptions.Operation = "StoreApi.PlaceOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/UserApi.cs index 907a252179d6..207dda93c6cc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/UserApi.cs @@ -34,8 +34,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - void CreateUser(User user); + void CreateUser(User user, int operationIndex = 0); /// /// Create user @@ -45,15 +46,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(User user); + ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithArrayInput(List user); + void CreateUsersWithArrayInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -63,15 +66,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user); + ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0); /// /// Creates list of users with given input array /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - void CreateUsersWithListInput(List user); + void CreateUsersWithListInput(List user, int operationIndex = 0); /// /// Creates list of users with given input array @@ -81,8 +86,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo(List user); + ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0); /// /// Delete user /// @@ -91,8 +97,9 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - void DeleteUser(string username); + void DeleteUser(string username, int operationIndex = 0); /// /// Delete user @@ -102,15 +109,17 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo(string username); + ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0); /// /// Get user by user name /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - User GetUserByName(string username); + User GetUserByName(string username, int operationIndex = 0); /// /// Get user by user name @@ -120,16 +129,18 @@ public interface IUserApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo(string username); + ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); /// /// Logs user into the system /// /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - string LoginUser(string username, string password); + string LoginUser(string username, string password, int operationIndex = 0); /// /// Logs user into the system @@ -140,14 +151,16 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo(string username, string password); + ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0); /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void LogoutUser(); + void LogoutUser(int operationIndex = 0); /// /// Logs out current logged in user session @@ -156,8 +169,9 @@ public interface IUserApiSync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo(); + ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0); /// /// Updated user /// @@ -167,8 +181,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - void UpdateUser(string username, User user); + void UpdateUser(string username, User user, int operationIndex = 0); /// /// Updated user @@ -179,8 +194,9 @@ public interface IUserApiSync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo(string username, User user); + ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0); #endregion Synchronous Operations } @@ -198,9 +214,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create user @@ -210,9 +227,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -221,9 +239,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -233,9 +252,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array /// @@ -244,9 +264,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates list of users with given input array @@ -256,9 +277,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user /// @@ -267,9 +289,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete user @@ -279,9 +302,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name /// @@ -290,9 +314,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get user by user name @@ -302,9 +327,10 @@ public interface IUserApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system /// @@ -314,9 +340,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs user into the system @@ -327,9 +354,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session /// @@ -337,9 +365,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logs out current logged in user session @@ -348,9 +377,10 @@ public interface IUserApiAsync : IApiAccessor /// /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user /// @@ -360,9 +390,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updated user @@ -373,9 +404,10 @@ public interface IUserApiAsync : IApiAccessor /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -501,8 +533,9 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// - public void CreateUser(User user) + public void CreateUser(User user, int operationIndex = 0) { CreateUserWithHttpInfo(user); } @@ -512,8 +545,9 @@ public void CreateUser(User user) /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user) + public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -545,6 +579,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -570,11 +607,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUserAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUserWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -582,9 +620,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// Created user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -617,6 +656,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -643,8 +685,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUserWithHttpInfo(User u /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithArrayInput(List user) + public void CreateUsersWithArrayInput(List user, int operationIndex = 0) { CreateUsersWithArrayInputWithHttpInfo(user); } @@ -654,8 +697,9 @@ public void CreateUsersWithArrayInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -687,6 +731,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -712,11 +759,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -724,9 +772,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -759,6 +808,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithArrayInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -785,8 +837,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithArrayInputWith /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// - public void CreateUsersWithListInput(List user) + public void CreateUsersWithListInput(List user, int operationIndex = 0) { CreateUsersWithListInputWithHttpInfo(user); } @@ -796,8 +849,9 @@ public void CreateUsersWithListInput(List user) /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user) + public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithHttpInfo(List user, int operationIndex = 0) { // verify the required parameter 'user' is set if (user == null) @@ -829,6 +883,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -854,11 +911,12 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); + await CreateUsersWithListInputWithHttpInfoAsync(user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -866,9 +924,10 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// List of user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync(List user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'user' is set if (user == null) @@ -901,6 +960,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.CreateUsersWithListInput"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -927,8 +989,9 @@ public Org.OpenAPITools.Client.ApiResponse CreateUsersWithListInputWithH /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// - public void DeleteUser(string username) + public void DeleteUser(string username, int operationIndex = 0) { DeleteUserWithHttpInfo(username); } @@ -938,8 +1001,9 @@ public void DeleteUser(string username) /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -970,6 +1034,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -995,11 +1062,12 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + await DeleteUserWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1007,9 +1075,10 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be deleted + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1041,6 +1110,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.DeleteUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1067,8 +1139,9 @@ public Org.OpenAPITools.Client.ApiResponse DeleteUserWithHttpInfo(string /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// User - public User GetUserByName(string username) + public User GetUserByName(string username, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -1079,8 +1152,9 @@ public User GetUserByName(string username) /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// ApiResponse of User - public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username) + public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1113,6 +1187,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1133,11 +1210,12 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1146,9 +1224,10 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1182,6 +1261,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Operation = "UserApi.GetUserByName"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1204,8 +1286,9 @@ public Org.OpenAPITools.Client.ApiResponse GetUserByNameWithHttpInfo(strin /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// string - public string LoginUser(string username, string password) + public string LoginUser(string username, string password, int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); return localVarResponse.Data; @@ -1217,8 +1300,9 @@ public string LoginUser(string username, string password) /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password) + public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string username, string password, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1258,6 +1342,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/user/login", localVarRequestOptions, this.Configuration); @@ -1279,11 +1366,12 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1293,9 +1381,10 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Thrown when fails to make API call /// The user name for login /// The password for login in clear text + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync(string username, string password, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1336,6 +1425,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); + localVarRequestOptions.Operation = "UserApi.LoginUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1356,8 +1448,9 @@ public Org.OpenAPITools.Client.ApiResponse LoginUserWithHttpInfo(string /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void LogoutUser() + public void LogoutUser(int operationIndex = 0) { LogoutUserWithHttpInfo(); } @@ -1366,8 +1459,9 @@ public void LogoutUser() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() + public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo(int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1391,6 +1485,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1415,20 +1512,22 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await LogoutUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// Logs out current logged in user session /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1453,6 +1552,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() } + localVarRequestOptions.Operation = "UserApi.LogoutUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1480,8 +1582,9 @@ public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo() /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// - public void UpdateUser(string username, User user) + public void UpdateUser(string username, User user, int operationIndex = 0) { UpdateUserWithHttpInfo(username, user); } @@ -1492,8 +1595,9 @@ public void UpdateUser(string username, User user) /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user) + public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string username, User user, int operationIndex = 0) { // verify the required parameter 'username' is set if (username == null) @@ -1532,6 +1636,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { @@ -1558,11 +1665,12 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + await UpdateUserWithHttpInfoAsync(username, user, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1571,9 +1679,10 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string /// Thrown when fails to make API call /// name that need to be deleted /// Updated user object + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string username, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) @@ -1613,6 +1722,9 @@ public Org.OpenAPITools.Client.ApiResponse UpdateUserWithHttpInfo(string localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; + localVarRequestOptions.Operation = "UserApi.UpdateUser"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (api_key) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs index bf0d74136153..e14098e80ac2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs @@ -429,9 +429,10 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -548,9 +549,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(baseUrl); client.ClearHandlers(); var existingDeserializer = req.JsonSerializer as IDeserializer; @@ -673,7 +675,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -688,7 +690,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -703,7 +705,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -718,7 +720,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -733,7 +735,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -748,7 +750,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -763,7 +765,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -779,7 +781,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -793,7 +795,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -807,7 +809,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -821,7 +823,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -835,7 +837,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -849,7 +851,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -863,7 +865,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/Configuration.cs index 897d5a1c666a..f78ad83459cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/Configuration.cs @@ -90,6 +90,13 @@ public class Configuration : IReadableConfiguration /// /// The servers private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + #endregion Private Members #region Constructors @@ -115,6 +122,9 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -374,6 +384,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -382,7 +409,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -393,9 +420,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -403,31 +470,34 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; @@ -506,7 +576,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, }; return config; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index cd8f3fdb1f37..ab9e74560486 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -99,6 +99,12 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -106,6 +112,14 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs index b21e8c5ffcdd..a4cca0b5b17c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -53,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Pet.cs index 0416d758d6f0..3ebe0c561def 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Pet.cs @@ -84,12 +84,14 @@ protected Pet() { } public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for Pet and cannot be null"); } this.Name = name; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) { + if (photoUrls == null) + { throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null"); } this.PhotoUrls = photoUrls; diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES index 3ed897cd208b..748620a28b08 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES @@ -5,6 +5,7 @@ README.md build.bat build.sh docs/AdditionalPropertiesClass.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ApiResponse.md @@ -52,6 +53,7 @@ docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md docs/Return.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md @@ -77,6 +79,7 @@ src/Org.OpenAPITools/Client/IApiAccessor.cs src/Org.OpenAPITools/Client/IReadableConfiguration.cs src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -119,6 +122,7 @@ src/Org.OpenAPITools/Model/OuterObjectWithEnumProperty.cs src/Org.OpenAPITools/Model/Pet.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/Return.cs +src/Org.OpenAPITools/Model/SingleRefType.cs src/Org.OpenAPITools/Model/SpecialModelName.cs src/Org.OpenAPITools/Model/Tag.cs src/Org.OpenAPITools/Model/User.cs diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index 56990e9348f8..9b31b8cb9f50 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Model.AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -193,6 +194,7 @@ Class | Method | HTTP request | Description - [Model.Pet](docs/Pet.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.Return](docs/Return.md) + - [Model.SingleRefType](docs/SingleRefType.md) - [Model.SpecialModelName](docs/SpecialModelName.md) - [Model.Tag](docs/Tag.md) - [Model.User](docs/User.md) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AllOfWithSingleRef.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AllOfWithSingleRef.md new file mode 100644 index 000000000000..308b1018e700 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + +# Org.OpenAPITools.Model.AllOfWithSingleRef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | [optional] +**SingleRefType** | **SingleRefType** | | [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/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index 93a9e0afbf0d..426116d6367d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -953,7 +953,7 @@ void (empty response body) ## TestEnumParameters -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumQueryModelArray = null, List enumFormStringArray = null, string enumFormString = null) To test enum parameters @@ -982,13 +982,14 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryModelArray = new List(); // List | (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -1012,6 +1013,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/SingleRefType.md b/samples/client/petstore/csharp/OpenAPIClient/docs/SingleRefType.md new file mode 100644 index 000000000000..1feba3b93cf4 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/SingleRefType.md @@ -0,0 +1,12 @@ + +# Org.OpenAPITools.Model.SingleRefType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AllOfWithSingleRefTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AllOfWithSingleRefTests.cs new file mode 100644 index 000000000000..71e6c77a6429 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AllOfWithSingleRefTests.cs @@ -0,0 +1,87 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing AllOfWithSingleRef + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AllOfWithSingleRefTests + { + // TODO uncomment below to declare an instance variable for AllOfWithSingleRef + //private AllOfWithSingleRef instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfWithSingleRef + //instance = new AllOfWithSingleRef(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfWithSingleRef + /// + [Test] + public void AllOfWithSingleRefInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" AllOfWithSingleRef + //Assert.IsInstanceOf(typeof(AllOfWithSingleRef), instance); + } + + + /// + /// Test the property 'Username' + /// + [Test] + public void UsernameTest() + { + // TODO unit test for the property 'Username' + } + /// + /// Test the property 'SingleRefType' + /// + [Test] + public void SingleRefTypeTest() + { + // TODO unit test for the property 'SingleRefType' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SingleRefTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SingleRefTypeTests.cs new file mode 100644 index 000000000000..ed509fa075fc --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SingleRefTypeTests.cs @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing SingleRefType + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SingleRefTypeTests + { + // TODO uncomment below to declare an instance variable for SingleRefType + //private SingleRefType instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SingleRefType + //instance = new SingleRefType(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SingleRefType + /// + [Test] + public void SingleRefTypeInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" SingleRefType + //Assert.IsInstanceOf(typeof(SingleRefType), instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index a5ee50030153..f8008a03ec63 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -199,7 +199,7 @@ public interface IFakeApi : IApiAccessor /// /// /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -210,7 +210,7 @@ public interface IFakeApi : IApiAccessor /// /// /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -240,10 +240,10 @@ public interface IFakeApi : IApiAccessor /// ApiResponse of Object(void) ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User user); /// - /// To test \"client\" model + /// To test \"client\" model /// /// - /// To test \"client\" model + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -251,10 +251,10 @@ public interface IFakeApi : IApiAccessor ModelClient TestClientModel (ModelClient modelClient); /// - /// To test \"client\" model + /// To test \"client\" model /// /// - /// To test \"client\" model + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -320,10 +320,11 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -338,10 +339,11 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -642,7 +644,7 @@ public interface IFakeApi : IApiAccessor /// /// /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -654,7 +656,7 @@ public interface IFakeApi : IApiAccessor /// /// /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -687,10 +689,10 @@ public interface IFakeApi : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User user, CancellationToken cancellationToken = default(CancellationToken)); /// - /// To test \"client\" model + /// To test \"client\" model /// /// - /// To test \"client\" model + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -702,7 +704,7 @@ public interface IFakeApi : IApiAccessor /// To test \"client\" model /// /// - /// To test \"client\" model + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -771,11 +773,12 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); /// /// To test enum parameters @@ -790,11 +793,12 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -2187,7 +2191,7 @@ public ApiResponse TestBodyWithBinaryWithHttpInfo (System.IO.Stream body } /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -2198,7 +2202,7 @@ public void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass) } /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -2259,7 +2263,7 @@ public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestCla } /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -2272,7 +2276,7 @@ public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestCla } /// - /// For this test, the body for this request must reference a schema named `File`. + /// For this test, the body for this request must reference a schema named `File`. /// /// Thrown when fails to make API call /// @@ -2493,7 +2497,7 @@ public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, Us } /// - /// To test \"client\" model To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -2505,7 +2509,7 @@ public ModelClient TestClientModel (ModelClient modelClient) } /// - /// To test \"client\" model To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -2567,7 +2571,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl } /// - /// To test \"client\" model To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -2581,7 +2585,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl } /// - /// To test \"client\" model To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -2894,12 +2898,13 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)) { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } /// @@ -2912,10 +2917,11 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "/fake"; @@ -2943,6 +2949,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter + if (enumQueryModelArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "enum_query_model_array", enumQueryModelArray)); // query parameter if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter @@ -2977,13 +2984,14 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, cancellationToken); } @@ -2997,11 +3005,12 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// (optional) /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) { var localVarPath = "/fake"; @@ -3029,6 +3038,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter + if (enumQueryModelArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "enum_query_model_array", enumQueryModelArray)); // query parameter if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index af3d41b729c3..e6183cf62120 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -77,7 +77,7 @@ public interface IPetApi : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) - /// List<Pet> + /// List List FindPetsByStatus (List status); /// @@ -88,7 +88,7 @@ public interface IPetApi : IApiAccessor /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) - /// ApiResponse of List<Pet> + /// ApiResponse of List ApiResponse> FindPetsByStatusWithHttpInfo (List status); /// /// Finds Pets by tags @@ -98,7 +98,7 @@ public interface IPetApi : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by - /// List<Pet> + /// List [Obsolete] List FindPetsByTags (List tags); @@ -110,7 +110,7 @@ public interface IPetApi : IApiAccessor /// /// Thrown when fails to make API call /// Tags to filter by - /// ApiResponse of List<Pet> + /// ApiResponse of List [Obsolete] ApiResponse> FindPetsByTagsWithHttpInfo (List tags); /// @@ -289,7 +289,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> + /// Task of List System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -312,7 +312,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// Tags to filter by /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> + /// Task of List [Obsolete] System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); @@ -881,7 +881,7 @@ public ApiResponse AddPetWithHttpInfo (Pet pet) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) - /// List<Pet> + /// List public List FindPetsByStatus (List status) { ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); @@ -893,7 +893,7 @@ public List FindPetsByStatus (List status) /// /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) - /// ApiResponse of List<Pet> + /// ApiResponse of List public ApiResponse> FindPetsByStatusWithHttpInfo (List status) { // verify the required parameter 'status' is set @@ -955,7 +955,7 @@ public ApiResponse> FindPetsByStatusWithHttpInfo (List status) /// Thrown when fails to make API call /// Status values that need to be considered for filter (deprecated) /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> + /// Task of List public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); @@ -1030,7 +1030,7 @@ public ApiResponse> FindPetsByStatusWithHttpInfo (List status) /// /// Thrown when fails to make API call /// Tags to filter by - /// List<Pet> + /// List [Obsolete] public List FindPetsByTags (List tags) { @@ -1043,7 +1043,7 @@ public List FindPetsByTags (List tags) /// /// Thrown when fails to make API call /// Tags to filter by - /// ApiResponse of List<Pet> + /// ApiResponse of List [Obsolete] public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) { @@ -1106,7 +1106,7 @@ public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) /// Thrown when fails to make API call /// Tags to filter by /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> + /// Task of List [Obsolete] public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) { diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index 33dc15acd833..576706c3d2c0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -29,7 +29,7 @@ public interface IStoreApi : IApiAccessor /// Delete purchase order by ID /// /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -40,7 +40,7 @@ public interface IStoreApi : IApiAccessor /// Delete purchase order by ID /// /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -53,7 +53,7 @@ public interface IStoreApi : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Dictionary<string, int> + /// Dictionary Dictionary GetInventory (); /// @@ -63,13 +63,13 @@ public interface IStoreApi : IApiAccessor /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> + /// ApiResponse of Dictionary ApiResponse> GetInventoryWithHttpInfo (); /// /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ public interface IStoreApi : IApiAccessor /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -113,7 +113,7 @@ public interface IStoreApi : IApiAccessor /// Delete purchase order by ID /// /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -125,7 +125,7 @@ public interface IStoreApi : IApiAccessor /// Delete purchase order by ID /// /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -140,7 +140,7 @@ public interface IStoreApi : IApiAccessor /// /// Thrown when fails to make API call /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> + /// Task of Dictionary System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)); /// @@ -157,7 +157,7 @@ public interface IStoreApi : IApiAccessor /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -169,7 +169,7 @@ public interface IStoreApi : IApiAccessor /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -311,7 +311,7 @@ public void AddDefaultHeader(string key, string value) } /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -322,7 +322,7 @@ public void DeleteOrder (string orderId) } /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -375,7 +375,7 @@ public ApiResponse DeleteOrderWithHttpInfo (string orderId) } /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -388,7 +388,7 @@ public ApiResponse DeleteOrderWithHttpInfo (string orderId) } /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call /// ID of the order that needs to be deleted @@ -445,7 +445,7 @@ public ApiResponse DeleteOrderWithHttpInfo (string orderId) /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Dictionary<string, int> + /// Dictionary public Dictionary GetInventory () { ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); @@ -456,7 +456,7 @@ public Dictionary GetInventory () /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> + /// ApiResponse of Dictionary public ApiResponse> GetInventoryWithHttpInfo () { @@ -511,7 +511,7 @@ public ApiResponse> GetInventoryWithHttpInfo () /// /// Thrown when fails to make API call /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> + /// Task of Dictionary public async System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); @@ -575,7 +575,7 @@ public ApiResponse> GetInventoryWithHttpInfo () } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -587,7 +587,7 @@ public Order GetOrderById (long orderId) } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -642,7 +642,7 @@ public ApiResponse GetOrderByIdWithHttpInfo (long orderId) } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -656,7 +656,7 @@ public ApiResponse GetOrderByIdWithHttpInfo (long orderId) } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs new file mode 100644 index 000000000000..dcd135e949df --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs @@ -0,0 +1,141 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// AllOfWithSingleRef + /// + [DataContract] + public partial class AllOfWithSingleRef : IEquatable, IValidatableObject + { + /// + /// Gets or Sets SingleRefType + /// + [DataMember(Name="SingleRefType", EmitDefaultValue=true)] + public SingleRefType? SingleRefType { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// username. + /// singleRefType. + public AllOfWithSingleRef(string username = default(string), SingleRefType? singleRefType = default(SingleRefType?)) + { + this.SingleRefType = singleRefType; + this.Username = username; + this.SingleRefType = singleRefType; + } + + /// + /// Gets or Sets Username + /// + [DataMember(Name="username", EmitDefaultValue=false)] + public string Username { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfWithSingleRef {\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" SingleRefType: ").Append(SingleRefType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfWithSingleRef); + } + + /// + /// Returns true if AllOfWithSingleRef instances are equal + /// + /// Instance of AllOfWithSingleRef to be compared + /// Boolean + public bool Equals(AllOfWithSingleRef input) + { + if (input == null) + return false; + + return + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && + ( + this.SingleRefType == input.SingleRefType || + (this.SingleRefType != null && + this.SingleRefType.Equals(input.SingleRefType)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Username != null) + hashCode = hashCode * 59 + this.Username.GetHashCode(); + if (this.SingleRefType != null) + hashCode = hashCode * 59 + this.SingleRefType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SingleRefType.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SingleRefType.cs new file mode 100644 index 000000000000..1c907fc1c0d6 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SingleRefType.cs @@ -0,0 +1,49 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// Defines SingleRefType + /// + + [JsonConverter(typeof(StringEnumConverter))] + + public enum SingleRefType + { + /// + /// Enum Admin for value: admin + /// + [EnumMember(Value = "admin")] + Admin = 1, + + /// + /// Enum User for value: user + /// + [EnumMember(Value = "user")] + User = 2 + + } + +} diff --git a/samples/client/petstore/elixir/.openapi-generator/FILES b/samples/client/petstore/elixir/.openapi-generator/FILES index aa063a4af9e6..22d942b9d92c 100644 --- a/samples/client/petstore/elixir/.openapi-generator/FILES +++ b/samples/client/petstore/elixir/.openapi-generator/FILES @@ -12,6 +12,7 @@ lib/openapi_petstore/connection.ex lib/openapi_petstore/deserializer.ex lib/openapi_petstore/model/_special_model_name_.ex lib/openapi_petstore/model/additional_properties_class.ex +lib/openapi_petstore/model/all_of_with_single_ref.ex lib/openapi_petstore/model/animal.ex lib/openapi_petstore/model/api_response.ex lib/openapi_petstore/model/array_of_array_of_number_only.ex @@ -54,6 +55,7 @@ lib/openapi_petstore/model/outer_object_with_enum_property.ex lib/openapi_petstore/model/pet.ex lib/openapi_petstore/model/read_only_first.ex lib/openapi_petstore/model/return.ex +lib/openapi_petstore/model/single_ref_type.ex lib/openapi_petstore/model/tag.ex lib/openapi_petstore/model/user.ex lib/openapi_petstore/request_builder.ex diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index c0e3c984c356..1bf34def2343 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -391,6 +391,7 @@ defmodule OpenapiPetstore.Api.Fake do - :enum_query_string (String.t): Query parameter enum test (string) - :enum_query_integer (integer()): Query parameter enum test (double) - :enum_query_double (float()): Query parameter enum test (double) + - :enum_query_model_array ([OpenapiPetstore.Model.EnumClass.t]): - :enum_form_string_array ([String.t]): Form parameter enum test (string array) - :enum_form_string (String.t): Form parameter enum test (string) ## Returns @@ -407,6 +408,7 @@ defmodule OpenapiPetstore.Api.Fake do :"enum_query_string" => :query, :"enum_query_integer" => :query, :"enum_query_double" => :query, + :"enum_query_model_array" => :query, :"enum_form_string_array" => :form, :"enum_form_string" => :form } diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex new file mode 100644 index 000000000000..f76ffcb62918 --- /dev/null +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex @@ -0,0 +1,29 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule OpenapiPetstore.Model.AllOfWithSingleRef do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :"username", + :"SingleRefType" + ] + + @type t :: %__MODULE__{ + :"username" => String.t | nil, + :"SingleRefType" => SingleRefType | nil + } +end + +defimpl Poison.Decoder, for: OpenapiPetstore.Model.AllOfWithSingleRef do + import OpenapiPetstore.Deserializer + def decode(value, options) do + value + |> deserialize(:"SingleRefType", :struct, OpenapiPetstore.Model.SingleRefType, options) + end +end + diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex new file mode 100644 index 000000000000..d2a17aa740df --- /dev/null +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex @@ -0,0 +1,25 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule OpenapiPetstore.Model.SingleRefType do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + + ] + + @type t :: %__MODULE__{ + + } +end + +defimpl Poison.Decoder, for: OpenapiPetstore.Model.SingleRefType do + def decode(value, _options) do + value + end +end + diff --git a/samples/client/petstore/go/go.mod b/samples/client/petstore/go/go.mod index 82a1337aea2f..6c1005e64ad6 100644 --- a/samples/client/petstore/go/go.mod +++ b/samples/client/petstore/go/go.mod @@ -7,6 +7,6 @@ go 1.13 require ( github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a ) diff --git a/samples/client/petstore/go/go.sum b/samples/client/petstore/go/go.sum index 601abdd5b8a7..bf7b32fe9a9b 100644 --- a/samples/client/petstore/go/go.sum +++ b/samples/client/petstore/go/go.sum @@ -186,6 +186,8 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -195,6 +197,8 @@ golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5om golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md index df06b72730bd..ba8e1c2f6117 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | ## Creating AnotherFakeApi @@ -46,9 +46,9 @@ To test special tags To test special tags and operation ID starting with number ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**ModelClient**](ModelClient.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**ModelClient**](ModelClient.md)| client model | | ### Return type diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md index 14cf772369e0..373605d3107c 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | ## Creating FakeApi @@ -59,9 +59,9 @@ creates an XmlItem this route creates an XmlItem ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | @@ -83,9 +83,9 @@ Mono FakeApi.fakeOuterBooleanSerialize(_body) Test serialization of outer boolean types ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | `Boolean`| Input boolean as post body | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | `Boolean`| Input boolean as post body | [optional parameter] | ### Return type @@ -108,9 +108,9 @@ Mono FakeApi.fakeOuterCompositeSerialize(_body) Test serialization of object with outer number type ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional parameter] | ### Return type @@ -133,9 +133,9 @@ Mono FakeApi.fakeOuterNumberSerialize(_body) Test serialization of outer number types ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | `BigDecimal`| Input number as post body | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | `BigDecimal`| Input number as post body | [optional parameter] | ### Return type @@ -158,9 +158,9 @@ Mono FakeApi.fakeOuterStringSerialize(_body) Test serialization of outer string types ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | `String`| Input string as post body | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | `String`| Input string as post body | [optional parameter] | ### Return type @@ -183,9 +183,9 @@ Mono FakeApi.testBodyWithFileSchema(_body) For this test, the body for this request much reference a schema named `File`. ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | @@ -205,10 +205,10 @@ Mono FakeApi.testBodyWithQueryParams(query_body) ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | `String`| | - **_body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | `String`| | | +| **_body** | [**User**](User.md)| | | @@ -230,9 +230,9 @@ To test \"client\" model To test \"client\" model ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**ModelClient**](ModelClient.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**ModelClient**](ModelClient.md)| client model | | ### Return type @@ -255,22 +255,22 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | `BigDecimal`| None | - **_double** | `Double`| None | - **patternWithoutDelimiter** | `String`| None | - **_byte** | `byte[]`| None | - **integer** | `Integer`| None | [optional parameter] - **int32** | `Integer`| None | [optional parameter] - **int64** | `Long`| None | [optional parameter] - **_float** | `Float`| None | [optional parameter] - **string** | `String`| None | [optional parameter] - **binary** | `File`| None | [optional parameter] - **date** | `LocalDate`| None | [optional parameter] - **dateTime** | `LocalDateTime`| None | [optional parameter] - **password** | `String`| None | [optional parameter] - **paramCallback** | `String`| None | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | `BigDecimal`| None | | +| **_double** | `Double`| None | | +| **patternWithoutDelimiter** | `String`| None | | +| **_byte** | `byte[]`| None | | +| **integer** | `Integer`| None | [optional parameter] | +| **int32** | `Integer`| None | [optional parameter] | +| **int64** | `Long`| None | [optional parameter] | +| **_float** | `Float`| None | [optional parameter] | +| **string** | `String`| None | [optional parameter] | +| **binary** | `File`| None | [optional parameter] | +| **date** | `LocalDate`| None | [optional parameter] | +| **dateTime** | `OffsetDateTime`| None | [optional parameter] | +| **password** | `String`| None | [optional parameter] | +| **paramCallback** | `String`| None | [optional parameter] | @@ -293,16 +293,16 @@ To test enum parameters To test enum parameters ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional parameter] [enum: `>`, `$`] - **enumHeaderString** | `String`| Header parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional parameter] [enum: `>`, `$`] - **enumQueryString** | `String`| Query parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] - **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, `-2`] - **enumQueryDouble** | `Double`| Query parameter enum test (double) | [optional parameter] [enum: `1.1`, `-1.2`] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional parameter] [default to `$`] [enum: `>`, `$`] - **enumFormString** | `String`| Form parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional parameter] [enum: `>`, `$`] | +| **enumHeaderString** | `String`| Header parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional parameter] [enum: `>`, `$`] | +| **enumQueryString** | `String`| Query parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | +| **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, `-2`] | +| **enumQueryDouble** | `Double`| Query parameter enum test (double) | [optional parameter] [enum: `1.1`, `-1.2`] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional parameter] [default to `$`] [enum: `>`, `$`] | +| **enumFormString** | `String`| Form parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | @@ -324,14 +324,14 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | `Integer`| Required String in group parameters | - **requiredBooleanGroup** | `Boolean`| Required Boolean in group parameters | - **requiredInt64Group** | `Long`| Required Integer in group parameters | - **stringGroup** | `Integer`| String in group parameters | [optional parameter] - **booleanGroup** | `Boolean`| Boolean in group parameters | [optional parameter] - **int64Group** | `Long`| Integer in group parameters | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | `Integer`| Required String in group parameters | | +| **requiredBooleanGroup** | `Boolean`| Required Boolean in group parameters | | +| **requiredInt64Group** | `Long`| Required Integer in group parameters | | +| **stringGroup** | `Integer`| String in group parameters | [optional parameter] | +| **booleanGroup** | `Boolean`| Boolean in group parameters | [optional parameter] | +| **int64Group** | `Long`| Integer in group parameters | [optional parameter] | @@ -351,9 +351,9 @@ Mono FakeApi.testInlineAdditionalProperties(param) test inline additionalProperties ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | @@ -373,10 +373,10 @@ Mono FakeApi.testJsonFormData(paramparam2) test json serialization of form data ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | `String`| field1 | - **param2** | `String`| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | `String`| field1 | | +| **param2** | `String`| field2 | | @@ -398,13 +398,13 @@ Mono FakeApi.testQueryParameterCollectionFormat(pipeioutilhttpurlcontext) To test the collection format in query parameters ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/FakeClassnameTags123Api.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeClassnameTags123Api.md index 6cc84918111d..02d3dac3d2df 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | ## Creating FakeClassnameTags123Api @@ -46,9 +46,9 @@ To test class name in snake case To test class name in snake case ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**ModelClient**](ModelClient.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**ModelClient**](ModelClient.md)| client model | | ### Return type diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/PetApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/PetApi.md index abbb6b6152f1..ad5d86410c4d 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/PetApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | ## Creating PetApi @@ -52,9 +52,9 @@ Mono PetApi.addPet(_body) Add a new pet to the store ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | @@ -75,10 +75,10 @@ Mono PetApi.deletePet(petIdapiKey) Deletes a pet ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | `Long`| Pet id to delete | - **apiKey** | `String`| | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | `Long`| Pet id to delete | | +| **apiKey** | `String`| | [optional parameter] | @@ -101,9 +101,9 @@ Finds Pets by status Multiple status values can be provided with comma separated strings ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: `available`, `pending`, `sold`] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: `available`, `pending`, `sold`] | ### Return type @@ -127,9 +127,9 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -153,9 +153,9 @@ Find pet by ID Returns a single pet ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | `Long`| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | `Long`| ID of pet to return | | ### Return type @@ -177,9 +177,9 @@ Mono PetApi.updatePet(_body) Update an existing pet ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | @@ -200,11 +200,11 @@ Mono PetApi.updatePetWithForm(petIdnamestatus) Updates a pet in the store with form data ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | `Long`| ID of pet that needs to be updated | - **name** | `String`| Updated name of the pet | [optional parameter] - **status** | `String`| Updated status of the pet | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | `Long`| ID of pet that needs to be updated | | +| **name** | `String`| Updated name of the pet | [optional parameter] | +| **status** | `String`| Updated status of the pet | [optional parameter] | @@ -225,11 +225,11 @@ Mono PetApi.uploadFile(petIdadditionalMetadata_file) uploads an image ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | `Long`| ID of pet to update | - **additionalMetadata** | `String`| Additional data to pass to server | [optional parameter] - **_file** | `File`| file to upload | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | `Long`| ID of pet to update | | +| **additionalMetadata** | `String`| Additional data to pass to server | [optional parameter] | +| **_file** | `File`| file to upload | [optional parameter] | ### Return type @@ -251,11 +251,11 @@ Mono PetApi.uploadFileWithRequiredFile(petIdrequiredFileadditi uploads an image (required) ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | `Long`| ID of pet to update | - **requiredFile** | `File`| file to upload | - **additionalMetadata** | `String`| Additional data to pass to server | [optional parameter] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | `Long`| ID of pet to update | | +| **requiredFile** | `File`| file to upload | | +| **additionalMetadata** | `String`| Additional data to pass to server | [optional parameter] | ### Return type diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md index eb32b4a754c7..cad3ef78ef42 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | ## Creating StoreApi @@ -49,9 +49,9 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | `String`| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | `String`| ID of the order that needs to be deleted | | @@ -95,9 +95,9 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | `Long`| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | `Long`| ID of pet that needs to be fetched | | ### Return type @@ -118,9 +118,9 @@ Mono StoreApi.placeOrder(_body) Place an order for a pet ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md index 3eb55a90d4f9..cd5122a4e71c 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | ## Creating UserApi @@ -53,9 +53,9 @@ Create user This can only be done by the logged in user. ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**User**](User.md)| Created user object | | @@ -75,9 +75,9 @@ Mono UserApi.createUsersWithArrayInput(_body) Creates list of users with given input array ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**List<User>**](User.md)| List of user object | | @@ -97,9 +97,9 @@ Mono UserApi.createUsersWithListInput(_body) Creates list of users with given input array ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **_body** | [**List<User>**](User.md)| List of user object | | @@ -121,9 +121,9 @@ Delete user This can only be done by the logged in user. ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | `String`| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | `String`| The name that needs to be deleted | | @@ -143,9 +143,9 @@ Mono UserApi.getUserByName(username) Get user by user name ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | `String`| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | `String`| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -166,10 +166,10 @@ Mono UserApi.loginUser(usernamepassword) Logs user into the system ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | `String`| The user name for login | - **password** | `String`| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | `String`| The user name for login | | +| **password** | `String`| The password for login in clear text | | ### Return type @@ -210,10 +210,10 @@ Updated user This can only be done by the logged in user. ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | `String`| name that need to be deleted | - **_body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | `String`| name that need to be deleted | | +| **_body** | [**User**](User.md)| Updated user object | | diff --git a/samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md b/samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md index d7299aaa90ed..420fa584ec3f 100644 --- a/samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **_byte** | `byte[]` | | **binary** | `File` | | [optional property] **date** | `LocalDate` | | -**dateTime** | `LocalDateTime` | | [optional property] +**dateTime** | `OffsetDateTime` | | [optional property] **uuid** | `UUID` | | [optional property] **password** | `String` | | **bigDecimal** | `BigDecimal` | | [optional property] diff --git a/samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md index b7c29269f10a..5eac3d4d078a 100644 --- a/samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ The class is defined in **[MixedPropertiesAndAdditionalPropertiesClass.java](../ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | `UUID` | | [optional property] -**dateTime** | `LocalDateTime` | | [optional property] +**dateTime** | `OffsetDateTime` | | [optional property] **map** | [`Map<String, Animal>`](Animal.md) | | [optional property] diff --git a/samples/client/petstore/java-micronaut-client/docs/models/Order.md b/samples/client/petstore/java-micronaut-client/docs/models/Order.md index c5f46aad0e1c..0b85dfe5e129 100644 --- a/samples/client/petstore/java-micronaut-client/docs/models/Order.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Order.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | `Long` | | [optional property] **petId** | `Long` | | [optional property] **quantity** | `Integer` | | [optional property] -**shipDate** | `LocalDateTime` | | [optional property] +**shipDate** | `OffsetDateTime` | | [optional property] **status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional property] **complete** | `Boolean` | | [optional property] diff --git a/samples/client/petstore/java-micronaut-client/pom.xml b/samples/client/petstore/java-micronaut-client/pom.xml index 9c20a94c9478..45ce5f36ccb0 100644 --- a/samples/client/petstore/java-micronaut-client/pom.xml +++ b/samples/client/petstore/java-micronaut-client/pom.xml @@ -16,6 +16,7 @@ jar 1.8 + UTF-8 3.3.1 diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java index 7f5970b69a61..d2de1f5d0e63 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java @@ -21,8 +21,8 @@ import java.io.File; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; -import java.time.LocalDateTime; import org.openapitools.model.ModelClient; +import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; @@ -57,7 +57,7 @@ Mono createXmlItem( * @return Boolean */ @Post(uri="/fake/outer/boolean") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"*/*"}) Mono fakeOuterBooleanSerialize( @Body @Nullable Boolean _body @@ -69,7 +69,7 @@ Mono fakeOuterBooleanSerialize( * @return OuterComposite */ @Post(uri="/fake/outer/composite") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"*/*"}) Mono fakeOuterCompositeSerialize( @Body @Nullable @Valid OuterComposite _body @@ -81,7 +81,7 @@ Mono fakeOuterCompositeSerialize( * @return BigDecimal */ @Post(uri="/fake/outer/number") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"*/*"}) Mono fakeOuterNumberSerialize( @Body @Nullable BigDecimal _body @@ -93,7 +93,7 @@ Mono fakeOuterNumberSerialize( * @return String */ @Post(uri="/fake/outer/string") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"*/*"}) Mono fakeOuterStringSerialize( @Body @Nullable String _body @@ -169,7 +169,7 @@ Mono testEndpointParameters( @Nullable @Pattern(regexp="/[a-z]/i") String string, @Nullable File binary, @Nullable @Format("yyyy-MM-dd") LocalDate date, - @Nullable @Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") LocalDateTime dateTime, + @Nullable @Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") OffsetDateTime dateTime, @Nullable @Size(min=10, max=64) String password, @Nullable String paramCallback ); diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java index 36ccca35533b..48b5ca5681f9 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java @@ -69,7 +69,7 @@ Mono getOrderById( * @return Order */ @Post(uri="/store/order") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"application/json"}) Mono placeOrder( @Body @NotNull @Valid Order _body diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java index 8fa12ce923b1..64d347f66a11 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java @@ -17,7 +17,7 @@ import io.micronaut.http.client.annotation.Client; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import org.openapitools.model.User; import javax.annotation.Generated; import java.util.ArrayList; @@ -38,7 +38,7 @@ public interface UserApi { * @param _body Created user object (required) */ @Post(uri="/user") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"application/json"}) Mono createUser( @Body @NotNull @Valid User _body @@ -49,7 +49,7 @@ Mono createUser( * @param _body List of user object (required) */ @Post(uri="/user/createWithArray") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"application/json"}) Mono createUsersWithArrayInput( @Body @NotNull List _body @@ -60,7 +60,7 @@ Mono createUsersWithArrayInput( * @param _body List of user object (required) */ @Post(uri="/user/createWithList") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"application/json"}) Mono createUsersWithListInput( @Body @NotNull List _body @@ -115,7 +115,7 @@ Mono loginUser( * @param _body Updated user object (required) */ @Put(uri="/user/{username}") - @Produces(value={"application/json"}) + @Produces(value={"*/*"}) @Consumes(value={"application/json"}) Mono updateUser( @PathVariable(name="username") @NotNull String username, diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 96ce13164ee3..7ea0ecf7aace 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,7 @@ public AdditionalPropertiesAnyType name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 107272b74d1c..3f3a6fb5f0fe 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -55,7 +55,7 @@ public AdditionalPropertiesArray name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index cfdb8791d0a8..5d4b5e8c0504 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,7 @@ public AdditionalPropertiesBoolean name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 05c2bd2e698b..6809a8223b0d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -103,7 +103,7 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { + public Map getMapString() { return mapString; } @@ -134,7 +134,7 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { + public Map getMapNumber() { return mapNumber; } @@ -165,7 +165,7 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapInteger() { + public Map getMapInteger() { return mapInteger; } @@ -196,7 +196,7 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapBoolean() { + public Map getMapBoolean() { return mapBoolean; } @@ -227,7 +227,7 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { + public Map> getMapArrayInteger() { return mapArrayInteger; } @@ -258,7 +258,7 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapArrayAnytype() { + public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -289,7 +289,7 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { + public Map> getMapMapString() { return mapMapString; } @@ -320,7 +320,7 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { + public Map> getMapMapAnytype() { return mapMapAnytype; } @@ -343,7 +343,7 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAnytype1() { + public Object getAnytype1() { return anytype1; } @@ -366,7 +366,7 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAnytype2() { + public Object getAnytype2() { return anytype2; } @@ -389,7 +389,7 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE3) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAnytype3() { + public Object getAnytype3() { return anytype3; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 1e1c1f20731e..a020738ebc2f 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -54,7 +54,7 @@ public AdditionalPropertiesInteger name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 972cb4ae44d1..c14416fb9f43 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -55,7 +55,7 @@ public AdditionalPropertiesNumber name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 1c3fe0f86264..46b9daa8130c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -54,7 +54,7 @@ public AdditionalPropertiesObject name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 732a70109dbd..5a2ba9d5aa47 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -54,7 +54,7 @@ public AdditionalPropertiesString name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java index 9920cdfda2d0..ecff8e9eebd7 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; @@ -34,7 +35,11 @@ }) @JsonTypeName("Animal") @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @@ -64,7 +69,7 @@ public Animal className(String className) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_CLASS_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClassName() { + public String getClassName() { return className; } @@ -87,7 +92,7 @@ public Animal color(String color) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getColor() { + public String getColor() { return color; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3fb686b35797..864a08f6bc80 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -62,7 +62,7 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayNumber() { + public List> getArrayArrayNumber() { return arrayArrayNumber; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index ba1b900987d2..27aa24b705d2 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -62,7 +62,7 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayNumber() { + public List getArrayNumber() { return arrayNumber; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java index 34a50221ea0f..11ed7f82a40b 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java @@ -70,7 +70,7 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayOfString() { + public List getArrayOfString() { return arrayOfString; } @@ -101,7 +101,7 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfInteger() { + public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -132,7 +132,7 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java index 732353de97dd..aa47991c28eb 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java @@ -89,7 +89,7 @@ public BigCat kind(KindEnum kind) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public KindEnum getKind() { + public KindEnum getKind() { return kind; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java index a8d93ae52c68..9f21a4ac8317 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -87,7 +87,7 @@ public BigCatAllOf kind(KindEnum kind) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public KindEnum getKind() { + public KindEnum getKind() { return kind; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java index 312e637f8669..d1d3ec3a9430 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java @@ -71,7 +71,7 @@ public Capitalization smallCamel(String smallCamel) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmallCamel() { + public String getSmallCamel() { return smallCamel; } @@ -94,7 +94,7 @@ public Capitalization capitalCamel(String capitalCamel) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCapitalCamel() { + public String getCapitalCamel() { return capitalCamel; } @@ -117,7 +117,7 @@ public Capitalization smallSnake(String smallSnake) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmallSnake() { + public String getSmallSnake() { return smallSnake; } @@ -140,7 +140,7 @@ public Capitalization capitalSnake(String capitalSnake) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCapitalSnake() { + public String getCapitalSnake() { return capitalSnake; } @@ -163,7 +163,7 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScAETHFlowPoints() { + public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -186,7 +186,7 @@ public Capitalization ATT_NAME(String ATT_NAME) { @ApiModelProperty(value = "Name of the pet ") @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getATTNAME() { + public String getATTNAME() { return ATT_NAME; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java index 817807f86d7c..3c54e82990f3 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java @@ -54,7 +54,7 @@ public Cat declawed(Boolean declawed) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDeclawed() { + public Boolean getDeclawed() { return declawed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java index de9cc24095ab..727fb1f91e7b 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java @@ -52,7 +52,7 @@ public CatAllOf declawed(Boolean declawed) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDeclawed() { + public Boolean getDeclawed() { return declawed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java index 88978ee639ce..ad1f82455c41 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java @@ -55,7 +55,7 @@ public Category id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -78,7 +78,7 @@ public Category name(String name) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java index 37dafc836cab..b42420c2e206 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java @@ -52,7 +52,7 @@ public ClassModel propertyClass(String propertyClass) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPropertyClass() { + public String getPropertyClass() { return propertyClass; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java index 53a7c64f13b0..08f0f4c5bb7d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java @@ -54,7 +54,7 @@ public Dog breed(String breed) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBreed() { + public String getBreed() { return breed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java index 8257ba1c1faf..e7e81982eab8 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java @@ -52,7 +52,7 @@ public DogAllOf breed(String breed) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBreed() { + public String getBreed() { return breed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java index b31ae4dcf000..004502a581f3 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java @@ -123,7 +123,7 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JustSymbolEnum getJustSymbol() { + public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -154,7 +154,7 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java index 3a49114419db..0b53b5cf3950 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java @@ -203,7 +203,7 @@ public EnumTest enumString(EnumStringEnum enumString) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnumStringEnum getEnumString() { + public EnumStringEnum getEnumString() { return enumString; } @@ -226,7 +226,7 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EnumStringRequiredEnum getEnumStringRequired() { + public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -249,7 +249,7 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnumIntegerEnum getEnumInteger() { + public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -272,7 +272,7 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnumNumberEnum getEnumNumber() { + public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -295,7 +295,7 @@ public EnumTest outerEnum(OuterEnum outerEnum) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public OuterEnum getOuterEnum() { return outerEnum; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java index df68f20bc6b3..241d2cf9aa78 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -59,7 +59,7 @@ public FileSchemaTestClass _file(ModelFile _file) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ModelFile getFile() { + public ModelFile getFile() { return _file; } @@ -90,7 +90,7 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { + public List getFiles() { return files; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java index 6d0e6a1c5f11..c0773d4e65ef 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java @@ -20,7 +20,7 @@ import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import java.util.UUID; import com.fasterxml.jackson.annotation.*; @@ -83,7 +83,7 @@ public class FormatTest { private LocalDate date; public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private LocalDateTime dateTime; + private OffsetDateTime dateTime; public static final String JSON_PROPERTY_UUID = "uuid"; private UUID uuid; @@ -113,7 +113,7 @@ public FormatTest integer(Integer integer) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInteger() { + public Integer getInteger() { return integer; } @@ -140,7 +140,7 @@ public FormatTest int32(Integer int32) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INT32) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt32() { + public Integer getInt32() { return int32; } @@ -163,7 +163,7 @@ public FormatTest int64(Long int64) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INT64) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInt64() { + public Long getInt64() { return int64; } @@ -190,7 +190,7 @@ public FormatTest number(BigDecimal number) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getNumber() { + public BigDecimal getNumber() { return number; } @@ -217,7 +217,7 @@ public FormatTest _float(Float _float) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FLOAT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Float getFloat() { + public Float getFloat() { return _float; } @@ -244,7 +244,7 @@ public FormatTest _double(Double _double) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DOUBLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { + public Double getDouble() { return _double; } @@ -268,7 +268,7 @@ public FormatTest string(String string) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getString() { + public String getString() { return string; } @@ -291,7 +291,7 @@ public FormatTest _byte(byte[] _byte) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_BYTE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public byte[] getByte() { + public byte[] getByte() { return _byte; } @@ -314,7 +314,7 @@ public FormatTest binary(File binary) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BINARY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getBinary() { + public File getBinary() { return binary; } @@ -338,7 +338,7 @@ public FormatTest date(LocalDate date) { @JsonProperty(JSON_PROPERTY_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - public LocalDate getDate() { + public LocalDate getDate() { return date; } @@ -349,7 +349,7 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(LocalDateTime dateTime) { + public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } @@ -363,14 +363,14 @@ public FormatTest dateTime(LocalDateTime dateTime) { @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getDateTime() { + public OffsetDateTime getDateTime() { return dateTime; } @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setDateTime(LocalDateTime dateTime) { + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -387,7 +387,7 @@ public FormatTest uuid(UUID uuid) { @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UUID getUuid() { + public UUID getUuid() { return uuid; } @@ -411,7 +411,7 @@ public FormatTest password(String password) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPassword() { + public String getPassword() { return password; } @@ -434,7 +434,7 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { + public BigDecimal getBigDecimal() { return bigDecimal; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 935585b256cc..d1b89a1d9349 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -51,7 +51,7 @@ public HasOnlyReadOnly() { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBar() { + public String getBar() { return bar; } @@ -63,7 +63,7 @@ public String getBar() { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FOO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFoo() { + public String getFoo() { return foo; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java index 8b2f5f203bf1..165ef46a610c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java @@ -107,7 +107,7 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapMapOfString() { + public Map> getMapMapOfString() { return mapMapOfString; } @@ -138,7 +138,7 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -169,7 +169,7 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getDirectMap() { + public Map getDirectMap() { return directMap; } @@ -200,7 +200,7 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 24149ce9314f..c9efb8f9968b 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -16,7 +16,7 @@ import java.util.Arrays; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -45,7 +45,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private LocalDateTime dateTime; + private OffsetDateTime dateTime; public static final String JSON_PROPERTY_MAP = "map"; private Map map = null; @@ -65,7 +65,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UUID getUuid() { + public UUID getUuid() { return uuid; } @@ -75,7 +75,7 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } @@ -89,14 +89,14 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTi @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getDateTime() { + public OffsetDateTime getDateTime() { return dateTime; } @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setDateTime(LocalDateTime dateTime) { + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -121,7 +121,7 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMap() { + public Map getMap() { return map; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java index 4279f5642118..10479693fabf 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java @@ -57,7 +57,7 @@ public Model200Response name(Integer name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getName() { + public Integer getName() { return name; } @@ -80,7 +80,7 @@ public Model200Response propertyClass(String propertyClass) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPropertyClass() { + public String getPropertyClass() { return propertyClass; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java index b5f9caf6139f..444553c17b74 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -60,7 +60,7 @@ public ModelApiResponse code(Integer code) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCode() { + public Integer getCode() { return code; } @@ -83,7 +83,7 @@ public ModelApiResponse type(String type) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public String getType() { return type; } @@ -106,7 +106,7 @@ public ModelApiResponse message(String message) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { + public String getMessage() { return message; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java index 9aac15eb2829..a7f5095bbd0d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java @@ -52,7 +52,7 @@ public ModelClient _client(String _client) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CLIENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClient() { + public String getClient() { return _client; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java index 2e62234e76fe..fe9ce28539d2 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java @@ -53,7 +53,7 @@ public ModelFile sourceURI(String sourceURI) { @ApiModelProperty(value = "Test capitalization") @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceURI() { + public String getSourceURI() { return sourceURI; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java index dd3965d127c4..0c032a0d6ca0 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java @@ -52,7 +52,7 @@ public ModelList _123list(String _123list) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String get123list() { + public String get123list() { return _123list; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java index dcf5131a4211..507388f348bd 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java @@ -53,7 +53,7 @@ public ModelReturn _return(Integer _return) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_RETURN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getReturn() { + public Integer getReturn() { return _return; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java index 401002e5de2f..96a94825b5a0 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java @@ -64,7 +64,7 @@ public Name name(Integer name) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getName() { + public Integer getName() { return name; } @@ -82,7 +82,7 @@ public void setName(Integer name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SNAKE_CASE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSnakeCase() { + public Integer getSnakeCase() { return snakeCase; } @@ -99,7 +99,7 @@ public Name property(String property) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProperty() { + public String getProperty() { return property; } @@ -117,7 +117,7 @@ public void setProperty(String property) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer get123number() { + public Integer get123number() { return _123number; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java index 9b3e86e34e33..77ee9e857c15 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java @@ -52,7 +52,7 @@ public NumberOnly justNumber(BigDecimal justNumber) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getJustNumber() { + public BigDecimal getJustNumber() { return justNumber; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java index 801a4d52c669..470b588c724d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java @@ -16,7 +16,7 @@ import java.util.Arrays; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -49,7 +49,7 @@ public class Order { private Integer quantity; public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; - private LocalDateTime shipDate; + private OffsetDateTime shipDate; /** * Order Status @@ -106,7 +106,7 @@ public Order id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -129,7 +129,7 @@ public Order petId(Long petId) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPetId() { + public Long getPetId() { return petId; } @@ -152,7 +152,7 @@ public Order quantity(Integer quantity) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getQuantity() { + public Integer getQuantity() { return quantity; } @@ -162,7 +162,7 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(LocalDateTime shipDate) { + public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; return this; } @@ -176,14 +176,14 @@ public Order shipDate(LocalDateTime shipDate) { @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getShipDate() { + public OffsetDateTime getShipDate() { return shipDate; } @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setShipDate(LocalDateTime shipDate) { + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -200,7 +200,7 @@ public Order status(StatusEnum status) { @ApiModelProperty(value = "Order Status") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public StatusEnum getStatus() { + public StatusEnum getStatus() { return status; } @@ -223,7 +223,7 @@ public Order complete(Boolean complete) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getComplete() { + public Boolean getComplete() { return complete; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java index 96fd146e2537..93431dd14e96 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java @@ -60,7 +60,7 @@ public OuterComposite myNumber(BigDecimal myNumber) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getMyNumber() { + public BigDecimal getMyNumber() { return myNumber; } @@ -83,7 +83,7 @@ public OuterComposite myString(String myString) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMyString() { + public String getMyString() { return myString; } @@ -106,7 +106,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java index 15e291c5b017..4a103cf9696f 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java @@ -112,7 +112,7 @@ public Pet id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -136,7 +136,7 @@ public Pet category(Category category) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Category getCategory() { + public Category getCategory() { return category; } @@ -159,7 +159,7 @@ public Pet name(String name) { @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { + public String getName() { return name; } @@ -187,7 +187,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Set getPhotoUrls() { + public Set getPhotoUrls() { return photoUrls; } @@ -219,7 +219,7 @@ public Pet addTagsItem(Tag tagsItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { + public List getTags() { return tags; } @@ -242,7 +242,7 @@ public Pet status(StatusEnum status) { @ApiModelProperty(value = "pet status in the store") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public StatusEnum getStatus() { + public StatusEnum getStatus() { return status; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 38133c13c8ee..72e8a80aa13c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -50,7 +50,7 @@ public ReadOnlyFirst() { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBar() { + public String getBar() { return bar; } @@ -67,7 +67,7 @@ public ReadOnlyFirst baz(String baz) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAZ) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBaz() { + public String getBaz() { return baz; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java index 584a790f345e..d8c9996b0431 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java @@ -52,7 +52,7 @@ public SpecialModelName() { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long get$SpecialPropertyName() { + public Long get$SpecialPropertyName() { return $specialPropertyName; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java index 7163b1863310..8bdd9c780159 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java @@ -55,7 +55,7 @@ public Tag id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -78,7 +78,7 @@ public Tag name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java index b569e2f29181..aa9443cc9068 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -70,7 +70,7 @@ public TypeHolderDefault stringItem(String stringItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStringItem() { + public String getStringItem() { return stringItem; } @@ -93,7 +93,7 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getNumberItem() { + public BigDecimal getNumberItem() { return numberItem; } @@ -116,7 +116,7 @@ public TypeHolderDefault integerItem(Integer integerItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getIntegerItem() { + public Integer getIntegerItem() { return integerItem; } @@ -139,7 +139,7 @@ public TypeHolderDefault boolItem(Boolean boolItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getBoolItem() { + public Boolean getBoolItem() { return boolItem; } @@ -167,7 +167,7 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getArrayItem() { + public List getArrayItem() { return arrayItem; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java index c138347293f3..fb781a3808e1 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -74,7 +74,7 @@ public TypeHolderExample stringItem(String stringItem) { @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStringItem() { + public String getStringItem() { return stringItem; } @@ -97,7 +97,7 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getNumberItem() { + public BigDecimal getNumberItem() { return numberItem; } @@ -120,7 +120,7 @@ public TypeHolderExample floatItem(Float floatItem) { @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Float getFloatItem() { + public Float getFloatItem() { return floatItem; } @@ -143,7 +143,7 @@ public TypeHolderExample integerItem(Integer integerItem) { @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getIntegerItem() { + public Integer getIntegerItem() { return integerItem; } @@ -166,7 +166,7 @@ public TypeHolderExample boolItem(Boolean boolItem) { @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getBoolItem() { + public Boolean getBoolItem() { return boolItem; } @@ -194,7 +194,7 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getArrayItem() { + public List getArrayItem() { return arrayItem; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java index fedc16d29198..71b20750b618 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java @@ -79,7 +79,7 @@ public User id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -102,7 +102,7 @@ public User username(String username) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUsername() { + public String getUsername() { return username; } @@ -125,7 +125,7 @@ public User firstName(String firstName) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFirstName() { + public String getFirstName() { return firstName; } @@ -148,7 +148,7 @@ public User lastName(String lastName) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLastName() { + public String getLastName() { return lastName; } @@ -171,7 +171,7 @@ public User email(String email) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { + public String getEmail() { return email; } @@ -194,7 +194,7 @@ public User password(String password) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPassword() { + public String getPassword() { return password; } @@ -217,7 +217,7 @@ public User phone(String phone) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPhone() { + public String getPhone() { return phone; } @@ -240,7 +240,7 @@ public User userStatus(Integer userStatus) { @ApiModelProperty(value = "User Status") @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUserStatus() { + public Integer getUserStatus() { return userStatus; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java index 486cd00a6778..5249887774ba 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java @@ -166,7 +166,7 @@ public XmlItem attributeString(String attributeString) { @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeString() { + public String getAttributeString() { return attributeString; } @@ -189,7 +189,7 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getAttributeNumber() { + public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -212,7 +212,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getAttributeInteger() { + public Integer getAttributeInteger() { return attributeInteger; } @@ -235,7 +235,7 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAttributeBoolean() { + public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -266,7 +266,7 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWrappedArray() { + public List getWrappedArray() { return wrappedArray; } @@ -289,7 +289,7 @@ public XmlItem nameString(String nameString) { @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_NAME_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNameString() { + public String getNameString() { return nameString; } @@ -312,7 +312,7 @@ public XmlItem nameNumber(BigDecimal nameNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_NAME_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getNameNumber() { + public BigDecimal getNameNumber() { return nameNumber; } @@ -335,7 +335,7 @@ public XmlItem nameInteger(Integer nameInteger) { @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_NAME_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNameInteger() { + public Integer getNameInteger() { return nameInteger; } @@ -358,7 +358,7 @@ public XmlItem nameBoolean(Boolean nameBoolean) { @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNameBoolean() { + public Boolean getNameBoolean() { return nameBoolean; } @@ -389,7 +389,7 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNameArray() { + public List getNameArray() { return nameArray; } @@ -420,7 +420,7 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNameWrappedArray() { + public List getNameWrappedArray() { return nameWrappedArray; } @@ -443,7 +443,7 @@ public XmlItem prefixString(String prefixString) { @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrefixString() { + public String getPrefixString() { return prefixString; } @@ -466,7 +466,7 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getPrefixNumber() { + public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -489,7 +489,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPrefixInteger() { + public Integer getPrefixInteger() { return prefixInteger; } @@ -512,7 +512,7 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPrefixBoolean() { + public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -543,7 +543,7 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixArray() { + public List getPrefixArray() { return prefixArray; } @@ -574,7 +574,7 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixWrappedArray() { + public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -597,7 +597,7 @@ public XmlItem namespaceString(String namespaceString) { @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNamespaceString() { + public String getNamespaceString() { return namespaceString; } @@ -620,7 +620,7 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getNamespaceNumber() { + public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -643,7 +643,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNamespaceInteger() { + public Integer getNamespaceInteger() { return namespaceInteger; } @@ -666,7 +666,7 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNamespaceBoolean() { + public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -697,7 +697,7 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNamespaceArray() { + public List getNamespaceArray() { return namespaceArray; } @@ -728,7 +728,7 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNamespaceWrappedArray() { + public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -751,7 +751,7 @@ public XmlItem prefixNsString(String prefixNsString) { @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrefixNsString() { + public String getPrefixNsString() { return prefixNsString; } @@ -774,7 +774,7 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getPrefixNsNumber() { + public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -797,7 +797,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPrefixNsInteger() { + public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -820,7 +820,7 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPrefixNsBoolean() { + public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -851,7 +851,7 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixNsArray() { + public List getPrefixNsArray() { return prefixNsArray; } @@ -882,7 +882,7 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixNsWrappedArray() { + public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/apache-httpclient/build.gradle b/samples/client/petstore/java/apache-httpclient/build.gradle index 90ad347ab622..6cec7394c49f 100644 --- a/samples/client/petstore/java/apache-httpclient/build.gradle +++ b/samples/client/petstore/java/apache-httpclient/build.gradle @@ -114,8 +114,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.12.1" - jackson_databind_version = "2.10.5.1" + jackson_version = "2.12.6" + jackson_databind_version = "2.12.6.1" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" httpclient_version = "4.5.13" diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Animal.md b/samples/client/petstore/java/apache-httpclient/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Animal.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/apache-httpclient/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/apache-httpclient/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ArrayTest.md b/samples/client/petstore/java/apache-httpclient/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ArrayTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/BigCat.md b/samples/client/petstore/java/apache-httpclient/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/BigCat.md +++ b/samples/client/petstore/java/apache-httpclient/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md b/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Capitalization.md b/samples/client/petstore/java/apache-httpclient/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Capitalization.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Cat.md b/samples/client/petstore/java/apache-httpclient/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Cat.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md b/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md +++ b/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Category.md b/samples/client/petstore/java/apache-httpclient/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Category.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ClassModel.md b/samples/client/petstore/java/apache-httpclient/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ClassModel.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Client.md b/samples/client/petstore/java/apache-httpclient/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Client.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Dog.md b/samples/client/petstore/java/apache-httpclient/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Dog.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md b/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md +++ b/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/EnumArrays.md b/samples/client/petstore/java/apache-httpclient/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/EnumArrays.md +++ b/samples/client/petstore/java/apache-httpclient/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 6ced5f29b128..25301e7502c3 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/FileSchemaTestClass.md b/samples/client/petstore/java/apache-httpclient/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md b/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/apache-httpclient/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/apache-httpclient/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/MapTest.md b/samples/client/petstore/java/apache-httpclient/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/MapTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/apache-httpclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/apache-httpclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/apache-httpclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Model200Response.md b/samples/client/petstore/java/apache-httpclient/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Model200Response.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ModelApiResponse.md b/samples/client/petstore/java/apache-httpclient/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ModelFile.md b/samples/client/petstore/java/apache-httpclient/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ModelFile.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ModelList.md b/samples/client/petstore/java/apache-httpclient/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ModelList.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/ModelReturn.md b/samples/client/petstore/java/apache-httpclient/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ModelReturn.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Name.md b/samples/client/petstore/java/apache-httpclient/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Name.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/NumberOnly.md b/samples/client/petstore/java/apache-httpclient/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/NumberOnly.md +++ b/samples/client/petstore/java/apache-httpclient/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Order.md b/samples/client/petstore/java/apache-httpclient/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Order.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/apache-httpclient/docs/OuterComposite.md b/samples/client/petstore/java/apache-httpclient/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/OuterComposite.md +++ b/samples/client/petstore/java/apache-httpclient/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/Pet.md b/samples/client/petstore/java/apache-httpclient/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Pet.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/apache-httpclient/docs/PetApi.md b/samples/client/petstore/java/apache-httpclient/docs/PetApi.md index acc142fa0221..1e79e30ef6c2 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/PetApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/ReadOnlyFirst.md b/samples/client/petstore/java/apache-httpclient/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/SpecialModelName.md b/samples/client/petstore/java/apache-httpclient/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/SpecialModelName.md +++ b/samples/client/petstore/java/apache-httpclient/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md b/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/Tag.md b/samples/client/petstore/java/apache-httpclient/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/Tag.md +++ b/samples/client/petstore/java/apache-httpclient/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/TypeHolderDefault.md b/samples/client/petstore/java/apache-httpclient/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/apache-httpclient/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/apache-httpclient/docs/TypeHolderExample.md b/samples/client/petstore/java/apache-httpclient/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/apache-httpclient/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/apache-httpclient/docs/User.md b/samples/client/petstore/java/apache-httpclient/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/User.md +++ b/samples/client/petstore/java/apache-httpclient/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/UserApi.md b/samples/client/petstore/java/apache-httpclient/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/UserApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/XmlItem.md b/samples/client/petstore/java/apache-httpclient/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/XmlItem.md +++ b/samples/client/petstore/java/apache-httpclient/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/pom.xml b/samples/client/petstore/java/apache-httpclient/pom.xml index d7242978e575..b99c8eb25653 100644 --- a/samples/client/petstore/java/apache-httpclient/pom.xml +++ b/samples/client/petstore/java/apache-httpclient/pom.xml @@ -38,6 +38,8 @@ maven-compiler-plugin 3.8.1 + 1.8 + 1.8 true 128m 512m @@ -147,15 +149,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.8 - 1.8 - - org.apache.maven.plugins maven-javadoc-plugin @@ -254,7 +247,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson-version} + ${jackson-databind-version} com.fasterxml.jackson.jaxrs @@ -284,7 +277,8 @@ UTF-8 1.5.21 4.5.13 - 2.12.1 + 2.12.6 + 2.12.6.1 1.3.5 1.0.0 4.13.2 diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java index 6f303f173ae2..be898d61d2ea 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java index 03e9592e224b..aa939d0b1f35 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java index 1f3434c2ec64..01f3a54cb5db 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java index 882b23a600fb..1a1de5a9a5a0 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ }) @javax.annotation.concurrent.Immutable @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java index 051f4a0d7b82..4ed81413c5ab 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ }) @javax.annotation.concurrent.Immutable @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java index 305e1927f676..416c66f9bf91 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ }) @javax.annotation.concurrent.Immutable @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java index 960744d9f008..215f66d08646 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ }) @javax.annotation.concurrent.Immutable @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/feign/.openapi-generator/FILES b/samples/client/petstore/java/feign/.openapi-generator/FILES index 72c610ee9180..9a92bb872d56 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/FILES +++ b/samples/client/petstore/java/feign/.openapi-generator/FILES @@ -39,6 +39,7 @@ src/main/java/org/openapitools/client/auth/OAuthFlow.java src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ApiResponse.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -82,6 +83,7 @@ src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/User.java diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 177bc923ce04..f90b0a7d9ab0 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -69,7 +69,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: description: "" @@ -92,7 +92,8 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-webclient-blocking: true + x-content-type: application/json x-accepts: application/json servers: - url: http://petstore.swagger.io/v2 @@ -141,6 +142,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -185,6 +187,7 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: @@ -252,6 +255,7 @@ paths: summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: description: "" @@ -291,7 +295,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -335,7 +339,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -383,7 +387,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -459,7 +463,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: @@ -473,7 +477,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithList: post: @@ -487,7 +491,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/login: get: @@ -631,7 +635,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: @@ -651,7 +655,7 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -800,6 +804,15 @@ paths: format: double type: number style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: $ref: '#/components/requestBodies/inline_object_2' content: @@ -832,7 +845,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -849,7 +862,7 @@ paths: summary: To test "client" model tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: | @@ -948,7 +961,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -969,7 +982,7 @@ paths: description: Output number tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/property/enum-int: post: @@ -991,7 +1004,7 @@ paths: description: Output enum (int) tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -1012,7 +1025,7 @@ paths: description: Output string tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -1033,7 +1046,7 @@ paths: description: Output boolean tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -1054,7 +1067,7 @@ paths: description: Output composite tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: @@ -1082,7 +1095,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1103,7 +1116,7 @@ paths: summary: test inline additionalProperties tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1127,7 +1140,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /another-fake/dummy: patch: @@ -1145,7 +1158,7 @@ paths: summary: To test special tags tags: - $another-fake? - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1163,7 +1176,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-binary: put: @@ -1183,7 +1196,7 @@ paths: description: Success tags: - fake - x-contentType: image/png + x-content-type: image/png x-accepts: application/json /fake/test-query-parameters: put: @@ -1303,7 +1316,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /fake/health: get: @@ -1348,7 +1361,7 @@ paths: summary: test http signature authentication tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json components: requestBodies: @@ -2101,6 +2114,20 @@ components: $ref: '#/components/schemas/Bar' type: array type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string inline_response_default: example: string: diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index 70b995edc331..d81e32dd1945 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -6,6 +6,7 @@ import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; import org.openapitools.client.model.HealthCheckResult; @@ -511,10 +512,11 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { * @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 enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) */ - @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}") + @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}&enum_query_model_array={enumQueryModelArray}") @Headers({ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", @@ -522,7 +524,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumQueryModelArray") List enumQueryModelArray, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); /** * To test enum parameters @@ -534,10 +536,11 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { * @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 enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) */ - @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}") + @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}&enum_query_model_array={enumQueryModelArray}") @Headers({ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", @@ -545,7 +548,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "enum_header_string: {enumHeaderString}" }) - ApiResponse testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + ApiResponse testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumQueryModelArray") List enumQueryModelArray, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); /** @@ -567,9 +570,10 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { *
  • enumQueryString - Query parameter enum test (string) (optional, default to -efg)
  • *
  • enumQueryInteger - Query parameter enum test (double) (optional)
  • *
  • enumQueryDouble - Query parameter enum test (double) (optional)
  • + *
  • enumQueryModelArray - (optional)
  • * */ - @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}") + @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}&enum_query_model_array={enumQueryModelArray}") @Headers({ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", @@ -595,9 +599,10 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { *
  • enumQueryString - Query parameter enum test (string) (optional, default to -efg)
  • *
  • enumQueryInteger - Query parameter enum test (double) (optional)
  • *
  • enumQueryDouble - Query parameter enum test (double) (optional)
  • + *
  • enumQueryModelArray - (optional)
  • * */ - @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}") + @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}&enum_query_model_array={enumQueryModelArray}") @Headers({ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", @@ -629,6 +634,10 @@ public TestEnumParametersQueryParams enumQueryDouble(final Double value) { put("enum_query_double", EncodingUtils.encode(value)); return this; } + public TestEnumParametersQueryParams enumQueryModelArray(final List value) { + put("enum_query_model_array", EncodingUtils.encodeCollection(value, "multi")); + return this; + } } /** diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 000000000000..6bde2cae3098 --- /dev/null +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,164 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.SingleRefType; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private JsonNullable singleRefType = JsonNullable.undefined(); + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + this.singleRefType = JsonNullable.of(singleRefType); + + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public SingleRefType getSingleRefType() { + return singleRefType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSingleRefType_JsonNullable() { + return singleRefType; + } + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + public void setSingleRefType_JsonNullable(JsonNullable singleRefType) { + this.singleRefType = singleRefType; + } + + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = JsonNullable.of(singleRefType); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + equalsNullable(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, hashCodeNullable(singleRefType)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java index 845e30d5a772..6f1a5d6fd804 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java index c6ededc593ed..1ce0b1531832 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 000000000000..f99224547559 --- /dev/null +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 000000000000..b43c3a5bcdc9 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.SingleRefType; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for AllOfWithSingleRef + */ +class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 000000000000..e46059b3867d --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,31 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.jupiter.api.Test; + + +/** + * Model tests for SingleRefType + */ +class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Animal.md b/samples/client/petstore/java/google-api-client/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/google-api-client/docs/Animal.md +++ b/samples/client/petstore/java/google-api-client/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/google-api-client/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/google-api-client/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/google-api-client/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/google-api-client/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/google-api-client/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/google-api-client/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/google-api-client/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/ArrayTest.md b/samples/client/petstore/java/google-api-client/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/google-api-client/docs/ArrayTest.md +++ b/samples/client/petstore/java/google-api-client/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/BigCat.md b/samples/client/petstore/java/google-api-client/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/google-api-client/docs/BigCat.md +++ b/samples/client/petstore/java/google-api-client/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md b/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/google-api-client/docs/Capitalization.md b/samples/client/petstore/java/google-api-client/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/google-api-client/docs/Capitalization.md +++ b/samples/client/petstore/java/google-api-client/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Cat.md b/samples/client/petstore/java/google-api-client/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/google-api-client/docs/Cat.md +++ b/samples/client/petstore/java/google-api-client/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/CatAllOf.md b/samples/client/petstore/java/google-api-client/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/google-api-client/docs/CatAllOf.md +++ b/samples/client/petstore/java/google-api-client/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Category.md b/samples/client/petstore/java/google-api-client/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/google-api-client/docs/Category.md +++ b/samples/client/petstore/java/google-api-client/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/google-api-client/docs/ClassModel.md b/samples/client/petstore/java/google-api-client/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/google-api-client/docs/ClassModel.md +++ b/samples/client/petstore/java/google-api-client/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Client.md b/samples/client/petstore/java/google-api-client/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/google-api-client/docs/Client.md +++ b/samples/client/petstore/java/google-api-client/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Dog.md b/samples/client/petstore/java/google-api-client/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/google-api-client/docs/Dog.md +++ b/samples/client/petstore/java/google-api-client/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/DogAllOf.md b/samples/client/petstore/java/google-api-client/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/google-api-client/docs/DogAllOf.md +++ b/samples/client/petstore/java/google-api-client/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/EnumArrays.md b/samples/client/petstore/java/google-api-client/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/google-api-client/docs/EnumArrays.md +++ b/samples/client/petstore/java/google-api-client/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/google-api-client/docs/EnumTest.md b/samples/client/petstore/java/google-api-client/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/google-api-client/docs/EnumTest.md +++ b/samples/client/petstore/java/google-api-client/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 6ced5f29b128..25301e7502c3 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/google-api-client/docs/FileSchemaTestClass.md b/samples/client/petstore/java/google-api-client/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/google-api-client/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/google-api-client/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/FormatTest.md b/samples/client/petstore/java/google-api-client/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/google-api-client/docs/FormatTest.md +++ b/samples/client/petstore/java/google-api-client/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | 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 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/google-api-client/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/google-api-client/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/google-api-client/docs/MapTest.md b/samples/client/petstore/java/google-api-client/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/google-api-client/docs/MapTest.md +++ b/samples/client/petstore/java/google-api-client/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/google-api-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/google-api-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/google-api-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/google-api-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Model200Response.md b/samples/client/petstore/java/google-api-client/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/google-api-client/docs/Model200Response.md +++ b/samples/client/petstore/java/google-api-client/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/ModelApiResponse.md b/samples/client/petstore/java/google-api-client/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/google-api-client/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/google-api-client/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/ModelFile.md b/samples/client/petstore/java/google-api-client/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/google-api-client/docs/ModelFile.md +++ b/samples/client/petstore/java/google-api-client/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/ModelList.md b/samples/client/petstore/java/google-api-client/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/google-api-client/docs/ModelList.md +++ b/samples/client/petstore/java/google-api-client/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/ModelReturn.md b/samples/client/petstore/java/google-api-client/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/google-api-client/docs/ModelReturn.md +++ b/samples/client/petstore/java/google-api-client/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | 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 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/google-api-client/docs/Name.md +++ b/samples/client/petstore/java/google-api-client/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/google-api-client/docs/NumberOnly.md b/samples/client/petstore/java/google-api-client/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/google-api-client/docs/NumberOnly.md +++ b/samples/client/petstore/java/google-api-client/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Order.md b/samples/client/petstore/java/google-api-client/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/google-api-client/docs/Order.md +++ b/samples/client/petstore/java/google-api-client/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/google-api-client/docs/OuterComposite.md b/samples/client/petstore/java/google-api-client/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/google-api-client/docs/OuterComposite.md +++ b/samples/client/petstore/java/google-api-client/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/Pet.md b/samples/client/petstore/java/google-api-client/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/google-api-client/docs/Pet.md +++ b/samples/client/petstore/java/google-api-client/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md index acc142fa0221..1e79e30ef6c2 100644 --- a/samples/client/petstore/java/google-api-client/docs/PetApi.md +++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type 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 a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/google-api-client/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/google-api-client/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md b/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md +++ b/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/StoreApi.md b/samples/client/petstore/java/google-api-client/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/google-api-client/docs/StoreApi.md +++ b/samples/client/petstore/java/google-api-client/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/google-api-client/docs/Tag.md b/samples/client/petstore/java/google-api-client/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/google-api-client/docs/Tag.md +++ b/samples/client/petstore/java/google-api-client/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/TypeHolderDefault.md b/samples/client/petstore/java/google-api-client/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/google-api-client/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/google-api-client/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/google-api-client/docs/TypeHolderExample.md b/samples/client/petstore/java/google-api-client/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/google-api-client/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/google-api-client/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/google-api-client/docs/User.md b/samples/client/petstore/java/google-api-client/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/google-api-client/docs/User.md +++ b/samples/client/petstore/java/google-api-client/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/google-api-client/docs/UserApi.md b/samples/client/petstore/java/google-api-client/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/google-api-client/docs/UserApi.md +++ b/samples/client/petstore/java/google-api-client/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/google-api-client/docs/XmlItem.md b/samples/client/petstore/java/google-api-client/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/google-api-client/docs/XmlItem.md +++ b/samples/client/petstore/java/google-api-client/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java index 6f303f173ae2..be898d61d2ea 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java index 03e9592e224b..aa939d0b1f35 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java index 1f3434c2ec64..01f3a54cb5db 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index f61806a68577..9fd2e9298090 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -114,8 +114,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.6.3" - jackson_version = "2.12.5" - jackson_databind_version = "2.10.5.1" + jackson_version = "2.12.6" + jackson_databind_version = "2.12.6.1" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" jersey_version = "1.19.4" diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Animal.md b/samples/client/petstore/java/jersey1/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/jersey1/docs/Animal.md +++ b/samples/client/petstore/java/jersey1/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/jersey1/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/jersey1/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/jersey1/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/jersey1/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/jersey1/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/jersey1/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/ArrayTest.md b/samples/client/petstore/java/jersey1/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/jersey1/docs/ArrayTest.md +++ b/samples/client/petstore/java/jersey1/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/BigCat.md b/samples/client/petstore/java/jersey1/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/jersey1/docs/BigCat.md +++ b/samples/client/petstore/java/jersey1/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md b/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/jersey1/docs/Capitalization.md b/samples/client/petstore/java/jersey1/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/jersey1/docs/Capitalization.md +++ b/samples/client/petstore/java/jersey1/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Cat.md b/samples/client/petstore/java/jersey1/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/jersey1/docs/Cat.md +++ b/samples/client/petstore/java/jersey1/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/CatAllOf.md b/samples/client/petstore/java/jersey1/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/jersey1/docs/CatAllOf.md +++ b/samples/client/petstore/java/jersey1/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Category.md b/samples/client/petstore/java/jersey1/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/jersey1/docs/Category.md +++ b/samples/client/petstore/java/jersey1/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/jersey1/docs/ClassModel.md b/samples/client/petstore/java/jersey1/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/jersey1/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey1/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Client.md b/samples/client/petstore/java/jersey1/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/jersey1/docs/Client.md +++ b/samples/client/petstore/java/jersey1/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Dog.md b/samples/client/petstore/java/jersey1/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/jersey1/docs/Dog.md +++ b/samples/client/petstore/java/jersey1/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/DogAllOf.md b/samples/client/petstore/java/jersey1/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/jersey1/docs/DogAllOf.md +++ b/samples/client/petstore/java/jersey1/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/EnumArrays.md b/samples/client/petstore/java/jersey1/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/jersey1/docs/EnumArrays.md +++ b/samples/client/petstore/java/jersey1/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/jersey1/docs/EnumTest.md b/samples/client/petstore/java/jersey1/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/jersey1/docs/EnumTest.md +++ b/samples/client/petstore/java/jersey1/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index 6ced5f29b128..25301e7502c3 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/FileSchemaTestClass.md b/samples/client/petstore/java/jersey1/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/jersey1/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/jersey1/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/FormatTest.md b/samples/client/petstore/java/jersey1/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/jersey1/docs/FormatTest.md +++ b/samples/client/petstore/java/jersey1/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/jersey1/docs/MapTest.md b/samples/client/petstore/java/jersey1/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/jersey1/docs/MapTest.md +++ b/samples/client/petstore/java/jersey1/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/jersey1/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/jersey1/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/jersey1/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey1/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Model200Response.md b/samples/client/petstore/java/jersey1/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/jersey1/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey1/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/ModelApiResponse.md b/samples/client/petstore/java/jersey1/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/jersey1/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/jersey1/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/ModelFile.md b/samples/client/petstore/java/jersey1/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/jersey1/docs/ModelFile.md +++ b/samples/client/petstore/java/jersey1/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/ModelList.md b/samples/client/petstore/java/jersey1/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/jersey1/docs/ModelList.md +++ b/samples/client/petstore/java/jersey1/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/ModelReturn.md b/samples/client/petstore/java/jersey1/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/jersey1/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey1/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Name.md b/samples/client/petstore/java/jersey1/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/jersey1/docs/Name.md +++ b/samples/client/petstore/java/jersey1/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/jersey1/docs/NumberOnly.md b/samples/client/petstore/java/jersey1/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/jersey1/docs/NumberOnly.md +++ b/samples/client/petstore/java/jersey1/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Order.md b/samples/client/petstore/java/jersey1/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/jersey1/docs/Order.md +++ b/samples/client/petstore/java/jersey1/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/jersey1/docs/OuterComposite.md b/samples/client/petstore/java/jersey1/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/jersey1/docs/OuterComposite.md +++ b/samples/client/petstore/java/jersey1/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/Pet.md b/samples/client/petstore/java/jersey1/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/jersey1/docs/Pet.md +++ b/samples/client/petstore/java/jersey1/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md index acc142fa0221..1e79e30ef6c2 100644 --- a/samples/client/petstore/java/jersey1/docs/PetApi.md +++ b/samples/client/petstore/java/jersey1/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/SpecialModelName.md b/samples/client/petstore/java/jersey1/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/jersey1/docs/SpecialModelName.md +++ b/samples/client/petstore/java/jersey1/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/StoreApi.md b/samples/client/petstore/java/jersey1/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/jersey1/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey1/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/Tag.md b/samples/client/petstore/java/jersey1/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/jersey1/docs/Tag.md +++ b/samples/client/petstore/java/jersey1/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/TypeHolderDefault.md b/samples/client/petstore/java/jersey1/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/jersey1/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/jersey1/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/jersey1/docs/TypeHolderExample.md b/samples/client/petstore/java/jersey1/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/jersey1/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/jersey1/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/jersey1/docs/User.md b/samples/client/petstore/java/jersey1/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/jersey1/docs/User.md +++ b/samples/client/petstore/java/jersey1/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/jersey1/docs/UserApi.md b/samples/client/petstore/java/jersey1/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/jersey1/docs/UserApi.md +++ b/samples/client/petstore/java/jersey1/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/XmlItem.md b/samples/client/petstore/java/jersey1/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/jersey1/docs/XmlItem.md +++ b/samples/client/petstore/java/jersey1/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml index 1575a0c1c4c3..a04da13e05c8 100644 --- a/samples/client/petstore/java/jersey1/pom.xml +++ b/samples/client/petstore/java/jersey1/pom.xml @@ -38,6 +38,8 @@ maven-compiler-plugin 3.8.1 + 1.8 + 1.8 true 128m 512m @@ -147,15 +149,6 @@
    - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.8 - 1.8 - - org.apache.maven.plugins maven-javadoc-plugin @@ -254,7 +247,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson-version} + ${jackson-databind-version} com.fasterxml.jackson.jaxrs @@ -284,7 +277,8 @@ UTF-8 1.6.3 1.19.4 - 2.12.5 + 2.12.6 + 2.12.6.1 1.3.5 1.0.0 4.13.2 diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java index 6f303f173ae2..be898d61d2ea 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java index 03e9592e224b..aa939d0b1f35 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java index 1f3434c2ec64..01f3a54cb5db 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle b/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle index e1a7e57a0b09..b70b07ae2a39 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle @@ -11,8 +11,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.6.3" - jackson_version = "2.13.0" - jackson_databind_version = "2.13.0" + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2.2" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" jersey_version = "2.35" - junit_version = "4.13.2" + junit_version = "5.8.2" scribejava_apis_version = "8.3.1" } @@ -123,7 +123,12 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() } javadoc { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt b/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt index c8adbf8c4867..6fe11cf32eca 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt @@ -10,20 +10,19 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "com.google.code.findbugs" % "jsr305" % "3.0.0", - "io.swagger" % "swagger-annotations" % "1.6.3", + "io.swagger" % "swagger-annotations" % "1.6.5", "org.glassfish.jersey.core" % "jersey-client" % "2.35", "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", - "com.fasterxml.jackson.core" % "jackson-core" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.0" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.2" % "compile", "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Animal.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Animal.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md index 1634ef64dbbb..c95eeb0b8c8c 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayTest.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayTest.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCat.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCat.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Capitalization.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Capitalization.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Cat.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Cat.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Category.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Category.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ClassModel.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Client.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Client.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Dog.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Dog.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumArrays.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumArrays.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumTest.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumTest.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index 5537ee8e9119..438fa9fae14c 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -127,9 +127,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -192,9 +192,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -258,9 +258,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -323,9 +323,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -387,9 +387,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -450,10 +450,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -516,9 +516,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **LocalDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **LocalDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -691,16 +691,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -775,14 +775,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -842,9 +842,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **Map<String,String>**| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **Map<String,String>**| request body | | ### Return type @@ -905,10 +905,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -974,13 +974,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | **List<String>**| | - **ioutil** | **List<String>**| | - **http** | **List<String>**| | - **url** | **List<String>**| | - **context** | **List<String>**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | **List<String>**| | | +| **ioutil** | **List<String>**| | | +| **http** | **List<String>**| | | +| **url** | **List<String>**| | | +| **context** | **List<String>**| | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeClassnameTags123Api.md index 66d3f7890a3a..77a56bad6f35 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FileSchemaTestClass.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FormatTest.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FormatTest.md index 1fcee404010f..5c36e3616e7d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FormatTest.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **LocalDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **LocalDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MapTest.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 2c3dd709622a..d8ba815078e3 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **LocalDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **LocalDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Model200Response.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelApiResponse.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelFile.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelFile.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelList.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelList.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelReturn.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Name.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Name.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/NumberOnly.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/NumberOnly.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Order.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Order.md index ff107e8d7ebc..386508ee4b07 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Order.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **LocalDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **LocalDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/OuterComposite.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/OuterComposite.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Pet.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Pet.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md index a451f62d88c7..57e78be6d9e5 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -129,10 +129,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -201,9 +201,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -272,9 +272,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | **List<String>**| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | **List<String>**| Tags to filter by | | ### Return type @@ -345,9 +345,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -414,9 +414,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -486,11 +486,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -559,11 +559,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -632,11 +632,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/SpecialModelName.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/SpecialModelName.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md index 6335befe4714..7e88578e3c5b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -186,9 +186,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -251,9 +251,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Tag.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Tag.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderDefault.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderExample.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/User.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/User.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/UserApi.md index d81d5f802230..57be237f5f9a 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -118,9 +118,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -180,9 +180,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -244,9 +244,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -308,9 +308,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -374,10 +374,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -499,10 +499,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/XmlItem.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/XmlItem.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml b/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml index 8904f559bedb..a851a834f431 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -102,7 +102,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -330,22 +330,22 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test UTF-8 - 1.6.3 + 1.6.5 2.35 - 2.13.0 - 2.13.0 + 2.13.2 + 2.13.2.2 0.2.2 1.3.5 - 4.13.2 + 5.8.2 8.3.1 - 2.17.3 + 2.21.0 diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Animal.java index f0e2f9e2ade7..62c11177942e 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Animal.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +42,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCat.java index 73ccb294016d..68eba7be5f3e 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Cat.java index c66294bbd00e..73484afc2dc0 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Cat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Dog.java index ed024e163482..da6c79f2fa3f 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/Dog.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 9bef314239b1..2b9189db2644 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -16,10 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.Client; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -38,8 +38,7 @@ public class AnotherFakeApiTest { * * To test special tags and operation ID starting with number * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void call123testSpecialTagsTest() throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeApiTest.java index 46018954e80a..4a8720f837f9 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -24,10 +24,10 @@ import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -46,8 +46,7 @@ public class FakeApiTest { * * this route creates an XmlItem * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createXmlItemTest() throws ApiException { @@ -57,12 +56,9 @@ public void createXmlItemTest() throws ApiException { } /** - * - * * Test serialization of outer boolean types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterBooleanSerializeTest() throws ApiException { @@ -72,12 +68,9 @@ public void fakeOuterBooleanSerializeTest() throws ApiException { } /** - * - * * Test serialization of object with outer number type * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { @@ -87,12 +80,9 @@ public void fakeOuterCompositeSerializeTest() throws ApiException { } /** - * - * * Test serialization of outer number types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterNumberSerializeTest() throws ApiException { @@ -102,12 +92,9 @@ public void fakeOuterNumberSerializeTest() throws ApiException { } /** - * - * * Test serialization of outer string types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterStringSerializeTest() throws ApiException { @@ -117,12 +104,9 @@ public void fakeOuterStringSerializeTest() throws ApiException { } /** - * - * * For this test, the body for this request much reference a schema named `File`. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { @@ -132,12 +116,7 @@ public void testBodyWithFileSchemaTest() throws ApiException { } /** - * - * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithQueryParamsTest() throws ApiException { @@ -152,8 +131,7 @@ public void testBodyWithQueryParamsTest() throws ApiException { * * To test \"client\" model * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClientModelTest() throws ApiException { @@ -167,8 +145,7 @@ public void testClientModelTest() throws ApiException { * * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEndpointParametersTest() throws ApiException { @@ -195,8 +172,7 @@ public void testEndpointParametersTest() throws ApiException { * * To test enum parameters * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEnumParametersTest() throws ApiException { @@ -217,8 +193,7 @@ public void testEnumParametersTest() throws ApiException { * * Fake endpoint to test group parameters (optional) * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testGroupParametersTest() throws ApiException { @@ -242,10 +217,7 @@ public void testGroupParametersTest() throws ApiException { /** * test inline additionalProperties * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { @@ -257,10 +229,7 @@ public void testInlineAdditionalPropertiesTest() throws ApiException { /** * test json serialization of form data * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testJsonFormDataTest() throws ApiException { @@ -271,12 +240,9 @@ public void testJsonFormDataTest() throws ApiException { } /** - * - * * To test the collection format in query parameters * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testQueryParameterCollectionFormatTest() throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index ec48a0fbc49e..fdf6c4c637b5 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -16,10 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.Client; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -38,8 +38,7 @@ public class FakeClassnameTags123ApiTest { * * To test class name in snake case * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClassnameTest() throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/PetApiTest.java index adabbeefdb54..490cf38aa0a2 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -19,10 +19,10 @@ import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; import java.util.Set; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -39,10 +39,7 @@ public class PetApiTest { /** * Add a new pet to the store * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void addPetTest() throws ApiException { @@ -54,10 +51,7 @@ public void addPetTest() throws ApiException { /** * Deletes a pet * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deletePetTest() throws ApiException { @@ -72,8 +66,7 @@ public void deletePetTest() throws ApiException { * * Multiple status values can be provided with comma separated strings * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void findPetsByStatusTest() throws ApiException { @@ -87,8 +80,7 @@ public void findPetsByStatusTest() throws ApiException { * * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void findPetsByTagsTest() throws ApiException { @@ -102,8 +94,7 @@ public void findPetsByTagsTest() throws ApiException { * * Returns a single pet * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getPetByIdTest() throws ApiException { @@ -115,10 +106,7 @@ public void getPetByIdTest() throws ApiException { /** * Update an existing pet * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updatePetTest() throws ApiException { @@ -130,10 +118,7 @@ public void updatePetTest() throws ApiException { /** * Updates a pet in the store with form data * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updatePetWithFormTest() throws ApiException { @@ -147,27 +132,21 @@ public void updatePetWithFormTest() throws ApiException { /** * uploads an image * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void uploadFileTest() throws ApiException { //Long petId = null; //String additionalMetadata = null; - //File file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + //File _file = null; + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); // TODO: test validations } /** * uploads an image (required) * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void uploadFileWithRequiredFileTest() throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java index 7b50f6b4f9a6..97fed8776ae9 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -16,10 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.Order; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -38,8 +38,7 @@ public class StoreApiTest { * * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteOrderTest() throws ApiException { @@ -53,8 +52,7 @@ public void deleteOrderTest() throws ApiException { * * Returns a map of status codes to quantities * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getInventoryTest() throws ApiException { @@ -67,8 +65,7 @@ public void getInventoryTest() throws ApiException { * * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getOrderByIdTest() throws ApiException { @@ -80,10 +77,7 @@ public void getOrderByIdTest() throws ApiException { /** * Place an order for a pet * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void placeOrderTest() throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/UserApiTest.java index 8fbc8a1c41c3..26e3b6cb9a57 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,11 +15,12 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; +import java.time.LocalDateTime; import org.openapitools.client.model.User; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -38,8 +39,7 @@ public class UserApiTest { * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUserTest() throws ApiException { @@ -51,10 +51,7 @@ public void createUserTest() throws ApiException { /** * Creates list of users with given input array * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithArrayInputTest() throws ApiException { @@ -66,10 +63,7 @@ public void createUsersWithArrayInputTest() throws ApiException { /** * Creates list of users with given input array * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithListInputTest() throws ApiException { @@ -83,8 +77,7 @@ public void createUsersWithListInputTest() throws ApiException { * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteUserTest() throws ApiException { @@ -96,10 +89,7 @@ public void deleteUserTest() throws ApiException { /** * Get user by user name * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getUserByNameTest() throws ApiException { @@ -111,10 +101,7 @@ public void getUserByNameTest() throws ApiException { /** * Logs user into the system * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void loginUserTest() throws ApiException { @@ -127,10 +114,7 @@ public void loginUserTest() throws ApiException { /** * Logs out current logged in user session * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void logoutUserTest() throws ApiException { @@ -143,8 +127,7 @@ public void logoutUserTest() throws ApiException { * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updateUserTest() throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index f2095c074e8b..8ce22388dfeb 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index fe5f0c8d8955..50c7b561d0d9 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesArray diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index dee5bf58edbe..ab541eaf2f08 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 0217e6cd5dcd..d063172adbb5 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -24,10 +24,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesClass diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 0c2df93bbc42..cf316c81eac0 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index bf5a6b9b3976..90ce9a47e6e7 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index c3f49d35f5d9..b8018e096b44 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesObject diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index ab76e203771a..b3983592a1d5 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesString diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AnimalTest.java index 3475d2be3123..83e370cc428a 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -25,10 +26,10 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Animal diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 928e2973997f..843755edbbef 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -23,10 +23,10 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 0c02796dc797..7c4c38a6e064 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -23,10 +23,10 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayOfNumberOnly diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayTestTest.java index bc5ac744672d..58d78aa4a5cd 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -23,10 +23,10 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayTest diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java index 83346220fd0e..3dc8d1088048 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for BigCatAllOf diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatTest.java index c9c1f264e0e9..3a16ebc5c4ed 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -24,10 +25,10 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for BigCat diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CapitalizationTest.java index ffa72405fa86..f36daac40c15 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Capitalization diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 7884c04c72eb..a0731738b24d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for CatAllOf diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatTest.java index 02f70ea913e0..88aa8d34daa8 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatTest.java @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -25,10 +26,10 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Cat diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CategoryTest.java index 7f149cec8544..8ad0eee05e0a 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Category diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClassModelTest.java index afac01e835cb..d60c8d4aaabb 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ClassModel diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClientTest.java index cf90750a9114..f6759ee68279 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ClientTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Client diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 0ac24507de6b..7e139a4d950e 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for DogAllOf diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogTest.java index 2903f6657e0f..e6f849f7f8c8 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogTest.java @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -24,10 +25,10 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Dog diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 3130e2a5a057..cfb1a337de90 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -22,10 +22,10 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EnumArrays diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd2..50fc9572fcdd 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EnumClass diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumTestTest.java index eb783880536e..90a44757f7cc 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EnumTest diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index c3c78aa3aa53..aad267bb2416 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -22,10 +22,11 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.client.model.ModelFile; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for FileSchemaTestClass @@ -42,11 +43,11 @@ public void testFileSchemaTestClass() { } /** - * Test the property 'file' + * Test the property '_file' */ @Test - public void fileTest() { - // TODO: test file + public void _fileTest() { + // TODO: test _file } /** diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FormatTestTest.java index d9f1088af072..bb9eb6533782 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -25,10 +25,10 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.util.UUID; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for FormatTest diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index e28f7d7441bd..2102a335f53b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for HasOnlyReadOnly diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MapTestTest.java index 8d1b64dfce77..b8483619edfb 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -23,10 +23,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for MapTest diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 3843d7c80c30..ff343059bae0 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -26,10 +26,10 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 20dee01ae5da..9a98de5ff16d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Model200Response diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 5dfb76f406a7..31fe5cea6c4b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelApiResponse diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelFileTest.java index 5b3fde28d4b4..2fad149d668b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelFile diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelListTest.java index 36755ee2bd6a..3c7f35ce7291 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelList diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelReturnTest.java index a1517b158a59..0d3f00e6fc46 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelReturn diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NameTest.java index d54b90ad166e..8a50c814697b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NameTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Name diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 4238632f54b8..c7e5efc28ccd 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for NumberOnly diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OrderTest.java index ee98599353e6..a7f88efb0cb9 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OrderTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.LocalDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Order diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 527a5df91af9..0eab13de6999 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterComposite diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf0..052ad003478d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterEnum diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/PetTest.java index 865e589be848..02e4f61b1fbd 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/PetTest.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; @@ -26,10 +27,10 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Pet diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 5d460c3c6979..86f8a92da18d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ReadOnlyFirst diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index da6a64c20f6b..9b8b4c09777b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for SpecialModelName diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TagTest.java index 51852d800581..97e1aa2743a5 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TagTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Tag diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 16918aa98d99..6fe4167df523 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -23,10 +23,10 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for TypeHolderDefault diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index 53d531b37eae..aae9fb060874 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -23,10 +23,10 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for TypeHolderExample diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/UserTest.java index 335a8f560bbf..7cafaf9a38ae 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/UserTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for User diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/XmlItemTest.java index d988813dbb27..50cc72a5ed45 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -23,10 +23,10 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for XmlItem diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle index 44c89afeab52..d53694126554 100644 --- a/samples/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/client/petstore/java/jersey2-java8/build.gradle @@ -11,8 +11,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.6.3" - jackson_version = "2.13.0" - jackson_databind_version = "2.13.0" + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2.2" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" jersey_version = "2.35" - junit_version = "4.13.2" + junit_version = "5.8.2" scribejava_apis_version = "8.3.1" } @@ -123,7 +123,12 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() } javadoc { diff --git a/samples/client/petstore/java/jersey2-java8/build.sbt b/samples/client/petstore/java/jersey2-java8/build.sbt index 5a45537b1203..7d1e0c9a31b9 100644 --- a/samples/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/client/petstore/java/jersey2-java8/build.sbt @@ -10,20 +10,19 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "com.google.code.findbugs" % "jsr305" % "3.0.0", - "io.swagger" % "swagger-annotations" % "1.6.3", + "io.swagger" % "swagger-annotations" % "1.6.5", "org.glassfish.jersey.core" % "jersey-client" % "2.35", "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", - "com.fasterxml.jackson.core" % "jackson-core" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.0" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.2" % "compile", "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Animal.md b/samples/client/petstore/java/jersey2-java8/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Animal.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md index 1634ef64dbbb..c95eeb0b8c8c 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ArrayTest.md b/samples/client/petstore/java/jersey2-java8/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ArrayTest.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/BigCat.md b/samples/client/petstore/java/jersey2-java8/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/BigCat.md +++ b/samples/client/petstore/java/jersey2-java8/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md b/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md b/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Cat.md b/samples/client/petstore/java/jersey2-java8/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Cat.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md b/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md +++ b/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Category.md b/samples/client/petstore/java/jersey2-java8/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Category.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md b/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Client.md b/samples/client/petstore/java/jersey2-java8/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Client.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Dog.md b/samples/client/petstore/java/jersey2-java8/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Dog.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md b/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md +++ b/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/EnumArrays.md b/samples/client/petstore/java/jersey2-java8/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/EnumArrays.md +++ b/samples/client/petstore/java/jersey2-java8/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/jersey2-java8/docs/EnumTest.md b/samples/client/petstore/java/jersey2-java8/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/EnumTest.md +++ b/samples/client/petstore/java/jersey2-java8/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index dea5e70e5cc1..f0c93223e4ad 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -127,9 +127,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -192,9 +192,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -258,9 +258,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -323,9 +323,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -387,9 +387,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -450,10 +450,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -516,9 +516,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -691,16 +691,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -775,14 +775,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -842,9 +842,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **Map<String,String>**| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **Map<String,String>**| request body | | ### Return type @@ -905,10 +905,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -974,13 +974,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | **List<String>**| | - **ioutil** | **List<String>**| | - **http** | **List<String>**| | - **url** | **List<String>**| | - **context** | **List<String>**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | **List<String>**| | | +| **ioutil** | **List<String>**| | | +| **http** | **List<String>**| | | +| **url** | **List<String>**| | | +| **context** | **List<String>**| | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md index 66d3f7890a3a..77a56bad6f35 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md b/samples/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/FormatTest.md b/samples/client/petstore/java/jersey2-java8/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FormatTest.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/MapTest.md b/samples/client/petstore/java/jersey2-java8/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2-java8/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md b/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md b/samples/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ModelFile.md b/samples/client/petstore/java/jersey2-java8/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ModelFile.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ModelList.md b/samples/client/petstore/java/jersey2-java8/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ModelList.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md b/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Name.md b/samples/client/petstore/java/jersey2-java8/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Name.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/NumberOnly.md b/samples/client/petstore/java/jersey2-java8/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/NumberOnly.md +++ b/samples/client/petstore/java/jersey2-java8/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Order.md b/samples/client/petstore/java/jersey2-java8/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Order.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/jersey2-java8/docs/OuterComposite.md b/samples/client/petstore/java/jersey2-java8/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/OuterComposite.md +++ b/samples/client/petstore/java/jersey2-java8/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/Pet.md b/samples/client/petstore/java/jersey2-java8/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Pet.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index a451f62d88c7..57e78be6d9e5 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -129,10 +129,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -201,9 +201,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -272,9 +272,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | **List<String>**| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | **List<String>**| Tags to filter by | | ### Return type @@ -345,9 +345,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -414,9 +414,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -486,11 +486,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -559,11 +559,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -632,11 +632,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/SpecialModelName.md b/samples/client/petstore/java/jersey2-java8/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/SpecialModelName.md +++ b/samples/client/petstore/java/jersey2-java8/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md index 6335befe4714..7e88578e3c5b 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -186,9 +186,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -251,9 +251,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/Tag.md b/samples/client/petstore/java/jersey2-java8/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Tag.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/TypeHolderDefault.md b/samples/client/petstore/java/jersey2-java8/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/jersey2-java8/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/jersey2-java8/docs/TypeHolderExample.md b/samples/client/petstore/java/jersey2-java8/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/jersey2-java8/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/jersey2-java8/docs/User.md b/samples/client/petstore/java/jersey2-java8/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/User.md +++ b/samples/client/petstore/java/jersey2-java8/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md index d81d5f802230..57be237f5f9a 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -118,9 +118,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -180,9 +180,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -244,9 +244,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -308,9 +308,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -374,10 +374,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -499,10 +499,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/XmlItem.md b/samples/client/petstore/java/jersey2-java8/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/XmlItem.md +++ b/samples/client/petstore/java/jersey2-java8/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index 630427c43d81..97d990a4dc93 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -102,7 +102,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -330,22 +330,22 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test UTF-8 - 1.6.3 + 1.6.5 2.35 - 2.13.0 - 2.13.0 + 2.13.2 + 2.13.2.2 0.2.2 1.3.5 - 4.13.2 + 5.8.2 8.3.1 - 2.17.3 + 2.21.0 diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java index f0e2f9e2ade7..62c11177942e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +42,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCat.java index 73ccb294016d..68eba7be5f3e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java index c66294bbd00e..73484afc2dc0 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java index ed024e163482..da6c79f2fa3f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java index 729490278764..c3cb6e6ac361 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java @@ -7,14 +7,14 @@ import java.text.SimpleDateFormat; import java.util.*; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class ApiClientTest { ApiClient apiClient = null; - @Before + @BeforeEach public void setup() { apiClient = new ApiClient(); } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ConfigurationTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ConfigurationTest.java index f05c230dc758..55b8aff3587f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ConfigurationTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ConfigurationTest.java @@ -1,7 +1,8 @@ package org.openapitools.client; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; + +import static org.junit.jupiter.api.Assertions.*; public class ConfigurationTest { diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java index 26c568d1956a..bd01fa26adbd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java @@ -10,15 +10,17 @@ import java.time.OffsetDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; -import org.junit.*; -import static org.junit.Assert.*; + +import org.junit.jupiter.api.*; + +import static org.junit.jupiter.api.Assertions.*; public class JSONTest { JSON json = null; Order order = null; - @Before + @BeforeEach public void setup() { json = new JSON(); order = new Order(); @@ -42,7 +44,7 @@ public void testRFC3339DateFormatDate() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S'Z'"); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); Date date = sdf.parse(dateStr); - + RFC3339DateFormat df = new RFC3339DateFormat(); StringBuffer sb = new StringBuffer(); String s = df.format(date); @@ -54,7 +56,7 @@ public void testRFC3339DateFormatDate() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S"); sdf.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles")); Date date = sdf.parse(dateStr); - + RFC3339DateFormat df = new RFC3339DateFormat(); StringBuffer sb = new StringBuffer(); String s = df.format(date); @@ -74,7 +76,7 @@ public void testCustomDate() throws Exception { } /** - * Validate a schema with special characters can be deserialized. + * Validate a schema with special characters can be deserialized. */ @Test public void testSchemaWithSpecialCharacters() throws Exception { @@ -85,6 +87,6 @@ public void testSchemaWithSpecialCharacters() throws Exception { // of the @JsonSubTypes annotation. SpecialModelName o = json.getContext(null).readValue(str, SpecialModelName.class); assertNotNull(o); - assertEquals((long)12345, (long)o.get$SpecialPropertyName()); - } + assertEquals((long) 12345, (long) o.get$SpecialPropertyName()); + } } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/StringUtilTest.java index aa7c81759ec4..fb999c8d0448 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/StringUtilTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/StringUtilTest.java @@ -1,7 +1,8 @@ package org.openapitools.client; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; + +import static org.junit.jupiter.api.Assertions.*; public class StringUtilTest { diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 837b5ea02461..3027dabacb6e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for AnotherFakeApi */ -@Ignore +@Disabled public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java index 8640ddbe82ec..33689726ebff 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -23,8 +23,8 @@ import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -34,7 +34,7 @@ /** * API tests for FakeApi */ -@Ignore +@Disabled public class FakeApiTest { private final FakeApi api = new FakeApi(); diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 71999316797a..506fbd74b25a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for FakeClassnameTags123Api */ -@Ignore +@Disabled public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java index 11dcafbcc11d..7a253d8d5a6c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -13,8 +13,9 @@ package org.openapitools.client.api; -import org.junit.Assert; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; @@ -64,39 +65,39 @@ public void addPetTest() throws ApiException { //get pet by ID Pet result = api.getPetById(petId); - Assert.assertEquals(result.getId(), body.getId()); - Assert.assertEquals(result.getCategory(), category); - Assert.assertEquals(result.getName(), body.getName()); - Assert.assertEquals(result.getPhotoUrls(), body.getPhotoUrls()); - Assert.assertEquals(result.getStatus(), body.getStatus()); - Assert.assertEquals(result.getTags(), body.getTags()); + assertEquals(result.getId(), body.getId()); + assertEquals(result.getCategory(), category); + assertEquals(result.getName(), body.getName()); + assertEquals(result.getPhotoUrls(), body.getPhotoUrls()); + assertEquals(result.getStatus(), body.getStatus()); + assertEquals(result.getTags(), body.getTags()); // update pet api.updatePetWithForm(petId, "jersey2 java8 pet 2", "sold"); //get pet by ID Pet result2 = api.getPetById(petId); - Assert.assertEquals(result2.getId(), body.getId()); - Assert.assertEquals(result2.getCategory(), category); - Assert.assertEquals(result2.getName(), "jersey2 java8 pet 2"); - Assert.assertEquals(result2.getPhotoUrls(), body.getPhotoUrls()); - Assert.assertEquals(result2.getStatus(), Pet.StatusEnum.SOLD); - Assert.assertEquals(result2.getTags(), body.getTags()); + assertEquals(result2.getId(), body.getId()); + assertEquals(result2.getCategory(), category); + assertEquals(result2.getName(), "jersey2 java8 pet 2"); + assertEquals(result2.getPhotoUrls(), body.getPhotoUrls()); + assertEquals(result2.getStatus(), Pet.StatusEnum.SOLD); + assertEquals(result2.getTags(), body.getTags()); // delete pet api.deletePet(petId, "empty api key"); try { Pet result3 = api.getPetById(petId); - Assert.assertEquals(false, true); + assertEquals(false, true); } catch (ApiException e) { // System.err.println("Exception when calling PetApi#getPetById"); // System.err.println("Status code: " + e.getCode()); // System.err.println("Reason: " + e.getResponseBody()); // System.err.println("Response headers: " + e.getResponseHeaders()); - Assert.assertEquals(e.getCode(), 404); - Assert.assertEquals(e.getResponseBody(), "{\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}"); + assertEquals(e.getCode(), 404); + assertEquals(e.getResponseBody(), "{\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}"); } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java index cd36a70fece3..768b5e53f3c0 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for StoreApi */ -@Ignore +@Disabled public class StoreApiTest { private final StoreApi api = new StoreApi(); diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java index f7ef9050c955..b63e4f889121 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for UserApi */ -@Ignore +@Disabled public class UserApiTest { private final UserApi api = new UserApi(); diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index 3e3351520928..029abcf9a87f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -7,8 +7,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class ApiKeyAuthTest { diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index 88b2105e24f2..a9c0bea6236c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -7,14 +7,14 @@ import org.openapitools.client.ApiException; import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class HttpBasicAuthTest { HttpBasicAuth auth = null; - @Before + @BeforeEach public void setup() { auth = new HttpBasicAuth(); } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index ec44af783873..5ff24e3b1db8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index ceb024c5620b..e4f735d1f98d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -22,9 +22,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index 517e5a10ae43..f360bed32a4d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 2e3844ba9756..61c3012d1b7a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -23,9 +23,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 66a7b85623e3..b18196228a16 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index 4e03485a4484..84f3e5f3bf4c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index e0c72c586347..c029642629b9 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index c84d987e7640..5119a466aa11 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java index c0d10ec5a3d8..9bc2a7284da7 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,9 +21,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index e25187a3b608..874c6418ebe4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index ae1061823991..0338a636b3a0 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 36bd9951cf60..4e8e2397a0d2 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java index a9b13011f001..2f95a2b26b49 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatTest.java index 006c80707427..7e67e5384d9f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java index a701b341fc59..d1125813c378 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 1d85a0447253..a86b3be62456 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java index dbf40678a2d0..60f53de5475b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.CatAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java index 6027994a2ac3..fae44f08ef92 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java index 8914c9cad43d..56e677bf881d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java index c21b346272d7..d4eac9796e58 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 6e4b49108098..e58c9fc20259 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java index a46bc508d48c..fb907dc01622 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 45b8fbbd8220..e4cf485c95a3 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd2..19518a5f665b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java index 04e7afb19784..f08d6bcc45b4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -20,9 +20,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumValueTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumValueTest.java index 47bfe940d3c3..c0fc143664a8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumValueTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumValueTest.java @@ -1,14 +1,12 @@ package org.openapitools.client.model; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.SerializationFeature; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; public class EnumValueTest { diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index ef37e666be39..84610c84c644 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java index 73a1f737503f..d6e7dbde0dc3 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -24,9 +24,9 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.UUID; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index e902c100383b..90232f9d9e5e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java index a0c991bb7588..f4f47e5df9bb 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -22,9 +22,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 630b566f54db..aca82a97f349 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -25,9 +25,9 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 82c7208079db..4f3ee95ad76c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 97a1287aa413..0c5b9ef7c1dd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java index 5b3fde28d4b4..134e99fd9fe9 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -20,9 +20,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java index 36755ee2bd6a..9e11206a9cf6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -20,9 +20,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java index f884519ebc86..12ef6f3c2310 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java index cb3a94cf74ab..58b4e8c42c2f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index f4fbd5ee8b42..e153e05f1cb0 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -20,9 +20,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java index da63441c6597..23d65d32365c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java @@ -20,9 +20,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index ebea3ca304c0..c7fcf40f61fe 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -20,9 +20,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf0..f7293142020a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java index c3c0d4cc35dd..ae3aff72a780 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java @@ -23,9 +23,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index b82a7d0ef561..fd0c6e28a4ea 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index d5a19c371e68..53d311c2d480 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java index 5c2cc6f49e05..1f543598374a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index e96ac744439d..8aeb85a22b79 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index 56641d163a50..d3134fcafde4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java index ce40d3a2a637..2e07ef00a86a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java index 501c414555f4..c181da49eda2 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -22,9 +22,9 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/jersey3/.github/workflows/maven.yml b/samples/client/petstore/java/jersey3/.github/workflows/maven.yml new file mode 100644 index 000000000000..89fbd4999bc1 --- /dev/null +++ b/samples/client/petstore/java/jersey3/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build OpenAPI Petstore + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/samples/client/petstore/java/jersey3/.gitignore b/samples/client/petstore/java/jersey3/.gitignore new file mode 100644 index 000000000000..a530464afa1b --- /dev/null +++ b/samples/client/petstore/java/jersey3/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/samples/client/petstore/java/jersey3/.openapi-generator-ignore b/samples/client/petstore/java/jersey3/.openapi-generator-ignore new file mode 100644 index 000000000000..16d6986fc2e5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/.openapi-generator-ignore @@ -0,0 +1,4 @@ +# OpenAPI Generator Ignore +# These are "live" test files which should not be overwritten +src/test/java/org/openapitools/client/JSONTest.java +src/test/java/org/openapitools/client/JSONComposedSchemaTest.java diff --git a/samples/client/petstore/java/jersey3/.openapi-generator/FILES b/samples/client/petstore/java/jersey3/.openapi-generator/FILES new file mode 100644 index 000000000000..d9a7d4789da6 --- /dev/null +++ b/samples/client/petstore/java/jersey3/.openapi-generator/FILES @@ -0,0 +1,201 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/AdditionalPropertiesClass.md +docs/Animal.md +docs/AnotherFakeApi.md +docs/Apple.md +docs/AppleReq.md +docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfNumberOnly.md +docs/ArrayTest.md +docs/Banana.md +docs/BananaReq.md +docs/BasquePig.md +docs/Capitalization.md +docs/Cat.md +docs/CatAllOf.md +docs/Category.md +docs/ChildCat.md +docs/ChildCatAllOf.md +docs/ClassModel.md +docs/Client.md +docs/ComplexQuadrilateral.md +docs/DanishPig.md +docs/DefaultApi.md +docs/DeprecatedObject.md +docs/Dog.md +docs/DogAllOf.md +docs/Drawing.md +docs/EnumArrays.md +docs/EnumClass.md +docs/EnumTest.md +docs/EquilateralTriangle.md +docs/FakeApi.md +docs/FakeClassnameTags123Api.md +docs/FileSchemaTestClass.md +docs/Foo.md +docs/FormatTest.md +docs/Fruit.md +docs/FruitReq.md +docs/GmFruit.md +docs/GrandparentAnimal.md +docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md +docs/InlineResponseDefault.md +docs/IsoscelesTriangle.md +docs/Mammal.md +docs/MapTest.md +docs/MixedPropertiesAndAdditionalPropertiesClass.md +docs/Model200Response.md +docs/ModelApiResponse.md +docs/ModelFile.md +docs/ModelList.md +docs/ModelReturn.md +docs/Name.md +docs/NullableClass.md +docs/NullableShape.md +docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md +docs/Order.md +docs/OuterComposite.md +docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/ParentPet.md +docs/Pet.md +docs/PetApi.md +docs/Pig.md +docs/Quadrilateral.md +docs/QuadrilateralInterface.md +docs/ReadOnlyFirst.md +docs/ScaleneTriangle.md +docs/Shape.md +docs/ShapeInterface.md +docs/ShapeOrNull.md +docs/SimpleQuadrilateral.md +docs/SpecialModelName.md +docs/StoreApi.md +docs/Tag.md +docs/Triangle.md +docs/TriangleInterface.md +docs/User.md +docs/UserApi.md +docs/Whale.md +docs/Zebra.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/org/openapitools/client/ApiClient.java +src/main/java/org/openapitools/client/ApiException.java +src/main/java/org/openapitools/client/ApiResponse.java +src/main/java/org/openapitools/client/Configuration.java +src/main/java/org/openapitools/client/JSON.java +src/main/java/org/openapitools/client/JavaTimeFormatter.java +src/main/java/org/openapitools/client/Pair.java +src/main/java/org/openapitools/client/RFC3339DateFormat.java +src/main/java/org/openapitools/client/ServerConfiguration.java +src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/StringUtil.java +src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java +src/main/java/org/openapitools/client/api/FakeApi.java +src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +src/main/java/org/openapitools/client/api/PetApi.java +src/main/java/org/openapitools/client/api/StoreApi.java +src/main/java/org/openapitools/client/api/UserApi.java +src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +src/main/java/org/openapitools/client/auth/Authentication.java +src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java +src/main/java/org/openapitools/client/auth/OAuth.java +src/main/java/org/openapitools/client/auth/OAuthFlow.java +src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/client/model/Animal.java +src/main/java/org/openapitools/client/model/Apple.java +src/main/java/org/openapitools/client/model/AppleReq.java +src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/client/model/ArrayTest.java +src/main/java/org/openapitools/client/model/Banana.java +src/main/java/org/openapitools/client/model/BananaReq.java +src/main/java/org/openapitools/client/model/BasquePig.java +src/main/java/org/openapitools/client/model/Capitalization.java +src/main/java/org/openapitools/client/model/Cat.java +src/main/java/org/openapitools/client/model/CatAllOf.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/ChildCat.java +src/main/java/org/openapitools/client/model/ChildCatAllOf.java +src/main/java/org/openapitools/client/model/ClassModel.java +src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +src/main/java/org/openapitools/client/model/DanishPig.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java +src/main/java/org/openapitools/client/model/Dog.java +src/main/java/org/openapitools/client/model/DogAllOf.java +src/main/java/org/openapitools/client/model/Drawing.java +src/main/java/org/openapitools/client/model/EnumArrays.java +src/main/java/org/openapitools/client/model/EnumClass.java +src/main/java/org/openapitools/client/model/EnumTest.java +src/main/java/org/openapitools/client/model/EquilateralTriangle.java +src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FormatTest.java +src/main/java/org/openapitools/client/model/Fruit.java +src/main/java/org/openapitools/client/model/FruitReq.java +src/main/java/org/openapitools/client/model/GmFruit.java +src/main/java/org/openapitools/client/model/GrandparentAnimal.java +src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java +src/main/java/org/openapitools/client/model/InlineResponseDefault.java +src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +src/main/java/org/openapitools/client/model/Mammal.java +src/main/java/org/openapitools/client/model/MapTest.java +src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/client/model/Model200Response.java +src/main/java/org/openapitools/client/model/ModelApiResponse.java +src/main/java/org/openapitools/client/model/ModelFile.java +src/main/java/org/openapitools/client/model/ModelList.java +src/main/java/org/openapitools/client/model/ModelReturn.java +src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java +src/main/java/org/openapitools/client/model/NullableShape.java +src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +src/main/java/org/openapitools/client/model/Order.java +src/main/java/org/openapitools/client/model/OuterComposite.java +src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/ParentPet.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Pig.java +src/main/java/org/openapitools/client/model/Quadrilateral.java +src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/ScaleneTriangle.java +src/main/java/org/openapitools/client/model/Shape.java +src/main/java/org/openapitools/client/model/ShapeInterface.java +src/main/java/org/openapitools/client/model/ShapeOrNull.java +src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +src/main/java/org/openapitools/client/model/SpecialModelName.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/Triangle.java +src/main/java/org/openapitools/client/model/TriangleInterface.java +src/main/java/org/openapitools/client/model/User.java +src/main/java/org/openapitools/client/model/Whale.java +src/main/java/org/openapitools/client/model/Zebra.java diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/java/jersey3/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION rename to samples/client/petstore/java/jersey3/.openapi-generator/VERSION diff --git a/samples/client/petstore/java/jersey3/.travis.yml b/samples/client/petstore/java/jersey3/.travis.yml new file mode 100644 index 000000000000..1b6741c083c7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/samples/client/petstore/java/jersey3/README.md b/samples/client/petstore/java/jersey3/README.md new file mode 100644 index 000000000000..a03601a1c49f --- /dev/null +++ b/samples/client/petstore/java/jersey3/README.md @@ -0,0 +1,287 @@ +# petstore-jersey3 + +OpenAPI Petstore + +- API version: 1.0.0 + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 1.8+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools + petstore-jersey3 + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the 'petstore-jersey3' jar has been published to maven central. + mavenLocal() // Needed if the 'petstore-jersey3' jar has been published to the local maven repo. + } + + dependencies { + implementation "org.openapitools:petstore-jersey3:1.0.0" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/petstore-jersey3-1.0.0.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.AnotherFakeApi; + +public class AnotherFakeApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client client = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +*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* | [**getArrayOfEnums**](docs/FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums +*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-parameters | +*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) + - [Apple](docs/Apple.md) + - [AppleReq](docs/AppleReq.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Banana](docs/Banana.md) + - [BananaReq](docs/BananaReq.md) + - [BasquePig](docs/BasquePig.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ChildCat](docs/ChildCat.md) + - [ChildCatAllOf](docs/ChildCatAllOf.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) + - [DanishPig](docs/DanishPig.md) + - [DeprecatedObject](docs/DeprecatedObject.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [Drawing](docs/Drawing.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [EquilateralTriangle](docs/EquilateralTriangle.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FormatTest](docs/FormatTest.md) + - [Fruit](docs/Fruit.md) + - [FruitReq](docs/FruitReq.md) + - [GmFruit](docs/GmFruit.md) + - [GrandparentAnimal](docs/GrandparentAnimal.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) + - [InlineResponseDefault](docs/InlineResponseDefault.md) + - [IsoscelesTriangle](docs/IsoscelesTriangle.md) + - [Mammal](docs/Mammal.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [ModelApiResponse](docs/ModelApiResponse.md) + - [ModelFile](docs/ModelFile.md) + - [ModelList](docs/ModelList.md) + - [ModelReturn](docs/ModelReturn.md) + - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) + - [NullableShape](docs/NullableShape.md) + - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.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) + - [ParentPet](docs/ParentPet.md) + - [Pet](docs/Pet.md) + - [Pig](docs/Pig.md) + - [Quadrilateral](docs/Quadrilateral.md) + - [QuadrilateralInterface](docs/QuadrilateralInterface.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [ScaleneTriangle](docs/ScaleneTriangle.md) + - [Shape](docs/Shape.md) + - [ShapeInterface](docs/ShapeInterface.md) + - [ShapeOrNull](docs/ShapeOrNull.md) + - [SimpleQuadrilateral](docs/SimpleQuadrilateral.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [Tag](docs/Tag.md) + - [Triangle](docs/Triangle.md) + - [TriangleInterface](docs/TriangleInterface.md) + - [User](docs/User.md) + - [Whale](docs/Whale.md) + - [Zebra](docs/Zebra.md) + + +## Documentation for Authorization + +Authentication schemes defined for the API: +### api_key + + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +### api_key_query + + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +### bearer_test + + +- **Type**: HTTP basic authentication + +### http_basic_test + + +- **Type**: HTTP basic authentication + +### http_signature_test + + +- **Type**: HTTP basic authentication + +### petstore_auth + + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - write:pets: modify pets in your account + - read:pets: read your pets + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml new file mode 100644 index 000000000000..6e508514df84 --- /dev/null +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -0,0 +1,2493 @@ +openapi: 3.0.0 +info: + description: "This spec is mainly for testing Petstore server and contains fake\ + \ endpoints, models. Please do not use this for any other purpose. Special characters:\ + \ \" \\" + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_variable +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_default' + description: response + x-accepts: application/json + /pet: + post: + description: "" + operationId: addPet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "405": + description: Invalid input + security: + - http_signature_test: [] + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-content-type: application/json + x-accepts: application/json + put: + description: "" + operationId: updatePet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "400": + description: Invalid ID supplied + "404": + description: Pet not found + "405": + description: Validation exception + security: + - http_signature_test: [] + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-content-type: application/json + x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - deprecated: true + description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "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: + - http_signature_test: [] + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + /pet/findByTags: + get: + deprecated: true + description: "Multiple tags can be provided with comma separated strings. Use\ + \ tag1, tag2, tag3 for testing." + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid tag value + security: + - http_signature_test: [] + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + /pet/{petId}: + delete: + description: "" + operationId: deletePet + parameters: + - explode: false + in: header + name: api_key + required: false + schema: + type: string + style: simple + - description: Pet id to delete + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "400": + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + 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 + x-accepts: application/json + post: + description: "" + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $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 + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + /pet/{petId}/uploadImage: + post: + description: "" + operationId: uploadFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $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 + x-content-type: multipart/form-data + x-accepts: application/json + /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 + x-accepts: application/json + /store/order: + post: + description: "" + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-content-type: application/json + x-accepts: application/json + /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 + x-accepts: application/json + 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 + x-accepts: application/json + /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 + x-content-type: application/json + x-accepts: application/json + /user/createWithArray: + post: + description: "" + operationId: createUsersWithArrayInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-content-type: application/json + x-accepts: application/json + /user/createWithList: + post: + description: "" + operationId: createUsersWithListInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-content-type: application/json + x-accepts: application/json + /user/login: + get: + description: "" + operationId: loginUser + parameters: + - description: The user name for login + explode: true + in: query + name: username + required: true + schema: + type: string + style: form + - description: The password for login in clear text + explode: true + in: query + name: password + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + 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 + x-accepts: application/json + /user/logout: + get: + description: "" + operationId: logoutUser + responses: + default: + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + /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 + x-accepts: application/json + get: + description: "" + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + description: Invalid username supplied + "404": + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + 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 + x-content-type: application/json + x-accepts: application/json + /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#$%^ + x-content-type: application/json + x-accepts: application/json + /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 + x-accepts: application/json + 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 + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + 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 + x-content-type: application/json + x-accepts: application/json + 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: + default: 2010-02-01T10:20:10.11111+01:00 + description: None + example: 2020-02-02T20:20:20.22222Z + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + type: object + responses: + "400": + description: Invalid username supplied + "404": + description: User not found + security: + - http_basic_test: [] + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + /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 + x-content-type: application/json + x-accepts: '*/*' + /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 + x-content-type: application/json + x-accepts: '*/*' + /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 + x-content-type: application/json + x-accepts: '*/*' + /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 + x-content-type: application/json + x-accepts: '*/*' + /fake/jsonFormData: + get: + description: "" + 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 + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + /fake/inline-additionalProperties: + post: + description: "" + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-content-type: application/json + x-accepts: application/json + /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 + x-content-type: application/json + x-accepts: application/json + /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? + x-content-type: application/json + x-accepts: application/json + /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 + x-content-type: application/json + x-accepts: application/json + /fake/test-query-parameters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: true + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + description: Success + tags: + - fake + x-accepts: application/json + /fake/{petId}/uploadImageWithRequiredFile: + post: + description: "" + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $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 + x-content-type: multipart/form-data + x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/array-of-enums: + get: + operationId: getArrayOfEnums + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ArrayOfEnums' + description: Got named array of enums + summary: Array of Enums + tags: + - fake + x-accepts: application/json +components: + requestBodies: + UserArray: + content: + application/json: + examples: + simple-list: + description: Should not get into code examples + summary: Simple list example + value: + - username: foo + - username: bar + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + 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: 2020-02-02T20:20:20.000222Z + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + example: 2020-02-02T20:20:20.000222Z + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + objectWithNoDeclaredPropsNullable: "{}" + phone: phone + objectWithNoDeclaredProps: "{}" + id: 0 + anyTypePropNullable: "" + email: email + anyTypeProp: "" + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + objectWithNoDeclaredProps: + description: test code generation for objects Value must be a map of strings + to values. It cannot be the 'null' value. + type: object + objectWithNoDeclaredPropsNullable: + description: test code generation for nullable objects. Value must be a + map of strings to values or the 'null' value. + nullable: true + type: object + anyTypeProp: + description: "test code generation for any type Here the 'type' attribute\ + \ is not specified, which means the value can be anything, including the\ + \ null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389" + anyTypePropNullable: + description: "test code generation for any type Here the 'type' attribute\ + \ is not specified, which means the value can be anything, including the\ + \ null value, string, number, boolean, array or object. The 'nullable'\ + \ attribute does not change the allowed values." + nullable: true + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + 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/Address' + - $ref: '#/components/schemas/Cat_allOf' + Address: + additionalProperties: + type: integer + type: object + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 100 + minimum: 10 + multipleOf: 2 + type: integer + int32: + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + multipleOf: 32.5 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + decimal: + format: number + type: string + string: + pattern: "/[a-z]/i" + type: string + byte: + format: byte + type: string + binary: + format: binary + type: string + date: + example: 2020-02-02 + format: date + type: string + dateTime: + example: 2007-12-03T10:15:30+01:00 + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" + type: string + 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_integer_only: + enum: + - 2 + - -2 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_property: + additionalProperties: + type: string + type: object + map_of_map_property: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + anytype_1: {} + map_with_undeclared_properties_anytype_1: + type: object + map_with_undeclared_properties_anytype_2: + properties: {} + type: object + map_with_undeclared_properties_anytype_3: + additionalProperties: true + type: object + empty_map: + additionalProperties: false + description: "an object with no declared properties and no undeclared properties,\ + \ hence it's an empty map." + type: object + map_with_undeclared_properties_string: + additionalProperties: + type: string + type: object + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + 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 + _special_model.name_: + type: string + xml: + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + fruit: + additionalProperties: false + oneOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + properties: + color: + type: string + apple: + nullable: true + properties: + cultivar: + pattern: "^[a-zA-Z\\s]*$" + type: string + origin: + pattern: "/^[A-Z\\s]*$/i" + type: string + type: object + banana: + properties: + lengthCm: + type: number + type: object + mammal: + discriminator: + propertyName: className + oneOf: + - $ref: '#/components/schemas/whale' + - $ref: '#/components/schemas/zebra' + - $ref: '#/components/schemas/Pig' + whale: + properties: + hasBaleen: + type: boolean + hasTeeth: + type: boolean + className: + type: string + required: + - className + type: object + zebra: + additionalProperties: true + properties: + type: + enum: + - plains + - mountain + - grevys + type: string + className: + type: string + required: + - className + type: object + Pig: + discriminator: + propertyName: className + oneOf: + - $ref: '#/components/schemas/BasquePig' + - $ref: '#/components/schemas/DanishPig' + BasquePig: + properties: + className: + type: string + required: + - className + type: object + DanishPig: + properties: + className: + type: string + required: + - className + type: object + gmFruit: + additionalProperties: false + anyOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + properties: + color: + type: string + fruitReq: + additionalProperties: false + oneOf: + - type: "null" + - $ref: '#/components/schemas/appleReq' + - $ref: '#/components/schemas/bananaReq' + appleReq: + additionalProperties: false + properties: + cultivar: + type: string + mealy: + type: boolean + required: + - cultivar + type: object + bananaReq: + additionalProperties: false + properties: + lengthCm: + type: number + sweet: + type: boolean + required: + - lengthCm + type: object + Drawing: + additionalProperties: + $ref: '#/components/schemas/fruit' + properties: + mainShape: + $ref: '#/components/schemas/Shape' + shapeOrNull: + $ref: '#/components/schemas/ShapeOrNull' + nullableShape: + $ref: '#/components/schemas/NullableShape' + shapes: + items: + $ref: '#/components/schemas/Shape' + type: array + type: object + Shape: + discriminator: + propertyName: shapeType + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + ShapeOrNull: + description: The value may be a shape or the 'null' value. This is introduced + in OAS schema >= 3.1. + discriminator: + propertyName: shapeType + oneOf: + - type: "null" + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + NullableShape: + description: The value may be a shape or the 'null' value. The 'nullable' attribute + was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema + >= 3.1. + discriminator: + propertyName: shapeType + nullable: true + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + ShapeInterface: + properties: + shapeType: + type: string + required: + - shapeType + TriangleInterface: + properties: + triangleType: + type: string + required: + - triangleType + Triangle: + discriminator: + propertyName: triangleType + oneOf: + - $ref: '#/components/schemas/EquilateralTriangle' + - $ref: '#/components/schemas/IsoscelesTriangle' + - $ref: '#/components/schemas/ScaleneTriangle' + EquilateralTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + IsoscelesTriangle: + additionalProperties: false + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + ScaleneTriangle: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/TriangleInterface' + QuadrilateralInterface: + properties: + quadrilateralType: + type: string + required: + - quadrilateralType + Quadrilateral: + discriminator: + propertyName: quadrilateralType + oneOf: + - $ref: '#/components/schemas/SimpleQuadrilateral' + - $ref: '#/components/schemas/ComplexQuadrilateral' + SimpleQuadrilateral: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/QuadrilateralInterface' + ComplexQuadrilateral: + allOf: + - $ref: '#/components/schemas/ShapeInterface' + - $ref: '#/components/schemas/QuadrilateralInterface' + GrandparentAnimal: + discriminator: + propertyName: pet_type + properties: + pet_type: + type: string + required: + - pet_type + type: object + ParentPet: + allOf: + - $ref: '#/components/schemas/GrandparentAnimal' + type: object + ChildCat: + allOf: + - $ref: '#/components/schemas/ParentPet' + - $ref: '#/components/schemas/ChildCat_allOf' + ArrayOfEnums: + items: + $ref: '#/components/schemas/OuterEnum' + type: array + DateTimeTest: + default: 2010-01-01T10:10:10.000111+01:00 + example: 2010-01-01T10:10:10.000111+01:00 + format: date-time + type: string + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + inline_response_default: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object + 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: + default: 2010-02-01T10:20:10.11111+01:00 + description: None + example: 2020-02-02T20:20:20.22222Z + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + type: object + 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 + type: object + Cat_allOf: + properties: + declawed: + type: boolean + type: object + ChildCat_allOf: + properties: + name: + type: string + pet_type: + default: ChildCat + enum: + - ChildCat + type: string + x-enum-as-string: true + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http + diff --git a/samples/client/petstore/java/jersey3/build.gradle b/samples/client/petstore/java/jersey3/build.gradle new file mode 100644 index 000000000000..d0be177a0eb5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/build.gradle @@ -0,0 +1,162 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'com.diffplug.spotless' + +group = 'org.openapitools' +version = '1.0.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'petstore-jersey3' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2" + jackson_databind_nullable_version = "0.2.2" + jakarta_annotation_version = "2.1.0" + jersey_version = "3.0.4" + junit_version = "5.8.2" + scribejava_apis_version = "8.3.1" + tomitribe_http_signatures_version = "1.7" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.glassfish.jersey.core:jersey-client:$jersey_version" + implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" + implementation "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" + implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + removeUnusedImports() + importOrder() + } +} diff --git a/samples/client/petstore/java/jersey3/build.sbt b/samples/client/petstore/java/jersey3/build.sbt new file mode 100644 index 000000000000..02d8f9eb294b --- /dev/null +++ b/samples/client/petstore/java/jersey3/build.sbt @@ -0,0 +1,29 @@ +lazy val root = (project in file(".")). + settings( + organization := "org.openapitools", + name := "petstore-jersey3", + version := "1.0.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + Compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "com.google.code.findbugs" % "jsr305" % "3.0.0", + "io.swagger" % "swagger-annotations" % "1.6.5", + "org.glassfish.jersey.core" % "jersey-client" % "3.0.4", + "org.glassfish.jersey.inject" % "jersey-hk2" % "3.0.4", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "3.0.4", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "3.0.4", + "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "3.0.4", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", + "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", + "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" + ) + ) diff --git a/samples/client/petstore/java/jersey3/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey3/docs/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..83051d9be44b --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/AdditionalPropertiesClass.md @@ -0,0 +1,20 @@ + + +# AdditionalPropertiesClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype3** | **Map<String, Object>** | | [optional] | +|**emptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] | +|**mapWithUndeclaredPropertiesString** | **Map<String, String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Animal.md b/samples/client/petstore/java/jersey3/docs/Animal.md new file mode 100644 index 000000000000..d9b32f14c88a --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Animal.md @@ -0,0 +1,14 @@ + + +# Animal + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey3/docs/AnotherFakeApi.md new file mode 100644 index 000000000000..3cd7cd99f71f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/AnotherFakeApi.md @@ -0,0 +1,74 @@ +# AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | + + + +## call123testSpecialTags + +> Client call123testSpecialTags(client) + +To test special tags + +To test special tags and operation ID starting with number + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.AnotherFakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client client = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey3/docs/Apple.md b/samples/client/petstore/java/jersey3/docs/Apple.md new file mode 100644 index 000000000000..0ef7a92c74d6 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Apple.md @@ -0,0 +1,14 @@ + + +# Apple + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | [optional] | +|**origin** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/AppleReq.md b/samples/client/petstore/java/jersey3/docs/AppleReq.md new file mode 100644 index 000000000000..989e1cfedd1e --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/AppleReq.md @@ -0,0 +1,14 @@ + + +# AppleReq + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | | +|**mealy** | **Boolean** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/jersey3/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..0188db3eb131 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,13 @@ + + +# ArrayOfArrayOfNumberOnly + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/jersey3/docs/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..a5753530aada --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ArrayOfNumberOnly.md @@ -0,0 +1,13 @@ + + +# ArrayOfNumberOnly + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ArrayTest.md b/samples/client/petstore/java/jersey3/docs/ArrayTest.md new file mode 100644 index 000000000000..36077c9df300 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ArrayTest.md @@ -0,0 +1,15 @@ + + +# ArrayTest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Banana.md b/samples/client/petstore/java/jersey3/docs/Banana.md new file mode 100644 index 000000000000..5356d17ee700 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Banana.md @@ -0,0 +1,13 @@ + + +# Banana + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lengthCm** | **BigDecimal** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/BananaReq.md b/samples/client/petstore/java/jersey3/docs/BananaReq.md new file mode 100644 index 000000000000..22ebe1a7105f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/BananaReq.md @@ -0,0 +1,14 @@ + + +# BananaReq + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lengthCm** | **BigDecimal** | | | +|**sweet** | **Boolean** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/BasquePig.md b/samples/client/petstore/java/jersey3/docs/BasquePig.md new file mode 100644 index 000000000000..160cb71c321f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/BasquePig.md @@ -0,0 +1,13 @@ + + +# BasquePig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Capitalization.md b/samples/client/petstore/java/jersey3/docs/Capitalization.md new file mode 100644 index 000000000000..82a812711de2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Capitalization.md @@ -0,0 +1,18 @@ + + +# Capitalization + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Cat.md b/samples/client/petstore/java/jersey3/docs/Cat.md new file mode 100644 index 000000000000..390dd519c8ce --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Cat.md @@ -0,0 +1,13 @@ + + +# Cat + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/CatAllOf.md b/samples/client/petstore/java/jersey3/docs/CatAllOf.md new file mode 100644 index 000000000000..926bc0abd78f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/CatAllOf.md @@ -0,0 +1,13 @@ + + +# CatAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Category.md b/samples/client/petstore/java/jersey3/docs/Category.md new file mode 100644 index 000000000000..ab6d1ec334dc --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Category.md @@ -0,0 +1,14 @@ + + +# Category + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ChildCat.md b/samples/client/petstore/java/jersey3/docs/ChildCat.md new file mode 100644 index 000000000000..6a114cc4ffb3 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ChildCat.md @@ -0,0 +1,22 @@ + + +# ChildCat + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**petType** | [**String**](#String) | | | + + + +## Enum: String + +| Name | Value | +|---- | -----| +| CHILDCAT | "ChildCat" | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ChildCatAllOf.md b/samples/client/petstore/java/jersey3/docs/ChildCatAllOf.md new file mode 100644 index 000000000000..35fac5c5f09f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ChildCatAllOf.md @@ -0,0 +1,22 @@ + + +# ChildCatAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**petType** | [**String**](#String) | | [optional] | + + + +## Enum: String + +| Name | Value | +|---- | -----| +| CHILDCAT | "ChildCat" | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ClassModel.md b/samples/client/petstore/java/jersey3/docs/ClassModel.md new file mode 100644 index 000000000000..af46dea1f6c8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ClassModel.md @@ -0,0 +1,14 @@ + + +# ClassModel + +Model for testing model with \"_class\" property + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Client.md b/samples/client/petstore/java/jersey3/docs/Client.md new file mode 100644 index 000000000000..ef07b4ab8b9d --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Client.md @@ -0,0 +1,13 @@ + + +# Client + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ComplexQuadrilateral.md b/samples/client/petstore/java/jersey3/docs/ComplexQuadrilateral.md new file mode 100644 index 000000000000..d0a4b1a0a758 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ComplexQuadrilateral.md @@ -0,0 +1,14 @@ + + +# ComplexQuadrilateral + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/DanishPig.md b/samples/client/petstore/java/jersey3/docs/DanishPig.md new file mode 100644 index 000000000000..0b366d3cf2ff --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/DanishPig.md @@ -0,0 +1,13 @@ + + +# DanishPig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/DefaultApi.md b/samples/client/petstore/java/jersey3/docs/DefaultApi.md new file mode 100644 index 000000000000..00a8ac2ac24d --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/DefaultApi.md @@ -0,0 +1,68 @@ +# 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() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + InlineResponseDefault result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**InlineResponseDefault**](InlineResponseDefault.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/jersey3/docs/DeprecatedObject.md b/samples/client/petstore/java/jersey3/docs/DeprecatedObject.md new file mode 100644 index 000000000000..48de1d624425 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Dog.md b/samples/client/petstore/java/jersey3/docs/Dog.md new file mode 100644 index 000000000000..972c981c0d05 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Dog.md @@ -0,0 +1,13 @@ + + +# Dog + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/DogAllOf.md b/samples/client/petstore/java/jersey3/docs/DogAllOf.md new file mode 100644 index 000000000000..d4e4ea0d548c --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/DogAllOf.md @@ -0,0 +1,13 @@ + + +# DogAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Drawing.md b/samples/client/petstore/java/jersey3/docs/Drawing.md new file mode 100644 index 000000000000..6b815fc4131b --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Drawing.md @@ -0,0 +1,16 @@ + + +# Drawing + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mainShape** | [**Shape**](Shape.md) | | [optional] | +|**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] | +|**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional] | +|**shapes** | [**List<Shape>**](Shape.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/EnumArrays.md b/samples/client/petstore/java/jersey3/docs/EnumArrays.md new file mode 100644 index 000000000000..b2222d5beb25 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/EnumArrays.md @@ -0,0 +1,32 @@ + + +# EnumArrays + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | + + + +## Enum: JustSymbolEnum + +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | + + + +## Enum: List<ArrayEnumEnum> + +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | + + + diff --git a/samples/client/petstore/java/jersey3/docs/EnumClass.md b/samples/client/petstore/java/jersey3/docs/EnumClass.md new file mode 100644 index 000000000000..b314590a7591 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/EnumClass.md @@ -0,0 +1,15 @@ + + +# EnumClass + +## Enum + + +* `_ABC` (value: `"_abc"`) + +* `_EFG` (value: `"-efg"`) + +* `_XYZ_` (value: `"(xyz)"`) + + + diff --git a/samples/client/petstore/java/jersey3/docs/EnumTest.md b/samples/client/petstore/java/jersey3/docs/EnumTest.md new file mode 100644 index 000000000000..3e226e18b50b --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/EnumTest.md @@ -0,0 +1,68 @@ + + +# EnumTest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumIntegerOnly** | [**EnumIntegerOnlyEnum**](#EnumIntegerOnlyEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | + + + +## Enum: EnumStringEnum + +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | + + + +## Enum: EnumStringRequiredEnum + +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | + + + +## Enum: EnumIntegerEnum + +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | + + + +## Enum: EnumIntegerOnlyEnum + +| Name | Value | +|---- | -----| +| NUMBER_2 | 2 | +| NUMBER_MINUS_2 | -2 | + + + +## Enum: EnumNumberEnum + +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | + + + diff --git a/samples/client/petstore/java/jersey3/docs/EquilateralTriangle.md b/samples/client/petstore/java/jersey3/docs/EquilateralTriangle.md new file mode 100644 index 000000000000..eade817feb3e --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/EquilateralTriangle.md @@ -0,0 +1,14 @@ + + +# EquilateralTriangle + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/FakeApi.md b/samples/client/petstore/java/jersey3/docs/FakeApi.md new file mode 100644 index 000000000000..00365edeae97 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/FakeApi.md @@ -0,0 +1,1067 @@ +# FakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums | +| [**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-parameters | | + + + +## fakeHealthGet + +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeOuterBooleanSerialize + +> Boolean fakeOuterBooleanSerialize(body) + + + +Test serialization of outer boolean types + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | + +### Return type + +**Boolean** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + + +## fakeOuterCompositeSerialize + +> OuterComposite fakeOuterCompositeSerialize(outerComposite) + + + +Test serialization of object with outer number type + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + + +## fakeOuterNumberSerialize + +> BigDecimal fakeOuterNumberSerialize(body) + + + +Test serialization of outer number types + +### Example + +```java +import java.math.BigDecimal; +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | + +### Return type + +[**BigDecimal**](BigDecimal.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + + +## fakeOuterStringSerialize + +> String fakeOuterStringSerialize(body) + + + +Test serialization of outer string types + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + + +## getArrayOfEnums + +> List<OuterEnum> getArrayOfEnums() + +Array of Enums + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + List result = apiInstance.getArrayOfEnums(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#getArrayOfEnums"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List<OuterEnum>**](OuterEnum.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Got named array of enums | - | + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request much reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithQueryParams + +> testBodyWithQueryParams(query, user) + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User user = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, user); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **user** | [**User**](User.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testClientModel + +> Client testClientModel(client) + +To test \"client\" model + +To test "client" model + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + Client client = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## testEndpointParameters + +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters +假端點 +偽のエンドポイント +가짜 엔드 포인트 + + +### Example + +```java +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); + + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(78); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = LocalDate.now(); // LocalDate | None + OffsetDateTime dateTime = OffsetDateTime.parse("2010-02-01T10:20:10.111110+01:00"); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] [default to 2010-02-01T10:20:10.111110+01:00] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## testEnumParameters + +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) + +To test enum parameters + +To test enum parameters + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + + +## testGroupParameters + +> testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); + + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + api.testGroupParameters() + .requiredStringGroup(requiredStringGroup) + .requiredBooleanGroup(requiredBooleanGroup) + .requiredInt64Group(requiredInt64Group) + .stringGroup(stringGroup) + .booleanGroup(booleanGroup) + .int64Group(int64Group) + .execute(); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + + +## testInlineAdditionalProperties + +> testInlineAdditionalProperties(requestBody) + +test inline additionalProperties + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + Map requestBody = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(requestBody); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requestBody** | **Map<String,String>**| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## testJsonFormData + +> testJsonFormData(param, param2) + +test json serialization of form data + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## testQueryParameterCollectionFormat + +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) + + + +To test the collection format in query parameters + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + List pipe = Arrays.asList(); // List | + List ioutil = Arrays.asList(); // List | + List http = Arrays.asList(); // List | + List url = Arrays.asList(); // List | + List context = Arrays.asList(); // List | + try { + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | **List<String>**| | | +| **ioutil** | **List<String>**| | | +| **http** | **List<String>**| | | +| **url** | **List<String>**| | | +| **context** | **List<String>**| | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/samples/client/petstore/java/jersey3/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey3/docs/FakeClassnameTags123Api.md new file mode 100644 index 000000000000..c0534bcf0439 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/FakeClassnameTags123Api.md @@ -0,0 +1,81 @@ +# FakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | + + + +## testClassname + +> Client testClassname(client) + +To test class name in snake case + +To test class name in snake case + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.FakeClassnameTags123Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); + + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client client = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey3/docs/FileSchemaTestClass.md b/samples/client/petstore/java/jersey3/docs/FileSchemaTestClass.md new file mode 100644 index 000000000000..85d1a0636694 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/FileSchemaTestClass.md @@ -0,0 +1,14 @@ + + +# FileSchemaTestClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Foo.md b/samples/client/petstore/java/jersey3/docs/Foo.md new file mode 100644 index 000000000000..6b3f0556528a --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/FormatTest.md b/samples/client/petstore/java/jersey3/docs/FormatTest.md new file mode 100644 index 000000000000..01b8c777ae06 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/FormatTest.md @@ -0,0 +1,28 @@ + + +# FormatTest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Fruit.md b/samples/client/petstore/java/jersey3/docs/Fruit.md new file mode 100644 index 000000000000..41b3152250e1 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Fruit.md @@ -0,0 +1,37 @@ + + +# Fruit + +## oneOf schemas +* [Apple](Apple.md) +* [Banana](Banana.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.Fruit; +import org.openapitools.client.model.Apple; +import org.openapitools.client.model.Banana; + +public class Example { + public static void main(String[] args) { + Fruit exampleFruit = new Fruit(); + + // create a new Apple + Apple exampleApple = new Apple(); + // set Fruit to Apple + exampleFruit.setActualInstance(exampleApple); + // to get back the Apple set earlier + Apple testApple = (Apple) exampleFruit.getActualInstance(); + + // create a new Banana + Banana exampleBanana = new Banana(); + // set Fruit to Banana + exampleFruit.setActualInstance(exampleBanana); + // to get back the Banana set earlier + Banana testBanana = (Banana) exampleFruit.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/FruitReq.md b/samples/client/petstore/java/jersey3/docs/FruitReq.md new file mode 100644 index 000000000000..9d9c875cd39a --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/FruitReq.md @@ -0,0 +1,39 @@ + + +# FruitReq + +## oneOf schemas +* [AppleReq](AppleReq.md) +* [BananaReq](BananaReq.md) + +NOTE: this class is nullable. + +## Example +```java +// Import classes: +import org.openapitools.client.model.FruitReq; +import org.openapitools.client.model.AppleReq; +import org.openapitools.client.model.BananaReq; + +public class Example { + public static void main(String[] args) { + FruitReq exampleFruitReq = new FruitReq(); + + // create a new AppleReq + AppleReq exampleAppleReq = new AppleReq(); + // set FruitReq to AppleReq + exampleFruitReq.setActualInstance(exampleAppleReq); + // to get back the AppleReq set earlier + AppleReq testAppleReq = (AppleReq) exampleFruitReq.getActualInstance(); + + // create a new BananaReq + BananaReq exampleBananaReq = new BananaReq(); + // set FruitReq to BananaReq + exampleFruitReq.setActualInstance(exampleBananaReq); + // to get back the BananaReq set earlier + BananaReq testBananaReq = (BananaReq) exampleFruitReq.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/GmFruit.md b/samples/client/petstore/java/jersey3/docs/GmFruit.md new file mode 100644 index 000000000000..c9dc50b92cb7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/GmFruit.md @@ -0,0 +1,37 @@ + + +# GmFruit + +## anyOf schemas +* [Apple](Apple.md) +* [Banana](Banana.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.GmFruit; +import org.openapitools.client.model.Apple; +import org.openapitools.client.model.Banana; + +public class Example { + public static void main(String[] args) { + GmFruit exampleGmFruit = new GmFruit(); + + // create a new Apple + Apple exampleApple = new Apple(); + // set GmFruit to Apple + exampleGmFruit.setActualInstance(exampleApple); + // to get back the Apple set earlier + Apple testApple = (Apple) exampleGmFruit.getActualInstance(); + + // create a new Banana + Banana exampleBanana = new Banana(); + // set GmFruit to Banana + exampleGmFruit.setActualInstance(exampleBanana); + // to get back the Banana set earlier + Banana testBanana = (Banana) exampleGmFruit.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/GrandparentAnimal.md b/samples/client/petstore/java/jersey3/docs/GrandparentAnimal.md new file mode 100644 index 000000000000..9737408f2724 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/GrandparentAnimal.md @@ -0,0 +1,13 @@ + + +# GrandparentAnimal + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**petType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey3/docs/HasOnlyReadOnly.md new file mode 100644 index 000000000000..29da5205dbba --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/HasOnlyReadOnly.md @@ -0,0 +1,14 @@ + + +# HasOnlyReadOnly + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/HealthCheckResult.md b/samples/client/petstore/java/jersey3/docs/HealthCheckResult.md new file mode 100644 index 000000000000..4885e6f1cada --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineObject.md b/samples/client/petstore/java/jersey3/docs/InlineObject.md new file mode 100644 index 000000000000..999fe3ef00ad --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineObject.md @@ -0,0 +1,13 @@ + + +# InlineObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Updated name of the pet | [optional] +**status** | **String** | Updated status of the pet | [optional] + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineObject1.md b/samples/client/petstore/java/jersey3/docs/InlineObject1.md new file mode 100644 index 000000000000..10cc19ce03ce --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineObject1.md @@ -0,0 +1,13 @@ + + +# InlineObject1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **String** | Additional data to pass to server | [optional] +**file** | **File** | file to upload | [optional] + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineObject2.md b/samples/client/petstore/java/jersey3/docs/InlineObject2.md new file mode 100644 index 000000000000..7e4ed7591c2a --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineObject2.md @@ -0,0 +1,32 @@ + + +# InlineObject2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumFormStringArray** | [**List<EnumFormStringArrayEnum>**](#List<EnumFormStringArrayEnum>) | Form parameter enum test (string array) | [optional] +**enumFormString** | [**EnumFormStringEnum**](#EnumFormStringEnum) | Form parameter enum test (string) | [optional] + + + +## Enum: List<EnumFormStringArrayEnum> + +Name | Value +---- | ----- +GREATER_THAN | ">" +DOLLAR | "$" + + + +## Enum: EnumFormStringEnum + +Name | Value +---- | ----- +_ABC | "_abc" +_EFG | "-efg" +_XYZ_ | "(xyz)" + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineObject3.md b/samples/client/petstore/java/jersey3/docs/InlineObject3.md new file mode 100644 index 000000000000..fef7fdf80327 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineObject3.md @@ -0,0 +1,25 @@ + + +# InlineObject3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | None | [optional] +**int32** | **Integer** | None | [optional] +**int64** | **Long** | None | [optional] +**number** | **BigDecimal** | None | +**_float** | **Float** | None | [optional] +**_double** | **Double** | None | +**string** | **String** | None | [optional] +**patternWithoutDelimiter** | **String** | None | +**_byte** | **byte[]** | None | +**binary** | **File** | None | [optional] +**date** | **LocalDate** | None | [optional] +**dateTime** | **OffsetDateTime** | None | [optional] +**password** | **String** | None | [optional] +**callback** | **String** | None | [optional] + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineObject4.md b/samples/client/petstore/java/jersey3/docs/InlineObject4.md new file mode 100644 index 000000000000..5ebef872403a --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineObject4.md @@ -0,0 +1,13 @@ + + +# InlineObject4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**param** | **String** | field1 | +**param2** | **String** | field2 | + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineObject5.md b/samples/client/petstore/java/jersey3/docs/InlineObject5.md new file mode 100644 index 000000000000..ec5d4309f4d0 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineObject5.md @@ -0,0 +1,13 @@ + + +# InlineObject5 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **String** | Additional data to pass to server | [optional] +**requiredFile** | **File** | file to upload | + + + diff --git a/samples/client/petstore/java/jersey3/docs/InlineResponseDefault.md b/samples/client/petstore/java/jersey3/docs/InlineResponseDefault.md new file mode 100644 index 000000000000..41cadb0373c2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/InlineResponseDefault.md @@ -0,0 +1,13 @@ + + +# InlineResponseDefault + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/IsoscelesTriangle.md b/samples/client/petstore/java/jersey3/docs/IsoscelesTriangle.md new file mode 100644 index 000000000000..0bd5045bc68f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/IsoscelesTriangle.md @@ -0,0 +1,14 @@ + + +# IsoscelesTriangle + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Mammal.md b/samples/client/petstore/java/jersey3/docs/Mammal.md new file mode 100644 index 000000000000..11bbff5e2ba9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Mammal.md @@ -0,0 +1,46 @@ + + +# Mammal + +## oneOf schemas +* [Pig](Pig.md) +* [Whale](Whale.md) +* [Zebra](Zebra.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.Mammal; +import org.openapitools.client.model.Pig; +import org.openapitools.client.model.Whale; +import org.openapitools.client.model.Zebra; + +public class Example { + public static void main(String[] args) { + Mammal exampleMammal = new Mammal(); + + // create a new Pig + Pig examplePig = new Pig(); + // set Mammal to Pig + exampleMammal.setActualInstance(examplePig); + // to get back the Pig set earlier + Pig testPig = (Pig) exampleMammal.getActualInstance(); + + // create a new Whale + Whale exampleWhale = new Whale(); + // set Mammal to Whale + exampleMammal.setActualInstance(exampleWhale); + // to get back the Whale set earlier + Whale testWhale = (Whale) exampleMammal.getActualInstance(); + + // create a new Zebra + Zebra exampleZebra = new Zebra(); + // set Mammal to Zebra + exampleMammal.setActualInstance(exampleZebra); + // to get back the Zebra set earlier + Zebra testZebra = (Zebra) exampleMammal.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/MapTest.md b/samples/client/petstore/java/jersey3/docs/MapTest.md new file mode 100644 index 000000000000..54380188e1d6 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/MapTest.md @@ -0,0 +1,25 @@ + + +# MapTest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | + + + +## Enum: Map<String, InnerEnum> + +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | + + + diff --git a/samples/client/petstore/java/jersey3/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/jersey3/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..a5ddf0faa6a9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,15 @@ + + +# MixedPropertiesAndAdditionalPropertiesClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Model200Response.md b/samples/client/petstore/java/jersey3/docs/Model200Response.md new file mode 100644 index 000000000000..109411580c62 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Model200Response.md @@ -0,0 +1,15 @@ + + +# Model200Response + +Model for testing model name starting with number + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ModelApiResponse.md b/samples/client/petstore/java/jersey3/docs/ModelApiResponse.md new file mode 100644 index 000000000000..e374c2dd2dec --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ModelApiResponse.md @@ -0,0 +1,15 @@ + + +# ModelApiResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ModelFile.md b/samples/client/petstore/java/jersey3/docs/ModelFile.md new file mode 100644 index 000000000000..adcde984f527 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ModelFile.md @@ -0,0 +1,14 @@ + + +# ModelFile + +Must be named `File` for test. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ModelList.md b/samples/client/petstore/java/jersey3/docs/ModelList.md new file mode 100644 index 000000000000..f93ab7dde8d4 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ModelList.md @@ -0,0 +1,13 @@ + + +# ModelList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ModelReturn.md b/samples/client/petstore/java/jersey3/docs/ModelReturn.md new file mode 100644 index 000000000000..0bd356861eb7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ModelReturn.md @@ -0,0 +1,14 @@ + + +# ModelReturn + +Model for testing reserved words + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Name.md b/samples/client/petstore/java/jersey3/docs/Name.md new file mode 100644 index 000000000000..c901d9435309 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Name.md @@ -0,0 +1,17 @@ + + +# Name + +Model for testing model name same as property name + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/NullableClass.md b/samples/client/petstore/java/jersey3/docs/NullableClass.md new file mode 100644 index 000000000000..fa98c5c6d984 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/NullableShape.md b/samples/client/petstore/java/jersey3/docs/NullableShape.md new file mode 100644 index 000000000000..60c45b268406 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/NullableShape.md @@ -0,0 +1,41 @@ + + +# NullableShape + +The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. + +## oneOf schemas +* [Quadrilateral](Quadrilateral.md) +* [Triangle](Triangle.md) + +NOTE: this class is nullable. + +## Example +```java +// Import classes: +import org.openapitools.client.model.NullableShape; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; + +public class Example { + public static void main(String[] args) { + NullableShape exampleNullableShape = new NullableShape(); + + // create a new Quadrilateral + Quadrilateral exampleQuadrilateral = new Quadrilateral(); + // set NullableShape to Quadrilateral + exampleNullableShape.setActualInstance(exampleQuadrilateral); + // to get back the Quadrilateral set earlier + Quadrilateral testQuadrilateral = (Quadrilateral) exampleNullableShape.getActualInstance(); + + // create a new Triangle + Triangle exampleTriangle = new Triangle(); + // set NullableShape to Triangle + exampleNullableShape.setActualInstance(exampleTriangle); + // to get back the Triangle set earlier + Triangle testTriangle = (Triangle) exampleNullableShape.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/NumberOnly.md b/samples/client/petstore/java/jersey3/docs/NumberOnly.md new file mode 100644 index 000000000000..b8ed1a4cfae1 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/NumberOnly.md @@ -0,0 +1,13 @@ + + +# NumberOnly + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/jersey3/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 000000000000..f1cf571f4c09 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Order.md b/samples/client/petstore/java/jersey3/docs/Order.md new file mode 100644 index 000000000000..27af32855c5c --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Order.md @@ -0,0 +1,28 @@ + + +# Order + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | + + + diff --git a/samples/client/petstore/java/jersey3/docs/OuterComposite.md b/samples/client/petstore/java/jersey3/docs/OuterComposite.md new file mode 100644 index 000000000000..98b56e0763ff --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/OuterComposite.md @@ -0,0 +1,15 @@ + + +# OuterComposite + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/OuterEnum.md b/samples/client/petstore/java/jersey3/docs/OuterEnum.md new file mode 100644 index 000000000000..1f9b723eb8e7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/OuterEnum.md @@ -0,0 +1,15 @@ + + +# OuterEnum + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/jersey3/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/jersey3/docs/OuterEnumDefaultValue.md new file mode 100644 index 000000000000..cbc7f4ba54d2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/jersey3/docs/OuterEnumInteger.md b/samples/client/petstore/java/jersey3/docs/OuterEnumInteger.md new file mode 100644 index 000000000000..f71dea30ad00 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/jersey3/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/jersey3/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 000000000000..99e6389f4278 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/jersey3/docs/ParentPet.md b/samples/client/petstore/java/jersey3/docs/ParentPet.md new file mode 100644 index 000000000000..4992b88a6710 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ParentPet.md @@ -0,0 +1,12 @@ + + +# ParentPet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/petstore/java/jersey3/docs/Pet.md b/samples/client/petstore/java/jersey3/docs/Pet.md new file mode 100644 index 000000000000..08dfd8623602 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Pet.md @@ -0,0 +1,28 @@ + + +# Pet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/petstore/java/jersey3/docs/PetApi.md b/samples/client/petstore/java/jersey3/docs/PetApi.md new file mode 100644 index 000000000000..eb2957e47054 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/PetApi.md @@ -0,0 +1,671 @@ +# 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(pet) + +Add a new pet to the store + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(pet); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +null (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +## deletePet + +> deletePet(petId, apiKey) + +Deletes a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +## findPetsByStatus + +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +## findPetsByTags + +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | **List<String>**| Tags to filter by | | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +## getPetById + +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +## updatePet + +> updatePet(pet) + +Update an existing pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(pet); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +null (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +## updatePetWithForm + +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +## uploadFile + +> ModelApiResponse uploadFile(petId, additionalMetadata, _file) + +uploads an image + + + +### Example + +```java +import java.io.File; +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File _file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## uploadFileWithRequiredFile + +> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + +uploads an image (required) + + + +### Example + +```java +import java.io.File; +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey3/docs/Pig.md b/samples/client/petstore/java/jersey3/docs/Pig.md new file mode 100644 index 000000000000..f0a92bbe61b8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Pig.md @@ -0,0 +1,37 @@ + + +# Pig + +## oneOf schemas +* [BasquePig](BasquePig.md) +* [DanishPig](DanishPig.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.Pig; +import org.openapitools.client.model.BasquePig; +import org.openapitools.client.model.DanishPig; + +public class Example { + public static void main(String[] args) { + Pig examplePig = new Pig(); + + // create a new BasquePig + BasquePig exampleBasquePig = new BasquePig(); + // set Pig to BasquePig + examplePig.setActualInstance(exampleBasquePig); + // to get back the BasquePig set earlier + BasquePig testBasquePig = (BasquePig) examplePig.getActualInstance(); + + // create a new DanishPig + DanishPig exampleDanishPig = new DanishPig(); + // set Pig to DanishPig + examplePig.setActualInstance(exampleDanishPig); + // to get back the DanishPig set earlier + DanishPig testDanishPig = (DanishPig) examplePig.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/Quadrilateral.md b/samples/client/petstore/java/jersey3/docs/Quadrilateral.md new file mode 100644 index 000000000000..83ffea0c742f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Quadrilateral.md @@ -0,0 +1,37 @@ + + +# Quadrilateral + +## oneOf schemas +* [ComplexQuadrilateral](ComplexQuadrilateral.md) +* [SimpleQuadrilateral](SimpleQuadrilateral.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.ComplexQuadrilateral; +import org.openapitools.client.model.SimpleQuadrilateral; + +public class Example { + public static void main(String[] args) { + Quadrilateral exampleQuadrilateral = new Quadrilateral(); + + // create a new ComplexQuadrilateral + ComplexQuadrilateral exampleComplexQuadrilateral = new ComplexQuadrilateral(); + // set Quadrilateral to ComplexQuadrilateral + exampleQuadrilateral.setActualInstance(exampleComplexQuadrilateral); + // to get back the ComplexQuadrilateral set earlier + ComplexQuadrilateral testComplexQuadrilateral = (ComplexQuadrilateral) exampleQuadrilateral.getActualInstance(); + + // create a new SimpleQuadrilateral + SimpleQuadrilateral exampleSimpleQuadrilateral = new SimpleQuadrilateral(); + // set Quadrilateral to SimpleQuadrilateral + exampleQuadrilateral.setActualInstance(exampleSimpleQuadrilateral); + // to get back the SimpleQuadrilateral set earlier + SimpleQuadrilateral testSimpleQuadrilateral = (SimpleQuadrilateral) exampleQuadrilateral.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/QuadrilateralInterface.md b/samples/client/petstore/java/jersey3/docs/QuadrilateralInterface.md new file mode 100644 index 000000000000..99451f3bd020 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/QuadrilateralInterface.md @@ -0,0 +1,13 @@ + + +# QuadrilateralInterface + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quadrilateralType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey3/docs/ReadOnlyFirst.md new file mode 100644 index 000000000000..ad6af7ee155f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ReadOnlyFirst.md @@ -0,0 +1,14 @@ + + +# ReadOnlyFirst + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ScaleneTriangle.md b/samples/client/petstore/java/jersey3/docs/ScaleneTriangle.md new file mode 100644 index 000000000000..c578f6cbfaab --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ScaleneTriangle.md @@ -0,0 +1,14 @@ + + +# ScaleneTriangle + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Shape.md b/samples/client/petstore/java/jersey3/docs/Shape.md new file mode 100644 index 000000000000..9c237eefb048 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Shape.md @@ -0,0 +1,37 @@ + + +# Shape + +## oneOf schemas +* [Quadrilateral](Quadrilateral.md) +* [Triangle](Triangle.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.Shape; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; + +public class Example { + public static void main(String[] args) { + Shape exampleShape = new Shape(); + + // create a new Quadrilateral + Quadrilateral exampleQuadrilateral = new Quadrilateral(); + // set Shape to Quadrilateral + exampleShape.setActualInstance(exampleQuadrilateral); + // to get back the Quadrilateral set earlier + Quadrilateral testQuadrilateral = (Quadrilateral) exampleShape.getActualInstance(); + + // create a new Triangle + Triangle exampleTriangle = new Triangle(); + // set Shape to Triangle + exampleShape.setActualInstance(exampleTriangle); + // to get back the Triangle set earlier + Triangle testTriangle = (Triangle) exampleShape.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/ShapeInterface.md b/samples/client/petstore/java/jersey3/docs/ShapeInterface.md new file mode 100644 index 000000000000..b4f981e3b566 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ShapeInterface.md @@ -0,0 +1,13 @@ + + +# ShapeInterface + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/ShapeOrNull.md b/samples/client/petstore/java/jersey3/docs/ShapeOrNull.md new file mode 100644 index 000000000000..6a738c4b9870 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/ShapeOrNull.md @@ -0,0 +1,41 @@ + + +# ShapeOrNull + +The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. + +## oneOf schemas +* [Quadrilateral](Quadrilateral.md) +* [Triangle](Triangle.md) + +NOTE: this class is nullable. + +## Example +```java +// Import classes: +import org.openapitools.client.model.ShapeOrNull; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; + +public class Example { + public static void main(String[] args) { + ShapeOrNull exampleShapeOrNull = new ShapeOrNull(); + + // create a new Quadrilateral + Quadrilateral exampleQuadrilateral = new Quadrilateral(); + // set ShapeOrNull to Quadrilateral + exampleShapeOrNull.setActualInstance(exampleQuadrilateral); + // to get back the Quadrilateral set earlier + Quadrilateral testQuadrilateral = (Quadrilateral) exampleShapeOrNull.getActualInstance(); + + // create a new Triangle + Triangle exampleTriangle = new Triangle(); + // set ShapeOrNull to Triangle + exampleShapeOrNull.setActualInstance(exampleTriangle); + // to get back the Triangle set earlier + Triangle testTriangle = (Triangle) exampleShapeOrNull.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/SimpleQuadrilateral.md b/samples/client/petstore/java/jersey3/docs/SimpleQuadrilateral.md new file mode 100644 index 000000000000..52fb7d1a6a49 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/SimpleQuadrilateral.md @@ -0,0 +1,14 @@ + + +# SimpleQuadrilateral + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/SpecialModelName.md b/samples/client/petstore/java/jersey3/docs/SpecialModelName.md new file mode 100644 index 000000000000..e17d0d797b7f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/SpecialModelName.md @@ -0,0 +1,14 @@ + + +# SpecialModelName + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | +|**specialModelName** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/StoreApi.md b/samples/client/petstore/java/jersey3/docs/StoreApi.md new file mode 100644 index 000000000000..a3cbc7ec0507 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/StoreApi.md @@ -0,0 +1,278 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | +| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID | +| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | + + + +## deleteOrder + +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## getInventory + +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## getOrderById + +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## placeOrder + +> Order placeOrder(order) + +Place an order for a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Order order = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/jersey3/docs/Tag.md b/samples/client/petstore/java/jersey3/docs/Tag.md new file mode 100644 index 000000000000..5088b2dd1c31 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Tag.md @@ -0,0 +1,14 @@ + + +# Tag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Triangle.md b/samples/client/petstore/java/jersey3/docs/Triangle.md new file mode 100644 index 000000000000..daf9d153ff61 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Triangle.md @@ -0,0 +1,46 @@ + + +# Triangle + +## oneOf schemas +* [EquilateralTriangle](EquilateralTriangle.md) +* [IsoscelesTriangle](IsoscelesTriangle.md) +* [ScaleneTriangle](ScaleneTriangle.md) + +## Example +```java +// Import classes: +import org.openapitools.client.model.Triangle; +import org.openapitools.client.model.EquilateralTriangle; +import org.openapitools.client.model.IsoscelesTriangle; +import org.openapitools.client.model.ScaleneTriangle; + +public class Example { + public static void main(String[] args) { + Triangle exampleTriangle = new Triangle(); + + // create a new EquilateralTriangle + EquilateralTriangle exampleEquilateralTriangle = new EquilateralTriangle(); + // set Triangle to EquilateralTriangle + exampleTriangle.setActualInstance(exampleEquilateralTriangle); + // to get back the EquilateralTriangle set earlier + EquilateralTriangle testEquilateralTriangle = (EquilateralTriangle) exampleTriangle.getActualInstance(); + + // create a new IsoscelesTriangle + IsoscelesTriangle exampleIsoscelesTriangle = new IsoscelesTriangle(); + // set Triangle to IsoscelesTriangle + exampleTriangle.setActualInstance(exampleIsoscelesTriangle); + // to get back the IsoscelesTriangle set earlier + IsoscelesTriangle testIsoscelesTriangle = (IsoscelesTriangle) exampleTriangle.getActualInstance(); + + // create a new ScaleneTriangle + ScaleneTriangle exampleScaleneTriangle = new ScaleneTriangle(); + // set Triangle to ScaleneTriangle + exampleTriangle.setActualInstance(exampleScaleneTriangle); + // to get back the ScaleneTriangle set earlier + ScaleneTriangle testScaleneTriangle = (ScaleneTriangle) exampleTriangle.getActualInstance(); + } +} +``` + + diff --git a/samples/client/petstore/java/jersey3/docs/TriangleInterface.md b/samples/client/petstore/java/jersey3/docs/TriangleInterface.md new file mode 100644 index 000000000000..ef5fc7575f34 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/TriangleInterface.md @@ -0,0 +1,13 @@ + + +# TriangleInterface + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**triangleType** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/User.md b/samples/client/petstore/java/jersey3/docs/User.md new file mode 100644 index 000000000000..9e97dc35485f --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/User.md @@ -0,0 +1,24 @@ + + +# User + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | +|**objectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] | +|**objectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] | +|**anyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] | +|**anyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] | + + + diff --git a/samples/client/petstore/java/jersey3/docs/UserApi.md b/samples/client/petstore/java/jersey3/docs/UserApi.md new file mode 100644 index 000000000000..6df604acce37 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/UserApi.md @@ -0,0 +1,535 @@ +# 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(user) + +Create user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + User user = new User(); // User | Created user object + try { + apiInstance.createUser(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## createUsersWithArrayInput + +> createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## createUsersWithListInput + +> createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + apiInstance.createUsersWithListInput(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## deleteUser + +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## getUserByName + +> User getUserByName(username) + +Get user by user name + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## loginUser + +> String loginUser(username, password) + +Logs user into the system + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +| **400** | Invalid username/password supplied | - | + + +## logoutUser + +> logoutUser() + +Logs out current logged in user session + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## updateUser + +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User user = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/jersey3/docs/Whale.md b/samples/client/petstore/java/jersey3/docs/Whale.md new file mode 100644 index 000000000000..30ce4bb82151 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Whale.md @@ -0,0 +1,15 @@ + + +# Whale + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasBaleen** | **Boolean** | | [optional] | +|**hasTeeth** | **Boolean** | | [optional] | +|**className** | **String** | | | + + + diff --git a/samples/client/petstore/java/jersey3/docs/Zebra.md b/samples/client/petstore/java/jersey3/docs/Zebra.md new file mode 100644 index 000000000000..f7c4389b6456 --- /dev/null +++ b/samples/client/petstore/java/jersey3/docs/Zebra.md @@ -0,0 +1,24 @@ + + +# Zebra + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**className** | **String** | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PLAINS | "plains" | +| MOUNTAIN | "mountain" | +| GREVYS | "grevys" | + + + diff --git a/samples/client/petstore/java/jersey3/git_push.sh b/samples/client/petstore/java/jersey3/git_push.sh new file mode 100644 index 000000000000..f53a75d4fabe --- /dev/null +++ b/samples/client/petstore/java/jersey3/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/java/jersey3/gradle.properties b/samples/client/petstore/java/jersey3/gradle.properties new file mode 100644 index 000000000000..d3e8e41ba6fb --- /dev/null +++ b/samples/client/petstore/java/jersey3/gradle.properties @@ -0,0 +1,13 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android + +# JVM arguments +org.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m +# set timeout +org.gradle.daemon.idletimeout=3600000 +# show all warnings +org.gradle.warning.mode=all diff --git a/samples/client/petstore/java/jersey3/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/jersey3/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000000..7454180f2ae8 Binary files /dev/null and b/samples/client/petstore/java/jersey3/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/java/jersey3/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/jersey3/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..ffed3a254e91 --- /dev/null +++ b/samples/client/petstore/java/jersey3/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/petstore/java/jersey3/gradlew b/samples/client/petstore/java/jersey3/gradlew new file mode 100644 index 000000000000..005bcde04284 --- /dev/null +++ b/samples/client/petstore/java/jersey3/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/java/jersey3/gradlew.bat b/samples/client/petstore/java/jersey3/gradlew.bat new file mode 100644 index 000000000000..6a68175eb70f --- /dev/null +++ b/samples/client/petstore/java/jersey3/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/samples/client/petstore/java/jersey3/pom.xml b/samples/client/petstore/java/jersey3/pom.xml new file mode 100644 index 000000000000..fbe5148197e8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/pom.xml @@ -0,0 +1,357 @@ + + 4.0.0 + org.openapitools + petstore-jersey3 + jar + petstore-jersey3 + 1.0.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + https://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + false + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + + attach-javadocs + + jar + + + + + none + 1.8 + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.glassfish.jersey.core + jersey-client + ${jersey-version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.tomitribe + tomitribe-http-signatures + ${http-signature-version} + + + com.github.scribejava + scribejava-apis + ${scribejava-apis-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.glassfish.jersey.connectors + jersey-apache-connector + ${jersey-version} + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + UTF-8 + 1.6.5 + 3.0.4 + 2.13.2 + 2.13.2 + 0.2.2 + 2.1.0 + 5.8.2 + 1.7 + 8.3.1 + 2.21.0 + + diff --git a/samples/client/petstore/java/jersey3/settings.gradle b/samples/client/petstore/java/jersey3/settings.gradle new file mode 100644 index 000000000000..b50c71ae7985 --- /dev/null +++ b/samples/client/petstore/java/jersey3/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "petstore-jersey3" \ No newline at end of file diff --git a/samples/client/petstore/java/jersey3/src/main/AndroidManifest.xml b/samples/client/petstore/java/jersey3/src/main/AndroidManifest.xml new file mode 100644 index 000000000000..54fbcb3da1e8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 000000000000..10170cec2b62 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,1447 @@ +package org.openapitools.client; + +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + +import com.github.scribejava.core.model.OAuth2AccessToken; +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; + +import java.io.IOException; +import java.io.InputStream; + +import java.net.URI; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.security.cert.X509Certificate; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.time.OffsetDateTime; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.openapitools.client.auth.Authentication; +import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; +import org.openapitools.client.auth.HttpSignatureAuth; +import org.openapitools.client.auth.ApiKeyAuth; +import org.openapitools.client.auth.OAuth; + +/** + *

    ApiClient class.

    + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiClient extends JavaTimeFormatter { + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String basePath = "http://petstore.swagger.io:80/v2"; + protected String userAgent; + private static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://{server}.swagger.io:{port}/v2", + "petstore server", + new HashMap() {{ + put("server", new ServerVariable( + "No description provided", + "petstore", + new HashSet( + Arrays.asList( + "petstore", + "qa-petstore", + "dev-petstore" + ) + ) + )); + put("port", new ServerVariable( + "No description provided", + "80", + new HashSet( + Arrays.asList( + "80", + "8080" + ) + ) + )); + }} + ), + new ServerConfiguration( + "https://localhost:8080/{version}", + "The local server", + new HashMap() {{ + put("version", new ServerVariable( + "No description provided", + "v2", + new HashSet( + Arrays.asList( + "v1", + "v2" + ) + ) + )); + }} + ), + new ServerConfiguration( + "https://127.0.0.1/no_variable", + "The local server without variables", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + protected Map> operationServers = new HashMap>() {{ + put("PetApi.addPet", new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://petstore.swagger.io/v2", + "No description provided", + new HashMap() + ), + + new ServerConfiguration( + "http://path-server-test.petstore.local/v2", + "No description provided", + new HashMap() + ) + ))); + put("PetApi.updatePet", new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://petstore.swagger.io/v2", + "No description provided", + new HashMap() + ), + + new ServerConfiguration( + "http://path-server-test.petstore.local/v2", + "No description provided", + new HashMap() + ) + ))); + }}; + protected Map operationServerIndex = new HashMap(); + protected Map> operationServerVariables = new HashMap>(); + protected boolean debugging = false; + protected ClientConfig clientConfig; + protected int connectionTimeout = 0; + private int readTimeout = 0; + + protected Client httpClient; + protected JSON json; + protected String tempFolderPath = null; + + protected Map authentications; + protected Map authenticationLookup; + + protected DateFormat dateFormat; + + /** + * Constructs a new ApiClient with default parameters. + */ + public ApiClient() { + this(null); + } + + /** + * Constructs a new ApiClient with the specified authentication parameters. + * + * @param authMap A hash map containing authentication parameters. + */ + public ApiClient(Map authMap) { + json = new JSON(); + httpClient = buildHttpClient(); + + this.dateFormat = new RFC3339DateFormat(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/1.0.0/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + Authentication auth = null; + if (authMap != null) { + auth = authMap.get("api_key"); + } + if (auth instanceof ApiKeyAuth) { + authentications.put("api_key", auth); + } else { + authentications.put("api_key", new ApiKeyAuth("header", "api_key")); + } + if (authMap != null) { + auth = authMap.get("api_key_query"); + } + if (auth instanceof ApiKeyAuth) { + authentications.put("api_key_query", auth); + } else { + authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); + } + if (authMap != null) { + auth = authMap.get("bearer_test"); + } + if (auth instanceof HttpBearerAuth) { + authentications.put("bearer_test", auth); + } else { + authentications.put("bearer_test", new HttpBearerAuth("bearer")); + } + if (authMap != null) { + auth = authMap.get("http_basic_test"); + } + if (auth instanceof HttpBasicAuth) { + authentications.put("http_basic_test", auth); + } else { + authentications.put("http_basic_test", new HttpBasicAuth()); + } + if (authMap != null) { + auth = authMap.get("http_signature_test"); + } + if (auth instanceof HttpSignatureAuth) { + authentications.put("http_signature_test", auth); + } + if (authMap != null) { + auth = authMap.get("petstore_auth"); + } + if (auth instanceof OAuth) { + authentications.put("petstore_auth", auth); + } else { + authentications.put("petstore_auth", new OAuth(basePath, "")); + } + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + // Setup authentication lookup (key: authentication alias, value: authentication name) + authenticationLookup = new HashMap(); + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + * + * @return JSON + */ + public JSON getJSON() { + return json; + } + + /** + *

    Getter for the field httpClient.

    + * + * @return a {@link jakarta.ws.rs.client.Client} object. + */ + public Client getHttpClient() { + return httpClient; + } + + /** + *

    Setter for the field httpClient.

    + * + * @param httpClient a {@link jakarta.ws.rs.client.Client} object. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ + public String getBasePath() { + return basePath; + } + + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + setOauthBasePath(basePath); + return this; + } + + /** + *

    Getter for the field servers.

    + * + * @return a {@link java.util.List} of servers. + */ + public List getServers() { + return servers; + } + + /** + *

    Setter for the field servers.

    + * + * @param servers a {@link java.util.List} of servers. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setServers(List servers) { + this.servers = servers; + updateBasePath(); + return this; + } + + /** + *

    Getter for the field serverIndex.

    + * + * @return a {@link java.lang.Integer} object. + */ + public Integer getServerIndex() { + return serverIndex; + } + + /** + *

    Setter for the field serverIndex.

    + * + * @param serverIndex the server index + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + updateBasePath(); + return this; + } + + /** + *

    Getter for the field serverVariables.

    + * + * @return a {@link java.util.Map} of server variables. + */ + public Map getServerVariables() { + return serverVariables; + } + + /** + *

    Setter for the field serverVariables.

    + * + * @param serverVariables a {@link java.util.Map} of server variables. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + updateBasePath(); + return this; + } + + private void updateBasePath() { + if (serverIndex != null) { + setBasePath(servers.get(serverIndex).URL(serverVariables)); + } + } + + private void setOauthBasePath(String basePath) { + for(Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setBasePath(basePath); + } + } + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication object + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to configure authentications which respects aliases of API keys. + * + * @param secrets Hash map from authentication name to its secret. + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient configureApiKeys(Map secrets) { + for (Map.Entry authEntry : authentications.entrySet()) { + Authentication auth = authEntry.getValue(); + if (auth instanceof ApiKeyAuth) { + String name = authEntry.getKey(); + // respect x-auth-id-alias property + name = authenticationLookup.containsKey(name) ? authenticationLookup.get(name) : name; + if (secrets.containsKey(name)) { + ((ApiKeyAuth) auth).setApiKey(secrets.get(name)); + } + } + } + return this; + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set bearer token for the first Bearer authentication. + * + * @param bearerToken Bearer token + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the credentials for the first OAuth2 authentication. + * + * @param clientId the client ID + * @param clientSecret the client secret + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthCredentials(String clientId, String clientSecret) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging()); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the password flow for the first OAuth2 authentication. + * + * @param username the user name + * @param password the user password + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthPasswordFlow(String username, String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).usePasswordFlow(username, password); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the authorization code flow for the first OAuth2 authentication. + * + * @param code the authorization code + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthAuthorizationCodeFlow(String code) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).useAuthorizationCodeFlow(code); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set the scopes for the first OAuth2 authentication. + * + * @param scope the oauth scope + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setOauthScope(String scope) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setScope(scope); + return this; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent Http user agent + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setUserAgent(String userAgent) { + this.userAgent = userAgent; + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Get the User-Agent header's value. + * + * @return User-Agent string + */ + public String getUserAgent(){ + return userAgent; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Gets the client config. + * + * @return Client config + */ + public ClientConfig getClientConfig() { + return clientConfig; + } + + /** + * Set the client config. + * + * @param clientConfig Set the client config + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setClientConfig(ClientConfig clientConfig) { + this.clientConfig = clientConfig; + // Rebuild HTTP Client according to the new "clientConfig" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is switched on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set temp folder path + * + * @param tempFolderPath Temp folder path + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Connect timeout (in milliseconds). + * + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout Connection timeout in milliseconds + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); + return this; + } + + /** + * read timeout (in milliseconds). + * + * @return Read timeout + */ + public int getReadTimeout() { + return readTimeout; + } + + /** + * Set the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout Read timeout in milliseconds + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * + * @param dateFormat Date format + * @return a {@link org.openapitools.client.ApiClient} object. + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + * Format to {@code Pair} objects. + * + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + + // create the params based on the collection format + if ("multi".equals(format)) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if ("csv".equals(format)) { + delimiter = ","; + } else if ("ssv".equals(format)) { + delimiter = " "; + } else if ("tsv".equals(format)) { + delimiter = "\t"; + } else if ("pipes".equals(format)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * + * @param mime MIME + * @return True if the MIME type is JSON + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return Entity + * @throws ApiException API exception + */ + public Entity serialize(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + Entity entity; + if (contentType.startsWith("multipart/form-data")) { + MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) + .fileName(file.getName()).size(file.length()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + } + } + entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + if (isBodyNullable) { // payload is nullable + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "null" : obj, contentType); + } + } else { + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "" : obj, contentType); + } + } + } + return entity; + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON, HTTP form is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @param isBodyNullable True if the body is nullable + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + if (isBodyNullable) { + return obj == null ? "null" : json.getMapper().writeValueAsString(obj); + } else { + return obj == null ? "" : json.getMapper().writeValueAsString(obj); + } + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Deserialize object + * @throws ApiException API exception + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.getRawType() == File.class) { + // Handle file downloading. + T file = (T) downloadFileFromResponse(response); + return file; + } + + String contentType = null; + List contentTypes = response.getHeaders().get("Content-Type"); + if (contentTypes != null && !contentTypes.isEmpty()) + contentType = String.valueOf(contentTypes.get(0)); + + // read the entity stream multiple times + response.bufferEntity(); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * + * @param response Response + * @return File + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + *

    Prepare the file for download from the response.

    + * + * @param response a {@link jakarta.ws.rs.core.Response} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param operation The qualified name of the operation + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @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 + * @param isBodyNullable True if the body is nullable + * @return The response body in type of string + * @throws ApiException API exception + */ + public ApiResponse invokeAPI( + String operation, + String path, + String method, + List queryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + GenericType returnType, + boolean isBodyNullable) + throws ApiException { + + // Not using `.target(targetURL).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + String targetURL; + if (serverIndex != null && operationServers.containsKey(operation)) { + Integer index = operationServerIndex.containsKey(operation) ? operationServerIndex.get(operation) : serverIndex; + Map variables = operationServerVariables.containsKey(operation) ? + operationServerVariables.get(operation) : serverVariables; + List serverConfigurations = operationServers.get(operation); + if (index < 0 || index >= serverConfigurations.size()) { + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", + index, serverConfigurations.size())); + } + targetURL = serverConfigurations.get(index).URL(variables) + path; + } else { + targetURL = this.basePath + path; + } + WebTarget target = httpClient.target(targetURL); + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); + } + } + } + + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } + + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + for (Entry entry : defaultCookieMap.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + Entity entity = serialize(body, formParams, contentType, isBodyNullable); + + // put all headers in one place + Map allHeaderParams = new HashMap<>(defaultHeaderMap); + allHeaderParams.putAll(headerParams); + + // update different parameters (e.g. headers) for authentication + updateParamsForAuth( + authNames, + queryParams, + allHeaderParams, + cookieParams, + serializeToString(body, formParams, contentType, isBodyNullable), + method, + target.getUri()); + + for (Entry entry : allHeaderParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(entry.getKey(), value); + } + } + + Response response = null; + + try { + response = sendRequest(method, invocationBuilder, entity); + + // If OAuth is used and a status 401 is received, renew the access token and retry the request + if (response.getStatusInfo() == Status.UNAUTHORIZED) { + for (String authName : authNames) { + Authentication authentication = authentications.get(authName); + if (authentication instanceof OAuth) { + OAuth2AccessToken accessToken = ((OAuth) authentication).renewAccessToken(); + if (accessToken != null) { + invocationBuilder.header("Authorization", null); + invocationBuilder.header("Authorization", "Bearer " + accessToken.getAccessToken()); + response = sendRequest(method, invocationBuilder, entity); + } + break; + } + } + } + + int statusCode = response.getStatusInfo().getStatusCode(); + Map> responseHeaders = buildResponseHeaders(response); + + if (response.getStatusInfo() == Status.NO_CONTENT) { + return new ApiResponse(statusCode, responseHeaders); + } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { + if (returnType == null) { + return new ApiResponse(statusCode, responseHeaders); + } else { + return new ApiResponse(statusCode, responseHeaders, deserialize(response, returnType)); + } + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), message, buildResponseHeaders(response), respBody); + } + } finally { + try { + response.close(); + } catch (Exception e) { + // it's not critical, since the response object is local in method invokeAPI; that's fine, + // just continue + } + } + } + + private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity entity) { + Response response; + if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + response = invocationBuilder.method("DELETE", entity); + } else if ("PATCH".equals(method)) { + response = invocationBuilder.method("PATCH", entity); + } else { + response = invocationBuilder.method(method); + } + return response; + } + + /** + * @deprecated Add qualified name of the operation as a first parameter. + */ + @Deprecated + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType, boolean isBodyNullable) throws ApiException { + return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable); + } + + /** + * Build the Client used to make HTTP requests. + * + * @return Client + */ + protected Client buildHttpClient() { + // recreate the client config to pickup changes + clientConfig = getDefaultClientConfig(); + + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + customizeClientBuilder(clientBuilder); + clientBuilder = clientBuilder.withConfig(clientConfig); + return clientBuilder.build(); + } + + /** + * Get the default client config. + * + * @return Client config + */ + public ClientConfig getDefaultClientConfig() { + ClientConfig clientConfig = new ClientConfig(); + clientConfig.register(MultiPartFeature.class); + clientConfig.register(json); + clientConfig.register(JacksonFeature.class); + clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); + // turn off compliance validation to be able to send payloads with DELETE calls + clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + if (debugging) { + clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); + clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); + // Set logger to ALL + java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); + } else { + // suppress warnings for payloads with DELETE calls: + java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); + } + + return clientConfig; + } + + /** + * Customize the client builder. + * + * This method can be overridden to customize the API client. For example, this can be used to: + * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname + * against its identification information. + * 2. Set the client-side key store. + * 3. Set the SSL context that will be used when creating secured transport connections to + * server endpoints from web targets created by the client instance that is using this SSL context. + * 4. Set the client-side trust store. + * + * To completely disable certificate validation (at your own risk), you can + * override this method and invoke disableCertificateValidation(clientBuilder). + * + * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object. + */ + protected void customizeClientBuilder(ClientBuilder clientBuilder) { + // No-op extension point + } + + /** + * Disable X.509 certificate validation in TLS connections. + * + * Please note that trusting all certificates is extremely risky. + * This may be useful in a development environment with self-signed certificates. + * + * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object. + * @throws java.security.KeyManagementException if any. + * @throws java.security.NoSuchAlgorithmException if any. + */ + protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException { + TrustManager[] trustAllCerts = new X509TrustManager[] { + new X509TrustManager() { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, trustAllCerts, new SecureRandom()); + clientBuilder.sslContext(sslContext); + } + + /** + *

    Build the response headers.

    + * + * @param response a {@link jakarta.ws.rs.core.Response} object. + * @return a {@link java.util.Map} of response headers. + */ + protected Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + continue; + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiException.java new file mode 100644 index 000000000000..cf61335328e5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiException.java @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.Map; +import java.util.List; + +/** + * API Exception + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiResponse.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiResponse.java new file mode 100644 index 000000000000..5f3daf26600c --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiResponse.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/Configuration.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/Configuration.java new file mode 100644 index 000000000000..b027f63461cd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/Configuration.java @@ -0,0 +1,39 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/JSON.java new file mode 100644 index 000000000000..4eece66820e8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/JSON.java @@ -0,0 +1,249 @@ +package org.openapitools.client; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.openapitools.client.model.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/JavaTimeFormatter.java new file mode 100644 index 000000000000..ae934029f934 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/JavaTimeFormatter.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +/** + * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. + * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JavaTimeFormatter { + + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } + + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } + + /** + * Parse the given string into {@code OffsetDateTime} object. + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); + } + } + /** + * Format the given {@code OffsetDateTime} object into string. + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/Pair.java new file mode 100644 index 000000000000..8af540ca6576 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/Pair.java @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/RFC3339DateFormat.java new file mode 100644 index 000000000000..f94cba613ba4 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 000000000000..ca5c1187edf2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replaceAll("\\{" + name + "\\}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 000000000000..c2f13e216662 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/StringUtil.java new file mode 100644 index 000000000000..9b10ec80d38b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/StringUtil.java @@ -0,0 +1,83 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.Collection; +import java.util.Iterator; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

    + * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

    + * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java new file mode 100644 index 000000000000..0437af1a111a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -0,0 +1,115 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import org.openapitools.client.model.Client; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AnotherFakeApi { + private ApiClient apiClient; + + public AnotherFakeApi() { + this(Configuration.getDefaultApiClient()); + } + + public AnotherFakeApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * To test special tags + * To test special tags and operation ID starting with number + * @param client client model (required) + * @return Client + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public Client call123testSpecialTags(Client client) throws ApiException { + return call123testSpecialTagsWithHttpInfo(client).getData(); + } + + /** + * To test special tags + * To test special tags and operation ID starting with number + * @param client client model (required) + * @return ApiResponse<Client> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse call123testSpecialTagsWithHttpInfo(Client client) throws ApiException { + Object localVarPostBody = client; + + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); + } + + // create path and map variables + String localVarPath = "/another-fake/dummy"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 000000000000..90712d51e580 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,108 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import org.openapitools.client.model.InlineResponseDefault; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(Configuration.getDefaultApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + * @return InlineResponseDefault + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 response -
    + */ + public InlineResponseDefault fooGet() throws ApiException { + return fooGetWithHttpInfo().getData(); + } + + /** + * + * + * @return ApiResponse<InlineResponseDefault> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 response -
    + */ + public ApiResponse fooGetWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/foo"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("DefaultApi.fooGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java new file mode 100644 index 000000000000..9f2482642dfa --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java @@ -0,0 +1,1257 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import java.math.BigDecimal; +import org.openapitools.client.model.Client; +import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.User; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FakeApi { + private ApiClient apiClient; + + public FakeApi() { + this(Configuration.getDefaultApiClient()); + } + + public FakeApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Health check endpoint + * + * @return HealthCheckResult + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 The instance started successfully -
    + */ + public HealthCheckResult fakeHealthGet() throws ApiException { + return fakeHealthGetWithHttpInfo().getData(); + } + + /** + * Health check endpoint + * + * @return ApiResponse<HealthCheckResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 The instance started successfully -
    + */ + public ApiResponse fakeHealthGetWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake/health"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeApi.fakeHealthGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * + * Test serialization of outer boolean types + * @param body Input boolean as post body (optional) + * @return Boolean + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output boolean -
    + */ + public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { + return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); + } + + /** + * + * Test serialization of outer boolean types + * @param body Input boolean as post body (optional) + * @return ApiResponse<Boolean> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output boolean -
    + */ + public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/fake/outer/boolean"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * + * Test serialization of object with outer number type + * @param outerComposite Input composite as post body (optional) + * @return OuterComposite + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output composite -
    + */ + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { + return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getData(); + } + + /** + * + * Test serialization of object with outer number type + * @param outerComposite Input composite as post body (optional) + * @return ApiResponse<OuterComposite> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output composite -
    + */ + public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException { + Object localVarPostBody = outerComposite; + + // create path and map variables + String localVarPath = "/fake/outer/composite"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * + * Test serialization of outer number types + * @param body Input number as post body (optional) + * @return BigDecimal + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output number -
    + */ + public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { + return fakeOuterNumberSerializeWithHttpInfo(body).getData(); + } + + /** + * + * Test serialization of outer number types + * @param body Input number as post body (optional) + * @return ApiResponse<BigDecimal> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output number -
    + */ + public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/fake/outer/number"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * + * Test serialization of outer string types + * @param body Input string as post body (optional) + * @return String + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output string -
    + */ + public String fakeOuterStringSerialize(String body) throws ApiException { + return fakeOuterStringSerializeWithHttpInfo(body).getData(); + } + + /** + * + * Test serialization of outer string types + * @param body Input string as post body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Output string -
    + */ + public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/fake/outer/string"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Array of Enums + * + * @return List<OuterEnum> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Got named array of enums -
    + */ + public List getArrayOfEnums() throws ApiException { + return getArrayOfEnumsWithHttpInfo().getData(); + } + + /** + * Array of Enums + * + * @return ApiResponse<List<OuterEnum>> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Got named array of enums -
    + */ + public ApiResponse> getArrayOfEnumsWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake/array-of-enums"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType> localVarReturnType = new GenericType>() {}; + + return apiClient.invokeAPI("FakeApi.getArrayOfEnums", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * + * For this test, the body for this request much reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); + } + + /** + * + * For this test, the body for this request much reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + Object localVarPostBody = fileSchemaTestClass; + + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); + } + + // create path and map variables + String localVarPath = "/fake/body-with-file-schema"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * + * + * @param query (required) + * @param user (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public void testBodyWithQueryParams(String query, User user) throws ApiException { + testBodyWithQueryParamsWithHttpInfo(query, user); + } + + /** + * + * + * @param query (required) + * @param user (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException { + Object localVarPostBody = user; + + // verify the required parameter 'query' is set + if (query == null) { + throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); + } + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); + } + + // create path and map variables + String localVarPath = "/fake/body-with-query-params"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * To test \"client\" model + * To test \"client\" model + * @param client client model (required) + * @return Client + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public Client testClientModel(Client client) throws ApiException { + return testClientModelWithHttpInfo(client).getData(); + } + + /** + * To test \"client\" model + * To test \"client\" model + * @param client client model (required) + * @return ApiResponse<Client> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse testClientModelWithHttpInfo(Client client) throws ApiException { + Object localVarPostBody = client; + + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); + } + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional, default to 2010-02-01T10:20:10.111110+01:00) + * @param password None (optional) + * @param paramCallback None (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid username supplied -
    404 User not found -
    + */ + public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { + 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 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @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, default to 2010-02-01T10:20:10.111110+01:00) + * @param password None (optional) + * @param paramCallback None (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid username supplied -
    404 User not found -
    + */ + public ApiResponse 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 ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'number' is set + if (number == null) { + throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters"); + } + + // verify the required parameter '_double' is set + if (_double == null) { + throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters"); + } + + // verify the required parameter 'patternWithoutDelimiter' is set + if (patternWithoutDelimiter == null) { + throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); + } + + // verify the required parameter '_byte' is set + if (_byte == null) { + throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters"); + } + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (integer != null) + localVarFormParams.put("integer", integer); +if (int32 != null) + localVarFormParams.put("int32", int32); +if (int64 != null) + localVarFormParams.put("int64", int64); +if (number != null) + localVarFormParams.put("number", number); +if (_float != null) + localVarFormParams.put("float", _float); +if (_double != null) + localVarFormParams.put("double", _double); +if (string != null) + localVarFormParams.put("string", string); +if (patternWithoutDelimiter != null) + localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter); +if (_byte != null) + localVarFormParams.put("byte", _byte); +if (binary != null) + localVarFormParams.put("binary", binary); +if (date != null) + localVarFormParams.put("date", date); +if (dateTime != null) + localVarFormParams.put("dateTime", dateTime); +if (password != null) + localVarFormParams.put("password", password); +if (paramCallback != null) + localVarFormParams.put("callback", paramCallback); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_basic_test" }; + + return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * To test enum parameters + * To test enum parameters + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid request -
    404 Not found -
    + */ + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + + /** + * To test enum parameters + * To test enum parameters + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid request -
    404 Not found -
    + */ + public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble)); + + if (enumHeaderStringArray != null) + localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); +if (enumHeaderString != null) + localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + + + if (enumFormStringArray != null) + localVarFormParams.put("enum_form_string_array", enumFormStringArray); +if (enumFormString != null) + localVarFormParams.put("enum_form_string", enumFormString); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + +private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'requiredStringGroup' is set + if (requiredStringGroup == null) { + throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"); + } + + // verify the required parameter 'requiredBooleanGroup' is set + if (requiredBooleanGroup == null) { + throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters"); + } + + // verify the required parameter 'requiredInt64Group' is set + if (requiredInt64Group == null) { + throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters"); + } + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); + + if (requiredBooleanGroup != null) + localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); +if (booleanGroup != null) + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearer_test" }; + + return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + + public class APItestGroupParametersRequest { + private Integer requiredStringGroup; + private Boolean requiredBooleanGroup; + private Long requiredInt64Group; + private Integer stringGroup; + private Boolean booleanGroup; + private Long int64Group; + + private APItestGroupParametersRequest() { + } + + /** + * Set requiredStringGroup + * @param requiredStringGroup Required String in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredStringGroup(Integer requiredStringGroup) { + this.requiredStringGroup = requiredStringGroup; + return this; + } + + /** + * Set requiredBooleanGroup + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredBooleanGroup(Boolean requiredBooleanGroup) { + this.requiredBooleanGroup = requiredBooleanGroup; + return this; + } + + /** + * Set requiredInt64Group + * @param requiredInt64Group Required Integer in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredInt64Group(Long requiredInt64Group) { + this.requiredInt64Group = requiredInt64Group; + return this; + } + + /** + * Set stringGroup + * @param stringGroup String in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest stringGroup(Integer stringGroup) { + this.stringGroup = stringGroup; + return this; + } + + /** + * Set booleanGroup + * @param booleanGroup Boolean in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest booleanGroup(Boolean booleanGroup) { + this.booleanGroup = booleanGroup; + return this; + } + + /** + * Set int64Group + * @param int64Group Integer in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest int64Group(Long int64Group) { + this.int64Group = int64Group; + return this; + } + + /** + * Execute testGroupParameters request + + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    400 Someting wrong -
    + + */ + + public void execute() throws ApiException { + this.executeWithHttpInfo().getData(); + } + + /** + * Execute testGroupParameters request with HTTP info returned + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    400 Someting wrong -
    + + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @return testGroupParametersRequest + * @throws ApiException if fails to make API call + + + */ + public APItestGroupParametersRequest testGroupParameters() throws ApiException { + return new APItestGroupParametersRequest(); + } + /** + * test inline additionalProperties + * + * @param requestBody request body (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public void testInlineAdditionalProperties(Map requestBody) throws ApiException { + testInlineAdditionalPropertiesWithHttpInfo(requestBody); + } + + /** + * test inline additionalProperties + * + * @param requestBody request body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws ApiException { + Object localVarPostBody = requestBody; + + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); + } + + // create path and map variables + String localVarPath = "/fake/inline-additionalProperties"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public void testJsonFormData(String param, String param2) throws ApiException { + testJsonFormDataWithHttpInfo(param, param2); + } + + /** + * test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'param' is set + if (param == null) { + throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData"); + } + + // verify the required parameter 'param2' is set + if (param2 == null) { + throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData"); + } + + // create path and map variables + String localVarPath = "/fake/jsonFormData"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (param != null) + localVarFormParams.put("param", param); +if (param2 != null) + localVarFormParams.put("param2", param2); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * + * To test the collection format in query parameters + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { + testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /** + * + * To test the collection format in query parameters + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'pipe' is set + if (pipe == null) { + throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); + } + + // verify the required parameter 'ioutil' is set + if (ioutil == null) { + throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat"); + } + + // verify the required parameter 'http' is set + if (http == null) { + throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat"); + } + + // verify the required parameter 'url' is set + if (url == null) { + throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat"); + } + + // verify the required parameter 'context' is set + if (context == null) { + throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); + } + + // create path and map variables + String localVarPath = "/fake/test-query-parameters"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "pipe", pipe)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); + localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java new file mode 100644 index 000000000000..6aee09d3edd0 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -0,0 +1,115 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import org.openapitools.client.model.Client; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FakeClassnameTags123Api { + private ApiClient apiClient; + + public FakeClassnameTags123Api() { + this(Configuration.getDefaultApiClient()); + } + + public FakeClassnameTags123Api(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * To test class name in snake case + * To test class name in snake case + * @param client client model (required) + * @return Client + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public Client testClassname(Client client) throws ApiException { + return testClassnameWithHttpInfo(client).getData(); + } + + /** + * To test class name in snake case + * To test class name in snake case + * @param client client model (required) + * @return ApiResponse<Client> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse testClassnameWithHttpInfo(Client client) throws ApiException { + Object localVarPostBody = client; + + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); + } + + // create path and map variables + String localVarPath = "/fake_classname_test"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key_query" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/PetApi.java new file mode 100644 index 000000000000..42eb2a83dc14 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/PetApi.java @@ -0,0 +1,697 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PetApi { + private ApiClient apiClient; + + public PetApi() { + this(Configuration.getDefaultApiClient()); + } + + public PetApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    405 Invalid input -
    + */ + public void addPet(Pet pet) throws ApiException { + addPetWithHttpInfo(pet); + } + + /** + * Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    405 Invalid input -
    + */ + public ApiResponse addPetWithHttpInfo(Pet pet) throws ApiException { + Object localVarPostBody = pet; + + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet"); + } + + // create path and map variables + String localVarPath = "/pet"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json", "application/xml" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_signature_test", "petstore_auth" }; + + return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    400 Invalid pet value -
    + */ + public void deletePet(Long petId, String apiKey) throws ApiException { + deletePetWithHttpInfo(petId, apiKey); + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    400 Invalid pet value -
    + */ + public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (apiKey != null) + localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * @param status Status values that need to be considered for filter (required) + * @return List<Pet> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid status value -
    + */ + public List findPetsByStatus(List status) throws ApiException { + return findPetsByStatusWithHttpInfo(status).getData(); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * @param status Status values that need to be considered for filter (required) + * @return ApiResponse<List<Pet>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid status value -
    + */ + public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'status' is set + if (status == null) { + throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus"); + } + + // create path and map variables + String localVarPath = "/pet/findByStatus"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_signature_test", "petstore_auth" }; + + GenericType> localVarReturnType = new GenericType>() {}; + + return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param tags Tags to filter by (required) + * @return List<Pet> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid tag value -
    + * @deprecated + */ + @Deprecated + public List findPetsByTags(List tags) throws ApiException { + return findPetsByTagsWithHttpInfo(tags).getData(); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param tags Tags to filter by (required) + * @return ApiResponse<List<Pet>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid tag value -
    + * @deprecated + */ + @Deprecated + public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'tags' is set + if (tags == null) { + throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags"); + } + + // create path and map variables + String localVarPath = "/pet/findByTags"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_signature_test", "petstore_auth" }; + + GenericType> localVarReturnType = new GenericType>() {}; + + return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return (required) + * @return Pet + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid ID supplied -
    404 Pet not found -
    + */ + public Pet getPetById(Long petId) throws ApiException { + return getPetByIdWithHttpInfo(petId).getData(); + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return (required) + * @return ApiResponse<Pet> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid ID supplied -
    404 Pet not found -
    + */ + public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    400 Invalid ID supplied -
    404 Pet not found -
    405 Validation exception -
    + */ + public void updatePet(Pet pet) throws ApiException { + updatePetWithHttpInfo(pet); + } + + /** + * Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    400 Invalid ID supplied -
    404 Pet not found -
    405 Validation exception -
    + */ + public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { + Object localVarPostBody = pet; + + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"); + } + + // create path and map variables + String localVarPath = "/pet"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json", "application/xml" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_signature_test", "petstore_auth" }; + + return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    405 Invalid input -
    + */ + public void updatePetWithForm(Long petId, String name, String status) throws ApiException { + updatePetWithFormWithHttpInfo(petId, name, status); + } + + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    405 Invalid input -
    + */ + public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (name != null) + localVarFormParams.put("name", name); +if (status != null) + localVarFormParams.put("status", status); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param _file file to upload (optional) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException { + return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param _file file to upload (optional) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImage" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (_file != null) + localVarFormParams.put("file", _file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); + } + + /** + * uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'requiredFile' is set + if (requiredFile == null) { + throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (requiredFile != null) + localVarFormParams.put("requiredFile", requiredFile); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java new file mode 100644 index 000000000000..0f4dd5cf858a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java @@ -0,0 +1,316 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import org.openapitools.client.model.Order; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StoreApi { + private ApiClient apiClient; + + public StoreApi() { + this(Configuration.getDefaultApiClient()); + } + + public StoreApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @param orderId ID of the order that needs to be deleted (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid ID supplied -
    404 Order not found -
    + */ + public void deleteOrder(String orderId) throws ApiException { + 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 + * @param orderId ID of the order that needs to be deleted (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid ID supplied -
    404 Order not found -
    + */ + public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'orderId' is set + if (orderId == null) { + throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder"); + } + + // create path and map variables + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return Map<String, Integer> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public Map getInventory() throws ApiException { + return getInventoryWithHttpInfo().getData(); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return ApiResponse<Map<String, Integer>> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    200 successful operation -
    + */ + public ApiResponse> getInventoryWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/store/inventory"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType> localVarReturnType = new GenericType>() {}; + + return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched (required) + * @return Order + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid ID supplied -
    404 Order not found -
    + */ + public Order getOrderById(Long orderId) throws ApiException { + return getOrderByIdWithHttpInfo(orderId).getData(); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched (required) + * @return ApiResponse<Order> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid ID supplied -
    404 Order not found -
    + */ + public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'orderId' is set + if (orderId == null) { + throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById"); + } + + // create path and map variables + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return Order + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid Order -
    + */ + public Order placeOrder(Order order) throws ApiException { + return placeOrderWithHttpInfo(order).getData(); + } + + /** + * Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return ApiResponse<Order> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid Order -
    + */ + public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiException { + Object localVarPostBody = order; + + // verify the required parameter 'order' is set + if (order == null) { + throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"); + } + + // create path and map variables + String localVarPath = "/store/order"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/UserApi.java new file mode 100644 index 000000000000..c23402c300bd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/UserApi.java @@ -0,0 +1,589 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import jakarta.ws.rs.core.GenericType; + +import java.time.OffsetDateTime; +import org.openapitools.client.model.User; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UserApi { + private ApiClient apiClient; + + public UserApi() { + this(Configuration.getDefaultApiClient()); + } + + public UserApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create user + * This can only be done by the logged in user. + * @param user Created user object (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public void createUser(User user) throws ApiException { + createUserWithHttpInfo(user); + } + + /** + * Create user + * This can only be done by the logged in user. + * @param user Created user object (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public ApiResponse createUserWithHttpInfo(User user) throws ApiException { + Object localVarPostBody = user; + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUser"); + } + + // create path and map variables + String localVarPath = "/user"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public void createUsersWithArrayInput(List user) throws ApiException { + createUsersWithArrayInputWithHttpInfo(user); + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public ApiResponse createUsersWithArrayInputWithHttpInfo(List user) throws ApiException { + Object localVarPostBody = user; + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); + } + + // create path and map variables + String localVarPath = "/user/createWithArray"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public void createUsersWithListInput(List user) throws ApiException { + createUsersWithListInputWithHttpInfo(user); + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public ApiResponse createUsersWithListInputWithHttpInfo(List user) throws ApiException { + Object localVarPostBody = user; + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); + } + + // create path and map variables + String localVarPath = "/user/createWithList"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid username supplied -
    404 User not found -
    + */ + public void deleteUser(String username) throws ApiException { + deleteUserWithHttpInfo(username); + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid username supplied -
    404 User not found -
    + */ + public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"); + } + + // create path and map variables + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return User + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid username supplied -
    404 User not found -
    + */ + public User getUserByName(String username) throws ApiException { + return getUserByNameWithHttpInfo(username).getData(); + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return ApiResponse<User> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 successful operation -
    400 Invalid username supplied -
    404 User not found -
    + */ + public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName"); + } + + // create path and map variables + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return String + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    400 Invalid username/password supplied -
    + */ + public String loginUser(String username, String password) throws ApiException { + return loginUserWithHttpInfo(username, password).getData(); + } + + /** + * Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 successful operation * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    400 Invalid username/password supplied -
    + */ + public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser"); + } + + // verify the required parameter 'password' is set + if (password == null) { + throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser"); + } + + // create path and map variables + String localVarPath = "/user/login"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); + + + + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Logs out current logged in user session + * + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public void logoutUser() throws ApiException { + logoutUserWithHttpInfo(); + } + + /** + * Logs out current logged in user session + * + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
    Status Code Description Response Headers
    0 successful operation -
    + */ + public ApiResponse logoutUserWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/logout"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid user supplied -
    404 User not found -
    + */ + public void updateUser(String username, User user) throws ApiException { + updateUserWithHttpInfo(username, user); + } + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
    Status Code Description Response Headers
    400 Invalid user supplied -
    404 User not found -
    + */ + public ApiResponse updateUserWithHttpInfo(String username, User user) throws ApiException { + Object localVarPostBody = user; + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); + } + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); + } + + // create path and map variables + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java new file mode 100644 index 000000000000..6b7c05426439 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/Authentication.java new file mode 100644 index 000000000000..579b5e0d6d53 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/Authentication.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java new file mode 100644 index 000000000000..b49dd09b98d4 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -0,0 +1,55 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java new file mode 100644 index 000000000000..1e07e27e4f97 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java new file mode 100644 index 000000000000..18274e1df9ec --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java @@ -0,0 +1,280 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.Key; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.List; +import java.util.TimeZone; +import java.security.spec.AlgorithmParameterSpec; +import java.security.InvalidKeyException; + +import org.tomitribe.auth.signatures.Algorithm; +import org.tomitribe.auth.signatures.Signer; +import org.tomitribe.auth.signatures.Signature; +import org.tomitribe.auth.signatures.SigningAlgorithm; + +/** + * A Configuration object for the HTTP message signature security scheme. + */ +public class HttpSignatureAuth implements Authentication { + + private Signer signer; + + // An opaque string that the server can use to look up the component they need to validate the signature. + private String keyId; + + // The HTTP signature algorithm. + private SigningAlgorithm signingAlgorithm; + + // The HTTP cryptographic algorithm. + private Algorithm algorithm; + + // The cryptographic parameters. + private AlgorithmParameterSpec parameterSpec; + + // The list of HTTP headers that should be included in the HTTP signature. + private List headers; + + // The digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + private String digestAlgorithm; + + // The maximum validity duration of the HTTP signature. + private Long maxSignatureValidity; + + /** + * Construct a new HTTP signature auth configuration object. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + * @param signingAlgorithm The signature algorithm. + * @param algorithm The cryptographic algorithm. + * @param digestAlgorithm The digest algorithm. + * @param headers The list of HTTP headers that should be included in the HTTP signature. + * @param maxSignatureValidity The maximum validity duration of the HTTP signature. + * Used to set the '(expires)' field in the HTTP signature. + */ + public HttpSignatureAuth(String keyId, + SigningAlgorithm signingAlgorithm, + Algorithm algorithm, + String digestAlgorithm, + AlgorithmParameterSpec parameterSpec, + List headers, + Long maxSignatureValidity) { + this.keyId = keyId; + this.signingAlgorithm = signingAlgorithm; + this.algorithm = algorithm; + this.parameterSpec = parameterSpec; + this.digestAlgorithm = digestAlgorithm; + this.headers = headers; + this.maxSignatureValidity = maxSignatureValidity; + } + + /** + * Returns the opaque string that the server can use to look up the component they need to validate the signature. + * + * @return The keyId. + */ + public String getKeyId() { + return keyId; + } + + /** + * Set the HTTP signature key id. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + */ + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + /** + * Returns the HTTP signature algorithm which is used to sign HTTP requests. + */ + public SigningAlgorithm getSigningAlgorithm() { + return signingAlgorithm; + } + + /** + * Sets the HTTP signature algorithm which is used to sign HTTP requests. + * + * @param signingAlgorithm The HTTP signature algorithm. + */ + public void setSigningAlgorithm(SigningAlgorithm signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } + + /** + * Returns the HTTP cryptographic algorithm which is used to sign HTTP requests. + */ + public Algorithm getAlgorithm() { + return algorithm; + } + + /** + * Sets the HTTP cryptographic algorithm which is used to sign HTTP requests. + * + * @param algorithm The HTTP signature algorithm. + */ + public void setAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + } + + /** + * Returns the cryptographic parameters which are used to sign HTTP requests. + */ + public AlgorithmParameterSpec getAlgorithmParameterSpec() { + return parameterSpec; + } + + /** + * Sets the cryptographic parameters which are used to sign HTTP requests. + * + * @param parameterSpec The cryptographic parameters. + */ + public void setAlgorithmParameterSpec(AlgorithmParameterSpec parameterSpec) { + this.parameterSpec = parameterSpec; + } + + /** + * Returns the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * @see java.security.MessageDigest + */ + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * The exact list of supported digest algorithms depends on the installed security providers. + * Every implementation of the Java platform is required to support "MD5", "SHA-1" and "SHA-256". + * Do not use "MD5" and "SHA-1", they are vulnerable to multiple known attacks. + * By default, "SHA-256" is used. + * + * @param digestAlgorithm The digest algorithm. + * + * @see java.security.MessageDigest + */ + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Returns the list of HTTP headers that should be included in the HTTP signature. + */ + public List getHeaders() { + return headers; + } + + /** + * Sets the list of HTTP headers that should be included in the HTTP signature. + * + * @param headers The HTTP headers. + */ + public void setHeaders(List headers) { + this.headers = headers; + } + + /** + * Returns the maximum validity duration of the HTTP signature. + * @return The maximum validity duration of the HTTP signature. + */ + public Long getMaxSignatureValidity() { + return maxSignatureValidity; + } + + /** + * Returns the signer instance used to sign HTTP messages. + * + * @return the signer instance. + */ + public Signer getSigner() { + return signer; + } + + /** + * Sets the signer instance used to sign HTTP messages. + * + * @param signer The signer instance to set. + */ + public void setSigner(Signer signer) { + this.signer = signer; + } + + /** + * Set the private key used to sign HTTP requests using the HTTP signature scheme. + * + * @param key The private key. + * + * @throws InvalidKeyException Unable to parse the key, or the security provider for this key + * is not installed. + */ + public void setPrivateKey(Key key) throws InvalidKeyException, ApiException { + if (key == null) { + throw new ApiException("Private key (java.security.Key) cannot be null"); + } + signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers, maxSignatureValidity)); + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + try { + if (headers.contains("host")) { + headerParams.put("host", uri.getHost()); + } + + if (headers.contains("date")) { + SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + headerParams.put("date", dateFormat.format(Calendar.getInstance().getTime())); + } + + if (headers.contains("digest")) { + headerParams.put("digest", + this.digestAlgorithm + "=" + + new String(Base64.getEncoder().encode(MessageDigest.getInstance(this.digestAlgorithm).digest(payload.getBytes())))); + } + + if (signer == null) { + throw new ApiException("Signer cannot be null. Please call the method `setPrivateKey` to set it up correctly"); + } + + // construct the path with the URL-encoded path and query. + // Calling getRawPath and getRawQuery ensures the path is URL-encoded as it will be serialized + // on the wire. The HTTP signature must use the encode URL as it is sent on the wire. + String path = uri.getRawPath(); + if (uri.getRawQuery() != null && !"".equals(uri.getRawQuery())) { + path += "?" + uri.getRawQuery(); + } + + headerParams.put("Authorization", signer.sign(method, path, headerParams).toString()); + } catch (Exception ex) { + throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString()); + } + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/OAuth.java new file mode 100644 index 000000000000..7d6650900347 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/OAuth.java @@ -0,0 +1,193 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; +import com.github.scribejava.core.builder.ServiceBuilder; +import com.github.scribejava.core.builder.api.DefaultApi20; +import com.github.scribejava.core.exceptions.OAuthException; +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth.OAuth20Service; + +import jakarta.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OAuth implements Authentication { + private static final Logger log = Logger.getLogger(OAuth.class.getName()); + + private String tokenUrl; + private String absoluteTokenUrl; + private OAuthFlow flow = OAuthFlow.APPLICATION; + private OAuth20Service service; + private DefaultApi20 authApi; + private String scope; + private String username; + private String password; + private String code; + private volatile OAuth2AccessToken accessToken; + + public OAuth(String basePath, String tokenUrl) { + this.tokenUrl = tokenUrl; + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + authApi = new DefaultApi20() { + @Override + public String getAccessTokenEndpoint() { + return absoluteTokenUrl; + } + + @Override + protected String getAuthorizationBaseUrl() { + throw new UnsupportedOperationException("Shouldn't get there !"); + } + }; + } + + private static String createAbsoluteTokenUrl(String basePath, String tokenUrl) { + if (!URI.create(tokenUrl).isAbsolute()) { + try { + return UriBuilder.fromPath(basePath).path(tokenUrl).build().toURL().toString(); + } catch (MalformedURLException e) { + log.log(Level.SEVERE, "Couldn't create absolute token URL", e); + } + } + return tokenUrl; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + + if (accessToken == null) { + obtainAccessToken(null); + } + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken.getAccessToken()); + } + } + + public OAuth2AccessToken renewAccessToken() throws ApiException { + String refreshToken = null; + if (accessToken != null) { + refreshToken = accessToken.getRefreshToken(); + accessToken = null; + } + return obtainAccessToken(refreshToken); + } + + public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException { + if (service == null) { + log.log(Level.FINE, "service is null in obtainAccessToken."); + return null; + } + try { + if (refreshToken != null) { + return service.refreshAccessToken(refreshToken); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + log.log(Level.FINE, "Refreshing the access token using the refresh token failed", e); + } + try { + switch (flow) { + case PASSWORD: + if (username != null && password != null) { + accessToken = service.getAccessTokenPasswordGrant(username, password, scope); + } + break; + case ACCESS_CODE: + if (code != null) { + accessToken = service.getAccessToken(code); + code = null; + } + break; + case APPLICATION: + accessToken = service.getAccessTokenClientCredentialsGrant(scope); + break; + default: + log.log(Level.SEVERE, "Invalid flow in obtainAccessToken: " + flow); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException(e); + } + return accessToken; + } + + public OAuth2AccessToken getAccessToken() { + return accessToken; + } + + public OAuth setAccessToken(OAuth2AccessToken accessToken) { + this.accessToken = accessToken; + return this; + } + + public OAuth setAccessToken(String accessToken) { + this.accessToken = new OAuth2AccessToken(accessToken); + return this; + } + + public OAuth setScope(String scope) { + this.scope = scope; + return this; + } + + public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret).debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .build(authApi); + } + return this; + } + + public OAuth usePasswordFlow(String username, String password) { + this.flow = OAuthFlow.PASSWORD; + this.username = username; + this.password = password; + return this; + } + + public OAuth useAuthorizationCodeFlow(String code) { + this.flow = OAuthFlow.ACCESS_CODE; + this.code = code; + return this; + } + + public OAuth setFlow(OAuthFlow flow) { + this.flow = flow; + return this; + } + + public void setBasePath(String basePath) { + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + } +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/OAuthFlow.java new file mode 100644 index 000000000000..dab6bf989ea7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -0,0 +1,24 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +/** + * OAuth flows that are supported by this client + */ +public enum OAuthFlow { + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java new file mode 100644 index 000000000000..f837dea9fdd9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.openapitools.client.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..5962b1ea54c7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -0,0 +1,394 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * AdditionalPropertiesClass + */ +@JsonPropertyOrder({ + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE1, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE2, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE3, + AdditionalPropertiesClass.JSON_PROPERTY_EMPTY_MAP, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_STRING +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdditionalPropertiesClass { + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = null; + + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty = null; + + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; + private JsonNullable anytype1 = JsonNullable.of(null); + + public static final String JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE1 = "map_with_undeclared_properties_anytype_1"; + private Object mapWithUndeclaredPropertiesAnytype1; + + public static final String JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE2 = "map_with_undeclared_properties_anytype_2"; + private Object mapWithUndeclaredPropertiesAnytype2; + + public static final String JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE3 = "map_with_undeclared_properties_anytype_3"; + private Map mapWithUndeclaredPropertiesAnytype3 = null; + + public static final String JSON_PROPERTY_EMPTY_MAP = "empty_map"; + private Object emptyMap; + + public static final String JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_STRING = "map_with_undeclared_properties_string"; + private Map mapWithUndeclaredPropertiesString = null; + + public AdditionalPropertiesClass() { + } + + public AdditionalPropertiesClass mapProperty(Map mapProperty) { + this.mapProperty = mapProperty; + return this; + } + + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); + } + this.mapProperty.put(key, mapPropertyItem); + return this; + } + + /** + * Get mapProperty + * @return mapProperty + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapProperty() { + return mapProperty; + } + + + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; + } + + + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; + return this; + } + + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); + } + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); + return this; + } + + /** + * Get mapOfMapProperty + * @return mapOfMapProperty + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapOfMapProperty() { + return mapOfMapProperty; + } + + + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; + } + + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = JsonNullable.of(anytype1); + return this; + } + + /** + * Get anytype1 + * @return anytype1 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public Object getAnytype1() { + return anytype1.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ANYTYPE1) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnytype1_JsonNullable() { + return anytype1; + } + + @JsonProperty(JSON_PROPERTY_ANYTYPE1) + public void setAnytype1_JsonNullable(JsonNullable anytype1) { + this.anytype1 = anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = JsonNullable.of(anytype1); + } + + + public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { + this.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + return this; + } + + /** + * Get mapWithUndeclaredPropertiesAnytype1 + * @return mapWithUndeclaredPropertiesAnytype1 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE1) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithUndeclaredPropertiesAnytype1() { + return mapWithUndeclaredPropertiesAnytype1; + } + + + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE1) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { + this.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + } + + + public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { + this.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + return this; + } + + /** + * Get mapWithUndeclaredPropertiesAnytype2 + * @return mapWithUndeclaredPropertiesAnytype2 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE2) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithUndeclaredPropertiesAnytype2() { + return mapWithUndeclaredPropertiesAnytype2; + } + + + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE2) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { + this.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + } + + + public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { + this.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + return this; + } + + public AdditionalPropertiesClass putMapWithUndeclaredPropertiesAnytype3Item(String key, Object mapWithUndeclaredPropertiesAnytype3Item) { + if (this.mapWithUndeclaredPropertiesAnytype3 == null) { + this.mapWithUndeclaredPropertiesAnytype3 = new HashMap<>(); + } + this.mapWithUndeclaredPropertiesAnytype3.put(key, mapWithUndeclaredPropertiesAnytype3Item); + return this; + } + + /** + * Get mapWithUndeclaredPropertiesAnytype3 + * @return mapWithUndeclaredPropertiesAnytype3 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE3) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapWithUndeclaredPropertiesAnytype3() { + return mapWithUndeclaredPropertiesAnytype3; + } + + + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_ANYTYPE3) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { + this.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + } + + + public AdditionalPropertiesClass emptyMap(Object emptyMap) { + this.emptyMap = emptyMap; + return this; + } + + /** + * an object with no declared properties and no undeclared properties, hence it's an empty map. + * @return emptyMap + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "an object with no declared properties and no undeclared properties, hence it's an empty map.") + @JsonProperty(JSON_PROPERTY_EMPTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getEmptyMap() { + return emptyMap; + } + + + @JsonProperty(JSON_PROPERTY_EMPTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmptyMap(Object emptyMap) { + this.emptyMap = emptyMap; + } + + + public AdditionalPropertiesClass mapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { + this.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + return this; + } + + public AdditionalPropertiesClass putMapWithUndeclaredPropertiesStringItem(String key, String mapWithUndeclaredPropertiesStringItem) { + if (this.mapWithUndeclaredPropertiesString == null) { + this.mapWithUndeclaredPropertiesString = new HashMap<>(); + } + this.mapWithUndeclaredPropertiesString.put(key, mapWithUndeclaredPropertiesStringItem); + return this; + } + + /** + * Get mapWithUndeclaredPropertiesString + * @return mapWithUndeclaredPropertiesString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapWithUndeclaredPropertiesString() { + return mapWithUndeclaredPropertiesString; + } + + + @JsonProperty(JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { + this.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + } + + + /** + * Return true if this AdditionalPropertiesClass object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty) && + equalsNullable(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.mapWithUndeclaredPropertiesAnytype1, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype1) && + Objects.equals(this.mapWithUndeclaredPropertiesAnytype2, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype2) && + Objects.equals(this.mapWithUndeclaredPropertiesAnytype3, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype3) && + Objects.equals(this.emptyMap, additionalPropertiesClass.emptyMap) && + Objects.equals(this.mapWithUndeclaredPropertiesString, additionalPropertiesClass.mapWithUndeclaredPropertiesString); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapProperty, mapOfMapProperty, hashCodeNullable(anytype1), mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, emptyMap, mapWithUndeclaredPropertiesString); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" mapWithUndeclaredPropertiesAnytype1: ").append(toIndentedString(mapWithUndeclaredPropertiesAnytype1)).append("\n"); + sb.append(" mapWithUndeclaredPropertiesAnytype2: ").append(toIndentedString(mapWithUndeclaredPropertiesAnytype2)).append("\n"); + sb.append(" mapWithUndeclaredPropertiesAnytype3: ").append(toIndentedString(mapWithUndeclaredPropertiesAnytype3)).append("\n"); + sb.append(" emptyMap: ").append(toIndentedString(emptyMap)).append("\n"); + sb.append(" mapWithUndeclaredPropertiesString: ").append(toIndentedString(mapWithUndeclaredPropertiesString)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java new file mode 100644 index 000000000000..f45ed42cfc25 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Animal.java @@ -0,0 +1,167 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Cat; +import org.openapitools.client.model.Dog; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Animal + */ +@JsonPropertyOrder({ + Animal.JSON_PROPERTY_CLASS_NAME, + Animal.JSON_PROPERTY_COLOR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private String className; + + public static final String JSON_PROPERTY_COLOR = "color"; + private String color = "red"; + + public Animal() { + } + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(String className) { + this.className = className; + } + + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(String color) { + this.color = color; + } + + + /** + * Return true if this Animal object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Cat", Cat.class); + mappings.put("Dog", Dog.class); + mappings.put("Animal", Animal.class); + JSON.registerDiscriminator(Animal.class, "className", mappings); +} +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java new file mode 100644 index 000000000000..c8904088a0df --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Apple.java @@ -0,0 +1,145 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Apple + */ +@JsonPropertyOrder({ + Apple.JSON_PROPERTY_CULTIVAR, + Apple.JSON_PROPERTY_ORIGIN +}) +@JsonTypeName("apple") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Apple { + public static final String JSON_PROPERTY_CULTIVAR = "cultivar"; + private String cultivar; + + public static final String JSON_PROPERTY_ORIGIN = "origin"; + private String origin; + + public Apple() { + } + + public Apple cultivar(String cultivar) { + this.cultivar = cultivar; + return this; + } + + /** + * Get cultivar + * @return cultivar + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CULTIVAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCultivar() { + return cultivar; + } + + + @JsonProperty(JSON_PROPERTY_CULTIVAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCultivar(String cultivar) { + this.cultivar = cultivar; + } + + + public Apple origin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get origin + * @return origin + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ORIGIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOrigin() { + return origin; + } + + + @JsonProperty(JSON_PROPERTY_ORIGIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrigin(String origin) { + this.origin = origin; + } + + + /** + * Return true if this apple object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Apple apple = (Apple) o; + return Objects.equals(this.cultivar, apple.cultivar) && + Objects.equals(this.origin, apple.origin); + } + + @Override + public int hashCode() { + return Objects.hash(cultivar, origin); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Apple {\n"); + sb.append(" cultivar: ").append(toIndentedString(cultivar)).append("\n"); + sb.append(" origin: ").append(toIndentedString(origin)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java new file mode 100644 index 000000000000..101f74fad8f6 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/AppleReq.java @@ -0,0 +1,145 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * AppleReq + */ +@JsonPropertyOrder({ + AppleReq.JSON_PROPERTY_CULTIVAR, + AppleReq.JSON_PROPERTY_MEALY +}) +@JsonTypeName("appleReq") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AppleReq { + public static final String JSON_PROPERTY_CULTIVAR = "cultivar"; + private String cultivar; + + public static final String JSON_PROPERTY_MEALY = "mealy"; + private Boolean mealy; + + public AppleReq() { + } + + public AppleReq cultivar(String cultivar) { + this.cultivar = cultivar; + return this; + } + + /** + * Get cultivar + * @return cultivar + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CULTIVAR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCultivar() { + return cultivar; + } + + + @JsonProperty(JSON_PROPERTY_CULTIVAR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCultivar(String cultivar) { + this.cultivar = cultivar; + } + + + public AppleReq mealy(Boolean mealy) { + this.mealy = mealy; + return this; + } + + /** + * Get mealy + * @return mealy + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MEALY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getMealy() { + return mealy; + } + + + @JsonProperty(JSON_PROPERTY_MEALY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMealy(Boolean mealy) { + this.mealy = mealy; + } + + + /** + * Return true if this appleReq object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppleReq appleReq = (AppleReq) o; + return Objects.equals(this.cultivar, appleReq.cultivar) && + Objects.equals(this.mealy, appleReq.mealy); + } + + @Override + public int hashCode() { + return Objects.hash(cultivar, mealy); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppleReq {\n"); + sb.append(" cultivar: ").append(toIndentedString(cultivar)).append("\n"); + sb.append(" mealy: ").append(toIndentedString(mealy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..c5af5b29fe95 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,123 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ArrayOfArrayOfNumberOnly + */ +@JsonPropertyOrder({ + ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArrayOfArrayOfNumberOnly { + public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly() { + } + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + /** + * Return true if this ArrayOfArrayOfNumberOnly object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..45026879e868 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -0,0 +1,123 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ArrayOfNumberOnly + */ +@JsonPropertyOrder({ + ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArrayOfNumberOnly { + public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; + private List arrayNumber = null; + + public ArrayOfNumberOnly() { + } + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayNumber() { + return arrayNumber; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + /** + * Return true if this ArrayOfNumberOnly object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java new file mode 100644 index 000000000000..b3f3f20192b6 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -0,0 +1,203 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ReadOnlyFirst; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ArrayTest + */ +@JsonPropertyOrder({ + ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING, + ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER, + ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArrayTest { + 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"; + private List> arrayArrayOfInteger = null; + + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; + private List> arrayArrayOfModel = null; + + public ArrayTest() { + } + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayOfString() { + return arrayOfString; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + /** + * Return true if this ArrayTest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java new file mode 100644 index 000000000000..e7a63fd3adf9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Banana.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Banana + */ +@JsonPropertyOrder({ + Banana.JSON_PROPERTY_LENGTH_CM +}) +@JsonTypeName("banana") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Banana { + public static final String JSON_PROPERTY_LENGTH_CM = "lengthCm"; + private BigDecimal lengthCm; + + public Banana() { + } + + public Banana lengthCm(BigDecimal lengthCm) { + this.lengthCm = lengthCm; + return this; + } + + /** + * Get lengthCm + * @return lengthCm + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LENGTH_CM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getLengthCm() { + return lengthCm; + } + + + @JsonProperty(JSON_PROPERTY_LENGTH_CM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLengthCm(BigDecimal lengthCm) { + this.lengthCm = lengthCm; + } + + + /** + * Return true if this banana object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Banana banana = (Banana) o; + return Objects.equals(this.lengthCm, banana.lengthCm); + } + + @Override + public int hashCode() { + return Objects.hash(lengthCm); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Banana {\n"); + sb.append(" lengthCm: ").append(toIndentedString(lengthCm)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java new file mode 100644 index 000000000000..d25642d46098 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BananaReq.java @@ -0,0 +1,146 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * BananaReq + */ +@JsonPropertyOrder({ + BananaReq.JSON_PROPERTY_LENGTH_CM, + BananaReq.JSON_PROPERTY_SWEET +}) +@JsonTypeName("bananaReq") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BananaReq { + public static final String JSON_PROPERTY_LENGTH_CM = "lengthCm"; + private BigDecimal lengthCm; + + public static final String JSON_PROPERTY_SWEET = "sweet"; + private Boolean sweet; + + public BananaReq() { + } + + public BananaReq lengthCm(BigDecimal lengthCm) { + this.lengthCm = lengthCm; + return this; + } + + /** + * Get lengthCm + * @return lengthCm + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_LENGTH_CM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getLengthCm() { + return lengthCm; + } + + + @JsonProperty(JSON_PROPERTY_LENGTH_CM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLengthCm(BigDecimal lengthCm) { + this.lengthCm = lengthCm; + } + + + public BananaReq sweet(Boolean sweet) { + this.sweet = sweet; + return this; + } + + /** + * Get sweet + * @return sweet + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SWEET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSweet() { + return sweet; + } + + + @JsonProperty(JSON_PROPERTY_SWEET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSweet(Boolean sweet) { + this.sweet = sweet; + } + + + /** + * Return true if this bananaReq object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BananaReq bananaReq = (BananaReq) o; + return Objects.equals(this.lengthCm, bananaReq.lengthCm) && + Objects.equals(this.sweet, bananaReq.sweet); + } + + @Override + public int hashCode() { + return Objects.hash(lengthCm, sweet); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BananaReq {\n"); + sb.append(" lengthCm: ").append(toIndentedString(lengthCm)).append("\n"); + sb.append(" sweet: ").append(toIndentedString(sweet)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java new file mode 100644 index 000000000000..4c09c9cea50f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/BasquePig.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * BasquePig + */ +@JsonPropertyOrder({ + BasquePig.JSON_PROPERTY_CLASS_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BasquePig { + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private String className; + + public BasquePig() { + } + + public BasquePig className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(String className) { + this.className = className; + } + + + /** + * Return true if this BasquePig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasquePig basquePig = (BasquePig) o; + return Objects.equals(this.className, basquePig.className); + } + + @Override + public int hashCode() { + return Objects.hash(className); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BasquePig {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java new file mode 100644 index 000000000000..35f10af74b73 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Capitalization.java @@ -0,0 +1,272 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Capitalization + */ +@JsonPropertyOrder({ + Capitalization.JSON_PROPERTY_SMALL_CAMEL, + Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, + Capitalization.JSON_PROPERTY_SMALL_SNAKE, + Capitalization.JSON_PROPERTY_CAPITAL_SNAKE, + Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS, + Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Capitalization { + public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; + private String smallCamel; + + public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; + private String capitalCamel; + + public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; + private String smallSnake; + + public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; + private String capitalSnake; + + public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; + private String scAETHFlowPoints; + + public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; + private String ATT_NAME; + + public Capitalization() { + } + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSmallCamel() { + return smallCamel; + } + + + @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCapitalCamel() { + return capitalCamel; + } + + + @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSmallSnake() { + return smallSnake; + } + + + @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCapitalSnake() { + return capitalSnake; + } + + + @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + + @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Name of the pet ") + @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getATTNAME() { + return ATT_NAME; + } + + + @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + /** + * Return true if this Capitalization object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java new file mode 100644 index 000000000000..a3d569c46d44 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Cat.java @@ -0,0 +1,174 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Cat + */ +@JsonPropertyOrder({ + Cat.JSON_PROPERTY_DECLAWED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) + +public class Cat extends Animal { + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + private Boolean declawed; + + public Cat() { + } + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDeclawed() { + return declawed; + } + + + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Cat putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Cat object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed)&& + Objects.equals(this.additionalProperties, cat.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Cat", Cat.class); + JSON.registerDiscriminator(Cat.class, "className", mappings); +} +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/CatAllOf.java new file mode 100644 index 000000000000..fe3a2613254e --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * CatAllOf + */ +@JsonPropertyOrder({ + CatAllOf.JSON_PROPERTY_DECLAWED +}) +@JsonTypeName("Cat_allOf") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CatAllOf { + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + private Boolean declawed; + + public CatAllOf() { + } + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDeclawed() { + return declawed; + } + + + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + /** + * Return true if this Cat_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 000000000000..ea13668b6aeb --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,144 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Category + */ +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Category { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name = "default-name"; + + public Category() { + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this Category object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java new file mode 100644 index 000000000000..c5bec7fb9de2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java @@ -0,0 +1,220 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildCatAllOf; +import org.openapitools.client.model.ParentPet; +import java.util.Set; +import java.util.HashSet; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ChildCat + */ +@JsonPropertyOrder({ + ChildCat.JSON_PROPERTY_NAME, + ChildCat.JSON_PROPERTY_PET_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "pet_type", // ignore manually set pet_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the pet_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "pet_type", visible = true) + +public class ChildCat extends ParentPet { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; + private String petType = "ChildCat"; + + public ChildCat() { + } + + public ChildCat name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public static final Set PET_TYPE_VALUES = new HashSet<>(Arrays.asList( + "ChildCat" + )); + + public ChildCat petType(String petType) { + if (!PET_TYPE_VALUES.contains(petType)) { + throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); + } + + this.petType = petType; + return this; + } + + /** + * Get petType + * @return petType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPetType() { + return petType; + } + + + @JsonProperty(JSON_PROPERTY_PET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPetType(String petType) { + if (!PET_TYPE_VALUES.contains(petType)) { + throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); + } + + this.petType = petType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ChildCat putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ChildCat object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildCat childCat = (ChildCat) o; + return Objects.equals(this.name, childCat.name) && + Objects.equals(this.petType, childCat.petType)&& + Objects.equals(this.additionalProperties, childCat.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, petType, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" petType: ").append(toIndentedString(petType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ChildCat", ChildCat.class); + JSON.registerDiscriminator(ChildCat.class, "pet_type", mappings); +} +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCatAllOf.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCatAllOf.java new file mode 100644 index 000000000000..23b63e3e69a0 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCatAllOf.java @@ -0,0 +1,159 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Set; +import java.util.HashSet; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ChildCatAllOf + */ +@JsonPropertyOrder({ + ChildCatAllOf.JSON_PROPERTY_NAME, + ChildCatAllOf.JSON_PROPERTY_PET_TYPE +}) +@JsonTypeName("ChildCat_allOf") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChildCatAllOf { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; + private String petType = "ChildCat"; + + public ChildCatAllOf() { + } + + public ChildCatAllOf name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public static final Set PET_TYPE_VALUES = new HashSet<>(Arrays.asList( + "ChildCat" + )); + + public ChildCatAllOf petType(String petType) { + if (!PET_TYPE_VALUES.contains(petType)) { + throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); + } + + this.petType = petType; + return this; + } + + /** + * Get petType + * @return petType + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PET_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPetType() { + return petType; + } + + + @JsonProperty(JSON_PROPERTY_PET_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPetType(String petType) { + if (!PET_TYPE_VALUES.contains(petType)) { + throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); + } + + this.petType = petType; + } + + + /** + * Return true if this ChildCat_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildCatAllOf childCatAllOf = (ChildCatAllOf) o; + return Objects.equals(this.name, childCatAllOf.name) && + Objects.equals(this.petType, childCatAllOf.petType); + } + + @Override + public int hashCode() { + return Objects.hash(name, petType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildCatAllOf {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" petType: ").append(toIndentedString(petType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java new file mode 100644 index 000000000000..d1251c7f6453 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ClassModel.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Model for testing model with \"_class\" property + */ +@ApiModel(description = "Model for testing model with \"_class\" property") +@JsonPropertyOrder({ + ClassModel.JSON_PROPERTY_PROPERTY_CLASS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ClassModel { + public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; + private String propertyClass; + + public ClassModel() { + } + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPropertyClass() { + return propertyClass; + } + + + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + /** + * Return true if this ClassModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java new file mode 100644 index 000000000000..28fd90dce193 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Client.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Client + */ +@JsonPropertyOrder({ + Client.JSON_PROPERTY_CLIENT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Client { + public static final String JSON_PROPERTY_CLIENT = "client"; + private String client; + + public Client() { + } + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CLIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getClient() { + return client; + } + + + @JsonProperty(JSON_PROPERTY_CLIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClient(String client) { + this.client = client; + } + + + /** + * Return true if this Client object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java new file mode 100644 index 000000000000..0a5b037ab6e5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -0,0 +1,189 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.QuadrilateralInterface; +import org.openapitools.client.model.ShapeInterface; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ComplexQuadrilateral + */ +@JsonPropertyOrder({ + ComplexQuadrilateral.JSON_PROPERTY_SHAPE_TYPE, + ComplexQuadrilateral.JSON_PROPERTY_QUADRILATERAL_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ComplexQuadrilateral { + public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType"; + private String shapeType; + + public static final String JSON_PROPERTY_QUADRILATERAL_TYPE = "quadrilateralType"; + private String quadrilateralType; + + public ComplexQuadrilateral() { + } + + public ComplexQuadrilateral shapeType(String shapeType) { + this.shapeType = shapeType; + return this; + } + + /** + * Get shapeType + * @return shapeType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getShapeType() { + return shapeType; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShapeType(String shapeType) { + this.shapeType = shapeType; + } + + + public ComplexQuadrilateral quadrilateralType(String quadrilateralType) { + this.quadrilateralType = quadrilateralType; + return this; + } + + /** + * Get quadrilateralType + * @return quadrilateralType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_QUADRILATERAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getQuadrilateralType() { + return quadrilateralType; + } + + + @JsonProperty(JSON_PROPERTY_QUADRILATERAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuadrilateralType(String quadrilateralType) { + this.quadrilateralType = quadrilateralType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ComplexQuadrilateral putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ComplexQuadrilateral object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComplexQuadrilateral complexQuadrilateral = (ComplexQuadrilateral) o; + return Objects.equals(this.shapeType, complexQuadrilateral.shapeType) && + Objects.equals(this.quadrilateralType, complexQuadrilateral.quadrilateralType)&& + Objects.equals(this.additionalProperties, complexQuadrilateral.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(shapeType, quadrilateralType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ComplexQuadrilateral {\n"); + sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append(" quadrilateralType: ").append(toIndentedString(quadrilateralType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java new file mode 100644 index 000000000000..01c761a5d4b5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DanishPig.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * DanishPig + */ +@JsonPropertyOrder({ + DanishPig.JSON_PROPERTY_CLASS_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DanishPig { + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private String className; + + public DanishPig() { + } + + public DanishPig className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(String className) { + this.className = className; + } + + + /** + * Return true if this DanishPig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DanishPig danishPig = (DanishPig) o; + return Objects.equals(this.className, danishPig.className); + } + + @Override + public int hashCode() { + return Objects.hash(className); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DanishPig {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 000000000000..b0fb094a3d6f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this DeprecatedObject object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java new file mode 100644 index 000000000000..ee816b578313 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Dog.java @@ -0,0 +1,174 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Dog + */ +@JsonPropertyOrder({ + Dog.JSON_PROPERTY_BREED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) + +public class Dog extends Animal { + public static final String JSON_PROPERTY_BREED = "breed"; + private String breed; + + public Dog() { + } + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBreed() { + return breed; + } + + + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBreed(String breed) { + this.breed = breed; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Dog putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Dog object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed)&& + Objects.equals(this.additionalProperties, dog.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Dog", Dog.class); + JSON.registerDiscriminator(Dog.class, "className", mappings); +} +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DogAllOf.java new file mode 100644 index 000000000000..a3b92e6c6483 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * DogAllOf + */ +@JsonPropertyOrder({ + DogAllOf.JSON_PROPERTY_BREED +}) +@JsonTypeName("Dog_allOf") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DogAllOf { + public static final String JSON_PROPERTY_BREED = "breed"; + private String breed; + + public DogAllOf() { + } + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBreed() { + return breed; + } + + + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBreed(String breed) { + this.breed = breed; + } + + + /** + * Return true if this Dog_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java new file mode 100644 index 000000000000..54dc66e511cf --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Drawing.java @@ -0,0 +1,288 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Fruit; +import org.openapitools.client.model.NullableShape; +import org.openapitools.client.model.Shape; +import org.openapitools.client.model.ShapeOrNull; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Drawing + */ +@JsonPropertyOrder({ + Drawing.JSON_PROPERTY_MAIN_SHAPE, + Drawing.JSON_PROPERTY_SHAPE_OR_NULL, + Drawing.JSON_PROPERTY_NULLABLE_SHAPE, + Drawing.JSON_PROPERTY_SHAPES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Drawing { + public static final String JSON_PROPERTY_MAIN_SHAPE = "mainShape"; + private Shape mainShape; + + public static final String JSON_PROPERTY_SHAPE_OR_NULL = "shapeOrNull"; + private ShapeOrNull shapeOrNull; + + public static final String JSON_PROPERTY_NULLABLE_SHAPE = "nullableShape"; + private JsonNullable nullableShape = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SHAPES = "shapes"; + private List shapes = null; + + public Drawing() { + } + + public Drawing mainShape(Shape mainShape) { + this.mainShape = mainShape; + return this; + } + + /** + * Get mainShape + * @return mainShape + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAIN_SHAPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Shape getMainShape() { + return mainShape; + } + + + @JsonProperty(JSON_PROPERTY_MAIN_SHAPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMainShape(Shape mainShape) { + this.mainShape = mainShape; + } + + + public Drawing shapeOrNull(ShapeOrNull shapeOrNull) { + this.shapeOrNull = shapeOrNull; + return this; + } + + /** + * Get shapeOrNull + * @return shapeOrNull + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_OR_NULL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ShapeOrNull getShapeOrNull() { + return shapeOrNull; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_OR_NULL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShapeOrNull(ShapeOrNull shapeOrNull) { + this.shapeOrNull = shapeOrNull; + } + + + public Drawing nullableShape(NullableShape nullableShape) { + this.nullableShape = JsonNullable.of(nullableShape); + return this; + } + + /** + * Get nullableShape + * @return nullableShape + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public NullableShape getNullableShape() { + return nullableShape.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_SHAPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableShape_JsonNullable() { + return nullableShape; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_SHAPE) + public void setNullableShape_JsonNullable(JsonNullable nullableShape) { + this.nullableShape = nullableShape; + } + + public void setNullableShape(NullableShape nullableShape) { + this.nullableShape = JsonNullable.of(nullableShape); + } + + + public Drawing shapes(List shapes) { + this.shapes = shapes; + return this; + } + + public Drawing addShapesItem(Shape shapesItem) { + if (this.shapes == null) { + this.shapes = new ArrayList<>(); + } + this.shapes.add(shapesItem); + return this; + } + + /** + * Get shapes + * @return shapes + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SHAPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getShapes() { + return shapes; + } + + + @JsonProperty(JSON_PROPERTY_SHAPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShapes(List shapes) { + this.shapes = shapes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Drawing putAdditionalProperty(String key, Fruit value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Fruit getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Drawing object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Drawing drawing = (Drawing) o; + return Objects.equals(this.mainShape, drawing.mainShape) && + Objects.equals(this.shapeOrNull, drawing.shapeOrNull) && + equalsNullable(this.nullableShape, drawing.nullableShape) && + Objects.equals(this.shapes, drawing.shapes)&& + Objects.equals(this.additionalProperties, drawing.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mainShape, shapeOrNull, hashCodeNullable(nullableShape), shapes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Drawing {\n"); + sb.append(" mainShape: ").append(toIndentedString(mainShape)).append("\n"); + sb.append(" shapeOrNull: ").append(toIndentedString(shapeOrNull)).append("\n"); + sb.append(" nullableShape: ").append(toIndentedString(nullableShape)).append("\n"); + sb.append(" shapes: ").append(toIndentedString(shapes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java new file mode 100644 index 000000000000..881df95c012d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -0,0 +1,224 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * EnumArrays + */ +@JsonPropertyOrder({ + EnumArrays.JSON_PROPERTY_JUST_SYMBOL, + EnumArrays.JSON_PROPERTY_ARRAY_ENUM +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; + private List arrayEnum = null; + + public EnumArrays() { + } + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + + @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayEnum() { + return arrayEnum; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + /** + * Return true if this EnumArrays object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java new file mode 100644 index 000000000000..973b51cc93e4 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumClass.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java new file mode 100644 index 000000000000..85b24eb3cff7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -0,0 +1,575 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * EnumTest + */ +@JsonPropertyOrder({ + EnumTest.JSON_PROPERTY_ENUM_STRING, + EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, + EnumTest.JSON_PROPERTY_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_ENUM_INTEGER_ONLY, + EnumTest.JSON_PROPERTY_ENUM_NUMBER, + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE +}) +@JsonTypeName("Enum_Test") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumIntegerOnly + */ + public enum EnumIntegerOnlyEnum { + NUMBER_2(2), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumIntegerOnlyEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerOnlyEnum fromValue(Integer value) { + for (EnumIntegerOnlyEnum b : EnumIntegerOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_INTEGER_ONLY = "enum_integer_only"; + private EnumIntegerOnlyEnum enumIntegerOnly; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; + private EnumNumberEnum enumNumber; + + public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; + + public EnumTest() { + } + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumStringEnum getEnumString() { + return enumString; + } + + + @JsonProperty(JSON_PROPERTY_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + + @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + + public EnumTest enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { + this.enumIntegerOnly = enumIntegerOnly; + return this; + } + + /** + * Get enumIntegerOnly + * @return enumIntegerOnly + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumIntegerOnlyEnum getEnumIntegerOnly() { + return enumIntegerOnly; + } + + + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { + this.enumIntegerOnly = enumIntegerOnly; + } + + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + + @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + return this; + } + + /** + * Get outerEnum + * @return outerEnum + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOuterEnum_JsonNullable() { + return outerEnum; + } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } + + + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + } + + + /** + * Return true if this Enum_Test object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumIntegerOnly, enumTest.enumIntegerOnly) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumIntegerOnly, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumIntegerOnly: ").append(toIndentedString(enumIntegerOnly)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java new file mode 100644 index 000000000000..217e53a7d871 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -0,0 +1,189 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ShapeInterface; +import org.openapitools.client.model.TriangleInterface; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * EquilateralTriangle + */ +@JsonPropertyOrder({ + EquilateralTriangle.JSON_PROPERTY_SHAPE_TYPE, + EquilateralTriangle.JSON_PROPERTY_TRIANGLE_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EquilateralTriangle { + public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType"; + private String shapeType; + + public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType"; + private String triangleType; + + public EquilateralTriangle() { + } + + public EquilateralTriangle shapeType(String shapeType) { + this.shapeType = shapeType; + return this; + } + + /** + * Get shapeType + * @return shapeType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getShapeType() { + return shapeType; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShapeType(String shapeType) { + this.shapeType = shapeType; + } + + + public EquilateralTriangle triangleType(String triangleType) { + this.triangleType = triangleType; + return this; + } + + /** + * Get triangleType + * @return triangleType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTriangleType() { + return triangleType; + } + + + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTriangleType(String triangleType) { + this.triangleType = triangleType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public EquilateralTriangle putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this EquilateralTriangle object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EquilateralTriangle equilateralTriangle = (EquilateralTriangle) o; + return Objects.equals(this.shapeType, equilateralTriangle.shapeType) && + Objects.equals(this.triangleType, equilateralTriangle.triangleType)&& + Objects.equals(this.additionalProperties, equilateralTriangle.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(shapeType, triangleType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EquilateralTriangle {\n"); + sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..bc732443e15d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -0,0 +1,155 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ModelFile; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * FileSchemaTestClass + */ +@JsonPropertyOrder({ + FileSchemaTestClass.JSON_PROPERTY_FILE, + FileSchemaTestClass.JSON_PROPERTY_FILES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FileSchemaTestClass { + public static final String JSON_PROPERTY_FILE = "file"; + private ModelFile _file; + + public static final String JSON_PROPERTY_FILES = "files"; + private List files = null; + + public FileSchemaTestClass() { + } + + public FileSchemaTestClass _file(ModelFile _file) { + this._file = _file; + return this; + } + + /** + * Get _file + * @return _file + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ModelFile getFile() { + return _file; + } + + + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFile(ModelFile _file) { + this._file = _file; + } + + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(ModelFile filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFiles() { + return files; + } + + + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFiles(List files) { + this.files = files; + } + + + /** + * Return true if this FileSchemaTestClass object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this._file, fileSchemaTestClass._file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(_file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 000000000000..1bb98fb7a83f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + + /** + * Return true if this Foo object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java new file mode 100644 index 000000000000..be0be69f52f9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FormatTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * FormatTest + */ +@JsonPropertyOrder({ + FormatTest.JSON_PROPERTY_INTEGER, + FormatTest.JSON_PROPERTY_INT32, + FormatTest.JSON_PROPERTY_INT64, + FormatTest.JSON_PROPERTY_NUMBER, + FormatTest.JSON_PROPERTY_FLOAT, + FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, + FormatTest.JSON_PROPERTY_STRING, + FormatTest.JSON_PROPERTY_BYTE, + FormatTest.JSON_PROPERTY_BINARY, + FormatTest.JSON_PROPERTY_DATE, + FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_UUID, + FormatTest.JSON_PROPERTY_PASSWORD, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER +}) +@JsonTypeName("format_test") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FormatTest { + public static final String JSON_PROPERTY_INTEGER = "integer"; + private Integer integer; + + public static final String JSON_PROPERTY_INT32 = "int32"; + private Integer int32; + + public static final String JSON_PROPERTY_INT64 = "int64"; + private Long int64; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + + public static final String JSON_PROPERTY_STRING = "string"; + private String string; + + public static final String JSON_PROPERTY_BYTE = "byte"; + private byte[] _byte; + + public static final String JSON_PROPERTY_BINARY = "binary"; + private File binary; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private OffsetDateTime dateTime; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; + + public FormatTest() { + } + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getInteger() { + return integer; + } + + + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInteger(Integer integer) { + this.integer = integer; + } + + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getInt32() { + return int32; + } + + + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInt32(Integer int32) { + this.int32 = int32; + } + + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getInt64() { + return int64; + } + + + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInt64(Long int64) { + this.int64 = int64; + } + + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(BigDecimal number) { + this.number = number; + } + + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Float getFloat() { + return _float; + } + + + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFloat(Float _float) { + this._float = _float; + } + + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getDouble() { + return _double; + } + + + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDouble(Double _double) { + this._double = _double; + } + + + public FormatTest decimal(BigDecimal decimal) { + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(String string) { + this.string = string; + } + + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public byte[] getByte() { + return _byte; + } + + + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + + public FormatTest binary(File binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public File getBinary() { + return binary; + } + + + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBinary(File binary) { + this.binary = binary; + } + + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(example = "Sun Feb 02 00:00:00 UTC 2020", required = true, value = "") + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDate() { + return date; + } + + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDate(LocalDate date) { + this.date = date; + } + + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "2007-12-03T10:15:30+01:00", value = "") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDateTime() { + return dateTime; + } + + + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UUID getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPassword() { + return password; + } + + + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassword(String password) { + this.password = password; + } + + + public FormatTest patternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + return this; + } + + /** + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.") + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigits() { + return patternWithDigits; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + } + + + /** + * Return true if this format_test object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java new file mode 100644 index 000000000000..adf801074209 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Fruit.java @@ -0,0 +1,253 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.client.model.Apple; +import org.openapitools.client.model.Banana; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Fruit.FruitDeserializer.class) +@JsonSerialize(using = Fruit.FruitSerializer.class) +public class Fruit extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Fruit.class.getName()); + + public static class FruitSerializer extends StdSerializer { + public FruitSerializer(Class t) { + super(t); + } + + public FruitSerializer() { + this(null); + } + + @Override + public void serialize(Fruit value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class FruitDeserializer extends StdDeserializer { + public FruitDeserializer() { + this(Fruit.class); + } + + public FruitDeserializer(Class vc) { + super(vc); + } + + @Override + public Fruit deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize Apple + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Apple.class.equals(Integer.class) || Apple.class.equals(Long.class) || Apple.class.equals(Float.class) || Apple.class.equals(Double.class) || Apple.class.equals(Boolean.class) || Apple.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Apple.class.equals(Integer.class) || Apple.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Apple.class.equals(Float.class) || Apple.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Apple.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Apple.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Apple.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Apple'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Apple'", e); + } + + // deserialize Banana + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Banana.class.equals(Integer.class) || Banana.class.equals(Long.class) || Banana.class.equals(Float.class) || Banana.class.equals(Double.class) || Banana.class.equals(Boolean.class) || Banana.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Banana.class.equals(Integer.class) || Banana.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Banana.class.equals(Float.class) || Banana.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Banana.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Banana.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Banana.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Banana'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Banana'", e); + } + + if (match == 1) { + Fruit ret = new Fruit(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Fruit: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Fruit getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Fruit cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public Fruit() { + super("oneOf", Boolean.FALSE); + } + + public Fruit(Apple o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Fruit(Banana o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Apple", new GenericType() { + }); + schemas.put("Banana", new GenericType() { + }); + JSON.registerDescendants(Fruit.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return Fruit.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Apple, Banana + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Apple.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Banana.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Apple, Banana"); + } + + /** + * Get the actual instance, which can be the following: + * Apple, Banana + * + * @return The actual instance (Apple, Banana) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Apple`. If the actual instance is not `Apple`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Apple` + * @throws ClassCastException if the instance is not `Apple` + */ + public Apple getApple() throws ClassCastException { + return (Apple)super.getActualInstance(); + } + + /** + * Get the actual instance of `Banana`. If the actual instance is not `Banana`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Banana` + * @throws ClassCastException if the instance is not `Banana` + */ + public Banana getBanana() throws ClassCastException { + return (Banana)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java new file mode 100644 index 000000000000..aab46f52d759 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/FruitReq.java @@ -0,0 +1,260 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.client.model.AppleReq; +import org.openapitools.client.model.BananaReq; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = FruitReq.FruitReqDeserializer.class) +@JsonSerialize(using = FruitReq.FruitReqSerializer.class) +public class FruitReq extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(FruitReq.class.getName()); + + public static class FruitReqSerializer extends StdSerializer { + public FruitReqSerializer(Class t) { + super(t); + } + + public FruitReqSerializer() { + this(null); + } + + @Override + public void serialize(FruitReq value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class FruitReqDeserializer extends StdDeserializer { + public FruitReqDeserializer() { + this(FruitReq.class); + } + + public FruitReqDeserializer(Class vc) { + super(vc); + } + + @Override + public FruitReq deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AppleReq + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AppleReq.class.equals(Integer.class) || AppleReq.class.equals(Long.class) || AppleReq.class.equals(Float.class) || AppleReq.class.equals(Double.class) || AppleReq.class.equals(Boolean.class) || AppleReq.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AppleReq.class.equals(Integer.class) || AppleReq.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AppleReq.class.equals(Float.class) || AppleReq.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (AppleReq.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AppleReq.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AppleReq.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AppleReq'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AppleReq'", e); + } + + // deserialize BananaReq + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BananaReq.class.equals(Integer.class) || BananaReq.class.equals(Long.class) || BananaReq.class.equals(Float.class) || BananaReq.class.equals(Double.class) || BananaReq.class.equals(Boolean.class) || BananaReq.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BananaReq.class.equals(Integer.class) || BananaReq.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BananaReq.class.equals(Float.class) || BananaReq.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BananaReq.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BananaReq.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BananaReq.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BananaReq'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BananaReq'", e); + } + + if (match == 1) { + FruitReq ret = new FruitReq(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for FruitReq: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public FruitReq getNullValue(DeserializationContext ctxt) throws JsonMappingException { + return null; + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public FruitReq() { + super("oneOf", Boolean.TRUE); + } + + public FruitReq(AppleReq o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + + public FruitReq(BananaReq o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + + static { + schemas.put("AppleReq", new GenericType() { + }); + schemas.put("BananaReq", new GenericType() { + }); + JSON.registerDescendants(FruitReq.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return FruitReq.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * AppleReq, BananaReq + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance == null) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AppleReq.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(BananaReq.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppleReq, BananaReq"); + } + + /** + * Get the actual instance, which can be the following: + * AppleReq, BananaReq + * + * @return The actual instance (AppleReq, BananaReq) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppleReq`. If the actual instance is not `AppleReq`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppleReq` + * @throws ClassCastException if the instance is not `AppleReq` + */ + public AppleReq getAppleReq() throws ClassCastException { + return (AppleReq)super.getActualInstance(); + } + + /** + * Get the actual instance of `BananaReq`. If the actual instance is not `BananaReq`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BananaReq` + * @throws ClassCastException if the instance is not `BananaReq` + */ + public BananaReq getBananaReq() throws ClassCastException { + return (BananaReq)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java new file mode 100644 index 000000000000..c7b1861369c3 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java @@ -0,0 +1,213 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.client.model.Apple; +import org.openapitools.client.model.Banana; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using=GmFruit.GmFruitDeserializer.class) +@JsonSerialize(using = GmFruit.GmFruitSerializer.class) +public class GmFruit extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(GmFruit.class.getName()); + + public static class GmFruitSerializer extends StdSerializer { + public GmFruitSerializer(Class t) { + super(t); + } + + public GmFruitSerializer() { + this(null); + } + + @Override + public void serialize(GmFruit value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class GmFruitDeserializer extends StdDeserializer { + public GmFruitDeserializer() { + this(GmFruit.class); + } + + public GmFruitDeserializer(Class vc) { + super(vc); + } + + @Override + public GmFruit deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + + Object deserialized = null; + // deserialize Apple + try { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Apple.class); + GmFruit ret = new GmFruit(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log(Level.FINER, "Input data does not match 'GmFruit'", e); + } + + // deserialize Banana + try { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Banana.class); + GmFruit ret = new GmFruit(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log(Level.FINER, "Input data does not match 'GmFruit'", e); + } + + throw new IOException(String.format("Failed deserialization for GmFruit: no match found")); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public GmFruit getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "GmFruit cannot be null"); + } + } + + // store a list of schema names defined in anyOf + public static final Map schemas = new HashMap(); + + public GmFruit() { + super("anyOf", Boolean.FALSE); + } + + public GmFruit(Apple o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public GmFruit(Banana o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Apple", new GenericType() { + }); + schemas.put("Banana", new GenericType() { + }); + JSON.registerDescendants(GmFruit.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return GmFruit.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * Apple, Banana + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Apple.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Banana.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Apple, Banana"); + } + + /** + * Get the actual instance, which can be the following: + * Apple, Banana + * + * @return The actual instance (Apple, Banana) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Apple`. If the actual instance is not `Apple`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Apple` + * @throws ClassCastException if the instance is not `Apple` + */ + public Apple getApple() throws ClassCastException { + return (Apple)super.getActualInstance(); + } + + /** + * Get the actual instance of `Banana`. If the actual instance is not `Banana`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Banana` + * @throws ClassCastException if the instance is not `Banana` + */ + public Banana getBanana() throws ClassCastException { + return (Banana)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java new file mode 100644 index 000000000000..291a97faf0ce --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -0,0 +1,135 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildCat; +import org.openapitools.client.model.ParentPet; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * GrandparentAnimal + */ +@JsonPropertyOrder({ + GrandparentAnimal.JSON_PROPERTY_PET_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "pet_type", // ignore manually set pet_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the pet_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "pet_type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildCat.class, name = "ChildCat"), + @JsonSubTypes.Type(value = ParentPet.class, name = "ParentPet"), +}) + +public class GrandparentAnimal { + public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; + private String petType; + + public GrandparentAnimal() { + } + + public GrandparentAnimal petType(String petType) { + this.petType = petType; + return this; + } + + /** + * Get petType + * @return petType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPetType() { + return petType; + } + + + @JsonProperty(JSON_PROPERTY_PET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPetType(String petType) { + this.petType = petType; + } + + + /** + * Return true if this GrandparentAnimal object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GrandparentAnimal grandparentAnimal = (GrandparentAnimal) o; + return Objects.equals(this.petType, grandparentAnimal.petType); + } + + @Override + public int hashCode() { + return Objects.hash(petType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GrandparentAnimal {\n"); + sb.append(" petType: ").append(toIndentedString(petType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ChildCat", ChildCat.class); + mappings.put("ParentPet", ParentPet.class); + mappings.put("GrandparentAnimal", GrandparentAnimal.class); + JSON.registerDiscriminator(GrandparentAnimal.class, "pet_type", mappings); +} +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..b7170439fcfc --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -0,0 +1,135 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * HasOnlyReadOnly + */ +@JsonPropertyOrder({ + HasOnlyReadOnly.JSON_PROPERTY_BAR, + HasOnlyReadOnly.JSON_PROPERTY_FOO +}) +@JsonTypeName("hasOnlyReadOnly") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HasOnlyReadOnly { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar; + + public static final String JSON_PROPERTY_FOO = "foo"; + private String foo; + + public HasOnlyReadOnly() { + } + + @JsonCreator + public HasOnlyReadOnly( + @JsonProperty(JSON_PROPERTY_BAR) String bar, + @JsonProperty(JSON_PROPERTY_FOO) String foo + ) { + this(); + this.bar = bar; + this.foo = foo; + } + + /** + * Get bar + * @return bar + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + + + /** + * Get foo + * @return foo + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FOO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFoo() { + return foo; + } + + + + + /** + * Return true if this hasOnlyReadOnly object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 000000000000..6016e3fedb66 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@ApiModel(description = "Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.") +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + + /** + * Return true if this HealthCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject.java new file mode 100644 index 000000000000..3ee32239de90 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineObject + */ +@JsonPropertyOrder({ + InlineObject.JSON_PROPERTY_NAME, + InlineObject.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + + public InlineObject name(String name) { + this.name = name; + return this; + } + + /** + * Updated name of the pet + * @return name + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Updated name of the pet") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public InlineObject status(String status) { + this.status = status; + return this; + } + + /** + * Updated status of the pet + * @return status + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Updated status of the pet") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + /** + * Return true if this inline_object object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject inlineObject = (InlineObject) o; + return Objects.equals(this.name, inlineObject.name) && + Objects.equals(this.status, inlineObject.status); + } + + @Override + public int hashCode() { + return Objects.hash(name, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject1.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject1.java new file mode 100644 index 000000000000..8a96745d564d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject1.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineObject1 + */ +@JsonPropertyOrder({ + InlineObject1.JSON_PROPERTY_ADDITIONAL_METADATA, + InlineObject1.JSON_PROPERTY_FILE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject1 { + public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata"; + private String additionalMetadata; + + public static final String JSON_PROPERTY_FILE = "file"; + private File file; + + + public InlineObject1 additionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + return this; + } + + /** + * Additional data to pass to server + * @return additionalMetadata + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Additional data to pass to server") + @JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdditionalMetadata() { + return additionalMetadata; + } + + + public void setAdditionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + } + + + public InlineObject1 file(File file) { + this.file = file; + return this; + } + + /** + * file to upload + * @return file + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "file to upload") + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public File getFile() { + return file; + } + + + public void setFile(File file) { + this.file = file; + } + + + /** + * Return true if this inline_object_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject1 inlineObject1 = (InlineObject1) o; + return Objects.equals(this.additionalMetadata, inlineObject1.additionalMetadata) && + Objects.equals(this.file, inlineObject1.file); + } + + @Override + public int hashCode() { + return Objects.hash(additionalMetadata, file); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject1 {\n"); + sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject2.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject2.java new file mode 100644 index 000000000000..89e0390aba41 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject2.java @@ -0,0 +1,221 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineObject2 + */ +@JsonPropertyOrder({ + InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING_ARRAY, + InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject2 { + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_FORM_STRING_ARRAY = "enum_form_string_array"; + private List enumFormStringArray = null; + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_FORM_STRING = "enum_form_string"; + private EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG; + + + public InlineObject2 enumFormStringArray(List enumFormStringArray) { + this.enumFormStringArray = enumFormStringArray; + return this; + } + + public InlineObject2 addEnumFormStringArrayItem(EnumFormStringArrayEnum enumFormStringArrayItem) { + if (this.enumFormStringArray == null) { + this.enumFormStringArray = new ArrayList<>(); + } + this.enumFormStringArray.add(enumFormStringArrayItem); + return this; + } + + /** + * Form parameter enum test (string array) + * @return enumFormStringArray + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Form parameter enum test (string array)") + @JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEnumFormStringArray() { + return enumFormStringArray; + } + + + public void setEnumFormStringArray(List enumFormStringArray) { + this.enumFormStringArray = enumFormStringArray; + } + + + public InlineObject2 enumFormString(EnumFormStringEnum enumFormString) { + this.enumFormString = enumFormString; + return this; + } + + /** + * Form parameter enum test (string) + * @return enumFormString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Form parameter enum test (string)") + @JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumFormStringEnum getEnumFormString() { + return enumFormString; + } + + + public void setEnumFormString(EnumFormStringEnum enumFormString) { + this.enumFormString = enumFormString; + } + + + /** + * Return true if this inline_object_2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject2 inlineObject2 = (InlineObject2) o; + return Objects.equals(this.enumFormStringArray, inlineObject2.enumFormStringArray) && + Objects.equals(this.enumFormString, inlineObject2.enumFormString); + } + + @Override + public int hashCode() { + return Objects.hash(enumFormStringArray, enumFormString); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject2 {\n"); + sb.append(" enumFormStringArray: ").append(toIndentedString(enumFormStringArray)).append("\n"); + sb.append(" enumFormString: ").append(toIndentedString(enumFormString)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject3.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject3.java new file mode 100644 index 000000000000..9c260e432f47 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject3.java @@ -0,0 +1,508 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineObject3 + */ +@JsonPropertyOrder({ + InlineObject3.JSON_PROPERTY_INTEGER, + InlineObject3.JSON_PROPERTY_INT32, + InlineObject3.JSON_PROPERTY_INT64, + InlineObject3.JSON_PROPERTY_NUMBER, + InlineObject3.JSON_PROPERTY_FLOAT, + InlineObject3.JSON_PROPERTY_DOUBLE, + InlineObject3.JSON_PROPERTY_STRING, + InlineObject3.JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER, + InlineObject3.JSON_PROPERTY_BYTE, + InlineObject3.JSON_PROPERTY_BINARY, + InlineObject3.JSON_PROPERTY_DATE, + InlineObject3.JSON_PROPERTY_DATE_TIME, + InlineObject3.JSON_PROPERTY_PASSWORD, + InlineObject3.JSON_PROPERTY_CALLBACK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject3 { + public static final String JSON_PROPERTY_INTEGER = "integer"; + private Integer integer; + + public static final String JSON_PROPERTY_INT32 = "int32"; + private Integer int32; + + public static final String JSON_PROPERTY_INT64 = "int64"; + private Long int64; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public static final String JSON_PROPERTY_STRING = "string"; + private String string; + + public static final String JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER = "pattern_without_delimiter"; + private String patternWithoutDelimiter; + + public static final String JSON_PROPERTY_BYTE = "byte"; + private byte[] _byte; + + public static final String JSON_PROPERTY_BINARY = "binary"; + private File binary; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private OffsetDateTime dateTime = OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault())); + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_CALLBACK = "callback"; + private String callback; + + + public InlineObject3 integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * None + * minimum: 10 + * maximum: 100 + * @return integer + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getInteger() { + return integer; + } + + + public void setInteger(Integer integer) { + this.integer = integer; + } + + + public InlineObject3 int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * None + * minimum: 20 + * maximum: 200 + * @return int32 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getInt32() { + return int32; + } + + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + + public InlineObject3 int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * None + * @return int64 + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getInt64() { + return int64; + } + + + public void setInt64(Long int64) { + this.int64 = int64; + } + + + public InlineObject3 number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * None + * minimum: 32.1 + * maximum: 543.2 + * @return number + **/ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getNumber() { + return number; + } + + + public void setNumber(BigDecimal number) { + this.number = number; + } + + + public InlineObject3 _float(Float _float) { + this._float = _float; + return this; + } + + /** + * None + * maximum: 987.6 + * @return _float + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Float getFloat() { + return _float; + } + + + public void setFloat(Float _float) { + this._float = _float; + } + + + public InlineObject3 _double(Double _double) { + this._double = _double; + return this; + } + + /** + * None + * minimum: 67.8 + * maximum: 123.4 + * @return _double + **/ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Double getDouble() { + return _double; + } + + + public void setDouble(Double _double) { + this._double = _double; + } + + + public InlineObject3 string(String string) { + this.string = string; + return this; + } + + /** + * None + * @return string + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getString() { + return string; + } + + + public void setString(String string) { + this.string = string; + } + + + public InlineObject3 patternWithoutDelimiter(String patternWithoutDelimiter) { + this.patternWithoutDelimiter = patternWithoutDelimiter; + return this; + } + + /** + * None + * @return patternWithoutDelimiter + **/ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPatternWithoutDelimiter() { + return patternWithoutDelimiter; + } + + + public void setPatternWithoutDelimiter(String patternWithoutDelimiter) { + this.patternWithoutDelimiter = patternWithoutDelimiter; + } + + + public InlineObject3 _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * None + * @return _byte + **/ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public byte[] getByte() { + return _byte; + } + + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + + public InlineObject3 binary(File binary) { + this.binary = binary; + return this; + } + + /** + * None + * @return binary + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public File getBinary() { + return binary; + } + + + public void setBinary(File binary) { + this.binary = binary; + } + + + public InlineObject3 date(LocalDate date) { + this.date = date; + return this; + } + + /** + * None + * @return date + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDate() { + return date; + } + + + public void setDate(LocalDate date) { + this.date = date; + } + + + public InlineObject3 dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * None + * @return dateTime + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "2020-02-02T20:20:20.222220Z", value = "None") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDateTime() { + return dateTime; + } + + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + + public InlineObject3 password(String password) { + this.password = password; + return this; + } + + /** + * None + * @return password + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public InlineObject3 callback(String callback) { + this.callback = callback; + return this; + } + + /** + * None + * @return callback + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_CALLBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallback() { + return callback; + } + + + public void setCallback(String callback) { + this.callback = callback; + } + + + /** + * Return true if this inline_object_3 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject3 inlineObject3 = (InlineObject3) o; + return Objects.equals(this.integer, inlineObject3.integer) && + Objects.equals(this.int32, inlineObject3.int32) && + Objects.equals(this.int64, inlineObject3.int64) && + Objects.equals(this.number, inlineObject3.number) && + Objects.equals(this._float, inlineObject3._float) && + Objects.equals(this._double, inlineObject3._double) && + Objects.equals(this.string, inlineObject3.string) && + Objects.equals(this.patternWithoutDelimiter, inlineObject3.patternWithoutDelimiter) && + Arrays.equals(this._byte, inlineObject3._byte) && + Objects.equals(this.binary, inlineObject3.binary) && + Objects.equals(this.date, inlineObject3.date) && + Objects.equals(this.dateTime, inlineObject3.dateTime) && + Objects.equals(this.password, inlineObject3.password) && + Objects.equals(this.callback, inlineObject3.callback); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, patternWithoutDelimiter, Arrays.hashCode(_byte), binary, date, dateTime, password, callback); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject3 {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" patternWithoutDelimiter: ").append(toIndentedString(patternWithoutDelimiter)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject4.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject4.java new file mode 100644 index 000000000000..d0d8d4ca1886 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject4.java @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineObject4 + */ +@JsonPropertyOrder({ + InlineObject4.JSON_PROPERTY_PARAM, + InlineObject4.JSON_PROPERTY_PARAM2 +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject4 { + public static final String JSON_PROPERTY_PARAM = "param"; + private String param; + + public static final String JSON_PROPERTY_PARAM2 = "param2"; + private String param2; + + + public InlineObject4 param(String param) { + this.param = param; + return this; + } + + /** + * field1 + * @return param + **/ + @ApiModelProperty(required = true, value = "field1") + @JsonProperty(JSON_PROPERTY_PARAM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getParam() { + return param; + } + + + public void setParam(String param) { + this.param = param; + } + + + public InlineObject4 param2(String param2) { + this.param2 = param2; + return this; + } + + /** + * field2 + * @return param2 + **/ + @ApiModelProperty(required = true, value = "field2") + @JsonProperty(JSON_PROPERTY_PARAM2) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getParam2() { + return param2; + } + + + public void setParam2(String param2) { + this.param2 = param2; + } + + + /** + * Return true if this inline_object_4 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject4 inlineObject4 = (InlineObject4) o; + return Objects.equals(this.param, inlineObject4.param) && + Objects.equals(this.param2, inlineObject4.param2); + } + + @Override + public int hashCode() { + return Objects.hash(param, param2); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject4 {\n"); + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append(" param2: ").append(toIndentedString(param2)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject5.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject5.java new file mode 100644 index 000000000000..2fb32ee5f855 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineObject5.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineObject5 + */ +@JsonPropertyOrder({ + InlineObject5.JSON_PROPERTY_ADDITIONAL_METADATA, + InlineObject5.JSON_PROPERTY_REQUIRED_FILE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject5 { + public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata"; + private String additionalMetadata; + + public static final String JSON_PROPERTY_REQUIRED_FILE = "requiredFile"; + private File requiredFile; + + + public InlineObject5 additionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + return this; + } + + /** + * Additional data to pass to server + * @return additionalMetadata + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Additional data to pass to server") + @JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdditionalMetadata() { + return additionalMetadata; + } + + + public void setAdditionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + } + + + public InlineObject5 requiredFile(File requiredFile) { + this.requiredFile = requiredFile; + return this; + } + + /** + * file to upload + * @return requiredFile + **/ + @ApiModelProperty(required = true, value = "file to upload") + @JsonProperty(JSON_PROPERTY_REQUIRED_FILE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public File getRequiredFile() { + return requiredFile; + } + + + public void setRequiredFile(File requiredFile) { + this.requiredFile = requiredFile; + } + + + /** + * Return true if this inline_object_5 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject5 inlineObject5 = (InlineObject5) o; + return Objects.equals(this.additionalMetadata, inlineObject5.additionalMetadata) && + Objects.equals(this.requiredFile, inlineObject5.requiredFile); + } + + @Override + public int hashCode() { + return Objects.hash(additionalMetadata, requiredFile); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject5 {\n"); + sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); + sb.append(" requiredFile: ").append(toIndentedString(requiredFile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineResponseDefault.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineResponseDefault.java new file mode 100644 index 000000000000..fd69604e8f74 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/InlineResponseDefault.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * InlineResponseDefault + */ +@JsonPropertyOrder({ + InlineResponseDefault.JSON_PROPERTY_STRING +}) +@JsonTypeName("inline_response_default") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineResponseDefault { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public InlineResponseDefault() { + } + + public InlineResponseDefault string(Foo string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + + /** + * Return true if this inline_response_default object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o; + return Objects.equals(this.string, inlineResponseDefault.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponseDefault {\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java new file mode 100644 index 000000000000..19e71a3b53c1 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -0,0 +1,146 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ShapeInterface; +import org.openapitools.client.model.TriangleInterface; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * IsoscelesTriangle + */ +@JsonPropertyOrder({ + IsoscelesTriangle.JSON_PROPERTY_SHAPE_TYPE, + IsoscelesTriangle.JSON_PROPERTY_TRIANGLE_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IsoscelesTriangle { + public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType"; + private String shapeType; + + public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType"; + private String triangleType; + + public IsoscelesTriangle() { + } + + public IsoscelesTriangle shapeType(String shapeType) { + this.shapeType = shapeType; + return this; + } + + /** + * Get shapeType + * @return shapeType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getShapeType() { + return shapeType; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShapeType(String shapeType) { + this.shapeType = shapeType; + } + + + public IsoscelesTriangle triangleType(String triangleType) { + this.triangleType = triangleType; + return this; + } + + /** + * Get triangleType + * @return triangleType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTriangleType() { + return triangleType; + } + + + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTriangleType(String triangleType) { + this.triangleType = triangleType; + } + + + /** + * Return true if this IsoscelesTriangle object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IsoscelesTriangle isoscelesTriangle = (IsoscelesTriangle) o; + return Objects.equals(this.shapeType, isoscelesTriangle.shapeType) && + Objects.equals(this.triangleType, isoscelesTriangle.triangleType); + } + + @Override + public int hashCode() { + return Objects.hash(shapeType, triangleType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IsoscelesTriangle {\n"); + sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java new file mode 100644 index 000000000000..b30511645bdc --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Mammal.java @@ -0,0 +1,385 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Pig; +import org.openapitools.client.model.Whale; +import org.openapitools.client.model.Zebra; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Mammal.MammalDeserializer.class) +@JsonSerialize(using = Mammal.MammalSerializer.class) +public class Mammal extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Mammal.class.getName()); + + public static class MammalSerializer extends StdSerializer { + public MammalSerializer(Class t) { + super(t); + } + + public MammalSerializer() { + this(null); + } + + @Override + public void serialize(Mammal value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class MammalDeserializer extends StdDeserializer { + public MammalDeserializer() { + this(Mammal.class); + } + + public MammalDeserializer(Class vc) { + super(vc); + } + + @Override + public Mammal deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Mammal newMammal = new Mammal(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("className"); + switch (discriminatorValue) { + case "Pig": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Pig.class); + newMammal.setActualInstance(deserialized); + return newMammal; + case "whale": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Whale.class); + newMammal.setActualInstance(deserialized); + return newMammal; + case "zebra": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Zebra.class); + newMammal.setActualInstance(deserialized); + return newMammal; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for Mammal. Possible values: Pig whale zebra", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize Pig + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Pig.class.equals(Integer.class) || Pig.class.equals(Long.class) || Pig.class.equals(Float.class) || Pig.class.equals(Double.class) || Pig.class.equals(Boolean.class) || Pig.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Pig.class.equals(Integer.class) || Pig.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Pig.class.equals(Float.class) || Pig.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Pig.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Pig.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Pig.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Pig'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Pig'", e); + } + + // deserialize Whale + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Whale.class.equals(Integer.class) || Whale.class.equals(Long.class) || Whale.class.equals(Float.class) || Whale.class.equals(Double.class) || Whale.class.equals(Boolean.class) || Whale.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Whale.class.equals(Integer.class) || Whale.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Whale.class.equals(Float.class) || Whale.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Whale.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Whale.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Whale.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Whale'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Whale'", e); + } + + // deserialize Zebra + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Zebra.class.equals(Integer.class) || Zebra.class.equals(Long.class) || Zebra.class.equals(Float.class) || Zebra.class.equals(Double.class) || Zebra.class.equals(Boolean.class) || Zebra.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Zebra.class.equals(Integer.class) || Zebra.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Zebra.class.equals(Float.class) || Zebra.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Zebra.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Zebra.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Zebra.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Zebra'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Zebra'", e); + } + + if (match == 1) { + Mammal ret = new Mammal(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Mammal: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Mammal getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Mammal cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public Mammal() { + super("oneOf", Boolean.FALSE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Mammal putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this mammal object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((Mammal)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public Mammal(Pig o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Mammal(Whale o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Mammal(Zebra o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Pig", new GenericType() { + }); + schemas.put("Whale", new GenericType() { + }); + schemas.put("Zebra", new GenericType() { + }); + JSON.registerDescendants(Mammal.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Pig", Pig.class); + mappings.put("whale", Whale.class); + mappings.put("zebra", Zebra.class); + mappings.put("mammal", Mammal.class); + JSON.registerDiscriminator(Mammal.class, "className", mappings); + } + + @Override + public Map getSchemas() { + return Mammal.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Pig, Whale, Zebra + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Pig.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Whale.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Zebra.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Pig, Whale, Zebra"); + } + + /** + * Get the actual instance, which can be the following: + * Pig, Whale, Zebra + * + * @return The actual instance (Pig, Whale, Zebra) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Pig`. If the actual instance is not `Pig`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Pig` + * @throws ClassCastException if the instance is not `Pig` + */ + public Pig getPig() throws ClassCastException { + return (Pig)super.getActualInstance(); + } + + /** + * Get the actual instance of `Whale`. If the actual instance is not `Whale`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Whale` + * @throws ClassCastException if the instance is not `Whale` + */ + public Whale getWhale() throws ClassCastException { + return (Whale)super.getActualInstance(); + } + + /** + * Get the actual instance of `Zebra`. If the actual instance is not `Zebra`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Zebra` + * @throws ClassCastException if the instance is not `Zebra` + */ + public Zebra getZebra() throws ClassCastException { + return (Zebra)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java new file mode 100644 index 000000000000..e25415b8f29d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MapTest.java @@ -0,0 +1,278 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * MapTest + */ +@JsonPropertyOrder({ + MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING, + MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING, + MapTest.JSON_PROPERTY_DIRECT_MAP, + MapTest.JSON_PROPERTY_INDIRECT_MAP +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MapTest { + public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + 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"; + private Map directMap = null; + + public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; + private Map indirectMap = null; + + public MapTest() { + } + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + + @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + + @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getDirectMap() { + return directMap; + } + + + @JsonProperty(JSON_PROPERTY_DIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getIndirectMap() { + return indirectMap; + } + + + @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + /** + * Return true if this MapTest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..cb3bf60e59ed --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,190 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.client.model.Animal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@JsonPropertyOrder({ + MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID, + MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME, + MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private OffsetDateTime dateTime; + + public static final String JSON_PROPERTY_MAP = "map"; + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass() { + } + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UUID getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDateTime() { + return dateTime; + } + + + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMap() { + return map; + } + + + @JsonProperty(JSON_PROPERTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMap(Map map) { + this.map = map; + } + + + /** + * Return true if this MixedPropertiesAndAdditionalPropertiesClass object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java new file mode 100644 index 000000000000..05cc6292c033 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Model200Response.java @@ -0,0 +1,146 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Model for testing model name starting with number + */ +@ApiModel(description = "Model for testing model name starting with number") +@JsonPropertyOrder({ + Model200Response.JSON_PROPERTY_NAME, + Model200Response.JSON_PROPERTY_PROPERTY_CLASS +}) +@JsonTypeName("200_response") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Model200Response { + public static final String JSON_PROPERTY_NAME = "name"; + private Integer name; + + public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; + private String propertyClass; + + public Model200Response() { + } + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(Integer name) { + this.name = name; + } + + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPropertyClass() { + return propertyClass; + } + + + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + /** + * Return true if this 200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java new file mode 100644 index 000000000000..be2abb32dd18 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ModelApiResponse + */ +@JsonPropertyOrder({ + ModelApiResponse.JSON_PROPERTY_CODE, + ModelApiResponse.JSON_PROPERTY_TYPE, + ModelApiResponse.JSON_PROPERTY_MESSAGE +}) +@JsonTypeName("ApiResponse") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModelApiResponse { + public static final String JSON_PROPERTY_CODE = "code"; + private Integer code; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public ModelApiResponse() { + } + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(Integer code) { + this.code = code; + } + + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + /** + * Return true if this ApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java new file mode 100644 index 000000000000..e2c262f9e219 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelFile.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Must be named `File` for test. + */ +@ApiModel(description = "Must be named `File` for test.") +@JsonPropertyOrder({ + ModelFile.JSON_PROPERTY_SOURCE_U_R_I +}) +@JsonTypeName("File") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModelFile { + public static final String JSON_PROPERTY_SOURCE_U_R_I = "sourceURI"; + private String sourceURI; + + public ModelFile() { + } + + public ModelFile sourceURI(String sourceURI) { + this.sourceURI = sourceURI; + return this; + } + + /** + * Test capitalization + * @return sourceURI + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Test capitalization") + @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceURI() { + return sourceURI; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceURI(String sourceURI) { + this.sourceURI = sourceURI; + } + + + /** + * Return true if this File object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelFile _file = (ModelFile) o; + return Objects.equals(this.sourceURI, _file.sourceURI); + } + + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelFile {\n"); + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java new file mode 100644 index 000000000000..769d5be8da1d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelList.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ModelList + */ +@JsonPropertyOrder({ + ModelList.JSON_PROPERTY_123LIST +}) +@JsonTypeName("List") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModelList { + public static final String JSON_PROPERTY_123LIST = "123-list"; + private String _123list; + + public ModelList() { + } + + public ModelList _123list(String _123list) { + this._123list = _123list; + return this; + } + + /** + * Get _123list + * @return _123list + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_123LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String get123list() { + return _123list; + } + + + @JsonProperty(JSON_PROPERTY_123LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void set123list(String _123list) { + this._123list = _123list; + } + + + /** + * Return true if this List object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelList _list = (ModelList) o; + return Objects.equals(this._123list, _list._123list); + } + + @Override + public int hashCode() { + return Objects.hash(_123list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelList {\n"); + sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java new file mode 100644 index 000000000000..04b07c86af7d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Model for testing reserved words + */ +@ApiModel(description = "Model for testing reserved words") +@JsonPropertyOrder({ + ModelReturn.JSON_PROPERTY_RETURN +}) +@JsonTypeName("Return") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModelReturn { + public static final String JSON_PROPERTY_RETURN = "return"; + private Integer _return; + + public ModelReturn() { + } + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RETURN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getReturn() { + return _return; + } + + + @JsonProperty(JSON_PROPERTY_RETURN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturn(Integer _return) { + this._return = _return; + } + + + /** + * Return true if this Return object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java new file mode 100644 index 000000000000..698ddd071c0d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Name.java @@ -0,0 +1,199 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Model for testing model name same as property name + */ +@ApiModel(description = "Model for testing model name same as property name") +@JsonPropertyOrder({ + Name.JSON_PROPERTY_NAME, + Name.JSON_PROPERTY_SNAKE_CASE, + Name.JSON_PROPERTY_PROPERTY, + Name.JSON_PROPERTY_123NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Name { + public static final String JSON_PROPERTY_NAME = "name"; + private Integer name; + + public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; + private Integer snakeCase; + + public static final String JSON_PROPERTY_PROPERTY = "property"; + private String property; + + public static final String JSON_PROPERTY_123NUMBER = "123Number"; + private Integer _123number; + + public Name() { + } + + @JsonCreator + public Name( + @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, + @JsonProperty(JSON_PROPERTY_123NUMBER) Integer _123number + ) { + this(); + this.snakeCase = snakeCase; + this._123number = _123number; + } + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(Integer name) { + this.name = name; + } + + + /** + * Get snakeCase + * @return snakeCase + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SNAKE_CASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getSnakeCase() { + return snakeCase; + } + + + + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getProperty() { + return property; + } + + + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProperty(String property) { + this.property = property; + } + + + /** + * Get _123number + * @return _123number + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_123NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer get123number() { + return _123number; + } + + + + + /** + * Return true if this Name object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 000000000000..27e1b9666d19 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,673 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable = null; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = null; + + public NullableClass() { + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public NullableClass putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this NullableClass object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable)&& + Objects.equals(this.additionalProperties, nullableClass.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java new file mode 100644 index 000000000000..a9aa2bec867f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NullableShape.java @@ -0,0 +1,337 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = NullableShape.NullableShapeDeserializer.class) +@JsonSerialize(using = NullableShape.NullableShapeSerializer.class) +public class NullableShape extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(NullableShape.class.getName()); + + public static class NullableShapeSerializer extends StdSerializer { + public NullableShapeSerializer(Class t) { + super(t); + } + + public NullableShapeSerializer() { + this(null); + } + + @Override + public void serialize(NullableShape value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class NullableShapeDeserializer extends StdDeserializer { + public NullableShapeDeserializer() { + this(NullableShape.class); + } + + public NullableShapeDeserializer(Class vc) { + super(vc); + } + + @Override + public NullableShape deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + NullableShape newNullableShape = new NullableShape(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("shapeType"); + switch (discriminatorValue) { + case "Quadrilateral": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Quadrilateral.class); + newNullableShape.setActualInstance(deserialized); + return newNullableShape; + case "Triangle": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Triangle.class); + newNullableShape.setActualInstance(deserialized); + return newNullableShape; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for NullableShape. Possible values: Quadrilateral Triangle", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize Quadrilateral + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Quadrilateral.class.equals(Integer.class) || Quadrilateral.class.equals(Long.class) || Quadrilateral.class.equals(Float.class) || Quadrilateral.class.equals(Double.class) || Quadrilateral.class.equals(Boolean.class) || Quadrilateral.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Quadrilateral.class.equals(Integer.class) || Quadrilateral.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Quadrilateral.class.equals(Float.class) || Quadrilateral.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Quadrilateral.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Quadrilateral.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Quadrilateral.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Quadrilateral'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Quadrilateral'", e); + } + + // deserialize Triangle + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Triangle.class.equals(Integer.class) || Triangle.class.equals(Long.class) || Triangle.class.equals(Float.class) || Triangle.class.equals(Double.class) || Triangle.class.equals(Boolean.class) || Triangle.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Triangle.class.equals(Integer.class) || Triangle.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Triangle.class.equals(Float.class) || Triangle.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Triangle.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Triangle.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Triangle.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Triangle'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Triangle'", e); + } + + if (match == 1) { + NullableShape ret = new NullableShape(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for NullableShape: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public NullableShape getNullValue(DeserializationContext ctxt) throws JsonMappingException { + return null; + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NullableShape() { + super("oneOf", Boolean.TRUE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public NullableShape putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this NullableShape object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((NullableShape)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public NullableShape(Quadrilateral o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + + public NullableShape(Triangle o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + + static { + schemas.put("Quadrilateral", new GenericType() { + }); + schemas.put("Triangle", new GenericType() { + }); + JSON.registerDescendants(NullableShape.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Quadrilateral", Quadrilateral.class); + mappings.put("Triangle", Triangle.class); + mappings.put("NullableShape", NullableShape.class); + JSON.registerDiscriminator(NullableShape.class, "shapeType", mappings); + } + + @Override + public Map getSchemas() { + return NullableShape.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Quadrilateral, Triangle + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance == null) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Triangle.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Quadrilateral, Triangle"); + } + + /** + * Get the actual instance, which can be the following: + * Quadrilateral, Triangle + * + * @return The actual instance (Quadrilateral, Triangle) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Quadrilateral` + * @throws ClassCastException if the instance is not `Quadrilateral` + */ + public Quadrilateral getQuadrilateral() throws ClassCastException { + return (Quadrilateral)super.getActualInstance(); + } + + /** + * Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Triangle` + * @throws ClassCastException if the instance is not `Triangle` + */ + public Triangle getTriangle() throws ClassCastException { + return (Triangle)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java new file mode 100644 index 000000000000..37306290f7fa --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * NumberOnly + */ +@JsonPropertyOrder({ + NumberOnly.JSON_PROPERTY_JUST_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NumberOnly { + public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; + private BigDecimal justNumber; + + public NumberOnly() { + } + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_JUST_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getJustNumber() { + return justNumber; + } + + + @JsonProperty(JSON_PROPERTY_JUST_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + /** + * Return true if this NumberOnly object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 000000000000..54316fdd1504 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,226 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars = null; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + + /** + * Return true if this ObjectWithDeprecatedFields object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java new file mode 100644 index 000000000000..b0e1ce4b02ed --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Order.java @@ -0,0 +1,310 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Order + */ +@JsonPropertyOrder({ + Order.JSON_PROPERTY_ID, + Order.JSON_PROPERTY_PET_ID, + Order.JSON_PROPERTY_QUANTITY, + Order.JSON_PROPERTY_SHIP_DATE, + Order.JSON_PROPERTY_STATUS, + Order.JSON_PROPERTY_COMPLETE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Order { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_PET_ID = "petId"; + private Long petId; + + public static final String JSON_PROPERTY_QUANTITY = "quantity"; + private Integer quantity; + + public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_COMPLETE = "complete"; + private Boolean complete = false; + + public Order() { + } + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getPetId() { + return petId; + } + + + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPetId(Long petId) { + this.petId = petId; + } + + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getQuantity() { + return quantity; + } + + + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "2020-02-02T20:20:20.000222Z", value = "") + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getShipDate() { + return shipDate; + } + + + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Order Status") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getComplete() { + return complete; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + /** + * Return true if this Order object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java new file mode 100644 index 000000000000..d71b453ac269 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * OuterComposite + */ +@JsonPropertyOrder({ + OuterComposite.JSON_PROPERTY_MY_NUMBER, + OuterComposite.JSON_PROPERTY_MY_STRING, + OuterComposite.JSON_PROPERTY_MY_BOOLEAN +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterComposite { + public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; + private BigDecimal myNumber; + + public static final String JSON_PROPERTY_MY_STRING = "my_string"; + private String myString; + + public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; + private Boolean myBoolean; + + public OuterComposite() { + } + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getMyNumber() { + return myNumber; + } + + + @JsonProperty(JSON_PROPERTY_MY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMyString() { + return myString; + } + + + @JsonProperty(JSON_PROPERTY_MY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMyString(String myString) { + this.myString = myString; + } + + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getMyBoolean() { + return myBoolean; + } + + + @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + /** + * Return true if this OuterComposite object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java new file mode 100644 index 000000000000..a2c3043d7629 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 000000000000..a7437d939b36 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 000000000000..d937d68bc1f7 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 000000000000..fa04cfa387bd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java new file mode 100644 index 000000000000..ae48ed08a859 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ParentPet.java @@ -0,0 +1,144 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildCat; +import org.openapitools.client.model.GrandparentAnimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ParentPet + */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "pet_type", // ignore manually set pet_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the pet_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "pet_type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildCat.class, name = "ChildCat"), +}) + +public class ParentPet extends GrandparentAnimal { + public ParentPet() { + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ParentPet putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ParentPet object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentPet {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ChildCat", ChildCat.class); + mappings.put("ParentPet", ParentPet.class); + JSON.registerDiscriminator(ParentPet.class, "pet_type", mappings); +} +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 000000000000..a338a90dc864 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,326 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Pet + */ +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private List photoUrls = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public Pet() { + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(Category category) { + this.category = category; + } + + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhotoUrls() { + return photoUrls; + } + + + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(List tags) { + this.tags = tags; + } + + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "pet status in the store") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + /** + * Return true if this Pet object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java new file mode 100644 index 000000000000..b283e1387503 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Pig.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.BasquePig; +import org.openapitools.client.model.DanishPig; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Pig.PigDeserializer.class) +@JsonSerialize(using = Pig.PigSerializer.class) +public class Pig extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Pig.class.getName()); + + public static class PigSerializer extends StdSerializer { + public PigSerializer(Class t) { + super(t); + } + + public PigSerializer() { + this(null); + } + + @Override + public void serialize(Pig value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class PigDeserializer extends StdDeserializer { + public PigDeserializer() { + this(Pig.class); + } + + public PigDeserializer(Class vc) { + super(vc); + } + + @Override + public Pig deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Pig newPig = new Pig(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("className"); + switch (discriminatorValue) { + case "BasquePig": + deserialized = tree.traverse(jp.getCodec()).readValueAs(BasquePig.class); + newPig.setActualInstance(deserialized); + return newPig; + case "DanishPig": + deserialized = tree.traverse(jp.getCodec()).readValueAs(DanishPig.class); + newPig.setActualInstance(deserialized); + return newPig; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for Pig. Possible values: BasquePig DanishPig", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize BasquePig + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BasquePig.class.equals(Integer.class) || BasquePig.class.equals(Long.class) || BasquePig.class.equals(Float.class) || BasquePig.class.equals(Double.class) || BasquePig.class.equals(Boolean.class) || BasquePig.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BasquePig.class.equals(Integer.class) || BasquePig.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BasquePig.class.equals(Float.class) || BasquePig.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BasquePig.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BasquePig.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BasquePig.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BasquePig'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BasquePig'", e); + } + + // deserialize DanishPig + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DanishPig.class.equals(Integer.class) || DanishPig.class.equals(Long.class) || DanishPig.class.equals(Float.class) || DanishPig.class.equals(Double.class) || DanishPig.class.equals(Boolean.class) || DanishPig.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DanishPig.class.equals(Integer.class) || DanishPig.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DanishPig.class.equals(Float.class) || DanishPig.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (DanishPig.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DanishPig.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DanishPig.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DanishPig'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DanishPig'", e); + } + + if (match == 1) { + Pig ret = new Pig(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Pig: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Pig getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Pig cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public Pig() { + super("oneOf", Boolean.FALSE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Pig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Pig object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((Pig)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public Pig(BasquePig o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Pig(DanishPig o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BasquePig", new GenericType() { + }); + schemas.put("DanishPig", new GenericType() { + }); + JSON.registerDescendants(Pig.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BasquePig", BasquePig.class); + mappings.put("DanishPig", DanishPig.class); + mappings.put("Pig", Pig.class); + JSON.registerDiscriminator(Pig.class, "className", mappings); + } + + @Override + public Map getSchemas() { + return Pig.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * BasquePig, DanishPig + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(BasquePig.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DanishPig.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be BasquePig, DanishPig"); + } + + /** + * Get the actual instance, which can be the following: + * BasquePig, DanishPig + * + * @return The actual instance (BasquePig, DanishPig) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BasquePig`. If the actual instance is not `BasquePig`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BasquePig` + * @throws ClassCastException if the instance is not `BasquePig` + */ + public BasquePig getBasquePig() throws ClassCastException { + return (BasquePig)super.getActualInstance(); + } + + /** + * Get the actual instance of `DanishPig`. If the actual instance is not `DanishPig`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DanishPig` + * @throws ClassCastException if the instance is not `DanishPig` + */ + public DanishPig getDanishPig() throws ClassCastException { + return (DanishPig)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java new file mode 100644 index 000000000000..0af291d6ef50 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Quadrilateral.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ComplexQuadrilateral; +import org.openapitools.client.model.SimpleQuadrilateral; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Quadrilateral.QuadrilateralDeserializer.class) +@JsonSerialize(using = Quadrilateral.QuadrilateralSerializer.class) +public class Quadrilateral extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Quadrilateral.class.getName()); + + public static class QuadrilateralSerializer extends StdSerializer { + public QuadrilateralSerializer(Class t) { + super(t); + } + + public QuadrilateralSerializer() { + this(null); + } + + @Override + public void serialize(Quadrilateral value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class QuadrilateralDeserializer extends StdDeserializer { + public QuadrilateralDeserializer() { + this(Quadrilateral.class); + } + + public QuadrilateralDeserializer(Class vc) { + super(vc); + } + + @Override + public Quadrilateral deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Quadrilateral newQuadrilateral = new Quadrilateral(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("quadrilateralType"); + switch (discriminatorValue) { + case "ComplexQuadrilateral": + deserialized = tree.traverse(jp.getCodec()).readValueAs(ComplexQuadrilateral.class); + newQuadrilateral.setActualInstance(deserialized); + return newQuadrilateral; + case "SimpleQuadrilateral": + deserialized = tree.traverse(jp.getCodec()).readValueAs(SimpleQuadrilateral.class); + newQuadrilateral.setActualInstance(deserialized); + return newQuadrilateral; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for Quadrilateral. Possible values: ComplexQuadrilateral SimpleQuadrilateral", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize ComplexQuadrilateral + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ComplexQuadrilateral.class.equals(Integer.class) || ComplexQuadrilateral.class.equals(Long.class) || ComplexQuadrilateral.class.equals(Float.class) || ComplexQuadrilateral.class.equals(Double.class) || ComplexQuadrilateral.class.equals(Boolean.class) || ComplexQuadrilateral.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ComplexQuadrilateral.class.equals(Integer.class) || ComplexQuadrilateral.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ComplexQuadrilateral.class.equals(Float.class) || ComplexQuadrilateral.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ComplexQuadrilateral.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ComplexQuadrilateral.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ComplexQuadrilateral.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ComplexQuadrilateral'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ComplexQuadrilateral'", e); + } + + // deserialize SimpleQuadrilateral + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SimpleQuadrilateral.class.equals(Integer.class) || SimpleQuadrilateral.class.equals(Long.class) || SimpleQuadrilateral.class.equals(Float.class) || SimpleQuadrilateral.class.equals(Double.class) || SimpleQuadrilateral.class.equals(Boolean.class) || SimpleQuadrilateral.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SimpleQuadrilateral.class.equals(Integer.class) || SimpleQuadrilateral.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SimpleQuadrilateral.class.equals(Float.class) || SimpleQuadrilateral.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (SimpleQuadrilateral.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SimpleQuadrilateral.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SimpleQuadrilateral.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SimpleQuadrilateral'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SimpleQuadrilateral'", e); + } + + if (match == 1) { + Quadrilateral ret = new Quadrilateral(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Quadrilateral: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Quadrilateral getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Quadrilateral cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public Quadrilateral() { + super("oneOf", Boolean.FALSE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Quadrilateral putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Quadrilateral object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((Quadrilateral)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public Quadrilateral(ComplexQuadrilateral o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Quadrilateral(SimpleQuadrilateral o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ComplexQuadrilateral", new GenericType() { + }); + schemas.put("SimpleQuadrilateral", new GenericType() { + }); + JSON.registerDescendants(Quadrilateral.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ComplexQuadrilateral", ComplexQuadrilateral.class); + mappings.put("SimpleQuadrilateral", SimpleQuadrilateral.class); + mappings.put("Quadrilateral", Quadrilateral.class); + JSON.registerDiscriminator(Quadrilateral.class, "quadrilateralType", mappings); + } + + @Override + public Map getSchemas() { + return Quadrilateral.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ComplexQuadrilateral, SimpleQuadrilateral + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ComplexQuadrilateral.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SimpleQuadrilateral.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be ComplexQuadrilateral, SimpleQuadrilateral"); + } + + /** + * Get the actual instance, which can be the following: + * ComplexQuadrilateral, SimpleQuadrilateral + * + * @return The actual instance (ComplexQuadrilateral, SimpleQuadrilateral) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ComplexQuadrilateral`. If the actual instance is not `ComplexQuadrilateral`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ComplexQuadrilateral` + * @throws ClassCastException if the instance is not `ComplexQuadrilateral` + */ + public ComplexQuadrilateral getComplexQuadrilateral() throws ClassCastException { + return (ComplexQuadrilateral)super.getActualInstance(); + } + + /** + * Get the actual instance of `SimpleQuadrilateral`. If the actual instance is not `SimpleQuadrilateral`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SimpleQuadrilateral` + * @throws ClassCastException if the instance is not `SimpleQuadrilateral` + */ + public SimpleQuadrilateral getSimpleQuadrilateral() throws ClassCastException { + return (SimpleQuadrilateral)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java new file mode 100644 index 000000000000..b6d3b20f1b77 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * QuadrilateralInterface + */ +@JsonPropertyOrder({ + QuadrilateralInterface.JSON_PROPERTY_QUADRILATERAL_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class QuadrilateralInterface { + public static final String JSON_PROPERTY_QUADRILATERAL_TYPE = "quadrilateralType"; + private String quadrilateralType; + + public QuadrilateralInterface() { + } + + public QuadrilateralInterface quadrilateralType(String quadrilateralType) { + this.quadrilateralType = quadrilateralType; + return this; + } + + /** + * Get quadrilateralType + * @return quadrilateralType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_QUADRILATERAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getQuadrilateralType() { + return quadrilateralType; + } + + + @JsonProperty(JSON_PROPERTY_QUADRILATERAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuadrilateralType(String quadrilateralType) { + this.quadrilateralType = quadrilateralType; + } + + + /** + * Return true if this QuadrilateralInterface object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuadrilateralInterface quadrilateralInterface = (QuadrilateralInterface) o; + return Objects.equals(this.quadrilateralType, quadrilateralInterface.quadrilateralType); + } + + @Override + public int hashCode() { + return Objects.hash(quadrilateralType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuadrilateralInterface {\n"); + sb.append(" quadrilateralType: ").append(toIndentedString(quadrilateralType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..1111f67f3835 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -0,0 +1,142 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ReadOnlyFirst + */ +@JsonPropertyOrder({ + ReadOnlyFirst.JSON_PROPERTY_BAR, + ReadOnlyFirst.JSON_PROPERTY_BAZ +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReadOnlyFirst { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar; + + public static final String JSON_PROPERTY_BAZ = "baz"; + private String baz; + + public ReadOnlyFirst() { + } + + @JsonCreator + public ReadOnlyFirst( + @JsonProperty(JSON_PROPERTY_BAR) String bar + ) { + this(); + this.bar = bar; + } + + /** + * Get bar + * @return bar + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAZ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBaz() { + return baz; + } + + + @JsonProperty(JSON_PROPERTY_BAZ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaz(String baz) { + this.baz = baz; + } + + + /** + * Return true if this ReadOnlyFirst object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java new file mode 100644 index 000000000000..15bc62cc8e60 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -0,0 +1,189 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ShapeInterface; +import org.openapitools.client.model.TriangleInterface; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ScaleneTriangle + */ +@JsonPropertyOrder({ + ScaleneTriangle.JSON_PROPERTY_SHAPE_TYPE, + ScaleneTriangle.JSON_PROPERTY_TRIANGLE_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScaleneTriangle { + public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType"; + private String shapeType; + + public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType"; + private String triangleType; + + public ScaleneTriangle() { + } + + public ScaleneTriangle shapeType(String shapeType) { + this.shapeType = shapeType; + return this; + } + + /** + * Get shapeType + * @return shapeType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getShapeType() { + return shapeType; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShapeType(String shapeType) { + this.shapeType = shapeType; + } + + + public ScaleneTriangle triangleType(String triangleType) { + this.triangleType = triangleType; + return this; + } + + /** + * Get triangleType + * @return triangleType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTriangleType() { + return triangleType; + } + + + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTriangleType(String triangleType) { + this.triangleType = triangleType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ScaleneTriangle putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ScaleneTriangle object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScaleneTriangle scaleneTriangle = (ScaleneTriangle) o; + return Objects.equals(this.shapeType, scaleneTriangle.shapeType) && + Objects.equals(this.triangleType, scaleneTriangle.triangleType)&& + Objects.equals(this.additionalProperties, scaleneTriangle.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(shapeType, triangleType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScaleneTriangle {\n"); + sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java new file mode 100644 index 000000000000..15f9fc173c07 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Shape.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Shape.ShapeDeserializer.class) +@JsonSerialize(using = Shape.ShapeSerializer.class) +public class Shape extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Shape.class.getName()); + + public static class ShapeSerializer extends StdSerializer { + public ShapeSerializer(Class t) { + super(t); + } + + public ShapeSerializer() { + this(null); + } + + @Override + public void serialize(Shape value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ShapeDeserializer extends StdDeserializer { + public ShapeDeserializer() { + this(Shape.class); + } + + public ShapeDeserializer(Class vc) { + super(vc); + } + + @Override + public Shape deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Shape newShape = new Shape(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("shapeType"); + switch (discriminatorValue) { + case "Quadrilateral": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Quadrilateral.class); + newShape.setActualInstance(deserialized); + return newShape; + case "Triangle": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Triangle.class); + newShape.setActualInstance(deserialized); + return newShape; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for Shape. Possible values: Quadrilateral Triangle", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize Quadrilateral + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Quadrilateral.class.equals(Integer.class) || Quadrilateral.class.equals(Long.class) || Quadrilateral.class.equals(Float.class) || Quadrilateral.class.equals(Double.class) || Quadrilateral.class.equals(Boolean.class) || Quadrilateral.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Quadrilateral.class.equals(Integer.class) || Quadrilateral.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Quadrilateral.class.equals(Float.class) || Quadrilateral.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Quadrilateral.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Quadrilateral.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Quadrilateral.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Quadrilateral'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Quadrilateral'", e); + } + + // deserialize Triangle + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Triangle.class.equals(Integer.class) || Triangle.class.equals(Long.class) || Triangle.class.equals(Float.class) || Triangle.class.equals(Double.class) || Triangle.class.equals(Boolean.class) || Triangle.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Triangle.class.equals(Integer.class) || Triangle.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Triangle.class.equals(Float.class) || Triangle.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Triangle.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Triangle.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Triangle.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Triangle'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Triangle'", e); + } + + if (match == 1) { + Shape ret = new Shape(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Shape: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Shape getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Shape cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public Shape() { + super("oneOf", Boolean.FALSE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Shape putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Shape object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((Shape)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public Shape(Quadrilateral o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Shape(Triangle o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Quadrilateral", new GenericType() { + }); + schemas.put("Triangle", new GenericType() { + }); + JSON.registerDescendants(Shape.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Quadrilateral", Quadrilateral.class); + mappings.put("Triangle", Triangle.class); + mappings.put("Shape", Shape.class); + JSON.registerDiscriminator(Shape.class, "shapeType", mappings); + } + + @Override + public Map getSchemas() { + return Shape.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Quadrilateral, Triangle + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Triangle.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Quadrilateral, Triangle"); + } + + /** + * Get the actual instance, which can be the following: + * Quadrilateral, Triangle + * + * @return The actual instance (Quadrilateral, Triangle) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Quadrilateral` + * @throws ClassCastException if the instance is not `Quadrilateral` + */ + public Quadrilateral getQuadrilateral() throws ClassCastException { + return (Quadrilateral)super.getActualInstance(); + } + + /** + * Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Triangle` + * @throws ClassCastException if the instance is not `Triangle` + */ + public Triangle getTriangle() throws ClassCastException { + return (Triangle)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java new file mode 100644 index 000000000000..68765950594d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * ShapeInterface + */ +@JsonPropertyOrder({ + ShapeInterface.JSON_PROPERTY_SHAPE_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ShapeInterface { + public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType"; + private String shapeType; + + public ShapeInterface() { + } + + public ShapeInterface shapeType(String shapeType) { + this.shapeType = shapeType; + return this; + } + + /** + * Get shapeType + * @return shapeType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getShapeType() { + return shapeType; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShapeType(String shapeType) { + this.shapeType = shapeType; + } + + + /** + * Return true if this ShapeInterface object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShapeInterface shapeInterface = (ShapeInterface) o; + return Objects.equals(this.shapeType, shapeInterface.shapeType); + } + + @Override + public int hashCode() { + return Objects.hash(shapeType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShapeInterface {\n"); + sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java new file mode 100644 index 000000000000..8bdc28cb7860 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ShapeOrNull.java @@ -0,0 +1,337 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = ShapeOrNull.ShapeOrNullDeserializer.class) +@JsonSerialize(using = ShapeOrNull.ShapeOrNullSerializer.class) +public class ShapeOrNull extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ShapeOrNull.class.getName()); + + public static class ShapeOrNullSerializer extends StdSerializer { + public ShapeOrNullSerializer(Class t) { + super(t); + } + + public ShapeOrNullSerializer() { + this(null); + } + + @Override + public void serialize(ShapeOrNull value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ShapeOrNullDeserializer extends StdDeserializer { + public ShapeOrNullDeserializer() { + this(ShapeOrNull.class); + } + + public ShapeOrNullDeserializer(Class vc) { + super(vc); + } + + @Override + public ShapeOrNull deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + ShapeOrNull newShapeOrNull = new ShapeOrNull(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("shapeType"); + switch (discriminatorValue) { + case "Quadrilateral": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Quadrilateral.class); + newShapeOrNull.setActualInstance(deserialized); + return newShapeOrNull; + case "Triangle": + deserialized = tree.traverse(jp.getCodec()).readValueAs(Triangle.class); + newShapeOrNull.setActualInstance(deserialized); + return newShapeOrNull; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for ShapeOrNull. Possible values: Quadrilateral Triangle", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize Quadrilateral + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Quadrilateral.class.equals(Integer.class) || Quadrilateral.class.equals(Long.class) || Quadrilateral.class.equals(Float.class) || Quadrilateral.class.equals(Double.class) || Quadrilateral.class.equals(Boolean.class) || Quadrilateral.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Quadrilateral.class.equals(Integer.class) || Quadrilateral.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Quadrilateral.class.equals(Float.class) || Quadrilateral.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Quadrilateral.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Quadrilateral.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Quadrilateral.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Quadrilateral'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Quadrilateral'", e); + } + + // deserialize Triangle + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Triangle.class.equals(Integer.class) || Triangle.class.equals(Long.class) || Triangle.class.equals(Float.class) || Triangle.class.equals(Double.class) || Triangle.class.equals(Boolean.class) || Triangle.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Triangle.class.equals(Integer.class) || Triangle.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Triangle.class.equals(Float.class) || Triangle.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (Triangle.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Triangle.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(Triangle.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'Triangle'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Triangle'", e); + } + + if (match == 1) { + ShapeOrNull ret = new ShapeOrNull(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for ShapeOrNull: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public ShapeOrNull getNullValue(DeserializationContext ctxt) throws JsonMappingException { + return null; + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ShapeOrNull() { + super("oneOf", Boolean.TRUE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ShapeOrNull putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ShapeOrNull object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((ShapeOrNull)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public ShapeOrNull(Quadrilateral o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + + public ShapeOrNull(Triangle o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + + static { + schemas.put("Quadrilateral", new GenericType() { + }); + schemas.put("Triangle", new GenericType() { + }); + JSON.registerDescendants(ShapeOrNull.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Quadrilateral", Quadrilateral.class); + mappings.put("Triangle", Triangle.class); + mappings.put("ShapeOrNull", ShapeOrNull.class); + JSON.registerDiscriminator(ShapeOrNull.class, "shapeType", mappings); + } + + @Override + public Map getSchemas() { + return ShapeOrNull.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Quadrilateral, Triangle + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance == null) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(Triangle.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Quadrilateral, Triangle"); + } + + /** + * Get the actual instance, which can be the following: + * Quadrilateral, Triangle + * + * @return The actual instance (Quadrilateral, Triangle) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Quadrilateral`. If the actual instance is not `Quadrilateral`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Quadrilateral` + * @throws ClassCastException if the instance is not `Quadrilateral` + */ + public Quadrilateral getQuadrilateral() throws ClassCastException { + return (Quadrilateral)super.getActualInstance(); + } + + /** + * Get the actual instance of `Triangle`. If the actual instance is not `Triangle`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Triangle` + * @throws ClassCastException if the instance is not `Triangle` + */ + public Triangle getTriangle() throws ClassCastException { + return (Triangle)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java new file mode 100644 index 000000000000..87fcfee6f40a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -0,0 +1,189 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.QuadrilateralInterface; +import org.openapitools.client.model.ShapeInterface; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * SimpleQuadrilateral + */ +@JsonPropertyOrder({ + SimpleQuadrilateral.JSON_PROPERTY_SHAPE_TYPE, + SimpleQuadrilateral.JSON_PROPERTY_QUADRILATERAL_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SimpleQuadrilateral { + public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType"; + private String shapeType; + + public static final String JSON_PROPERTY_QUADRILATERAL_TYPE = "quadrilateralType"; + private String quadrilateralType; + + public SimpleQuadrilateral() { + } + + public SimpleQuadrilateral shapeType(String shapeType) { + this.shapeType = shapeType; + return this; + } + + /** + * Get shapeType + * @return shapeType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getShapeType() { + return shapeType; + } + + + @JsonProperty(JSON_PROPERTY_SHAPE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShapeType(String shapeType) { + this.shapeType = shapeType; + } + + + public SimpleQuadrilateral quadrilateralType(String quadrilateralType) { + this.quadrilateralType = quadrilateralType; + return this; + } + + /** + * Get quadrilateralType + * @return quadrilateralType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_QUADRILATERAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getQuadrilateralType() { + return quadrilateralType; + } + + + @JsonProperty(JSON_PROPERTY_QUADRILATERAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuadrilateralType(String quadrilateralType) { + this.quadrilateralType = quadrilateralType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public SimpleQuadrilateral putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SimpleQuadrilateral object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimpleQuadrilateral simpleQuadrilateral = (SimpleQuadrilateral) o; + return Objects.equals(this.shapeType, simpleQuadrilateral.shapeType) && + Objects.equals(this.quadrilateralType, simpleQuadrilateral.quadrilateralType)&& + Objects.equals(this.additionalProperties, simpleQuadrilateral.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(shapeType, quadrilateralType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimpleQuadrilateral {\n"); + sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append(" quadrilateralType: ").append(toIndentedString(quadrilateralType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java new file mode 100644 index 000000000000..08e0f972e5c2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -0,0 +1,145 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * SpecialModelName + */ +@JsonPropertyOrder({ + SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME, + SpecialModelName.JSON_PROPERTY_SPECIAL_MODEL_NAME +}) +@JsonTypeName("_special_model.name_") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SpecialModelName { + public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; + private Long $specialPropertyName; + + public static final String JSON_PROPERTY_SPECIAL_MODEL_NAME = "_special_model.name_"; + private String specialModelName; + + public SpecialModelName() { + } + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + + @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + public SpecialModelName specialModelName(String specialModelName) { + this.specialModelName = specialModelName; + return this; + } + + /** + * Get specialModelName + * @return specialModelName + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SPECIAL_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSpecialModelName() { + return specialModelName; + } + + + @JsonProperty(JSON_PROPERTY_SPECIAL_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSpecialModelName(String specialModelName) { + this.specialModelName = specialModelName; + } + + + /** + * Return true if this _special_model.name_ object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName) && + Objects.equals(this.specialModelName, specialModelName.specialModelName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName, specialModelName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append(" specialModelName: ").append(toIndentedString(specialModelName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 000000000000..6b15559ee319 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,144 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Tag + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Tag() { + } + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this Tag object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java new file mode 100644 index 000000000000..8df5a0a77cbf --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Triangle.java @@ -0,0 +1,385 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.EquilateralTriangle; +import org.openapitools.client.model.IsoscelesTriangle; +import org.openapitools.client.model.ScaleneTriangle; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.openapitools.client.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Triangle.TriangleDeserializer.class) +@JsonSerialize(using = Triangle.TriangleSerializer.class) +public class Triangle extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Triangle.class.getName()); + + public static class TriangleSerializer extends StdSerializer { + public TriangleSerializer(Class t) { + super(t); + } + + public TriangleSerializer() { + this(null); + } + + @Override + public void serialize(Triangle value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TriangleDeserializer extends StdDeserializer { + public TriangleDeserializer() { + this(Triangle.class); + } + + public TriangleDeserializer(Class vc) { + super(vc); + } + + @Override + public Triangle deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Triangle newTriangle = new Triangle(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("triangleType"); + switch (discriminatorValue) { + case "EquilateralTriangle": + deserialized = tree.traverse(jp.getCodec()).readValueAs(EquilateralTriangle.class); + newTriangle.setActualInstance(deserialized); + return newTriangle; + case "IsoscelesTriangle": + deserialized = tree.traverse(jp.getCodec()).readValueAs(IsoscelesTriangle.class); + newTriangle.setActualInstance(deserialized); + return newTriangle; + case "ScaleneTriangle": + deserialized = tree.traverse(jp.getCodec()).readValueAs(ScaleneTriangle.class); + newTriangle.setActualInstance(deserialized); + return newTriangle; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for Triangle. Possible values: EquilateralTriangle IsoscelesTriangle ScaleneTriangle", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize EquilateralTriangle + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EquilateralTriangle.class.equals(Integer.class) || EquilateralTriangle.class.equals(Long.class) || EquilateralTriangle.class.equals(Float.class) || EquilateralTriangle.class.equals(Double.class) || EquilateralTriangle.class.equals(Boolean.class) || EquilateralTriangle.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EquilateralTriangle.class.equals(Integer.class) || EquilateralTriangle.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EquilateralTriangle.class.equals(Float.class) || EquilateralTriangle.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (EquilateralTriangle.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EquilateralTriangle.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(EquilateralTriangle.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EquilateralTriangle'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EquilateralTriangle'", e); + } + + // deserialize IsoscelesTriangle + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IsoscelesTriangle.class.equals(Integer.class) || IsoscelesTriangle.class.equals(Long.class) || IsoscelesTriangle.class.equals(Float.class) || IsoscelesTriangle.class.equals(Double.class) || IsoscelesTriangle.class.equals(Boolean.class) || IsoscelesTriangle.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IsoscelesTriangle.class.equals(Integer.class) || IsoscelesTriangle.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IsoscelesTriangle.class.equals(Float.class) || IsoscelesTriangle.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (IsoscelesTriangle.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IsoscelesTriangle.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(IsoscelesTriangle.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'IsoscelesTriangle'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IsoscelesTriangle'", e); + } + + // deserialize ScaleneTriangle + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ScaleneTriangle.class.equals(Integer.class) || ScaleneTriangle.class.equals(Long.class) || ScaleneTriangle.class.equals(Float.class) || ScaleneTriangle.class.equals(Double.class) || ScaleneTriangle.class.equals(Boolean.class) || ScaleneTriangle.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ScaleneTriangle.class.equals(Integer.class) || ScaleneTriangle.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ScaleneTriangle.class.equals(Float.class) || ScaleneTriangle.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ScaleneTriangle.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ScaleneTriangle.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ScaleneTriangle.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ScaleneTriangle'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ScaleneTriangle'", e); + } + + if (match == 1) { + Triangle ret = new Triangle(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Triangle: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Triangle getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Triangle cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public Triangle() { + super("oneOf", Boolean.FALSE); + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Triangle putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this Triangle object is equal to o. + */ + @Override + public boolean equals(Object o) { + return super.equals(o) && Objects.equals(this.additionalProperties, ((Triangle)o).additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); + } + public Triangle(EquilateralTriangle o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Triangle(IsoscelesTriangle o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Triangle(ScaleneTriangle o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("EquilateralTriangle", new GenericType() { + }); + schemas.put("IsoscelesTriangle", new GenericType() { + }); + schemas.put("ScaleneTriangle", new GenericType() { + }); + JSON.registerDescendants(Triangle.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EquilateralTriangle", EquilateralTriangle.class); + mappings.put("IsoscelesTriangle", IsoscelesTriangle.class); + mappings.put("ScaleneTriangle", ScaleneTriangle.class); + mappings.put("Triangle", Triangle.class); + JSON.registerDiscriminator(Triangle.class, "triangleType", mappings); + } + + @Override + public Map getSchemas() { + return Triangle.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(EquilateralTriangle.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(IsoscelesTriangle.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ScaleneTriangle.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle"); + } + + /** + * Get the actual instance, which can be the following: + * EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle + * + * @return The actual instance (EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `EquilateralTriangle`. If the actual instance is not `EquilateralTriangle`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EquilateralTriangle` + * @throws ClassCastException if the instance is not `EquilateralTriangle` + */ + public EquilateralTriangle getEquilateralTriangle() throws ClassCastException { + return (EquilateralTriangle)super.getActualInstance(); + } + + /** + * Get the actual instance of `IsoscelesTriangle`. If the actual instance is not `IsoscelesTriangle`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IsoscelesTriangle` + * @throws ClassCastException if the instance is not `IsoscelesTriangle` + */ + public IsoscelesTriangle getIsoscelesTriangle() throws ClassCastException { + return (IsoscelesTriangle)super.getActualInstance(); + } + + /** + * Get the actual instance of `ScaleneTriangle`. If the actual instance is not `ScaleneTriangle`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ScaleneTriangle` + * @throws ClassCastException if the instance is not `ScaleneTriangle` + */ + public ScaleneTriangle getScaleneTriangle() throws ClassCastException { + return (ScaleneTriangle)super.getActualInstance(); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java new file mode 100644 index 000000000000..ce693260bbfc --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * TriangleInterface + */ +@JsonPropertyOrder({ + TriangleInterface.JSON_PROPERTY_TRIANGLE_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TriangleInterface { + public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType"; + private String triangleType; + + public TriangleInterface() { + } + + public TriangleInterface triangleType(String triangleType) { + this.triangleType = triangleType; + return this; + } + + /** + * Get triangleType + * @return triangleType + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTriangleType() { + return triangleType; + } + + + @JsonProperty(JSON_PROPERTY_TRIANGLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTriangleType(String triangleType) { + this.triangleType = triangleType; + } + + + /** + * Return true if this TriangleInterface object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TriangleInterface triangleInterface = (TriangleInterface) o; + return Objects.equals(this.triangleType, triangleInterface.triangleType); + } + + @Override + public int hashCode() { + return Objects.hash(triangleType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TriangleInterface {\n"); + sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java new file mode 100644 index 000000000000..eae5b4e785d3 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/User.java @@ -0,0 +1,503 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * User + */ +@JsonPropertyOrder({ + User.JSON_PROPERTY_ID, + User.JSON_PROPERTY_USERNAME, + User.JSON_PROPERTY_FIRST_NAME, + User.JSON_PROPERTY_LAST_NAME, + User.JSON_PROPERTY_EMAIL, + User.JSON_PROPERTY_PASSWORD, + User.JSON_PROPERTY_PHONE, + User.JSON_PROPERTY_USER_STATUS, + User.JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS, + User.JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS_NULLABLE, + User.JSON_PROPERTY_ANY_TYPE_PROP, + User.JSON_PROPERTY_ANY_TYPE_PROP_NULLABLE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class User { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private String phone; + + public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + private Integer userStatus; + + public static final String JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS = "objectWithNoDeclaredProps"; + private Object objectWithNoDeclaredProps; + + public static final String JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS_NULLABLE = "objectWithNoDeclaredPropsNullable"; + private JsonNullable objectWithNoDeclaredPropsNullable = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANY_TYPE_PROP = "anyTypeProp"; + private JsonNullable anyTypeProp = JsonNullable.of(null); + + public static final String JSON_PROPERTY_ANY_TYPE_PROP_NULLABLE = "anyTypePropNullable"; + private JsonNullable anyTypePropNullable = JsonNullable.of(null); + + public User() { + } + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFirstName() { + return firstName; + } + + + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLastName() { + return lastName; + } + + + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassword() { + return password; + } + + + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassword(String password) { + this.password = password; + } + + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(String phone) { + this.phone = phone; + } + + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "User Status") + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getUserStatus() { + return userStatus; + } + + + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + public User objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { + this.objectWithNoDeclaredProps = objectWithNoDeclaredProps; + return this; + } + + /** + * test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + * @return objectWithNoDeclaredProps + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.") + @JsonProperty(JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getObjectWithNoDeclaredProps() { + return objectWithNoDeclaredProps; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { + this.objectWithNoDeclaredProps = objectWithNoDeclaredProps; + } + + + public User objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { + this.objectWithNoDeclaredPropsNullable = JsonNullable.of(objectWithNoDeclaredPropsNullable); + return this; + } + + /** + * test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + * @return objectWithNoDeclaredPropsNullable + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.") + @JsonIgnore + + public Object getObjectWithNoDeclaredPropsNullable() { + return objectWithNoDeclaredPropsNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getObjectWithNoDeclaredPropsNullable_JsonNullable() { + return objectWithNoDeclaredPropsNullable; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_WITH_NO_DECLARED_PROPS_NULLABLE) + public void setObjectWithNoDeclaredPropsNullable_JsonNullable(JsonNullable objectWithNoDeclaredPropsNullable) { + this.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + } + + public void setObjectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { + this.objectWithNoDeclaredPropsNullable = JsonNullable.of(objectWithNoDeclaredPropsNullable); + } + + + public User anyTypeProp(Object anyTypeProp) { + this.anyTypeProp = JsonNullable.of(anyTypeProp); + return this; + } + + /** + * test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + * @return anyTypeProp + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389") + @JsonIgnore + + public Object getAnyTypeProp() { + return anyTypeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ANY_TYPE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnyTypeProp_JsonNullable() { + return anyTypeProp; + } + + @JsonProperty(JSON_PROPERTY_ANY_TYPE_PROP) + public void setAnyTypeProp_JsonNullable(JsonNullable anyTypeProp) { + this.anyTypeProp = anyTypeProp; + } + + public void setAnyTypeProp(Object anyTypeProp) { + this.anyTypeProp = JsonNullable.of(anyTypeProp); + } + + + public User anyTypePropNullable(Object anyTypePropNullable) { + this.anyTypePropNullable = JsonNullable.of(anyTypePropNullable); + return this; + } + + /** + * test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. + * @return anyTypePropNullable + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.") + @JsonIgnore + + public Object getAnyTypePropNullable() { + return anyTypePropNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ANY_TYPE_PROP_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnyTypePropNullable_JsonNullable() { + return anyTypePropNullable; + } + + @JsonProperty(JSON_PROPERTY_ANY_TYPE_PROP_NULLABLE) + public void setAnyTypePropNullable_JsonNullable(JsonNullable anyTypePropNullable) { + this.anyTypePropNullable = anyTypePropNullable; + } + + public void setAnyTypePropNullable(Object anyTypePropNullable) { + this.anyTypePropNullable = JsonNullable.of(anyTypePropNullable); + } + + + /** + * Return true if this User object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus) && + Objects.equals(this.objectWithNoDeclaredProps, user.objectWithNoDeclaredProps) && + equalsNullable(this.objectWithNoDeclaredPropsNullable, user.objectWithNoDeclaredPropsNullable) && + equalsNullable(this.anyTypeProp, user.anyTypeProp) && + equalsNullable(this.anyTypePropNullable, user.anyTypePropNullable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, objectWithNoDeclaredProps, hashCodeNullable(objectWithNoDeclaredPropsNullable), hashCodeNullable(anyTypeProp), hashCodeNullable(anyTypePropNullable)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append(" objectWithNoDeclaredProps: ").append(toIndentedString(objectWithNoDeclaredProps)).append("\n"); + sb.append(" objectWithNoDeclaredPropsNullable: ").append(toIndentedString(objectWithNoDeclaredPropsNullable)).append("\n"); + sb.append(" anyTypeProp: ").append(toIndentedString(anyTypeProp)).append("\n"); + sb.append(" anyTypePropNullable: ").append(toIndentedString(anyTypePropNullable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java new file mode 100644 index 000000000000..6cda7a62a92a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Whale.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Whale + */ +@JsonPropertyOrder({ + Whale.JSON_PROPERTY_HAS_BALEEN, + Whale.JSON_PROPERTY_HAS_TEETH, + Whale.JSON_PROPERTY_CLASS_NAME +}) +@JsonTypeName("whale") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Whale { + public static final String JSON_PROPERTY_HAS_BALEEN = "hasBaleen"; + private Boolean hasBaleen; + + public static final String JSON_PROPERTY_HAS_TEETH = "hasTeeth"; + private Boolean hasTeeth; + + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private String className; + + public Whale() { + } + + public Whale hasBaleen(Boolean hasBaleen) { + this.hasBaleen = hasBaleen; + return this; + } + + /** + * Get hasBaleen + * @return hasBaleen + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_HAS_BALEEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getHasBaleen() { + return hasBaleen; + } + + + @JsonProperty(JSON_PROPERTY_HAS_BALEEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHasBaleen(Boolean hasBaleen) { + this.hasBaleen = hasBaleen; + } + + + public Whale hasTeeth(Boolean hasTeeth) { + this.hasTeeth = hasTeeth; + return this; + } + + /** + * Get hasTeeth + * @return hasTeeth + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_HAS_TEETH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getHasTeeth() { + return hasTeeth; + } + + + @JsonProperty(JSON_PROPERTY_HAS_TEETH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHasTeeth(Boolean hasTeeth) { + this.hasTeeth = hasTeeth; + } + + + public Whale className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(String className) { + this.className = className; + } + + + /** + * Return true if this whale object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Whale whale = (Whale) o; + return Objects.equals(this.hasBaleen, whale.hasBaleen) && + Objects.equals(this.hasTeeth, whale.hasTeeth) && + Objects.equals(this.className, whale.className); + } + + @Override + public int hashCode() { + return Objects.hash(hasBaleen, hasTeeth, className); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Whale {\n"); + sb.append(" hasBaleen: ").append(toIndentedString(hasBaleen)).append("\n"); + sb.append(" hasTeeth: ").append(toIndentedString(hasTeeth)).append("\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java new file mode 100644 index 000000000000..c46c5e2c311d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/Zebra.java @@ -0,0 +1,225 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.openapitools.client.JSON; + + +/** + * Zebra + */ +@JsonPropertyOrder({ + Zebra.JSON_PROPERTY_TYPE, + Zebra.JSON_PROPERTY_CLASS_NAME +}) +@JsonTypeName("zebra") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Zebra { + /** + * Gets or Sets type + */ + public enum TypeEnum { + PLAINS("plains"), + + MOUNTAIN("mountain"), + + GREVYS("grevys"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private String className; + + public Zebra() { + } + + public Zebra type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public Zebra className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(String className) { + this.className = className; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public Zebra putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this zebra object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Zebra zebra = (Zebra) o; + return Objects.equals(this.type, zebra.type) && + Objects.equals(this.className, zebra.className)&& + Objects.equals(this.additionalProperties, zebra.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, className, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Zebra {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/ApiClientTest.java new file mode 100644 index 000000000000..d83de070118e --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/ApiClientTest.java @@ -0,0 +1,126 @@ +package org.openapitools.client; + +import org.openapitools.client.auth.Authentication; +import org.openapitools.client.auth.HttpSignatureAuth; +import org.openapitools.client.model.*; +import org.openapitools.client.ApiClient; + +import java.lang.Exception; +import java.security.spec.AlgorithmParameterSpec; +import java.util.*; +import java.net.URI; +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; + +import org.glassfish.jersey.apache.connector.ApacheConnectorProvider; +import org.tomitribe.auth.signatures.Algorithm; +import org.tomitribe.auth.signatures.Signer; +import org.tomitribe.auth.signatures.SigningAlgorithm; +import java.security.spec.PSSParameterSpec; +import java.security.spec.MGF1ParameterSpec; +import org.tomitribe.auth.signatures.*; +import java.io.ByteArrayInputStream; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.PublicKey; +import java.security.PrivateKey; + +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; + +public class ApiClientTest { + ApiClient apiClient = null; + Pet pet = null; + PrivateKey privateKey = null; + PublicKey publicKey = null; + + @BeforeEach + public void setup() { + apiClient = new ApiClient(); + pet = new Pet(); + try { + KeyPair keypair = KeyPairGenerator.getInstance("RSA").generateKeyPair(); + privateKey = keypair.getPrivate(); + publicKey = keypair.getPublic(); + } catch(NoSuchAlgorithmException e) { + fail("No such algorithm: " + e.toString()); + } + } + + @Test + public void testClientConfig() { + ApiClient testClient = new ApiClient(); + ClientConfig config = testClient.getDefaultClientConfig(); + config.connectorProvider(new ApacheConnectorProvider()); + config.property(ClientProperties.PROXY_URI, "http://localhost:8080"); + config.property(ClientProperties.PROXY_USERNAME,"proxy_user"); + config.property(ClientProperties.PROXY_PASSWORD,"proxy_password"); + testClient.setClientConfig(config); + } + + @Test + public void testUpdateParamsForAuth() throws Exception { + Map headerParams = new HashMap(); + List queryParams = new ArrayList<>(); + + URI uri = new URI("/api/v1/telemetry/TimeSeries"); + + // auth name + String[] authNames = {"http_signature_test"}; + + HashMap authMap = new HashMap(); + + HttpSignatureAuth signatureAuth = new HttpSignatureAuth("some-key-1", SigningAlgorithm.HS2019, Algorithm.RSA_SHA512, null, + null, Arrays.asList(new String[] { "(request-target)" }), 128L); + + signatureAuth.setPrivateKey(privateKey); + + authMap.put("http_signature_test", signatureAuth); + + ApiClient client = new ApiClient(authMap); + + client.updateParamsForAuth(authNames, queryParams, headerParams, null, null, "post", uri); + Signature requestSignature = Signature.fromString(headerParams.get("Authorization"), Algorithm.RSA_SHA512); + Verifier verify = new Verifier(publicKey, requestSignature); + assert verify.verify("post", uri.toString(), headerParams); + } + + @Test + public void testSerializeToString() throws Exception { + Long petId = 4321L; + pet.setId(petId); + pet.setName("jersey2 java8 pet"); + Category category = new Category(); + category.setId(petId); + category.setName("jersey2 java8 category"); + pet.setCategory(category); + pet.setStatus(Pet.StatusEnum.AVAILABLE); + pet.setPhotoUrls(Arrays.asList("A", "B", "C")); + org.openapitools.client.model.Tag tag = new org.openapitools.client.model.Tag(); + tag.setId(petId); + tag.setName("jersey2 java8 tag"); + pet.setTags(Arrays.asList(tag)); + + String result = "{\"id\":4321,\"category\":{\"id\":4321,\"name\":\"jersey2 java8 category\"},\"name\":\"jersey2 java8 pet\",\"photoUrls\":[\"A\",\"B\",\"C\"],\"tags\":[{\"id\":4321,\"name\":\"jersey2 java8 tag\"}],\"status\":\"available\"}"; + assertEquals(result, apiClient.serializeToString(pet, null, "application/json", false)); + // nulllable and there should be no diffencne as the payload is not null + assertEquals(result, apiClient.serializeToString(pet, null, "application/json", true)); + + // non-nullable null object should be converted to "" (empty body) + assertEquals("", apiClient.serializeToString(null, null, "application/json", false)); + // nullable null object should be converted to "null" + assertEquals("null", apiClient.serializeToString(null, null, "application/json", true)); + + // non-nullable empty string should be converted to "\"\"" (empty json string) + assertEquals("\"\"", apiClient.serializeToString("", null, "application/json", false)); + // nullable empty string should be converted to "\"\"" (empty json string) + assertEquals("\"\"", apiClient.serializeToString("", null, "application/json", true)); + + // non-nullable string "null" should be converted to "\"null\"" + assertEquals("\"null\"", apiClient.serializeToString("null", null, "application/json", false)); + // nullable string "null" should be converted to "\"null\"" + assertEquals("\"null\"", apiClient.serializeToString("null", null, "application/json", true)); + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java new file mode 100644 index 000000000000..1834c34b0685 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java @@ -0,0 +1,451 @@ +package org.openapitools.client; + +import org.openapitools.client.model.*; +import java.lang.Exception; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.databind.JsonMappingException; + +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; + +public class JSONComposedSchemaTest { + JSON json = null; + + @BeforeEach + public void setup() { + json = new JSON(); + } + + @Test + public void testOneOfSchemaAdditionalProperties() throws Exception { + { + // The discriminator value is zebra but the properties belong to Whale. + // The 'whale' properties are considered to be additional (undeclared) properties + // because in the 'zebra' schema, the 'additionalProperties' keyword has been set + // to true. + // TODO: The outcome should depend on the value of the 'useOneOfDiscriminatorLookup' CLI. + String str = "{ \"className\": \"zebra\", \"hasBaleen\": true, \"hasTeeth\": false }"; + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Mammal.class); + assertNotNull(o); + assertTrue(o.getActualInstance() instanceof Zebra); + Zebra z = (Zebra)o.getActualInstance(); + assertNotNull(z.getAdditionalProperties()); + assertEquals(2, z.getAdditionalProperties().size()); + assertTrue(z.getAdditionalProperties().containsKey("hasBaleen")); + } + { + // Same test as above, but this time deserializing directly into the Zebra class. + String str = "{ \"className\": \"zebra\", \"hasBaleen\": true, \"hasTeeth\": false }"; + Zebra o = json.getContext(null).readValue(str, Zebra.class); + assertNotNull(o); + assertNotNull(o.getAdditionalProperties()); + assertEquals(2, o.getAdditionalProperties().size()); + } + { + // Same test as above, but with properties that belong neither to zebra nor whale + String str = "{ \"className\": \"zebra\", \"some_other_property\": \"abc\" }"; + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Mammal.class); + assertNotNull(o); + assertTrue(o.getActualInstance() instanceof Zebra); + Zebra z = (Zebra)o.getActualInstance(); + assertNotNull(z.getAdditionalProperties()); + assertEquals(1, z.getAdditionalProperties().size()); + } + { + // Same test as above, but with properties that belong neither to zebra nor whale + // Deserialize directly into Zebra. + String str = "{ \"className\": \"zebra\", \"some_other_property\": \"abc\" }"; + Zebra o = json.getContext(null).readValue(str, Zebra.class); + assertNotNull(o); + assertNotNull(o.getAdditionalProperties()); + assertEquals(1, o.getAdditionalProperties().size()); + assertTrue(o.getAdditionalProperties().containsKey("some_other_property")); + assertTrue(o.getAdditionalProperties().containsValue("abc")); + } + } + + /** + * Test to ensure the setter will throw IllegalArgumentException + */ + @Test + public void testEnumDiscriminator() throws Exception { + IllegalArgumentException thrown = Assertions.assertThrows(IllegalArgumentException.class, () -> { + ChildCat cc = new ChildCat(); + cc.setPetType("ChildCat"); + assertEquals("ChildCat", cc.getPetType()); + cc.setPetType("WrongValue"); + }); + Assertions.assertEquals("WrongValue is invalid. Possible values for petType: ChildCat", thrown.getMessage()); + } + + /** + * Test to ensure the getter will throw ClassCastException + */ + @Test + public void testCastException() throws Exception { + ClassCastException thrown = Assertions.assertThrows(ClassCastException.class, () -> { + String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false }"; + FruitReq o = json.getContext(null).readValue(str, FruitReq.class); + assertTrue(o.getActualInstance() instanceof AppleReq); + BananaReq inst2 = o.getBananaReq(); // should throw ClassCastException + }); + // comment out below as the erorr message can be different due to JDK versions + // org.opentest4j.AssertionFailedError: expected: but was: + //Assertions.assertEquals("class org.openapitools.client.model.AppleReq cannot be cast to class org.openapitools.client.model.BananaReq (org.openapitools.client.model.AppleReq and org.openapitools.client.model.BananaReq are in unnamed module of loader 'app')", thrown.getMessage()); + Assertions.assertNotNull(thrown); + } + + /** + * Validate a oneOf schema can be deserialized into the expected class. + * The oneOf schema does not have a discriminator. + */ + @Test + public void testOneOfSchemaWithoutDiscriminator() throws Exception { + // BananaReq and AppleReq have explicitly defined properties that are different by name. + // There is no discriminator property. + { + String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false }"; + FruitReq o = json.getContext(null).readValue(str, FruitReq.class); + assertTrue(o.getActualInstance() instanceof AppleReq); + AppleReq inst = (AppleReq) o.getActualInstance(); + assertEquals(inst.getCultivar(), "golden delicious"); + assertEquals(inst.getMealy(), false); + + AppleReq inst2 = o.getAppleReq(); + assertEquals(inst2.getCultivar(), "golden delicious"); + assertEquals(inst2.getMealy(), false); + } + { + // Same test, but this time with additional (undeclared) properties. + // Since FruitReq has additionalProperties: false, deserialization should fail. + String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false, \"garbage_prop\": \"abc\" }"; + Exception exception = assertThrows(JsonMappingException.class, () -> { + FruitReq o = json.getContext(null).readValue(str, FruitReq.class); + }); + assertTrue(exception.getMessage().contains("Failed deserialization for FruitReq: 0 classes match result")); + } + { + String str = "{ \"lengthCm\": 17 }"; + FruitReq o = json.getContext(null).readValue(str, FruitReq.class); + assertTrue(o.getActualInstance() instanceof BananaReq); + BananaReq inst = (BananaReq) o.getActualInstance(); + assertEquals(inst.getLengthCm(), new java.math.BigDecimal(17)); + } + { + // Try to deserialize empty object. This should fail 'oneOf' because that will match + // both AppleReq and BananaReq. + String str = "{ }"; + Exception exception = assertThrows(JsonMappingException.class, () -> { + json.getContext(null).readValue(str, FruitReq.class); + }); + assertTrue(exception.getMessage().contains("Failed deserialization for FruitReq: 2 classes match result")); + // TODO: add a similar unit test where the oneOf child schemas have required properties. + // If the implementation is correct, the unmarshaling should take the "required" keyword + // into consideration, which it is not doing currently. + } + { + // Deserialize the null value. This should be allowed because the 'FruitReq' schema + // has nullable: true. + String str = "null"; + FruitReq o = json.getContext(null).readValue(str, FruitReq.class); + assertNull(o); + } + } + + /** + * Validate a oneOf schema can be deserialized into the expected class. + * The oneOf schema has a discriminator. + */ + @Test + public void testOneOfSchemaWithDiscriminator() throws Exception { + // Mammal can be one of whale, pig and zebra. + // pig has sub-classes. + { + String str = "{ \"className\": \"whale\", \"hasBaleen\": true, \"hasTeeth\": false }"; + + // Note that the 'zebra' schema does not have any explicit property defined AND + // it has additionalProperties: true. Hence without a discriminator the above + // JSON payload would match both 'whale' and 'zebra'. This is because the 'hasBaleen' + // and 'hasTeeth' would be considered additional (undeclared) properties for 'zebra'. + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Mammal.class); + assertNotNull(o); + assertTrue(o.getActualInstance() instanceof Whale); + } + { + String str = "{ \"className\": \"zebra\", \"type\": \"plains\" }"; + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Mammal.class); + assertNotNull(o); + assertTrue(o.getActualInstance() instanceof Zebra); + Zebra z = (Zebra)o.getActualInstance(); + assertEquals(Zebra.TypeEnum.PLAINS, z.getType()); + } + { + // The discriminator value is valid but the 'type' value is invalid. + String str = "{ \"className\": \"zebra\", \"type\": \"garbage_value\" }"; + Exception exception = assertThrows(JsonMappingException.class, () -> { + json.getContext(null).readValue(str, Mammal.class); + }); + } + { + String str = "{ \"className\": \"zebra\" }"; + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Mammal.class); + assertNotNull(o); + assertTrue(o.getActualInstance() instanceof Zebra); + Zebra z = (Zebra)o.getActualInstance(); + assertNull(z.getAdditionalProperties()); + } + { + /* comment out while unboxing nested oneOf/anyOf is still in discussion + // Deserialization test with indirections of 'oneOf' child schemas. + // Mammal is oneOf whale, zebra and pig, and pig is itself one of BasquePig, DanishPig. + String str = "{ \"className\": \"BasquePig\" }"; + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Mammal.class); + assertTrue(o.getActualInstance() instanceof BasquePig); + */ + } + } + + @Test + public void testOneOfNullable() throws Exception { + String str = "null"; + // 'null' is a valid value for NullableShape because it is nullable. + AbstractOpenApiSchema o = json.getContext(null).readValue(str, NullableShape.class); + assertNull(o); + + // 'null' is a valid value for ShapeOrNull because it is a oneOf with one of the + // children being the null type. + o = json.getContext(null).readValue(str, ShapeOrNull.class); + assertNull(o); + + // 'null' is not a valid value for the Shape model because it is not nullable. + // An exception should be raised. + Exception exception = assertThrows(JsonMappingException.class, () -> { + json.getContext(null).readValue(str, Shape.class); + }); + assertTrue(exception.getMessage().contains("Shape cannot be null")); + } + + /** + * Test payload with more than one discriminator. + */ + @Test + public void testOneOfMultipleDiscriminators() throws Exception { + // 'shapeType' is a discriminator for the 'Shape' model and + // 'triangleType' is a discriminator forr the 'Triangle' model. + String str = "{ \"shapeType\": \"Triangle\", \"triangleType\": \"EquilateralTriangle\" }"; + + // We should be able to deserialize a equilateral triangle into a EquilateralTriangle class. + EquilateralTriangle t = json.getContext(null).readValue(str, EquilateralTriangle.class); + assertNotNull(t); + + // We should be able to deserialize a equilateral triangle into a triangle. + AbstractOpenApiSchema o = json.getContext(null).readValue(str, Triangle.class); + assertNotNull(o); + assertTrue(o.getActualInstance() instanceof EquilateralTriangle); + + // We should be able to deserialize a equilateral triangle into a shape. + o = json.getContext(null).readValue(str, Shape.class); + // The container is a shape, and the actual instance should be a EquilateralTriangle. + assertTrue(o instanceof Shape); + /* comment out while unboxing nested oneOf/anyOf is still in discussion + assertTrue(o.getActualInstance() instanceof EquilateralTriangle); + + // It is not valid to deserialize a equilateral triangle into a quadrilateral. + Exception exception = assertThrows(JsonMappingException.class, () -> { + json.getContext(null).readValue(str, Quadrilateral.class); + }); + assertTrue(exception.getMessage().contains("Failed deserialization for Quadrilateral: 0 classes match result")); + */ + } + + @Test + public void testOneOfNestedComposedSchema() throws Exception { + { + String str = "{ " + + " \"mainShape\": { \"shapeType\": \"Triangle\", \"triangleType\": \"EquilateralTriangle\" }, " + + " \"shapeOrNull\": { \"shapeType\": \"Quadrilateral\", \"quadrilateralType\": \"SimpleQuadrilateral\" }, " + + " \"nullableShape\": { \"shapeType\": \"Triangle\", \"triangleType\": \"ScaleneTriangle\" } " + + "}"; + Drawing d = json.getContext(null).readValue(str, Drawing.class); + assertNotNull(d); + assertNotNull(d.getMainShape()); + assertNotNull(d.getShapeOrNull()); + assertNotNull(d.getNullableShape()); + assertTrue(d.getMainShape().getActualInstance() instanceof Triangle); + assertTrue(d.getShapeOrNull().getActualInstance() instanceof Quadrilateral); + assertTrue(d.getNullableShape().getActualInstance() instanceof Triangle); + // TODO: add assertions with call to getActualInstanceRecursively(). + //assertTrue(d.getMainShape().getActualInstanceRecursively() instanceof EquilateralTriangle); + //assertTrue(d.getShapeOrNull().getActualInstanceRecursively() instanceof SimpleQuadrilateral); + //assertTrue(d.getNullableShape().getActualInstanceRecursively() instanceof ScaleneTriangle); + } + + { + String str = "{ " + + " \"mainShape\": { \"shapeType\": \"Triangle\", \"triangleType\": \"EquilateralTriangle\" }, " + + " \"shapeOrNull\": null, " + + " \"nullableShape\": null " + + "}"; + Drawing d = json.getContext(null).readValue(str, Drawing.class); + assertNotNull(d); + assertNotNull(d.getMainShape()); + assertNull(d.getShapeOrNull()); + assertNull(d.getNullableShape()); + assertTrue(d.getMainShape().getActualInstance() instanceof Triangle); + } + } + + @Test + public void testOneOfNestedComposedSchemaWithAdditionalProperties() throws Exception { + { + String str = "{ " + + " \"mainShape\": { \"shapeType\": \"Triangle\", \"triangleType\": \"EquilateralTriangle\" }, " + + " \"shapeOrNull\": { \"shapeType\": \"Quadrilateral\", \"quadrilateralType\": \"SimpleQuadrilateral\" }, " + + " \"nullableShape\": { \"shapeType\": \"Triangle\", \"triangleType\": \"ScaleneTriangle\" }, " + + " \"fruit_1\": { \"cultivar\": \"golden delicious\", \"origin\": \"California\" }," + + " \"fruit_2\": { \"cultivar\": \"honeycrisp\", \"origin\": \"California\" }" + + "}"; + Drawing d = json.getContext(null).readValue(str, Drawing.class); + assertNotNull(d); + assertNotNull(d.getMainShape()); + assertNotNull(d.getShapeOrNull()); + assertNotNull(d.getNullableShape()); + assertTrue(d.getMainShape().getActualInstance() instanceof Triangle); + assertTrue(d.getShapeOrNull().getActualInstance() instanceof Quadrilateral); + assertTrue(d.getNullableShape().getActualInstance() instanceof Triangle); + // TODO: add assertions with call to getActualInstanceRecursively(). + //assertTrue(d.getMainShape().getActualInstanceRecursively() instanceof EquilateralTriangle); + //assertTrue(d.getShapeOrNull().getActualInstanceRecursively() instanceof SimpleQuadrilateral); + //assertTrue(d.getNullableShape().getActualInstanceRecursively() instanceof ScaleneTriangle); + assertNotNull(d.getAdditionalProperties()); + assertEquals(2, d.getAdditionalProperties().size()); + assertTrue(d.getAdditionalProperties().containsKey("fruit_1")); + assertTrue(d.getAdditionalProperties().containsKey("fruit_2")); + Fruit f1 = d.getAdditionalProperties().get("fruit_1"); + assertTrue(f1.getActualInstance() instanceof Apple); + Apple a = (Apple)f1.getActualInstance(); + assertEquals("golden delicious", a.getCultivar()); + assertEquals("California", a.getOrigin()); + } + } + + /** + * Validate a allOf schema can be deserialized into the expected class. + */ + @Test + public void testAllOfSchema() throws Exception { + { + String str = "{ \"className\": \"Dog\", \"color\": \"white\", \"breed\": \"Siberian Husky\" }"; + + // We should be able to deserialize a dog into a Dog. + Dog d = json.getContext(null).readValue(str, Dog.class); + assertNotNull(d); + assertEquals("white", d.getColor()); + } + { + String str = "{ \"pet_type\": \"ChildCat\", \"name\": \"fluffy\", " + + " \"stuff1\": \"the_value\", " + // additional, undeclared property of type string. + " \"stuff2\": { \"p1\": 123 }, " + // additional, undeclared property of type object. + " \"stuff3\": null," + // additional, undeclared property with null value. + " \"stuff4\": [ 12, \"abc\" ]" + // additional, undeclared property of type array. + " }"; + GrandparentAnimal o = json.getContext(null).readValue(str, GrandparentAnimal.class); + assertNotNull(o); + assertTrue(o instanceof ParentPet); + assertTrue(o instanceof ChildCat); + ChildCat c = (ChildCat)o; + assertEquals("fluffy", c.getName()); + assertNotNull(c.getAdditionalProperties()); + assertEquals(4, c.getAdditionalProperties().size()); + assertTrue(c.getAdditionalProperties().containsKey("stuff1")); + assertTrue(c.getAdditionalProperties().containsKey("stuff2")); + assertTrue(c.getAdditionalProperties().containsKey("stuff3")); + assertTrue(c.getAdditionalProperties().containsKey("stuff4")); + assertEquals("the_value", c.getAdditionalProperties().get("stuff1")); + assertNotNull(c.getAdditionalProperties().get("stuff2")); + assertTrue(c.getAdditionalProperties().get("stuff2") instanceof Map); + assertNull(c.getAdditionalProperties().get("stuff3")); + assertNotNull(c.getAdditionalProperties().get("stuff4")); + assertTrue(c.getAdditionalProperties().get("stuff4") instanceof List); + } + { + String str = "{ \"pet_type\": \"ChildCat\", \"name\": \"fluffy\" }"; + ParentPet o = json.getContext(null).readValue(str, ParentPet.class); + assertNotNull(o); + assertTrue(o instanceof ChildCat); + ChildCat c = (ChildCat)o; + assertEquals("fluffy", c.getName()); + } + { + // Wrong discriminator value in the payload. + String str = "{ \"pet_type\": \"Garbage\", \"name\": \"fluffy\" }"; + Exception exception = assertThrows(JsonMappingException.class, () -> { + json.getContext(null).readValue(str, GrandparentAnimal.class); + }); + assertTrue(exception.getMessage().contains("Could not resolve type id 'Garbage'")); + } + } + + @Test + public void testNullValueDisallowed() throws Exception { + { + String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }"; + org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class); + assertEquals(100L, (long)o.getQuantity()); + assertEquals(org.openapitools.client.model.Order.StatusEnum.PLACED, o.getStatus()); + } + { + String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": null }"; + org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class); + // TODO: the null value is not allowed per OAS document. + // The deserialization should fail. + assertNull(o.getQuantity()); + } + } + + /** + * Validate a anyOf schema can be deserialized into the expected class. + * The anyOf schema has a discriminator. + */ + @Test + public void testAnyOfSchemaWithoutDiscriminator() throws Exception { + { + // TODO: the GmFruit defines a 'color' property, which should be allowed + // in the input data, but the generated code does not have it. + String str = "{ \"cultivar\": \"golden delicious\", \"origin\": \"California\" }"; + GmFruit o = json.getContext(null).readValue(str, GmFruit.class); + assertTrue(o.getActualInstance() instanceof Apple); + Apple inst = (Apple) o.getActualInstance(); + assertEquals("golden delicious", inst.getCultivar()); + assertEquals("California", inst.getOrigin()); + // TODO: the 'Color' property is not generated for the 'GmFruit'. + //assertEquals("yellow", o.getColor()); + } + { + String str = "{ \"lengthCm\": 17 }"; + GmFruit o = json.getContext(null).readValue(str, GmFruit.class); + assertTrue(o.getActualInstance() instanceof Banana); + Banana inst = (Banana) o.getActualInstance(); + assertEquals(new java.math.BigDecimal(17), inst.getLengthCm()); + } + { + // Deserialize empty object. This should work because it will match either apple or banana. + String str = "{ }"; + GmFruit o = json.getContext(null).readValue(str, GmFruit.class); + // The payload matches against either apple or banana, so either model could be returned, + // but the implementation always picks the first anyOf child schema that matches the + // input payload. + assertTrue(o.getActualInstance() instanceof Apple); + } + { + // Deserialize the null value. This is not allowed because the 'gmFruit' schema + // is not nullable. + String str = "null"; + Exception exception = assertThrows(JsonMappingException.class, () -> { + GmFruit o = json.getContext(null).readValue(str, GmFruit.class); + }); + assertTrue(exception.getMessage().contains("GmFruit cannot be null")); + } + } +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONTest.java new file mode 100644 index 000000000000..b5e9d7872a0e --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONTest.java @@ -0,0 +1,90 @@ +package org.openapitools.client; + +import org.openapitools.client.model.Order; +import org.openapitools.client.model.SpecialModelName; + +import java.lang.Exception; +import java.util.Date; +import java.util.TimeZone; +import java.text.SimpleDateFormat; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; + +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; + +public class JSONTest { + JSON json = null; + Order order = null; + + @BeforeEach + public void setup() { + json = new JSON(); + order = new Order(); + } + + @Test + public void testDefaultDate() throws Exception { + final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + final String dateStr = "2015-11-07T14:11:05.267Z"; + order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime::from)); + + String str = json.getContext(null).writeValueAsString(order); + Order o = json.getContext(null).readValue(str, Order.class); + assertEquals(dateStr, dateFormat.format(o.getShipDate())); + } + + @Test + public void testRFC3339DateFormatDate() throws Exception { + { + String dateStr = "2011-01-18 00:00:00.0Z"; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S'Z'"); + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + Date date = sdf.parse(dateStr); + + RFC3339DateFormat df = new RFC3339DateFormat(); + StringBuffer sb = new StringBuffer(); + String s = df.format(date); + System.out.println("DATE: " + s); + assertEquals("2011-01-18T00:00:00.000+00:00", s); + } + { + String dateStr = "2011-01-18 00:00:00.0"; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S"); + sdf.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles")); + Date date = sdf.parse(dateStr); + + RFC3339DateFormat df = new RFC3339DateFormat(); + StringBuffer sb = new StringBuffer(); + String s = df.format(date); + assertEquals("2011-01-18T08:00:00.000+00:00", s); + } + } + + @Test + public void testCustomDate() throws Exception { + final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2")); + final String dateStr = "2015-11-07T14:11:05-02:00"; + order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime::from)); + + String str = json.getContext(null).writeValueAsString(order); + Order o = json.getContext(null).readValue(str, Order.class); + assertEquals(dateStr, dateFormat.format(o.getShipDate())); + } + + /** + * Validate a schema with special characters can be deserialized. + */ + @Test + public void testSchemaWithSpecialCharacters() throws Exception { + String str = "{ \"$special[property.name]\": 12345 }"; + // The name of the OpenAPI schema is '_special_model.name_'. + // After sanitization rules are applied the name of the class is 'SpecialModelName'. + // The class deserialization should be successful because + // of the @JsonSubTypes annotation. + SpecialModelName o = json.getContext(null).readValue(str, SpecialModelName.class); + assertNotNull(o); + assertEquals((long)12345, (long)o.get$SpecialPropertyName()); + } +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java new file mode 100644 index 000000000000..746794d96876 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.Client; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AnotherFakeApi + */ +public class AnotherFakeApiTest { + + private final AnotherFakeApi api = new AnotherFakeApi(); + + /** + * To test special tags + * + * To test special tags and operation ID starting with number + * + * @throws ApiException if the Api call fails + */ + @Test + public void call123testSpecialTagsTest() throws ApiException { + //Client client = null; + //Client response = api.call123testSpecialTags(client); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 000000000000..248dbfc04553 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,45 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.InlineResponseDefault; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DefaultApi + */ +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + /** + * @throws ApiException if the Api call fails + */ + @Test + public void fooGetTest() throws ApiException { + //InlineResponseDefault response = api.fooGet(); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/FakeApiTest.java new file mode 100644 index 000000000000..99ec8629a504 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -0,0 +1,271 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import java.math.BigDecimal; +import org.openapitools.client.model.Client; +import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.User; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FakeApi + */ +public class FakeApiTest { + + private final FakeApi api = new FakeApi(); + + /** + * Health check endpoint + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeHealthGetTest() throws ApiException { + //HealthCheckResult response = api.fakeHealthGet(); + // TODO: test validations + } + + /** + * Test serialization of outer boolean types + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterBooleanSerializeTest() throws ApiException { + //Boolean body = null; + //Boolean response = api.fakeOuterBooleanSerialize(body); + // TODO: test validations + } + + /** + * Test serialization of object with outer number type + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterCompositeSerializeTest() throws ApiException { + //OuterComposite outerComposite = null; + //OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + // TODO: test validations + } + + /** + * Test serialization of outer number types + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterNumberSerializeTest() throws ApiException { + //BigDecimal body = null; + //BigDecimal response = api.fakeOuterNumberSerialize(body); + // TODO: test validations + } + + /** + * Test serialization of outer string types + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterStringSerializeTest() throws ApiException { + //String body = null; + //String response = api.fakeOuterStringSerialize(body); + // TODO: test validations + } + + /** + * Array of Enums + * + * @throws ApiException if the Api call fails + */ + @Test + public void getArrayOfEnumsTest() throws ApiException { + //List response = api.getArrayOfEnums(); + // TODO: test validations + } + + /** + * For this test, the body for this request much reference a schema named `File`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void testBodyWithFileSchemaTest() throws ApiException { + //FileSchemaTestClass fileSchemaTestClass = null; + //api.testBodyWithFileSchema(fileSchemaTestClass); + // TODO: test validations + } + + /** + * @throws ApiException if the Api call fails + */ + @Test + public void testBodyWithQueryParamsTest() throws ApiException { + //String query = null; + //User user = null; + //api.testBodyWithQueryParams(query, user); + // TODO: test validations + } + + /** + * To test \"client\" model + * + * To test \"client\" model + * + * @throws ApiException if the Api call fails + */ + @Test + public void testClientModelTest() throws ApiException { + //Client client = null; + //Client response = api.testClientModel(client); + // TODO: test validations + } + + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @throws ApiException if the Api call fails + */ + @Test + public void testEndpointParametersTest() throws ApiException { + //BigDecimal number = null; + //Double _double = null; + //String patternWithoutDelimiter = null; + //byte[] _byte = null; + //Integer integer = null; + //Integer int32 = null; + //Long int64 = null; + //Float _float = null; + //String string = null; + //File binary = null; + //LocalDate date = null; + //OffsetDateTime dateTime = null; + //String password = null; + //String paramCallback = null; + //api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + // TODO: test validations + } + + /** + * To test enum parameters + * + * To test enum parameters + * + * @throws ApiException if the Api call fails + */ + @Test + public void testEnumParametersTest() throws ApiException { + //List enumHeaderStringArray = null; + //String enumHeaderString = null; + //List enumQueryStringArray = null; + //String enumQueryString = null; + //Integer enumQueryInteger = null; + //Double enumQueryDouble = null; + //List enumFormStringArray = null; + //String enumFormString = null; + //api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + // TODO: test validations + } + + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testGroupParametersTest() throws ApiException { + //Integer requiredStringGroup = null; + //Boolean requiredBooleanGroup = null; + //Long requiredInt64Group = null; + //Integer stringGroup = null; + //Boolean booleanGroup = null; + //Long int64Group = null; + //api.testGroupParameters() + // .requiredStringGroup(requiredStringGroup) + // .requiredBooleanGroup(requiredBooleanGroup) + // .requiredInt64Group(requiredInt64Group) + // .stringGroup(stringGroup) + // .booleanGroup(booleanGroup) + // .int64Group(int64Group) + // .execute(); + // TODO: test validations + } + + /** + * test inline additionalProperties + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() throws ApiException { + //Map requestBody = null; + //api.testInlineAdditionalProperties(requestBody); + // TODO: test validations + } + + /** + * test json serialization of form data + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void testJsonFormDataTest() throws ApiException { + //String param = null; + //String param2 = null; + //api.testJsonFormData(param, param2); + // TODO: test validations + } + + /** + * To test the collection format in query parameters + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + //List pipe = null; + //List ioutil = null; + //List http = null; + //List url = null; + //List context = null; + //api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java new file mode 100644 index 000000000000..92a40d23900a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.Client; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FakeClassnameTags123Api + */ +public class FakeClassnameTags123ApiTest { + + private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); + + /** + * To test class name in snake case + * + * To test class name in snake case + * + * @throws ApiException if the Api call fails + */ + @Test + public void testClassnameTest() throws ApiException { + //Client client = null; + //Client response = api.testClassname(client); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/PetApiTest.java new file mode 100644 index 000000000000..9c61bba29e36 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -0,0 +1,224 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import java.io.File; +import org.openapitools.client.model.*; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; + +/** + * API tests for PetApi + */ +public class PetApiTest { + + private final PetApi api = new PetApi(); + private final long petId = 5638l; + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void addPetTest() throws ApiException { + // add pet + Pet body = new Pet(); + body.setId(petId); + body.setName("jersey2 java8 pet"); + Category category = new Category(); + category.setId(petId); + category.setName("jersey2 java8 category"); + body.setCategory(category); + body.setStatus(Pet.StatusEnum.AVAILABLE); + body.setPhotoUrls(Arrays.asList("A", "B", "C")); + Tag tag = new Tag(); + tag.setId(petId); + tag.setName("jersey2 java8 tag"); + body.setTags(Arrays.asList(tag)); + + api.addPet(body); + + //get pet by ID + Pet result = api.getPetById(petId); + Assertions.assertEquals(result.getId(), body.getId()); + Assertions.assertEquals(result.getCategory(), category); + Assertions.assertEquals(result.getName(), body.getName()); + Assertions.assertEquals(result.getPhotoUrls(), body.getPhotoUrls()); + Assertions.assertEquals(result.getStatus(), body.getStatus()); + Assertions.assertEquals(result.getTags(), body.getTags()); + + // update pet + api.updatePetWithForm(petId, "jersey2 java8 pet 2", "sold"); + + //get pet by ID + Pet result2 = api.getPetById(petId); + Assertions.assertEquals(result2.getId(), body.getId()); + Assertions.assertEquals(result2.getCategory(), category); + Assertions.assertEquals(result2.getName(), "jersey2 java8 pet 2"); + Assertions.assertEquals(result2.getPhotoUrls(), body.getPhotoUrls()); + Assertions.assertEquals(result2.getStatus(), Pet.StatusEnum.SOLD); + Assertions.assertEquals(result2.getTags(), body.getTags()); + + // delete pet + api.deletePet(petId, "empty api key"); + + try { + Pet result3 = api.getPetById(petId); + Assertions.assertEquals(false, true); + } catch (ApiException e) { +// System.err.println("Exception when calling PetApi#getPetById"); +// System.err.println("Status code: " + e.getCode()); +// System.err.println("Reason: " + e.getResponseBody()); +// System.err.println("Response headers: " + e.getResponseHeaders()); + + Assertions.assertEquals(e.getCode(), 404); + Assertions.assertEquals(e.getResponseBody(), "{\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}"); + + } + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deletePetTest() throws ApiException { + //Long petId = null; + //String apiKey = null; + //api.deletePet(petId, apiKey); + // TODO: test validations + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException if the Api call fails + */ + @Test + public void findPetsByStatusTest() throws ApiException { + //List status = null; + //List response = api.findPetsByStatus(status); + // TODO: test validations + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException if the Api call fails + */ + @Test + public void findPetsByTagsTest() throws ApiException { + //List tags = null; + //List response = api.findPetsByTags(tags); + // TODO: test validations + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPetByIdTest() throws ApiException { + //Long petId = null; + //Pet response = api.getPetById(petId); + // TODO: test validations + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void updatePetTest() throws ApiException { + //Pet pet = null; + //api.updatePet(pet); + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void updatePetWithFormTest() throws ApiException { + //Long petId = null; + //String name = null; + //String status = null; + //api.updatePetWithForm(petId, name, status); + // TODO: test validations + } + + /** + * uploads an image + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadFileTest() throws ApiException { + //Long petId = null; + //String additionalMetadata = null; + //File _file = null; + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + // TODO: test validations + } + + /** + * uploads an image (required) + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws ApiException { + //Long petId = null; + //File requiredFile = null; + //String additionalMetadata = null; + //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java new file mode 100644 index 000000000000..38f008c16cdb --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -0,0 +1,91 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.Order; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for StoreApi + */ +public class StoreApiTest { + + private final StoreApi api = new StoreApi(); + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrderTest() throws ApiException { + //String orderId = null; + //api.deleteOrder(orderId); + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException if the Api call fails + */ + @Test + public void getInventoryTest() throws ApiException { + //Map response = api.getInventory(); + // TODO: test validations + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderByIdTest() throws ApiException { + //Long orderId = null; + //Order response = api.getOrderById(orderId); + // TODO: test validations + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + //Order order = null; + //Order response = api.placeOrder(order); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/UserApiTest.java new file mode 100644 index 000000000000..358763cb9be0 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -0,0 +1,150 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import java.time.OffsetDateTime; +import org.openapitools.client.model.User; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UserApi + */ +public class UserApiTest { + + private final UserApi api = new UserApi(); + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserTest() throws ApiException { + //User user = null; + //api.createUser(user); + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() throws ApiException { + //List user = null; + //api.createUsersWithArrayInput(user); + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUsersWithListInputTest() throws ApiException { + //List user = null; + //api.createUsersWithListInput(user); + // TODO: test validations + } + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserTest() throws ApiException { + //String username = null; + //api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getUserByNameTest() throws ApiException { + //String username = null; + //User response = api.getUserByName(username); + // TODO: test validations + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void loginUserTest() throws ApiException { + //String username = null; + //String password = null; + //String response = api.loginUser(username, password); + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void logoutUserTest() throws ApiException { + //api.logoutUser(); + // TODO: test validations + } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + //String username = null; + //User user = null; + //api.updateUser(username, user); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 000000000000..635c50f435e6 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AdditionalPropertiesClass + */ +public class AdditionalPropertiesClassTest { + private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); + + /** + * Model tests for AdditionalPropertiesClass + */ + @Test + public void testAdditionalPropertiesClass() { + // TODO: test AdditionalPropertiesClass + } + + /** + * Test the property 'mapProperty' + */ + @Test + public void mapPropertyTest() { + // TODO: test mapProperty + } + + /** + * Test the property 'mapOfMapProperty' + */ + @Test + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty + } + + /** + * Test the property 'anytype1' + */ + @Test + public void anytype1Test() { + // TODO: test anytype1 + } + + /** + * Test the property 'mapWithUndeclaredPropertiesAnytype1' + */ + @Test + public void mapWithUndeclaredPropertiesAnytype1Test() { + // TODO: test mapWithUndeclaredPropertiesAnytype1 + } + + /** + * Test the property 'mapWithUndeclaredPropertiesAnytype2' + */ + @Test + public void mapWithUndeclaredPropertiesAnytype2Test() { + // TODO: test mapWithUndeclaredPropertiesAnytype2 + } + + /** + * Test the property 'mapWithUndeclaredPropertiesAnytype3' + */ + @Test + public void mapWithUndeclaredPropertiesAnytype3Test() { + // TODO: test mapWithUndeclaredPropertiesAnytype3 + } + + /** + * Test the property 'emptyMap' + */ + @Test + public void emptyMapTest() { + // TODO: test emptyMap + } + + /** + * Test the property 'mapWithUndeclaredPropertiesString' + */ + @Test + public void mapWithUndeclaredPropertiesStringTest() { + // TODO: test mapWithUndeclaredPropertiesString + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AnimalTest.java new file mode 100644 index 000000000000..84cc827725b4 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Cat; +import org.openapitools.client.model.Dog; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Animal + */ +public class AnimalTest { + private final Animal model = new Animal(); + + /** + * Model tests for Animal + */ + @Test + public void testAnimal() { + // TODO: test Animal + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AppleReqTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AppleReqTest.java new file mode 100644 index 000000000000..436f436eff06 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AppleReqTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AppleReq + */ +public class AppleReqTest { + private final AppleReq model = new AppleReq(); + + /** + * Model tests for AppleReq + */ + @Test + public void testAppleReq() { + // TODO: test AppleReq + } + + /** + * Test the property 'cultivar' + */ + @Test + public void cultivarTest() { + // TODO: test cultivar + } + + /** + * Test the property 'mealy' + */ + @Test + public void mealyTest() { + // TODO: test mealy + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AppleTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AppleTest.java new file mode 100644 index 000000000000..a0dfa4507a5f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/AppleTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Apple + */ +public class AppleTest { + private final Apple model = new Apple(); + + /** + * Model tests for Apple + */ + @Test + public void testApple() { + // TODO: test Apple + } + + /** + * Test the property 'cultivar' + */ + @Test + public void cultivarTest() { + // TODO: test cultivar + } + + /** + * Test the property 'origin' + */ + @Test + public void originTest() { + // TODO: test origin + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 000000000000..843755edbbef --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ArrayOfArrayOfNumberOnly + */ +public class ArrayOfArrayOfNumberOnlyTest { + private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); + + /** + * Model tests for ArrayOfArrayOfNumberOnly + */ + @Test + public void testArrayOfArrayOfNumberOnly() { + // TODO: test ArrayOfArrayOfNumberOnly + } + + /** + * Test the property 'arrayArrayNumber' + */ + @Test + public void arrayArrayNumberTest() { + // TODO: test arrayArrayNumber + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 000000000000..7c4c38a6e064 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ArrayOfNumberOnly + */ +public class ArrayOfNumberOnlyTest { + private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); + + /** + * Model tests for ArrayOfNumberOnly + */ + @Test + public void testArrayOfNumberOnly() { + // TODO: test ArrayOfNumberOnly + } + + /** + * Test the property 'arrayNumber' + */ + @Test + public void arrayNumberTest() { + // TODO: test arrayNumber + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayTestTest.java new file mode 100644 index 000000000000..58d78aa4a5cd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ReadOnlyFirst; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ArrayTest + */ +public class ArrayTestTest { + private final ArrayTest model = new ArrayTest(); + + /** + * Model tests for ArrayTest + */ + @Test + public void testArrayTest() { + // TODO: test ArrayTest + } + + /** + * Test the property 'arrayOfString' + */ + @Test + public void arrayOfStringTest() { + // TODO: test arrayOfString + } + + /** + * Test the property 'arrayArrayOfInteger' + */ + @Test + public void arrayArrayOfIntegerTest() { + // TODO: test arrayArrayOfInteger + } + + /** + * Test the property 'arrayArrayOfModel' + */ + @Test + public void arrayArrayOfModelTest() { + // TODO: test arrayArrayOfModel + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BananaReqTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BananaReqTest.java new file mode 100644 index 000000000000..675128f9b9d9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BananaReqTest.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for BananaReq + */ +public class BananaReqTest { + private final BananaReq model = new BananaReq(); + + /** + * Model tests for BananaReq + */ + @Test + public void testBananaReq() { + // TODO: test BananaReq + } + + /** + * Test the property 'lengthCm' + */ + @Test + public void lengthCmTest() { + // TODO: test lengthCm + } + + /** + * Test the property 'sweet' + */ + @Test + public void sweetTest() { + // TODO: test sweet + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BananaTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BananaTest.java new file mode 100644 index 000000000000..60855139ce79 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BananaTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Banana + */ +public class BananaTest { + private final Banana model = new Banana(); + + /** + * Model tests for Banana + */ + @Test + public void testBanana() { + // TODO: test Banana + } + + /** + * Test the property 'lengthCm' + */ + @Test + public void lengthCmTest() { + // TODO: test lengthCm + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BasquePigTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BasquePigTest.java new file mode 100644 index 000000000000..f08be5450b77 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/BasquePigTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for BasquePig + */ +public class BasquePigTest { + private final BasquePig model = new BasquePig(); + + /** + * Model tests for BasquePig + */ + @Test + public void testBasquePig() { + // TODO: test BasquePig + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CapitalizationTest.java new file mode 100644 index 000000000000..f36daac40c15 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -0,0 +1,90 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Capitalization + */ +public class CapitalizationTest { + private final Capitalization model = new Capitalization(); + + /** + * Model tests for Capitalization + */ + @Test + public void testCapitalization() { + // TODO: test Capitalization + } + + /** + * Test the property 'smallCamel' + */ + @Test + public void smallCamelTest() { + // TODO: test smallCamel + } + + /** + * Test the property 'capitalCamel' + */ + @Test + public void capitalCamelTest() { + // TODO: test capitalCamel + } + + /** + * Test the property 'smallSnake' + */ + @Test + public void smallSnakeTest() { + // TODO: test smallSnake + } + + /** + * Test the property 'capitalSnake' + */ + @Test + public void capitalSnakeTest() { + // TODO: test capitalSnake + } + + /** + * Test the property 'scAETHFlowPoints' + */ + @Test + public void scAETHFlowPointsTest() { + // TODO: test scAETHFlowPoints + } + + /** + * Test the property 'ATT_NAME' + */ + @Test + public void ATT_NAMETest() { + // TODO: test ATT_NAME + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatAllOfTest.java new file mode 100644 index 000000000000..a0731738b24d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CatAllOf + */ +public class CatAllOfTest { + private final CatAllOf model = new CatAllOf(); + + /** + * Model tests for CatAllOf + */ + @Test + public void testCatAllOf() { + // TODO: test CatAllOf + } + + /** + * Test the property 'declawed' + */ + @Test + public void declawedTest() { + // TODO: test declawed + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatTest.java new file mode 100644 index 000000000000..43055fd2be03 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatTest.java @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Cat + */ +public class CatTest { + private final Cat model = new Cat(); + + /** + * Model tests for Cat + */ + @Test + public void testCat() { + // TODO: test Cat + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'declawed' + */ + @Test + public void declawedTest() { + // TODO: test declawed + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 000000000000..8ad0eee05e0a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Category + */ +public class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java new file mode 100644 index 000000000000..f2820f8cd35d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Set; +import java.util.HashSet; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildCatAllOf + */ +public class ChildCatAllOfTest { + private final ChildCatAllOf model = new ChildCatAllOf(); + + /** + * Model tests for ChildCatAllOf + */ + @Test + public void testChildCatAllOf() { + // TODO: test ChildCatAllOf + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'petType' + */ + @Test + public void petTypeTest() { + // TODO: test petType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatTest.java new file mode 100644 index 000000000000..82ff19a5d767 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatTest.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildCatAllOf; +import org.openapitools.client.model.ParentPet; +import java.util.Set; +import java.util.HashSet; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildCat + */ +public class ChildCatTest { + private final ChildCat model = new ChildCat(); + + /** + * Model tests for ChildCat + */ + @Test + public void testChildCat() { + // TODO: test ChildCat + } + + /** + * Test the property 'petType' + */ + @Test + public void petTypeTest() { + // TODO: test petType + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ClassModelTest.java new file mode 100644 index 000000000000..d60c8d4aaabb --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ClassModel + */ +public class ClassModelTest { + private final ClassModel model = new ClassModel(); + + /** + * Model tests for ClassModel + */ + @Test + public void testClassModel() { + // TODO: test ClassModel + } + + /** + * Test the property 'propertyClass' + */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ClientTest.java new file mode 100644 index 000000000000..f6759ee68279 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ClientTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Client + */ +public class ClientTest { + private final Client model = new Client(); + + /** + * Model tests for Client + */ + @Test + public void testClient() { + // TODO: test Client + } + + /** + * Test the property 'client' + */ + @Test + public void clientTest() { + // TODO: test client + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java new file mode 100644 index 000000000000..685c0829fa1d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.QuadrilateralInterface; +import org.openapitools.client.model.ShapeInterface; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ComplexQuadrilateral + */ +public class ComplexQuadrilateralTest { + private final ComplexQuadrilateral model = new ComplexQuadrilateral(); + + /** + * Model tests for ComplexQuadrilateral + */ + @Test + public void testComplexQuadrilateral() { + // TODO: test ComplexQuadrilateral + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DanishPigTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DanishPigTest.java new file mode 100644 index 000000000000..2a5ade5f5452 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DanishPigTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DanishPig + */ +public class DanishPigTest { + private final DanishPig model = new DanishPig(); + + /** + * Model tests for DanishPig + */ + @Test + public void testDanishPig() { + // TODO: test DanishPig + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java new file mode 100644 index 000000000000..56a80875062c --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeprecatedObject + */ +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); + + /** + * Model tests for DeprecatedObject + */ + @Test + public void testDeprecatedObject() { + // TODO: test DeprecatedObject + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogAllOfTest.java new file mode 100644 index 000000000000..7e139a4d950e --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DogAllOf + */ +public class DogAllOfTest { + private final DogAllOf model = new DogAllOf(); + + /** + * Model tests for DogAllOf + */ + @Test + public void testDogAllOf() { + // TODO: test DogAllOf + } + + /** + * Test the property 'breed' + */ + @Test + public void breedTest() { + // TODO: test breed + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogTest.java new file mode 100644 index 000000000000..e6f849f7f8c8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogTest.java @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Dog + */ +public class DogTest { + private final Dog model = new Dog(); + + /** + * Model tests for Dog + */ + @Test + public void testDog() { + // TODO: test Dog + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'breed' + */ + @Test + public void breedTest() { + // TODO: test breed + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DrawingTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DrawingTest.java new file mode 100644 index 000000000000..0b00214330f8 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DrawingTest.java @@ -0,0 +1,84 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Fruit; +import org.openapitools.client.model.NullableShape; +import org.openapitools.client.model.Shape; +import org.openapitools.client.model.ShapeOrNull; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Drawing + */ +public class DrawingTest { + private final Drawing model = new Drawing(); + + /** + * Model tests for Drawing + */ + @Test + public void testDrawing() { + // TODO: test Drawing + } + + /** + * Test the property 'mainShape' + */ + @Test + public void mainShapeTest() { + // TODO: test mainShape + } + + /** + * Test the property 'shapeOrNull' + */ + @Test + public void shapeOrNullTest() { + // TODO: test shapeOrNull + } + + /** + * Test the property 'nullableShape' + */ + @Test + public void nullableShapeTest() { + // TODO: test nullableShape + } + + /** + * Test the property 'shapes' + */ + @Test + public void shapesTest() { + // TODO: test shapes + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumArraysTest.java new file mode 100644 index 000000000000..cfb1a337de90 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EnumArrays + */ +public class EnumArraysTest { + private final EnumArrays model = new EnumArrays(); + + /** + * Model tests for EnumArrays + */ + @Test + public void testEnumArrays() { + // TODO: test EnumArrays + } + + /** + * Test the property 'justSymbol' + */ + @Test + public void justSymbolTest() { + // TODO: test justSymbol + } + + /** + * Test the property 'arrayEnum' + */ + @Test + public void arrayEnumTest() { + // TODO: test arrayEnum + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumClassTest.java new file mode 100644 index 000000000000..50fc9572fcdd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EnumClass + */ +public class EnumClassTest { + /** + * Model tests for EnumClass + */ + @Test + public void testEnumClass() { + // TODO: test EnumClass + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumTestTest.java new file mode 100644 index 000000000000..3fe8f8bce99d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -0,0 +1,122 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EnumTest + */ +public class EnumTestTest { + private final EnumTest model = new EnumTest(); + + /** + * Model tests for EnumTest + */ + @Test + public void testEnumTest() { + // TODO: test EnumTest + } + + /** + * Test the property 'enumString' + */ + @Test + public void enumStringTest() { + // TODO: test enumString + } + + /** + * Test the property 'enumStringRequired' + */ + @Test + public void enumStringRequiredTest() { + // TODO: test enumStringRequired + } + + /** + * Test the property 'enumInteger' + */ + @Test + public void enumIntegerTest() { + // TODO: test enumInteger + } + + /** + * Test the property 'enumIntegerOnly' + */ + @Test + public void enumIntegerOnlyTest() { + // TODO: test enumIntegerOnly + } + + /** + * Test the property 'enumNumber' + */ + @Test + public void enumNumberTest() { + // TODO: test enumNumber + } + + /** + * Test the property 'outerEnum' + */ + @Test + public void outerEnumTest() { + // TODO: test outerEnum + } + + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java new file mode 100644 index 000000000000..c5236c89e195 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ShapeInterface; +import org.openapitools.client.model.TriangleInterface; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EquilateralTriangle + */ +public class EquilateralTriangleTest { + private final EquilateralTriangle model = new EquilateralTriangle(); + + /** + * Model tests for EquilateralTriangle + */ + @Test + public void testEquilateralTriangle() { + // TODO: test EquilateralTriangle + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java new file mode 100644 index 000000000000..aad267bb2416 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ModelFile; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FileSchemaTestClass + */ +public class FileSchemaTestClassTest { + private final FileSchemaTestClass model = new FileSchemaTestClass(); + + /** + * Model tests for FileSchemaTestClass + */ + @Test + public void testFileSchemaTestClass() { + // TODO: test FileSchemaTestClass + } + + /** + * Test the property '_file' + */ + @Test + public void _fileTest() { + // TODO: test _file + } + + /** + * Test the property 'files' + */ + @Test + public void filesTest() { + // TODO: test files + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 000000000000..4a1f200121eb --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Foo + */ +public class FooTest { + private final Foo model = new Foo(); + + /** + * Model tests for Foo + */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FormatTestTest.java new file mode 100644 index 000000000000..68a894af142b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -0,0 +1,175 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FormatTest + */ +public class FormatTestTest { + private final FormatTest model = new FormatTest(); + + /** + * Model tests for FormatTest + */ + @Test + public void testFormatTest() { + // TODO: test FormatTest + } + + /** + * Test the property 'integer' + */ + @Test + public void integerTest() { + // TODO: test integer + } + + /** + * Test the property 'int32' + */ + @Test + public void int32Test() { + // TODO: test int32 + } + + /** + * Test the property 'int64' + */ + @Test + public void int64Test() { + // TODO: test int64 + } + + /** + * Test the property 'number' + */ + @Test + public void numberTest() { + // TODO: test number + } + + /** + * Test the property '_float' + */ + @Test + public void _floatTest() { + // TODO: test _float + } + + /** + * Test the property '_double' + */ + @Test + public void _doubleTest() { + // TODO: test _double + } + + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + + /** + * Test the property '_byte' + */ + @Test + public void _byteTest() { + // TODO: test _byte + } + + /** + * Test the property 'binary' + */ + @Test + public void binaryTest() { + // TODO: test binary + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + + /** + * Test the property 'dateTime' + */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** + * Test the property 'uuid' + */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'patternWithDigits' + */ + @Test + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FruitReqTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FruitReqTest.java new file mode 100644 index 000000000000..1e1dfda43c9d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FruitReqTest.java @@ -0,0 +1,77 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.client.model.AppleReq; +import org.openapitools.client.model.BananaReq; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FruitReq + */ +public class FruitReqTest { + private final FruitReq model = new FruitReq(); + + /** + * Model tests for FruitReq + */ + @Test + public void testFruitReq() { + // TODO: test FruitReq + } + + /** + * Test the property 'cultivar' + */ + @Test + public void cultivarTest() { + // TODO: test cultivar + } + + /** + * Test the property 'mealy' + */ + @Test + public void mealyTest() { + // TODO: test mealy + } + + /** + * Test the property 'lengthCm' + */ + @Test + public void lengthCmTest() { + // TODO: test lengthCm + } + + /** + * Test the property 'sweet' + */ + @Test + public void sweetTest() { + // TODO: test sweet + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FruitTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FruitTest.java new file mode 100644 index 000000000000..5cb1cf300bb4 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/FruitTest.java @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.client.model.Apple; +import org.openapitools.client.model.Banana; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Fruit + */ +public class FruitTest { + private final Fruit model = new Fruit(); + + /** + * Model tests for Fruit + */ + @Test + public void testFruit() { + // TODO: test Fruit + } + + /** + * Test the property 'cultivar' + */ + @Test + public void cultivarTest() { + // TODO: test cultivar + } + + /** + * Test the property 'origin' + */ + @Test + public void originTest() { + // TODO: test origin + } + + /** + * Test the property 'lengthCm' + */ + @Test + public void lengthCmTest() { + // TODO: test lengthCm + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/GmFruitTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/GmFruitTest.java new file mode 100644 index 000000000000..5b9e5aba2c19 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/GmFruitTest.java @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.client.model.Apple; +import org.openapitools.client.model.Banana; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GmFruit + */ +public class GmFruitTest { + private final GmFruit model = new GmFruit(); + + /** + * Model tests for GmFruit + */ + @Test + public void testGmFruit() { + // TODO: test GmFruit + } + + /** + * Test the property 'cultivar' + */ + @Test + public void cultivarTest() { + // TODO: test cultivar + } + + /** + * Test the property 'origin' + */ + @Test + public void originTest() { + // TODO: test origin + } + + /** + * Test the property 'lengthCm' + */ + @Test + public void lengthCmTest() { + // TODO: test lengthCm + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java new file mode 100644 index 000000000000..b6c369b5e405 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java @@ -0,0 +1,55 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildCat; +import org.openapitools.client.model.ParentPet; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GrandparentAnimal + */ +public class GrandparentAnimalTest { + private final GrandparentAnimal model = new GrandparentAnimal(); + + /** + * Model tests for GrandparentAnimal + */ + @Test + public void testGrandparentAnimal() { + // TODO: test GrandparentAnimal + } + + /** + * Test the property 'petType' + */ + @Test + public void petTypeTest() { + // TODO: test petType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 000000000000..2102a335f53b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for HasOnlyReadOnly + */ +public class HasOnlyReadOnlyTest { + private final HasOnlyReadOnly model = new HasOnlyReadOnly(); + + /** + * Model tests for HasOnlyReadOnly + */ + @Test + public void testHasOnlyReadOnly() { + // TODO: test HasOnlyReadOnly + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + + /** + * Test the property 'foo' + */ + @Test + public void fooTest() { + // TODO: test foo + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 000000000000..db11384e8c41 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,54 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java new file mode 100644 index 000000000000..a8c56aa226ff --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Foo; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InlineResponseDefault + */ +public class InlineResponseDefaultTest { + private final InlineResponseDefault model = new InlineResponseDefault(); + + /** + * Model tests for InlineResponseDefault + */ + @Test + public void testInlineResponseDefault() { + // TODO: test InlineResponseDefault + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java new file mode 100644 index 000000000000..fc5cf03cfe4b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ShapeInterface; +import org.openapitools.client.model.TriangleInterface; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for IsoscelesTriangle + */ +public class IsoscelesTriangleTest { + private final IsoscelesTriangle model = new IsoscelesTriangle(); + + /** + * Model tests for IsoscelesTriangle + */ + @Test + public void testIsoscelesTriangle() { + // TODO: test IsoscelesTriangle + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MammalTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MammalTest.java new file mode 100644 index 000000000000..209262fde520 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MammalTest.java @@ -0,0 +1,133 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.JSON; +import org.openapitools.client.model.Pig; +import org.openapitools.client.model.Whale; +import org.openapitools.client.model.Zebra; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Mammal + */ +public class MammalTest { + private final Mammal model = new Mammal(); + + /** + * Model tests for Mammal + */ + @Test + public void testMammal() throws Exception { + Mammal m = new Mammal(); + Zebra z = new Zebra(); + z.setType(Zebra.TypeEnum.MOUNTAIN); + z.setClassName("zebra"); + m.setActualInstance(z); + Assertions.assertEquals(JSON.getDefault().getMapper().writeValueAsString(m), "{\"type\":\"mountain\",\"className\":\"zebra\"}"); + } + + /** + * Model tests for getActualInstanceRecursively + */ + @Test + public void testGetActualInstanceRecursively() throws Exception { + Mammal m = new Mammal(); + Pig p = new Pig(); + DanishPig dp = new DanishPig(); + dp.setClassName("danish_pig"); + p.setActualInstance(dp); + m.setActualInstance(p); + Assertions.assertTrue(m.getActualInstanceRecursively() instanceof DanishPig); + + Pig p2 = new Pig(); + m.setActualInstance(p2); + Assertions.assertEquals(m.getActualInstanceRecursively(), null); + } + + /** + * Test the property 'hasBaleen' + */ + @Test + public void hasBaleenTest() { + // TODO: test hasBaleen + } + + /** + * Test the property 'hasTeeth' + */ + @Test + public void hasTeethTest() { + // TODO: test hasTeeth + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test code sample + */ + @Test + public void codeSampleTest() { + Mammal exampleMammal = new Mammal(); + + // create a new Pig + Pig examplePig = new Pig(); + // set Mammal to Pig + exampleMammal.setActualInstance(examplePig); + // to get back the Pig set earlier + Pig testPig = (Pig) exampleMammal.getActualInstance(); + + // create a new Whale + Whale exampleWhale = new Whale(); + // set Mammal to Whale + exampleMammal.setActualInstance(exampleWhale); + // to get back the Whale set earlier + Whale testWhale = (Whale) exampleMammal.getActualInstance(); + + // create a new Zebra + Zebra exampleZebra = new Zebra(); + // set Mammal to Zebra + exampleMammal.setActualInstance(exampleZebra); + // to get back the Zebra set earlier + Zebra testZebra = (Zebra) exampleMammal.getActualInstance(); + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MapTestTest.java new file mode 100644 index 000000000000..b8483619edfb --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -0,0 +1,77 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MapTest + */ +public class MapTestTest { + private final MapTest model = new MapTest(); + + /** + * Model tests for MapTest + */ + @Test + public void testMapTest() { + // TODO: test MapTest + } + + /** + * Test the property 'mapMapOfString' + */ + @Test + public void mapMapOfStringTest() { + // TODO: test mapMapOfString + } + + /** + * Test the property 'mapOfEnumString' + */ + @Test + public void mapOfEnumStringTest() { + // TODO: test mapOfEnumString + } + + /** + * Test the property 'directMap' + */ + @Test + public void directMapTest() { + // TODO: test directMap + } + + /** + * Test the property 'indirectMap' + */ + @Test + public void indirectMapTest() { + // TODO: test indirectMap + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 000000000000..a8c724138097 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,72 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.client.model.Animal; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MixedPropertiesAndAdditionalPropertiesClass + */ +public class MixedPropertiesAndAdditionalPropertiesClassTest { + private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); + + /** + * Model tests for MixedPropertiesAndAdditionalPropertiesClass + */ + @Test + public void testMixedPropertiesAndAdditionalPropertiesClass() { + // TODO: test MixedPropertiesAndAdditionalPropertiesClass + } + + /** + * Test the property 'uuid' + */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** + * Test the property 'dateTime' + */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** + * Test the property 'map' + */ + @Test + public void mapTest() { + // TODO: test map + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/Model200ResponseTest.java new file mode 100644 index 000000000000..9a98de5ff16d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Model200Response + */ +public class Model200ResponseTest { + private final Model200Response model = new Model200Response(); + + /** + * Model tests for Model200Response + */ + @Test + public void testModel200Response() { + // TODO: test Model200Response + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'propertyClass' + */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java new file mode 100644 index 000000000000..31fe5cea6c4b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelApiResponse + */ +public class ModelApiResponseTest { + private final ModelApiResponse model = new ModelApiResponse(); + + /** + * Model tests for ModelApiResponse + */ + @Test + public void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelFileTest.java new file mode 100644 index 000000000000..2fad149d668b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelFile + */ +public class ModelFileTest { + private final ModelFile model = new ModelFile(); + + /** + * Model tests for ModelFile + */ + @Test + public void testModelFile() { + // TODO: test ModelFile + } + + /** + * Test the property 'sourceURI' + */ + @Test + public void sourceURITest() { + // TODO: test sourceURI + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelListTest.java new file mode 100644 index 000000000000..3c7f35ce7291 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelList + */ +public class ModelListTest { + private final ModelList model = new ModelList(); + + /** + * Model tests for ModelList + */ + @Test + public void testModelList() { + // TODO: test ModelList + } + + /** + * Test the property '_123list' + */ + @Test + public void _123listTest() { + // TODO: test _123list + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelReturnTest.java new file mode 100644 index 000000000000..0d3f00e6fc46 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelReturn + */ +public class ModelReturnTest { + private final ModelReturn model = new ModelReturn(); + + /** + * Model tests for ModelReturn + */ + @Test + public void testModelReturn() { + // TODO: test ModelReturn + } + + /** + * Test the property '_return' + */ + @Test + public void _returnTest() { + // TODO: test _return + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NameTest.java new file mode 100644 index 000000000000..8a50c814697b --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NameTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Name + */ +public class NameTest { + private final Name model = new Name(); + + /** + * Model tests for Name + */ + @Test + public void testName() { + // TODO: test Name + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'snakeCase' + */ + @Test + public void snakeCaseTest() { + // TODO: test snakeCase + } + + /** + * Test the property 'property' + */ + @Test + public void propertyTest() { + // TODO: test property + } + + /** + * Test the property '_123number' + */ + @Test + public void _123numberTest() { + // TODO: test _123number + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 000000000000..fbeeed0b7624 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NullableShapeTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NullableShapeTest.java new file mode 100644 index 000000000000..9ae3eba5aa66 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NullableShapeTest.java @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NullableShape + */ +public class NullableShapeTest { + private final NullableShape model = new NullableShape(); + + /** + * Model tests for NullableShape + */ + @Test + public void testNullableShape() { + // TODO: test NullableShape + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NumberOnlyTest.java new file mode 100644 index 000000000000..c7e5efc28ccd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NumberOnly + */ +public class NumberOnlyTest { + private final NumberOnly model = new NumberOnly(); + + /** + * Model tests for NumberOnly + */ + @Test + public void testNumberOnly() { + // TODO: test NumberOnly + } + + /** + * Test the property 'justNumber' + */ + @Test + public void justNumberTest() { + // TODO: test justNumber + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java new file mode 100644 index 000000000000..1ecac2abcf28 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ObjectWithDeprecatedFields + */ +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); + + /** + * Model tests for ObjectWithDeprecatedFields + */ + @Test + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields + } + + /** + * Test the property 'uuid' + */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'deprecatedRef' + */ + @Test + public void deprecatedRefTest() { + // TODO: test deprecatedRef + } + + /** + * Test the property 'bars' + */ + @Test + public void barsTest() { + // TODO: test bars + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OrderTest.java new file mode 100644 index 000000000000..22743d42dd48 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OrderTest.java @@ -0,0 +1,91 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Order + */ +public class OrderTest { + private final Order model = new Order(); + + /** + * Model tests for Order + */ + @Test + public void testOrder() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'petId' + */ + @Test + public void petIdTest() { + // TODO: test petId + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipDate' + */ + @Test + public void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'complete' + */ + @Test + public void completeTest() { + // TODO: test complete + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterCompositeTest.java new file mode 100644 index 000000000000..0eab13de6999 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -0,0 +1,67 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OuterComposite + */ +public class OuterCompositeTest { + private final OuterComposite model = new OuterComposite(); + + /** + * Model tests for OuterComposite + */ + @Test + public void testOuterComposite() { + // TODO: test OuterComposite + } + + /** + * Test the property 'myNumber' + */ + @Test + public void myNumberTest() { + // TODO: test myNumber + } + + /** + * Test the property 'myString' + */ + @Test + public void myStringTest() { + // TODO: test myString + } + + /** + * Test the property 'myBoolean' + */ + @Test + public void myBooleanTest() { + // TODO: test myBoolean + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 000000000000..5e6c1ecb1587 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 000000000000..226897579ad2 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 000000000000..61330bb05eea --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumTest.java new file mode 100644 index 000000000000..052ad003478d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OuterEnum + */ +public class OuterEnumTest { + /** + * Model tests for OuterEnum + */ + @Test + public void testOuterEnum() { + // TODO: test OuterEnum + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ParentPetTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ParentPetTest.java new file mode 100644 index 000000000000..99209770aaed --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ParentPetTest.java @@ -0,0 +1,55 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildCat; +import org.openapitools.client.model.GrandparentAnimal; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ParentPet + */ +public class ParentPetTest { + private final ParentPet model = new ParentPet(); + + /** + * Model tests for ParentPet + */ + @Test + public void testParentPet() { + // TODO: test ParentPet + } + + /** + * Test the property 'petType' + */ + @Test + public void petTypeTest() { + // TODO: test petType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 000000000000..a1ebb6782c3f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Pet + */ +public class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'photoUrls' + */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/PigTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/PigTest.java new file mode 100644 index 000000000000..f3c0218c837d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/PigTest.java @@ -0,0 +1,55 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.BasquePig; +import org.openapitools.client.model.DanishPig; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Pig + */ +public class PigTest { + private final Pig model = new Pig(); + + /** + * Model tests for Pig + */ + @Test + public void testPig() { + // TODO: test Pig + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java new file mode 100644 index 000000000000..e2d81c731720 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuadrilateralInterface + */ +public class QuadrilateralInterfaceTest { + private final QuadrilateralInterface model = new QuadrilateralInterface(); + + /** + * Model tests for QuadrilateralInterface + */ + @Test + public void testQuadrilateralInterface() { + // TODO: test QuadrilateralInterface + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/QuadrilateralTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/QuadrilateralTest.java new file mode 100644 index 000000000000..54d0189f8db5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/QuadrilateralTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ComplexQuadrilateral; +import org.openapitools.client.model.SimpleQuadrilateral; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Quadrilateral + */ +public class QuadrilateralTest { + private final Quadrilateral model = new Quadrilateral(); + + /** + * Model tests for Quadrilateral + */ + @Test + public void testQuadrilateral() { + // TODO: test Quadrilateral + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java new file mode 100644 index 000000000000..86f8a92da18d --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReadOnlyFirst + */ +public class ReadOnlyFirstTest { + private final ReadOnlyFirst model = new ReadOnlyFirst(); + + /** + * Model tests for ReadOnlyFirst + */ + @Test + public void testReadOnlyFirst() { + // TODO: test ReadOnlyFirst + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + + /** + * Test the property 'baz' + */ + @Test + public void bazTest() { + // TODO: test baz + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java new file mode 100644 index 000000000000..0e96e8ba04cd --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ShapeInterface; +import org.openapitools.client.model.TriangleInterface; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ScaleneTriangle + */ +public class ScaleneTriangleTest { + private final ScaleneTriangle model = new ScaleneTriangle(); + + /** + * Model tests for ScaleneTriangle + */ + @Test + public void testScaleneTriangle() { + // TODO: test ScaleneTriangle + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java new file mode 100644 index 000000000000..fa26c0fe98ed --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ShapeInterface + */ +public class ShapeInterfaceTest { + private final ShapeInterface model = new ShapeInterface(); + + /** + * Model tests for ShapeInterface + */ + @Test + public void testShapeInterface() { + // TODO: test ShapeInterface + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java new file mode 100644 index 000000000000..dfe730ca97a9 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ShapeOrNull + */ +public class ShapeOrNullTest { + private final ShapeOrNull model = new ShapeOrNull(); + + /** + * Model tests for ShapeOrNull + */ + @Test + public void testShapeOrNull() { + // TODO: test ShapeOrNull + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeTest.java new file mode 100644 index 000000000000..8249ec7bba1a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ShapeTest.java @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Quadrilateral; +import org.openapitools.client.model.Triangle; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Shape + */ +public class ShapeTest { + private final Shape model = new Shape(); + + /** + * Model tests for Shape + */ + @Test + public void testShape() { + // TODO: test Shape + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java new file mode 100644 index 000000000000..a21fd430e4ed --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.QuadrilateralInterface; +import org.openapitools.client.model.ShapeInterface; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SimpleQuadrilateral + */ +public class SimpleQuadrilateralTest { + private final SimpleQuadrilateral model = new SimpleQuadrilateral(); + + /** + * Model tests for SimpleQuadrilateral + */ + @Test + public void testSimpleQuadrilateral() { + // TODO: test SimpleQuadrilateral + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'quadrilateralType' + */ + @Test + public void quadrilateralTypeTest() { + // TODO: test quadrilateralType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java new file mode 100644 index 000000000000..991753f718ff --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SpecialModelName + */ +public class SpecialModelNameTest { + private final SpecialModelName model = new SpecialModelName(); + + /** + * Model tests for SpecialModelName + */ + @Test + public void testSpecialModelName() { + // TODO: test SpecialModelName + } + + /** + * Test the property '$specialPropertyName' + */ + @Test + public void $specialPropertyNameTest() { + // TODO: test $specialPropertyName + } + + /** + * Test the property 'specialModelName' + */ + @Test + public void specialModelNameTest() { + // TODO: test specialModelName + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 000000000000..97e1aa2743a5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java new file mode 100644 index 000000000000..4fdd985d127f --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TriangleInterface + */ +public class TriangleInterfaceTest { + private final TriangleInterface model = new TriangleInterface(); + + /** + * Model tests for TriangleInterface + */ + @Test + public void testTriangleInterface() { + // TODO: test TriangleInterface + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TriangleTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TriangleTest.java new file mode 100644 index 000000000000..d1dea3a429d3 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/TriangleTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.EquilateralTriangle; +import org.openapitools.client.model.IsoscelesTriangle; +import org.openapitools.client.model.ScaleneTriangle; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Triangle + */ +public class TriangleTest { + private final Triangle model = new Triangle(); + + /** + * Model tests for Triangle + */ + @Test + public void testTriangle() { + // TODO: test Triangle + } + + /** + * Test the property 'shapeType' + */ + @Test + public void shapeTypeTest() { + // TODO: test shapeType + } + + /** + * Test the property 'triangleType' + */ + @Test + public void triangleTypeTest() { + // TODO: test triangleType + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/UserTest.java new file mode 100644 index 000000000000..dc7ea6d5e9c5 --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/UserTest.java @@ -0,0 +1,142 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for User + */ +public class UserTest { + private final User model = new User(); + + /** + * Model tests for User + */ + @Test + public void testUser() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'firstName' + */ + @Test + public void firstNameTest() { + // TODO: test firstName + } + + /** + * Test the property 'lastName' + */ + @Test + public void lastNameTest() { + // TODO: test lastName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'userStatus' + */ + @Test + public void userStatusTest() { + // TODO: test userStatus + } + + /** + * Test the property 'objectWithNoDeclaredProps' + */ + @Test + public void objectWithNoDeclaredPropsTest() { + // TODO: test objectWithNoDeclaredProps + } + + /** + * Test the property 'objectWithNoDeclaredPropsNullable' + */ + @Test + public void objectWithNoDeclaredPropsNullableTest() { + // TODO: test objectWithNoDeclaredPropsNullable + } + + /** + * Test the property 'anyTypeProp' + */ + @Test + public void anyTypePropTest() { + // TODO: test anyTypeProp + } + + /** + * Test the property 'anyTypePropNullable' + */ + @Test + public void anyTypePropNullableTest() { + // TODO: test anyTypePropNullable + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/WhaleTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/WhaleTest.java new file mode 100644 index 000000000000..674ec1456e8a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/WhaleTest.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Whale + */ +public class WhaleTest { + private final Whale model = new Whale(); + + /** + * Model tests for Whale + */ + @Test + public void testWhale() { + // TODO: test Whale + } + + /** + * Test the property 'hasBaleen' + */ + @Test + public void hasBaleenTest() { + // TODO: test hasBaleen + } + + /** + * Test the property 'hasTeeth' + */ + @Test + public void hasTeethTest() { + // TODO: test hasTeeth + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + +} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ZebraTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ZebraTest.java new file mode 100644 index 000000000000..4bd27dc0f12a --- /dev/null +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ZebraTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.databind.type.MapType; +import com.fasterxml.jackson.databind.type.TypeFactory; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.HashMap; +import java.util.Map; + +import org.openapitools.client.JSON; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Zebra + */ +public class ZebraTest { + private final Zebra model = new Zebra(); + + /** + * Model tests for Zebra + */ + @Test + public void testZebra() { + Zebra z = new Zebra(); + z.setClassName("zebra"); + Map m = new HashMap<>(); + z.putAdditionalProperty("key1", "value1"); + z.putAdditionalProperty("key2", 12321); + z.setType(Zebra.TypeEnum.MOUNTAIN); + + JSON j = new JSON(); + try { + // serialize + Assertions.assertEquals(j.getMapper().writeValueAsString(z), "{\"type\":\"mountain\",\"className\":\"zebra\",\"key1\":\"value1\",\"key2\":12321}"); + + // deserialize + String zebraJson = "{\"type\":\"mountain\",\"className\":\"zebra\",\"key1\":\"value1\",\"key2\":12321}"; + Zebra zebraFromJson = j.getMapper().readValue(zebraJson, Zebra.class); + Assertions.assertEquals(zebraFromJson.getType(), Zebra.TypeEnum.MOUNTAIN); + Assertions.assertEquals(zebraFromJson.getClassName(), "zebra"); + Assertions.assertEquals(zebraFromJson.getAdditionalProperties().size(), 2); + Assertions.assertEquals(zebraFromJson.getAdditionalProperty("key1"), "value1"); + Assertions.assertEquals(zebraFromJson.getAdditionalProperty("key2"), 12321); + } catch (Exception ex) { + Assertions.assertEquals(true, false); // exception shouldn't be thrown + } + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + String zebraJson = "{\"type\":\"mountain\",\"className\":\"zebra\",\"key1\":\"value1\",\"key2\":12321}"; + + JSON j = new JSON(); + TypeFactory typeFactory = j.getMapper().getTypeFactory(); + MapType mapType = typeFactory.constructMapType(HashMap.class, String.class, Object.class); + try { + HashMap map = j.getMapper().readValue(zebraJson, mapType); + Assertions.assertEquals(map.get("type"), "mountain"); + + Map result = + j.getMapper().readValue(zebraJson, new TypeReference>() {}); + + Assertions.assertEquals(result.get("type"), "mountain"); + } catch (Exception ex) { + Assertions.assertEquals(true, false); // exception shouldn't be thrown + } + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + +} diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator-ignore b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator-ignore rename to samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator-ignore diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES new file mode 100644 index 000000000000..ae145903e52b --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES @@ -0,0 +1,22 @@ +README.md +docs/Category.md +docs/ModelApiResponse.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +pom.xml +src/main/java/org/openapitools/client/api/ApiException.java +src/main/java/org/openapitools/client/api/ApiExceptionMapper.java +src/main/java/org/openapitools/client/api/PetApi.java +src/main/java/org/openapitools/client/api/StoreApi.java +src/main/java/org/openapitools/client/api/UserApi.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/ModelApiResponse.java +src/main/java/org/openapitools/client/model/Order.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/User.java diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/VERSION similarity index 100% rename from samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION rename to samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/VERSION diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/README.md b/samples/client/petstore/java/microprofile-rest-client-3.0/README.md new file mode 100644 index 000000000000..e95301f74cda --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/README.md @@ -0,0 +1,8 @@ +# OpenAPI Petstore - MicroProfile Rest Client + +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 API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +[MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling +REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes. diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Category.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Category.md new file mode 100644 index 000000000000..a7fc939d252e --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Category.md @@ -0,0 +1,15 @@ + + +# Category + +A category for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/ModelApiResponse.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/ModelApiResponse.md new file mode 100644 index 000000000000..cd7e3c400be6 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/ModelApiResponse.md @@ -0,0 +1,16 @@ + + +# ModelApiResponse + +Describes the result of uploading an image resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Order.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Order.md new file mode 100644 index 000000000000..7bfa42e6a902 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Order.md @@ -0,0 +1,29 @@ + + +# Order + +An order for a pets from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **Date** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Pet.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Pet.md new file mode 100644 index 000000000000..8bb363301232 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Pet.md @@ -0,0 +1,29 @@ + + +# Pet + +A pet for sale in the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md new file mode 100644 index 000000000000..fb5361b0808f --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md @@ -0,0 +1,604 @@ +# 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 + +> Pet addPet(pet) + +Add a new pet to the store + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.addPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +## deletePet + +> void deletePet(petId, apiKey) + +Deletes a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + void result = apiInstance.deletePet(petId, apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | + +### Return type + +[**void**](Void.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +## findPetsByStatus + +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +## findPetsByTags + +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +## getPetById + +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +## updatePet + +> Pet updatePet(pet) + +Update an existing pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.updatePet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +## updatePetWithForm + +> void updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + void result = apiInstance.updatePetWithForm(petId, name, status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | + +### Return type + +[**void**](Void.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +## uploadFile + +> ModelApiResponse uploadFile(petId, additionalMetadata, _file) + +uploads an image + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File _file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md new file mode 100644 index 000000000000..08e810fdab2c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md @@ -0,0 +1,283 @@ +# 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 + +> void deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + void result = apiInstance.deleteOrder(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | + +### Return type + +[**void**](Void.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## getInventory + +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## getOrderById + +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## placeOrder + +> Order placeOrder(order) + +Place an order for a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Order order = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Tag.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Tag.md new file mode 100644 index 000000000000..abfde4afb501 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/Tag.md @@ -0,0 +1,15 @@ + + +# Tag + +A tag for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/User.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/User.md new file mode 100644 index 000000000000..426845227bd3 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/User.md @@ -0,0 +1,21 @@ + + +# User + +A User who is purchasing from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | + + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/UserApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/UserApi.md new file mode 100644 index 000000000000..89c1bfc6026d --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/UserApi.md @@ -0,0 +1,591 @@ +# 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 + +> void createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + User user = new User(); // User | Created user object + try { + void result = apiInstance.createUser(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## createUsersWithArrayInput + +> void createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + void result = apiInstance.createUsersWithArrayInput(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## createUsersWithListInput + +> void createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + void result = apiInstance.createUsersWithListInput(user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## deleteUser + +> void deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + void result = apiInstance.deleteUser(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## getUserByName + +> User getUserByName(username) + +Get user by user name + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## loginUser + +> String loginUser(username, password) + +Logs user into the system + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
    * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +| **400** | Invalid username/password supplied | - | + + +## logoutUser + +> void logoutUser() + +Logs out current logged in user session + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + void result = apiInstance.logoutUser(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## updateUser + +> void updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User user = new User(); // User | Updated user object + try { + void result = apiInstance.updateUser(username, user); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | + +### Return type + +[**void**](Void.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml new file mode 100644 index 000000000000..46ec836840c6 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml @@ -0,0 +1,177 @@ + + 4.0.0 + org.openapitools + microprofile-rest-client-3 + jar + microprofile-rest-client-3 + This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + 1.0.0 + + src/main/java + + + org.jboss.jandex + jandex-maven-plugin + ${jandex.maven.plugin.version} + + + make-index + + jandex + + + + + + maven-failsafe-plugin + ${maven.failsafe.plugin.version} + + + + integration-test + verify + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.maven.plugin.version} + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + junit + junit + ${junit.version} + test + + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-api + ${microprofile.rest.client.api.version} + + + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + provided + + + + org.glassfish.jersey.ext.microprofile + jersey-mp-rest-client + ${jersey.mp.rest.client.version} + test + + + org.apache.geronimo.config + geronimo-config-impl + ${geronimo.config.impl.version} + test + + + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.rt.rs.extension.providers.version} + + + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind.version} + + + jakarta.json + jakarta.json-api + ${jakarta.json.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb.core.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.impl.version} + + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.jaxrs.version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.version} + provided + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 11 + ${java.version} + ${java.version} + 1.5.18 + 9.2.9.v20150224 + 4.13.2 + 1.2.10 + 3.2.7 + 2.13.2 + 2.1.0 + 2.0.0 + 2.0.0 + 2.0.1 + 3.0.0 + 3.0.1 + 3.0 + 3.0.4 + 1.2.3 + 3.5.1 + 3.0.2 + 3.0.2 + 7.0.4.Final + 1.1.0 + 2.6 + 1.9.1 + UTF-8 + + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/ApiException.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/ApiException.java new file mode 100644 index 000000000000..2fc6d04ee687 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/ApiException.java @@ -0,0 +1,34 @@ +/** + * 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.api; + +import jakarta.ws.rs.core.Response; + +public class ApiException extends Exception { + + private static final long serialVersionUID = 1L; + private Response response; + + public ApiException() { + super(); + } + + public ApiException(Response response) { + super("Api response has status code " + response.getStatus()); + this.response = response; + } + + public Response getResponse() { + return this.response; + } +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java new file mode 100644 index 000000000000..0dec2c6aec06 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/ApiExceptionMapper.java @@ -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.api; + +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.Provider; +import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper; + +@Provider +public class ApiExceptionMapper + implements ResponseExceptionMapper { + + @Override + public boolean handles(int status, MultivaluedMap headers) { + return status >= 400; + } + + @Override + public ApiException toThrowable(Response response) { + return new ApiException(response); + } +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java new file mode 100644 index 000000000000..e9cabcc30376 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java @@ -0,0 +1,136 @@ +/** + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * 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. + * + */ + +@RegisterRestClient(configKey="petstore") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/pet") +public interface PetApi { + + /** + * Add a new pet to the store + * + * + * + */ + @POST + + @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) + public Pet addPet(Pet pet) throws ApiException, ProcessingException; + + /** + * Deletes a pet + * + * + * + */ + @DELETE + @Path("/{petId}") + public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + */ + @GET + @Path("/findByStatus") + @Produces({ "application/xml", "application/json" }) + public List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @deprecated + */ + @Deprecated + @GET + @Path("/findByTags") + @Produces({ "application/xml", "application/json" }) + public List findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + + /** + * Find pet by ID + * + * Returns a single pet + * + */ + @GET + @Path("/{petId}") + @Produces({ "application/xml", "application/json" }) + public Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + + /** + * Update an existing pet + * + * + * + */ + @PUT + + @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) + public Pet updatePet(Pet pet) throws ApiException, ProcessingException; + + /** + * Updates a pet in the store with form data + * + * + * + */ + @POST + @Path("/{petId}") + @Consumes({ "application/x-www-form-urlencoded" }) + public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + + /** + * uploads an image + * + * + * + */ + @POST + @Path("/{petId}/uploadImage") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java new file mode 100644 index 000000000000..ea8a22c76734 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java @@ -0,0 +1,86 @@ +/** + * 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.api; + +import org.openapitools.client.model.Order; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * 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. + * + */ + +@RegisterRestClient(configKey="petstore") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/store") +public interface StoreApi { + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + */ + @DELETE + @Path("/order/{orderId}") + public void deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + */ + @GET + @Path("/inventory") + @Produces({ "application/json" }) + public Map getInventory() throws ApiException, ProcessingException; + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + */ + @GET + @Path("/order/{orderId}") + @Produces({ "application/xml", "application/json" }) + public Order getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + + /** + * Place an order for a pet + * + * + * + */ + @POST + @Path("/order") + @Consumes({ "application/json" }) + @Produces({ "application/xml", "application/json" }) + public Order placeOrder(Order order) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java new file mode 100644 index 000000000000..d2c3ce2b7c47 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java @@ -0,0 +1,129 @@ +/** + * 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.api; + +import java.util.Date; +import org.openapitools.client.model.User; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.MediaType; +import org.apache.cxf.jaxrs.ext.multipart.*; + + +import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +/** + * 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. + * + */ + +@RegisterRestClient(configKey="petstore") +@RegisterProvider(ApiExceptionMapper.class) +@Path("/user") +public interface UserApi { + + /** + * Create user + * + * This can only be done by the logged in user. + * + */ + @POST + + @Consumes({ "application/json" }) + public void createUser(User user) throws ApiException, ProcessingException; + + /** + * Creates list of users with given input array + * + * + * + */ + @POST + @Path("/createWithArray") + @Consumes({ "application/json" }) + public void createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + + /** + * Creates list of users with given input array + * + * + * + */ + @POST + @Path("/createWithList") + @Consumes({ "application/json" }) + public void createUsersWithListInput(List user) throws ApiException, ProcessingException; + + /** + * Delete user + * + * This can only be done by the logged in user. + * + */ + @DELETE + @Path("/{username}") + public void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + + /** + * Get user by user name + * + * + * + */ + @GET + @Path("/{username}") + @Produces({ "application/xml", "application/json" }) + public User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + + /** + * Logs user into the system + * + * + * + */ + @GET + @Path("/login") + @Produces({ "application/xml", "application/json" }) + public String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + + /** + * Logs out current logged in user session + * + * + * + */ + @GET + @Path("/logout") + public void logoutUser() throws ApiException, ProcessingException; + + /** + * Updated user + * + * This can only be done by the logged in user. + * + */ + @PUT + @Path("/{username}") + @Consumes({ "application/json" }) + public void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 000000000000..42f49caec09c --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,105 @@ +/** + * 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.model; + + +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A category for a pet + **/ + +public class Category { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("name") + private String name; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + **/ + public void setId(Long id) { + this.id = id; + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + **/ + public void setName(String name) { + this.name = name; + } + + public Category name(String name) { + this.name = name; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java new file mode 100644 index 000000000000..db4bd533e518 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -0,0 +1,129 @@ +/** + * 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.model; + + +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * Describes the result of uploading an image resource + **/ + +public class ModelApiResponse { + + @JsonbProperty("code") + private Integer code; + + @JsonbProperty("type") + private String type; + + @JsonbProperty("message") + private String message; + + /** + * Get code + * @return code + **/ + public Integer getCode() { + return code; + } + + /** + * Set code + **/ + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get type + * @return type + **/ + public String getType() { + return type; + } + + /** + * Set type + **/ + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get message + * @return message + **/ + public String getMessage() { + return message; + } + + /** + * Set message + **/ + public void setMessage(String message) { + this.message = message; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java new file mode 100644 index 000000000000..7d5241198622 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java @@ -0,0 +1,247 @@ +/** + * 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.model; + +import java.util.Date; + +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * An order for a pets from the pet store + **/ + +public class Order { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("petId") + private Long petId; + + @JsonbProperty("quantity") + private Integer quantity; + + @JsonbProperty("shipDate") + private Date shipDate; + + @JsonbTypeSerializer(StatusEnum.Serializer.class) + @JsonbTypeDeserializer(StatusEnum.Deserializer.class) + public enum StatusEnum { + + PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); + + + String value; + + StatusEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static final class Deserializer implements JsonbDeserializer { + @Override + public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'"); + } + } + + public static final class Serializer implements JsonbSerializer { + @Override + public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } + } + + /** + * Order Status + **/ + @JsonbProperty("status") + private StatusEnum status; + + @JsonbProperty("complete") + private Boolean complete = false; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + **/ + public void setId(Long id) { + this.id = id; + } + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get petId + * @return petId + **/ + public Long getPetId() { + return petId; + } + + /** + * Set petId + **/ + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + public Integer getQuantity() { + return quantity; + } + + /** + * Set quantity + **/ + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + public Date getShipDate() { + return shipDate; + } + + /** + * Set shipDate + **/ + public void setShipDate(Date shipDate) { + this.shipDate = shipDate; + } + + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Order Status + * @return status + **/ + public StatusEnum getStatus() { + return status; + } + + /** + * Set status + **/ + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get complete + * @return complete + **/ + public Boolean getComplete() { + return complete; + } + + /** + * Set complete + **/ + public void setComplete(Boolean complete) { + this.complete = complete; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 000000000000..d39f45d721e0 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,262 @@ +/** + * 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.model; + +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; + +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A pet for sale in the pet store + **/ + +public class Pet { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("category") + private Category category; + + @JsonbProperty("name") + private String name; + + @JsonbProperty("photoUrls") + private List photoUrls = new ArrayList<>(); + + @JsonbProperty("tags") + private List tags = null; + + @JsonbTypeSerializer(StatusEnum.Serializer.class) + @JsonbTypeDeserializer(StatusEnum.Deserializer.class) + public enum StatusEnum { + + AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); + + + String value; + + StatusEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static final class Deserializer implements JsonbDeserializer { + @Override + public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(parser.getString())) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'"); + } + } + + public static final class Serializer implements JsonbSerializer { + @Override + public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) { + generator.write(obj.value); + } + } + } + + /** + * pet status in the store + **/ + @JsonbProperty("status") + private StatusEnum status; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + **/ + public void setId(Long id) { + this.id = id; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get category + * @return category + **/ + public Category getCategory() { + return category; + } + + /** + * Set category + **/ + public void setCategory(Category category) { + this.category = category; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + **/ + public void setName(String name) { + this.name = name; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + public List getPhotoUrls() { + return photoUrls; + } + + /** + * Set photoUrls + **/ + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + public List getTags() { + return tags; + } + + /** + * Set tags + **/ + public void setTags(List tags) { + this.tags = tags; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + **/ + @Deprecated + public StatusEnum getStatus() { + return status; + } + + /** + * Set status + **/ + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 000000000000..c9cb0107f49b --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,105 @@ +/** + * 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.model; + + +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A tag for a pet + **/ + +public class Tag { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("name") + private String name; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + **/ + public void setId(Long id) { + this.id = id; + } + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + /** + * Set name + **/ + public void setName(String name) { + this.name = name; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java new file mode 100644 index 000000000000..8dc160e52f91 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java @@ -0,0 +1,252 @@ +/** + * 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.model; + + +import java.lang.reflect.Type; +import jakarta.json.bind.annotation.JsonbTypeDeserializer; +import jakarta.json.bind.annotation.JsonbTypeSerializer; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.bind.annotation.JsonbProperty; + +/** + * A User who is purchasing from the pet store + **/ + +public class User { + + @JsonbProperty("id") + private Long id; + + @JsonbProperty("username") + private String username; + + @JsonbProperty("firstName") + private String firstName; + + @JsonbProperty("lastName") + private String lastName; + + @JsonbProperty("email") + private String email; + + @JsonbProperty("password") + private String password; + + @JsonbProperty("phone") + private String phone; + + /** + * User Status + **/ + @JsonbProperty("userStatus") + private Integer userStatus; + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + /** + * Set id + **/ + public void setId(Long id) { + this.id = id; + } + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get username + * @return username + **/ + public String getUsername() { + return username; + } + + /** + * Set username + **/ + public void setUsername(String username) { + this.username = username; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + public String getFirstName() { + return firstName; + } + + /** + * Set firstName + **/ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + public String getLastName() { + return lastName; + } + + /** + * Set lastName + **/ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get email + * @return email + **/ + public String getEmail() { + return email; + } + + /** + * Set email + **/ + public void setEmail(String email) { + this.email = email; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get password + * @return password + **/ + public String getPassword() { + return password; + } + + /** + * Set password + **/ + public void setPassword(String password) { + this.password = password; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get phone + * @return phone + **/ + public String getPhone() { + return phone; + } + + /** + * Set phone + **/ + public void setPhone(String phone) { + this.phone = phone; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * User Status + * @return userStatus + **/ + public Integer getUserStatus() { + return userStatus; + } + + /** + * Set userStatus + **/ + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java new file mode 100644 index 000000000000..94de80f0b851 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -0,0 +1,200 @@ +/** + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; +import org.junit.Test; +import org.junit.Before; +import static org.junit.Assert.*; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + + +/** + * OpenAPI Petstore Test + * + * API tests for PetApi + */ +public class PetApiTest { + + private PetApi client; + private String baseUrl = "http://localhost:9080"; + + @Before + public void setup() throws MalformedURLException { + // TODO initialize the client + } + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addPetTest() { + // TODO: test validations + Pet pet = null; + //Pet response = api.addPet(pet); + //assertNotNull(response); + + + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deletePetTest() { + // TODO: test validations + Long petId = null; + String apiKey = null; + //void response = api.deletePet(petId, apiKey); + //assertNotNull(response); + + + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findPetsByStatusTest() { + // TODO: test validations + List status = null; + //List response = api.findPetsByStatus(status); + //assertNotNull(response); + + + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findPetsByTagsTest() { + // TODO: test validations + List tags = null; + //List response = api.findPetsByTags(tags); + //assertNotNull(response); + + + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getPetByIdTest() { + // TODO: test validations + Long petId = null; + //Pet response = api.getPetById(petId); + //assertNotNull(response); + + + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetTest() { + // TODO: test validations + Pet pet = null; + //Pet response = api.updatePet(pet); + //assertNotNull(response); + + + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetWithFormTest() { + // TODO: test validations + Long petId = null; + String name = null; + String status = null; + //void response = api.updatePetWithForm(petId, name, status); + //assertNotNull(response); + + + } + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileTest() { + // TODO: test validations + Long petId = null; + String additionalMetadata = null; + org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + //assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java new file mode 100644 index 000000000000..4e7e884ae2a9 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -0,0 +1,120 @@ +/** + * 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.api; + +import org.openapitools.client.model.Order; +import org.junit.Test; +import org.junit.Before; +import static org.junit.Assert.*; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + + +/** + * OpenAPI Petstore Test + * + * API tests for StoreApi + */ +public class StoreApiTest { + + private StoreApi client; + private String baseUrl = "http://localhost:9080"; + + @Before + public void setup() throws MalformedURLException { + // TODO initialize the client + } + + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteOrderTest() { + // TODO: test validations + String orderId = null; + //void response = api.deleteOrder(orderId); + //assertNotNull(response); + + + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getInventoryTest() { + // TODO: test validations + //Map response = api.getInventory(); + //assertNotNull(response); + + + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getOrderByIdTest() { + // TODO: test validations + Long orderId = null; + //Order response = api.getOrderById(orderId); + //assertNotNull(response); + + + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() { + // TODO: test validations + Order order = null; + //Order response = api.placeOrder(order); + //assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java new file mode 100644 index 000000000000..898ba6b799df --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -0,0 +1,195 @@ +/** + * 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.api; + +import java.util.Date; +import org.openapitools.client.model.User; +import org.junit.Test; +import org.junit.Before; +import static org.junit.Assert.*; + +import org.eclipse.microprofile.rest.client.RestClientBuilder; + +import java.net.URL; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + + +/** + * OpenAPI Petstore Test + * + * API tests for UserApi + */ +public class UserApiTest { + + private UserApi client; + private String baseUrl = "http://localhost:9080"; + + @Before + public void setup() throws MalformedURLException { + // TODO initialize the client + } + + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUserTest() { + // TODO: test validations + User user = null; + //void response = api.createUser(user); + //assertNotNull(response); + + + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() { + // TODO: test validations + List user = null; + //void response = api.createUsersWithArrayInput(user); + //assertNotNull(response); + + + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithListInputTest() { + // TODO: test validations + List user = null; + //void response = api.createUsersWithListInput(user); + //assertNotNull(response); + + + } + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteUserTest() { + // TODO: test validations + String username = null; + //void response = api.deleteUser(username); + //assertNotNull(response); + + + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getUserByNameTest() { + // TODO: test validations + String username = null; + //User response = api.getUserByName(username); + //assertNotNull(response); + + + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginUserTest() { + // TODO: test validations + String username = null; + String password = null; + //String response = api.loginUser(username, password); + //assertNotNull(response); + + + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void logoutUserTest() { + // TODO: test validations + //void response = api.logoutUser(); + //assertNotNull(response); + + + } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateUserTest() { + // TODO: test validations + String username = null; + User user = null; + //void response = api.updateUser(username, user); + //assertNotNull(response); + + + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 000000000000..3f8a3046a4cc --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,51 @@ +/** + * 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.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Category + */ +public class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java new file mode 100644 index 000000000000..31d3ca9f1fbb --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -0,0 +1,59 @@ +/** + * 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.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ModelApiResponse + */ +public class ModelApiResponseTest { + private final ModelApiResponse model = new ModelApiResponse(); + + /** + * Model tests for ModelApiResponse + */ + @Test + public void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java new file mode 100644 index 000000000000..d80a78086743 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java @@ -0,0 +1,84 @@ +/** + * 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.model; + +import java.util.Date; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Order + */ +public class OrderTest { + private final Order model = new Order(); + + /** + * Model tests for Order + */ + @Test + public void testOrder() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'petId' + */ + @Test + public void petIdTest() { + // TODO: test petId + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipDate' + */ + @Test + public void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'complete' + */ + @Test + public void completeTest() { + // TODO: test complete + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 000000000000..68f000a5762f --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,87 @@ +/** + * 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.model; + +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Pet + */ +public class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'photoUrls' + */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 000000000000..857b97396717 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,51 @@ +/** + * 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.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java new file mode 100644 index 000000000000..39dbbf2bf652 --- /dev/null +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java @@ -0,0 +1,99 @@ +/** + * 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.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for User + */ +public class UserTest { + private final User model = new User(); + + /** + * Model tests for User + */ + @Test + public void testUser() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'firstName' + */ + @Test + public void firstNameTest() { + // TODO: test firstName + } + + /** + * Test the property 'lastName' + */ + @Test + public void lastNameTest() { + // TODO: test lastName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'userStatus' + */ + @Test + public void userStatusTest() { + // TODO: test userStatus + } + +} diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/Category.md b/samples/client/petstore/java/microprofile-rest-client/docs/Category.md index 6f5421307d51..a7fc939d252e 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/Category.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/Category.md @@ -6,10 +6,10 @@ A category for a pet ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/ModelApiResponse.md b/samples/client/petstore/java/microprofile-rest-client/docs/ModelApiResponse.md index 113ba95b7085..cd7e3c400be6 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/ModelApiResponse.md @@ -6,11 +6,11 @@ Describes the result of uploading an image resource ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/Order.md b/samples/client/petstore/java/microprofile-rest-client/docs/Order.md index cefaaf5b4d20..7bfa42e6a902 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/Order.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/Order.md @@ -6,24 +6,24 @@ An order for a pets from the pet store ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **Date** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/Pet.md b/samples/client/petstore/java/microprofile-rest-client/docs/Pet.md index 2ab4d8c7fe7b..8bb363301232 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/Pet.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/Pet.md @@ -6,24 +6,24 @@ A pet for sale in the pet store ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **List<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md b/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md index a74639beb956..fdc9c56bd004 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -202,9 +202,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -274,9 +274,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | ### Return type @@ -348,9 +348,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md b/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md index da0b458210a5..8f599b0364fb 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -53,9 +53,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -189,9 +189,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -255,9 +255,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/Tag.md b/samples/client/petstore/java/microprofile-rest-client/docs/Tag.md index ae6756ef3935..abfde4afb501 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/Tag.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/Tag.md @@ -6,10 +6,10 @@ A tag for a pet ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/User.md b/samples/client/petstore/java/microprofile-rest-client/docs/User.md index 22968c797bfd..426845227bd3 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/User.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/User.md @@ -6,16 +6,16 @@ A User who is purchasing from the pet store ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/UserApi.md b/samples/client/petstore/java/microprofile-rest-client/docs/UserApi.md index 71d6c6ded6fa..babf04d19166 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/UserApi.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -121,9 +121,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -185,9 +185,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -251,9 +251,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -316,9 +316,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -383,10 +383,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -512,10 +512,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/microprofile-rest-client/pom.xml b/samples/client/petstore/java/microprofile-rest-client/pom.xml index 992fd5ba9bb3..968f176c15f8 100644 --- a/samples/client/petstore/java/microprofile-rest-client/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client/pom.xml @@ -12,7 +12,7 @@ org.jboss.jandex jandex-maven-plugin - 1.1.0 + ${jandex.maven.plugin.version} make-index @@ -24,7 +24,7 @@ maven-failsafe-plugin - 2.6 + ${maven.failsafe.plugin.version} @@ -37,7 +37,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.9.1 + ${build.helper.maven.plugin.version} add-source @@ -59,81 +59,81 @@ junit junit - ${junit-version} + ${junit.version} test org.eclipse.microprofile.rest.client microprofile-rest-client-api - 1.4.1 + ${microprofile.rest.client.api.version} jakarta.ws.rs jakarta.ws.rs-api - ${jakarta.ws.rs-version} + ${jakarta.ws.rs.version} provided io.smallrye smallrye-rest-client - 1.2.1 + ${smallrye.rest.client.version} test io.smallrye smallrye-config - 1.3.5 + ${smallrye.config.version} test org.apache.cxf cxf-rt-rs-extension-providers - 3.2.6 + ${cxf.rt.rs.extension.providers.version} jakarta.json.bind jakarta.json.bind-api - ${jakarta.json.bind-version} + ${jakarta.json.bind.version} jakarta.json jakarta.json-api - ${jakarta.json-version} + ${jakarta.json.version} jakarta.xml.bind jakarta.xml.bind-api - ${jakarta.xml.bind-version} + ${jakarta.xml.bind.version} com.sun.xml.bind jaxb-core - 2.2.11 + ${jaxb.core.version} com.sun.xml.bind jaxb-impl - 2.2.11 + ${jaxb.impl.version} jakarta.activation jakarta.activation-api - ${jakarta.activation-version} + ${jakarta.activation.version} com.fasterxml.jackson.datatype jackson-datatype-jsr310 - ${jackson-jaxrs-version} + ${jackson.jaxrs.version} jakarta.annotation jakarta.annotation-api - ${jakarta-annotation-version} + ${jakarta.annotation.version} provided @@ -150,18 +150,28 @@ 1.8 ${java.version} ${java.version} - 1.5.18 - 9.2.9.v20150224 - 4.13.2 - 1.2.10 - 3.2.7 - 2.9.7 - 1.2.2 - 1.3.5 - 1.0.2 - 1.1.6 - 2.1.6 - 2.3.3 + 1.5.18 + 9.2.9.v20150224 + 4.13.2 + 1.2.10 + 3.2.7 + 2.9.7 + 1.2.2 + 1.3.5 + 1.0.2 + 1.1.6 + 2.1.6 + 2.3.3 + 2.0 + 1.2.1 + 1.3.5 + 3.2.6 + 2.2.11 + 2.2.11 + 5.2.2.Final + 1.1.0 + 2.6 + 1.9.1 UTF-8 diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java index 38bd75c30cb9..46d8035636e8 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java @@ -26,6 +26,7 @@ import javax.ws.rs.core.MediaType; import org.apache.cxf.jaxrs.ext.multipart.*; + import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java index fc5b9b52f295..93b22832c682 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,6 +24,7 @@ import javax.ws.rs.core.MediaType; import org.apache.cxf.jaxrs.ext.multipart.*; + import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java index 400bcc6a8ef8..de2b8d449344 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java @@ -25,6 +25,7 @@ import javax.ws.rs.core.MediaType; import org.apache.cxf.jaxrs.ext.multipart.*; + import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/native-async/build.gradle b/samples/client/petstore/java/native-async/build.gradle index dfc762f87923..60dc3e1e959f 100644 --- a/samples/client/petstore/java/native-async/build.gradle +++ b/samples/client/petstore/java/native-async/build.gradle @@ -63,7 +63,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.10.4" + jackson_version = "2.13.0" jakarta_annotation_version = "1.3.5" junit_version = "4.13.2" } diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Animal.md b/samples/client/petstore/java/native-async/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/native-async/docs/Animal.md +++ b/samples/client/petstore/java/native-async/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md b/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md index b70558ee12fd..e4f1d88a4737 100644 --- a/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md @@ -2,10 +2,10 @@ 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 -[**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | +| [**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/native-async/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/native-async/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/native-async/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/native-async/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/native-async/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/native-async/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/ArrayTest.md b/samples/client/petstore/java/native-async/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/native-async/docs/ArrayTest.md +++ b/samples/client/petstore/java/native-async/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/BigCat.md b/samples/client/petstore/java/native-async/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/native-async/docs/BigCat.md +++ b/samples/client/petstore/java/native-async/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/native-async/docs/BigCatAllOf.md b/samples/client/petstore/java/native-async/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/native-async/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/native-async/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/native-async/docs/Capitalization.md b/samples/client/petstore/java/native-async/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/native-async/docs/Capitalization.md +++ b/samples/client/petstore/java/native-async/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Cat.md b/samples/client/petstore/java/native-async/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/native-async/docs/Cat.md +++ b/samples/client/petstore/java/native-async/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/CatAllOf.md b/samples/client/petstore/java/native-async/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/native-async/docs/CatAllOf.md +++ b/samples/client/petstore/java/native-async/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Category.md b/samples/client/petstore/java/native-async/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/native-async/docs/Category.md +++ b/samples/client/petstore/java/native-async/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/native-async/docs/ClassModel.md b/samples/client/petstore/java/native-async/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/native-async/docs/ClassModel.md +++ b/samples/client/petstore/java/native-async/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Client.md b/samples/client/petstore/java/native-async/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/native-async/docs/Client.md +++ b/samples/client/petstore/java/native-async/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Dog.md b/samples/client/petstore/java/native-async/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/native-async/docs/Dog.md +++ b/samples/client/petstore/java/native-async/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/DogAllOf.md b/samples/client/petstore/java/native-async/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/native-async/docs/DogAllOf.md +++ b/samples/client/petstore/java/native-async/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/EnumArrays.md b/samples/client/petstore/java/native-async/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/native-async/docs/EnumArrays.md +++ b/samples/client/petstore/java/native-async/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/native-async/docs/EnumTest.md b/samples/client/petstore/java/native-async/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/native-async/docs/EnumTest.md +++ b/samples/client/petstore/java/native-async/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index c71305325f79..3ecae4a48cc0 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -2,36 +2,36 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterCompositeSerializeWithHttpInfo**](FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testGroupParametersWithHttpInfo**](FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testInlineAdditionalPropertiesWithHttpInfo**](FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testJsonFormDataWithHttpInfo**](FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | -[**testQueryParameterCollectionFormatWithHttpInfo**](FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterCompositeSerializeWithHttpInfo**](FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testGroupParametersWithHttpInfo**](FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testInlineAdditionalPropertiesWithHttpInfo**](FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testJsonFormDataWithHttpInfo**](FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | +| [**testQueryParameterCollectionFormatWithHttpInfo**](FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-parameters | | @@ -77,9 +77,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -152,9 +152,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -219,9 +219,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -295,9 +295,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -362,9 +362,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -438,9 +438,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -505,9 +505,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -581,9 +581,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -648,9 +648,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -724,9 +724,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -790,9 +790,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -865,9 +865,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -930,10 +930,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -1005,10 +1005,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -1073,9 +1073,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -1149,9 +1149,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -1234,22 +1234,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -1342,22 +1342,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -1429,16 +1429,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -1519,16 +1519,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -1724,12 +1724,12 @@ No authorization required | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | -------------| - **requiredStringGroup** | **Integer** | Required String in group parameters | - **requiredBooleanGroup** | **Boolean** | Required Boolean in group parameters | - **requiredInt64Group** | **Long** | Required Integer in group parameters | - **stringGroup** | **Integer** | String in group parameters | [optional] - **booleanGroup** | **Boolean** | Boolean in group parameters | [optional] - **int64Group** | **Long** | Integer in group parameters | [optional] +| **requiredStringGroup** | **Integer** | Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean** | Required Boolean in group parameters | | +| **requiredInt64Group** | **Long** | Required Integer in group parameters | | +| **stringGroup** | **Integer** | String in group parameters | [optional] | +| **booleanGroup** | **Boolean** | Boolean in group parameters | [optional] | +| **int64Group** | **Long** | Integer in group parameters | [optional] | @@ -1773,9 +1773,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1846,9 +1846,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1911,10 +1911,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -1986,10 +1986,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -2057,13 +2057,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type @@ -2140,13 +2140,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md index 181506415f05..a149ae8063c9 100644 --- a/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md @@ -2,10 +2,10 @@ 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 -[**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | +| [**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -59,9 +59,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -142,9 +142,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/FileSchemaTestClass.md b/samples/client/petstore/java/native-async/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/native-async/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/native-async/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/FormatTest.md b/samples/client/petstore/java/native-async/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/native-async/docs/FormatTest.md +++ b/samples/client/petstore/java/native-async/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/native-async/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/native-async/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/native-async/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/native-async/docs/MapTest.md b/samples/client/petstore/java/native-async/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/native-async/docs/MapTest.md +++ b/samples/client/petstore/java/native-async/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/native-async/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/native-async/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/native-async/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native-async/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Model200Response.md b/samples/client/petstore/java/native-async/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/native-async/docs/Model200Response.md +++ b/samples/client/petstore/java/native-async/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/ModelApiResponse.md b/samples/client/petstore/java/native-async/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/native-async/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/native-async/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/ModelFile.md b/samples/client/petstore/java/native-async/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/native-async/docs/ModelFile.md +++ b/samples/client/petstore/java/native-async/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/ModelList.md b/samples/client/petstore/java/native-async/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/native-async/docs/ModelList.md +++ b/samples/client/petstore/java/native-async/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/ModelReturn.md b/samples/client/petstore/java/native-async/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/native-async/docs/ModelReturn.md +++ b/samples/client/petstore/java/native-async/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Name.md b/samples/client/petstore/java/native-async/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/native-async/docs/Name.md +++ b/samples/client/petstore/java/native-async/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/native-async/docs/NumberOnly.md b/samples/client/petstore/java/native-async/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/native-async/docs/NumberOnly.md +++ b/samples/client/petstore/java/native-async/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Order.md b/samples/client/petstore/java/native-async/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/native-async/docs/Order.md +++ b/samples/client/petstore/java/native-async/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/native-async/docs/OuterComposite.md b/samples/client/petstore/java/native-async/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/native-async/docs/OuterComposite.md +++ b/samples/client/petstore/java/native-async/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/Pet.md b/samples/client/petstore/java/native-async/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/native-async/docs/Pet.md +++ b/samples/client/petstore/java/native-async/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/native-async/docs/PetApi.md b/samples/client/petstore/java/native-async/docs/PetApi.md index b2df57db5717..555643777888 100644 --- a/samples/client/petstore/java/native-async/docs/PetApi.md +++ b/samples/client/petstore/java/native-async/docs/PetApi.md @@ -2,26 +2,26 @@ 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 -[**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet -[**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags -[**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -[**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet -[**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -[**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store | +| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet | +| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID | +| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | +| [**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image | +| [**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) | +| [**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) | @@ -70,9 +70,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -149,9 +149,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -220,10 +220,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -301,10 +301,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -375,9 +375,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -457,9 +457,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -530,9 +530,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -612,9 +612,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -687,9 +687,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -772,9 +772,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -843,9 +843,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -924,9 +924,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -998,11 +998,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -1080,11 +1080,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -1154,11 +1154,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -1237,11 +1237,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -1311,11 +1311,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type @@ -1394,11 +1394,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/ReadOnlyFirst.md b/samples/client/petstore/java/native-async/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/native-async/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/native-async/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/SpecialModelName.md b/samples/client/petstore/java/native-async/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/native-async/docs/SpecialModelName.md +++ b/samples/client/petstore/java/native-async/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/StoreApi.md b/samples/client/petstore/java/native-async/docs/StoreApi.md index 452c1b85789a..3042949fd609 100644 --- a/samples/client/petstore/java/native-async/docs/StoreApi.md +++ b/samples/client/petstore/java/native-async/docs/StoreApi.md @@ -2,16 +2,16 @@ 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 -[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID -[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet -[**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | +| [**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | +| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID | +| [**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID | +| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | +| [**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -133,9 +133,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -350,9 +350,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -428,9 +428,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -495,9 +495,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -570,9 +570,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/Tag.md b/samples/client/petstore/java/native-async/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/native-async/docs/Tag.md +++ b/samples/client/petstore/java/native-async/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/TypeHolderDefault.md b/samples/client/petstore/java/native-async/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/native-async/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/native-async/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/native-async/docs/TypeHolderExample.md b/samples/client/petstore/java/native-async/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/native-async/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/native-async/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/native-async/docs/User.md b/samples/client/petstore/java/native-async/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/native-async/docs/User.md +++ b/samples/client/petstore/java/native-async/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/UserApi.md b/samples/client/petstore/java/native-async/docs/UserApi.md index ef3c6265600a..ce9d1a23f49b 100644 --- a/samples/client/petstore/java/native-async/docs/UserApi.md +++ b/samples/client/petstore/java/native-async/docs/UserApi.md @@ -2,24 +2,24 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserApi.md#createUser) | **POST** /user | Create user -[**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **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 -[**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -[**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -[**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -[**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -[**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user -[**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | +| [**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user | +| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **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 | +| [**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user | +| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name | +| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system | +| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session | +| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | +| [**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user | @@ -65,9 +65,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -140,9 +140,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -204,9 +204,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -277,9 +277,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -341,9 +341,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -414,9 +414,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -480,9 +480,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -556,9 +556,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -622,9 +622,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -698,9 +698,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -766,10 +766,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -843,10 +843,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -1041,10 +1041,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type @@ -1119,10 +1119,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/XmlItem.md b/samples/client/petstore/java/native-async/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/native-async/docs/XmlItem.md +++ b/samples/client/petstore/java/native-async/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/native-async/pom.xml b/samples/client/petstore/java/native-async/pom.xml index 4991ea8b9d6a..a07ba182c37b 100644 --- a/samples/client/petstore/java/native-async/pom.xml +++ b/samples/client/petstore/java/native-async/pom.xml @@ -214,7 +214,7 @@ 1.5.22 11 11 - 2.10.4 + 2.13.0 0.2.2 1.3.5 4.13.2 diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java index df94845d590c..9f57c5e9ce9a 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java @@ -23,6 +23,7 @@ import java.net.URI; import java.net.URLEncoder; import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; @@ -63,6 +64,7 @@ public class ApiClient { private Consumer> responseInterceptor; private Consumer> asyncResponseInterceptor; private Duration readTimeout; + private Duration connectTimeout; private static String valueToString(Object value) { if (value == null) { @@ -167,6 +169,7 @@ public ApiClient() { updateBaseUri(getDefaultBaseUri()); interceptor = null; readTimeout = null; + connectTimeout = null; responseInterceptor = null; asyncResponseInterceptor = null; } @@ -184,6 +187,7 @@ public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri()); interceptor = null; readTimeout = null; + connectTimeout = null; responseInterceptor = null; asyncResponseInterceptor = null; } @@ -418,4 +422,35 @@ public ApiClient setReadTimeout(Duration readTimeout) { public Duration getReadTimeout() { return readTimeout; } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

    In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java index 8f6c3721de80..78ba54ee4e32 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java @@ -87,6 +87,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * creates an XmlItem * this route creates an XmlItem * @param xmlItem XmlItem Body (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture createXmlItem(XmlItem xmlItem) throws ApiException { @@ -532,6 +533,7 @@ private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) * * For this test, the body for this request much reference a schema named `File`. * @param body (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { @@ -615,6 +617,7 @@ private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestC * * @param query (required) * @param body (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testBodyWithQueryParams(String query, User body) throws ApiException { @@ -820,6 +823,7 @@ private HttpRequest.Builder testClientModelRequestBuilder(Client body) throws Ap * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -928,6 +932,7 @@ private HttpRequest.Builder testEndpointParametersRequestBuilder(BigDecimal numb * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -1025,6 +1030,7 @@ private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHe * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) * @param apiRequest {@link APItestGroupParametersRequest} + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testGroupParameters(APItestGroupParametersRequest apiRequest) throws ApiException { @@ -1063,6 +1069,7 @@ public CompletableFuture> testGroupParametersWithHttpInfo(APIt * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -1247,6 +1254,7 @@ public APItestGroupParametersRequest build() { * test inline additionalProperties * * @param param request body (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testInlineAdditionalProperties(Map param) throws ApiException { @@ -1330,6 +1338,7 @@ private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map testJsonFormData(String param, String param2) throws ApiException { @@ -1415,6 +1424,7 @@ private HttpRequest.Builder testJsonFormDataRequestBuilder(String param, String * @param http (required) * @param url (required) * @param context (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java index 00775e875a39..91f03b8ad9b1 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java @@ -82,6 +82,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * Add a new pet to the store * * @param body Pet object that needs to be added to the store (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture addPet(Pet body) throws ApiException { @@ -165,6 +166,7 @@ private HttpRequest.Builder addPetRequestBuilder(Pet body) throws ApiException { * * @param petId Pet id to delete (required) * @param apiKey (optional) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture deletePet(Long petId, String apiKey) throws ApiException { @@ -539,6 +541,7 @@ private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiExcep * Update an existing pet * * @param body Pet object that needs to be added to the store (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture updatePet(Pet body) throws ApiException { @@ -623,6 +626,7 @@ private HttpRequest.Builder updatePetRequestBuilder(Pet body) throws ApiExceptio * @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 CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture updatePetWithForm(Long petId, String name, String status) throws ApiException { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java index 65430c5eaa5c..dbfab114479f 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java @@ -79,6 +79,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture deleteOrder(String orderId) throws ApiException { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java index 5e05a49b80cf..4ad3dc79553b 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java @@ -80,6 +80,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * Create user * This can only be done by the logged in user. * @param body Created user object (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture createUser(User body) throws ApiException { @@ -162,6 +163,7 @@ private HttpRequest.Builder createUserRequestBuilder(User body) throws ApiExcept * Creates list of users with given input array * * @param body List of user object (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture createUsersWithArrayInput(List body) throws ApiException { @@ -244,6 +246,7 @@ private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List b * Creates list of users with given input array * * @param body List of user object (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture createUsersWithListInput(List body) throws ApiException { @@ -326,6 +329,7 @@ private HttpRequest.Builder createUsersWithListInputRequestBuilder(List bo * Delete user * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture deleteUser(String username) throws ApiException { @@ -599,6 +603,7 @@ private HttpRequest.Builder loginUserRequestBuilder(String username, String pass /** * Logs out current logged in user session * + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture logoutUser() throws ApiException { @@ -671,6 +676,7 @@ private HttpRequest.Builder logoutUserRequestBuilder() throws ApiException { * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) + * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ public CompletableFuture updateUser(String username, User body) throws ApiException { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index c4899ad6165d..8f85fc034bef 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object valu } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 61b9f3bb9c75..a5d61a79c59a 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -83,6 +83,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { @@ -94,7 +97,8 @@ public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -103,6 +107,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public List getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index ff57c303501c..deee9965d6db 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean val } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Boolean getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index cc0598a14a04..4a1fc2a47be2 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer val } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Integer getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 1ec3719074de..5229ad5e1969 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -83,6 +83,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { @@ -94,7 +97,8 @@ public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal v } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -103,6 +107,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public BigDecimal getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 6000e007e6e8..57c34c7b7e3e 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Map getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index f3719fe70b0e..6d490abd2641 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesString putAdditionalProperty(String key, String value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesString putAdditionalProperty(String key, String value } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public String getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java index cf2f2ca676ee..60a7b9e8ea9f 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +42,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCat.java index 5844b15aed50..7ab4afb38c5c 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java index 942947f62023..77fda9a3dc44 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Dog.java index 1ffd0598fca9..c1db92311cc6 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Dog.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle index dfc762f87923..60dc3e1e959f 100644 --- a/samples/client/petstore/java/native/build.gradle +++ b/samples/client/petstore/java/native/build.gradle @@ -63,7 +63,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.10.4" + jackson_version = "2.13.0" jakarta_annotation_version = "1.3.5" junit_version = "4.13.2" } diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Animal.md b/samples/client/petstore/java/native/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/native/docs/Animal.md +++ b/samples/client/petstore/java/native/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AnotherFakeApi.md b/samples/client/petstore/java/native/docs/AnotherFakeApi.md index cb613c7dde43..da47c8bee314 100644 --- a/samples/client/petstore/java/native/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/native/docs/AnotherFakeApi.md @@ -2,10 +2,10 @@ 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 -[**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | +| [**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags | @@ -51,9 +51,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/ArrayTest.md b/samples/client/petstore/java/native/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/native/docs/ArrayTest.md +++ b/samples/client/petstore/java/native/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/BigCat.md b/samples/client/petstore/java/native/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/native/docs/BigCat.md +++ b/samples/client/petstore/java/native/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/native/docs/BigCatAllOf.md b/samples/client/petstore/java/native/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/native/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/native/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/native/docs/Capitalization.md b/samples/client/petstore/java/native/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/native/docs/Capitalization.md +++ b/samples/client/petstore/java/native/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/native/docs/Cat.md b/samples/client/petstore/java/native/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/native/docs/Cat.md +++ b/samples/client/petstore/java/native/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/CatAllOf.md b/samples/client/petstore/java/native/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/native/docs/CatAllOf.md +++ b/samples/client/petstore/java/native/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Category.md b/samples/client/petstore/java/native/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/native/docs/Category.md +++ b/samples/client/petstore/java/native/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/native/docs/ClassModel.md b/samples/client/petstore/java/native/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/native/docs/ClassModel.md +++ b/samples/client/petstore/java/native/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Client.md b/samples/client/petstore/java/native/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/native/docs/Client.md +++ b/samples/client/petstore/java/native/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Dog.md b/samples/client/petstore/java/native/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/native/docs/Dog.md +++ b/samples/client/petstore/java/native/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/DogAllOf.md b/samples/client/petstore/java/native/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/native/docs/DogAllOf.md +++ b/samples/client/petstore/java/native/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/EnumArrays.md b/samples/client/petstore/java/native/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/native/docs/EnumArrays.md +++ b/samples/client/petstore/java/native/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/native/docs/EnumTest.md b/samples/client/petstore/java/native/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/native/docs/EnumTest.md +++ b/samples/client/petstore/java/native/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index 54ffb0467a3a..7a35dbf48d2b 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -2,36 +2,36 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterCompositeSerializeWithHttpInfo**](FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testGroupParametersWithHttpInfo**](FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testInlineAdditionalPropertiesWithHttpInfo**](FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testJsonFormDataWithHttpInfo**](FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | -[**testQueryParameterCollectionFormatWithHttpInfo**](FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterCompositeSerializeWithHttpInfo**](FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testGroupParametersWithHttpInfo**](FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testInlineAdditionalPropertiesWithHttpInfo**](FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testJsonFormDataWithHttpInfo**](FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | +| [**testQueryParameterCollectionFormatWithHttpInfo**](FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-parameters | | @@ -76,9 +76,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -143,9 +143,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -209,9 +209,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -277,9 +277,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -343,9 +343,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -411,9 +411,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -477,9 +477,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -545,9 +545,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -611,9 +611,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -679,9 +679,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -744,9 +744,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -811,9 +811,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -875,10 +875,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -942,10 +942,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -1009,9 +1009,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -1077,9 +1077,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -1161,22 +1161,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -1261,22 +1261,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -1347,16 +1347,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -1429,16 +1429,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -1625,12 +1625,12 @@ No authorization required | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | -------------| - **requiredStringGroup** | **Integer** | Required String in group parameters | - **requiredBooleanGroup** | **Boolean** | Required Boolean in group parameters | - **requiredInt64Group** | **Long** | Required Integer in group parameters | - **stringGroup** | **Integer** | String in group parameters | [optional] - **booleanGroup** | **Boolean** | Boolean in group parameters | [optional] - **int64Group** | **Long** | Integer in group parameters | [optional] +| **requiredStringGroup** | **Integer** | Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean** | Required Boolean in group parameters | | +| **requiredInt64Group** | **Long** | Required Integer in group parameters | | +| **stringGroup** | **Integer** | String in group parameters | [optional] | +| **booleanGroup** | **Boolean** | Boolean in group parameters | [optional] | +| **int64Group** | **Long** | Integer in group parameters | [optional] | @@ -1673,9 +1673,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1738,9 +1738,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1802,10 +1802,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -1869,10 +1869,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -1939,13 +1939,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type @@ -2014,13 +2014,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md index 0c55bf93505c..50553769d102 100644 --- a/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md @@ -2,10 +2,10 @@ 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 -[**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | +| [**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -58,9 +58,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -133,9 +133,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native/docs/FileSchemaTestClass.md b/samples/client/petstore/java/native/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/native/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/native/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/native/docs/FormatTest.md b/samples/client/petstore/java/native/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/native/docs/FormatTest.md +++ b/samples/client/petstore/java/native/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/native/docs/MapTest.md b/samples/client/petstore/java/native/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/native/docs/MapTest.md +++ b/samples/client/petstore/java/native/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Model200Response.md b/samples/client/petstore/java/native/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/native/docs/Model200Response.md +++ b/samples/client/petstore/java/native/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/ModelApiResponse.md b/samples/client/petstore/java/native/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/native/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/native/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/ModelFile.md b/samples/client/petstore/java/native/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/native/docs/ModelFile.md +++ b/samples/client/petstore/java/native/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/native/docs/ModelList.md b/samples/client/petstore/java/native/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/native/docs/ModelList.md +++ b/samples/client/petstore/java/native/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/ModelReturn.md b/samples/client/petstore/java/native/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/native/docs/ModelReturn.md +++ b/samples/client/petstore/java/native/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Name.md b/samples/client/petstore/java/native/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/native/docs/Name.md +++ b/samples/client/petstore/java/native/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/native/docs/NumberOnly.md b/samples/client/petstore/java/native/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/native/docs/NumberOnly.md +++ b/samples/client/petstore/java/native/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Order.md b/samples/client/petstore/java/native/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/native/docs/Order.md +++ b/samples/client/petstore/java/native/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/native/docs/OuterComposite.md b/samples/client/petstore/java/native/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/native/docs/OuterComposite.md +++ b/samples/client/petstore/java/native/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/Pet.md b/samples/client/petstore/java/native/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/native/docs/Pet.md +++ b/samples/client/petstore/java/native/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/native/docs/PetApi.md b/samples/client/petstore/java/native/docs/PetApi.md index 530ce80639e6..9ee7f49c4ebc 100644 --- a/samples/client/petstore/java/native/docs/PetApi.md +++ b/samples/client/petstore/java/native/docs/PetApi.md @@ -2,26 +2,26 @@ 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 -[**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet -[**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags -[**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -[**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet -[**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -[**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store | +| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet | +| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID | +| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | +| [**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image | +| [**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) | +| [**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) | @@ -69,9 +69,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -140,9 +140,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -210,10 +210,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -283,10 +283,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -356,9 +356,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -430,9 +430,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -502,9 +502,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -576,9 +576,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -650,9 +650,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -727,9 +727,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -797,9 +797,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -870,9 +870,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -943,11 +943,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -1017,11 +1017,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -1090,11 +1090,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -1165,11 +1165,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -1238,11 +1238,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type @@ -1313,11 +1313,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/native/docs/ReadOnlyFirst.md b/samples/client/petstore/java/native/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/native/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/native/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/SpecialModelName.md b/samples/client/petstore/java/native/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/native/docs/SpecialModelName.md +++ b/samples/client/petstore/java/native/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/StoreApi.md b/samples/client/petstore/java/native/docs/StoreApi.md index 0c6b58fc81e2..7f2744f1c1a4 100644 --- a/samples/client/petstore/java/native/docs/StoreApi.md +++ b/samples/client/petstore/java/native/docs/StoreApi.md @@ -2,16 +2,16 @@ 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 -[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID -[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet -[**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | +| [**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | +| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID | +| [**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID | +| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | +| [**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -124,9 +124,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -331,9 +331,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -401,9 +401,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -467,9 +467,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -534,9 +534,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/native/docs/Tag.md b/samples/client/petstore/java/native/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/native/docs/Tag.md +++ b/samples/client/petstore/java/native/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/TypeHolderDefault.md b/samples/client/petstore/java/native/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/native/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/native/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/native/docs/TypeHolderExample.md b/samples/client/petstore/java/native/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/native/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/native/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/native/docs/User.md b/samples/client/petstore/java/native/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/native/docs/User.md +++ b/samples/client/petstore/java/native/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/native/docs/UserApi.md b/samples/client/petstore/java/native/docs/UserApi.md index 7188e70cb95b..f1bc072177a5 100644 --- a/samples/client/petstore/java/native/docs/UserApi.md +++ b/samples/client/petstore/java/native/docs/UserApi.md @@ -2,24 +2,24 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserApi.md#createUser) | **POST** /user | Create user -[**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **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 -[**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -[**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -[**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -[**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -[**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user -[**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | +| [**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user | +| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **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 | +| [**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user | +| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name | +| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system | +| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session | +| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | +| [**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user | @@ -64,9 +64,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -131,9 +131,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -259,9 +259,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -322,9 +322,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -387,9 +387,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -452,9 +452,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -520,9 +520,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -585,9 +585,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -653,9 +653,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -720,10 +720,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -789,10 +789,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -977,10 +977,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type @@ -1047,10 +1047,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/native/docs/XmlItem.md b/samples/client/petstore/java/native/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/native/docs/XmlItem.md +++ b/samples/client/petstore/java/native/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/native/pom.xml b/samples/client/petstore/java/native/pom.xml index 4991ea8b9d6a..a07ba182c37b 100644 --- a/samples/client/petstore/java/native/pom.xml +++ b/samples/client/petstore/java/native/pom.xml @@ -214,7 +214,7 @@ 1.5.22 11 11 - 2.10.4 + 2.13.0 0.2.2 1.3.5 4.13.2 diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index df94845d590c..9f57c5e9ce9a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -23,6 +23,7 @@ import java.net.URI; import java.net.URLEncoder; import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; @@ -63,6 +64,7 @@ public class ApiClient { private Consumer> responseInterceptor; private Consumer> asyncResponseInterceptor; private Duration readTimeout; + private Duration connectTimeout; private static String valueToString(Object value) { if (value == null) { @@ -167,6 +169,7 @@ public ApiClient() { updateBaseUri(getDefaultBaseUri()); interceptor = null; readTimeout = null; + connectTimeout = null; responseInterceptor = null; asyncResponseInterceptor = null; } @@ -184,6 +187,7 @@ public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri()); interceptor = null; readTimeout = null; + connectTimeout = null; responseInterceptor = null; asyncResponseInterceptor = null; } @@ -418,4 +422,35 @@ public ApiClient setReadTimeout(Duration readTimeout) { public Duration getReadTimeout() { return readTimeout; } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

    In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index c4899ad6165d..8f85fc034bef 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object valu } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 61b9f3bb9c75..a5d61a79c59a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -83,6 +83,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { @@ -94,7 +97,8 @@ public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -103,6 +107,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public List getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index ff57c303501c..deee9965d6db 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean val } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Boolean getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index cc0598a14a04..4a1fc2a47be2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer val } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Integer getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 1ec3719074de..5229ad5e1969 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -83,6 +83,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { @@ -94,7 +97,8 @@ public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal v } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -103,6 +107,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public BigDecimal getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 6000e007e6e8..57c34c7b7e3e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public Map getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index f3719fe70b0e..6d490abd2641 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -82,6 +82,9 @@ public void setName(String name) { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value value of the property + * @return self reference */ @JsonAnySetter public AdditionalPropertiesString putAdditionalProperty(String key, String value) { @@ -93,7 +96,8 @@ public AdditionalPropertiesString putAdditionalProperty(String key, String value } /** - * Return the additional (undeclared) property. + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties */ @JsonAnyGetter public Map getAdditionalProperties() { @@ -102,6 +106,8 @@ public Map getAdditionalProperties() { /** * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name */ public String getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index cf2f2ca676ee..60a7b9e8ea9f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +42,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCat.java index 5844b15aed50..7ab4afb38c5c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java index 942947f62023..77fda9a3dc44 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java index 1ffd0598fca9..c1db92311cc6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle index c070b3e9f4f2..7d4c9665783f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle @@ -12,8 +12,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -106,21 +106,21 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' + implementation 'io.swagger:swagger-annotations:1.6.5' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' + implementation 'com.squareup.okhttp3:okhttp:4.9.3' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' + implementation 'com.google.code.gson:gson:2.9.0' + implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.0' - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.2' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.30' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:3.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.mockito:mockito-core:3.12.4' } javadoc { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt index dbc1c85f77de..6ed9d7588347 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt @@ -9,21 +9,21 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.9.3", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", + "com.google.code.gson" % "gson" % "2.9.0", + "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.0", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", "org.openapitools" % "jackson-databind-nullable" % "0.2.2", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", - "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.23" % "compile" - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.30" % "compile" + "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Animal.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Animal.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md index 0565c2589b3c..d26a29ef8e26 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -47,9 +47,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -67,5 +67,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayTest.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayTest.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCat.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCat.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Capitalization.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Capitalization.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Cat.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Cat.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Category.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Category.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ClassModel.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Client.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Client.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Dog.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Dog.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumArrays.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumArrays.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumTest.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index ed2724757eef..f804c0e19404 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -59,9 +59,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -79,7 +79,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **fakeOuterBooleanSerialize** @@ -121,9 +121,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -141,7 +141,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output boolean | - | +| **200** | Output boolean | - | # **fakeOuterCompositeSerialize** @@ -183,9 +183,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -203,7 +203,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output composite | - | +| **200** | Output composite | - | # **fakeOuterNumberSerialize** @@ -245,9 +245,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -265,7 +265,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output number | - | +| **200** | Output number | - | # **fakeOuterStringSerialize** @@ -307,9 +307,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -327,7 +327,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output string | - | +| **200** | Output string | - | # **testBodyWithFileSchema** @@ -368,9 +368,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -388,7 +388,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | # **testBodyWithQueryParams** @@ -428,10 +428,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -449,7 +449,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | # **testClientModel** @@ -491,9 +491,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -511,7 +511,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testEndpointParameters** @@ -571,22 +571,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -604,8 +604,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **testEnumParameters** @@ -653,16 +653,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -680,8 +680,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid request | - | -**404** | Not found | - | +| **400** | Invalid request | - | +| **404** | Not found | - | # **testGroupParameters** @@ -731,14 +731,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -756,7 +756,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +| **400** | Someting wrong | - | # **testInlineAdditionalProperties** @@ -795,9 +795,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -815,7 +815,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testJsonFormData** @@ -855,10 +855,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -876,7 +876,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testQueryParameterCollectionFormat** @@ -921,13 +921,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type @@ -945,5 +945,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeClassnameTags123Api.md index bd934e360718..65061cde05bb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -54,9 +54,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -74,5 +74,5 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FileSchemaTestClass.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FormatTest.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FormatTest.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Model200Response.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelApiResponse.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelFile.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelFile.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelList.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelList.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelReturn.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelReturn.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Name.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/NumberOnly.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/NumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Order.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Order.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/OuterComposite.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/OuterComposite.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Pet.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Pet.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md index d1aa160676c1..4309006d5720 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -77,8 +77,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**405** | Invalid input | - | +| **200** | successful operation | - | +| **405** | Invalid input | - | # **deletePet** @@ -123,10 +123,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -144,8 +144,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid pet value | - | +| **200** | successful operation | - | +| **400** | Invalid pet value | - | # **findPetsByStatus** @@ -192,9 +192,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -212,8 +212,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid status value | - | +| **200** | successful operation | - | +| **400** | Invalid status value | - | # **findPetsByTags** @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -280,8 +280,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid tag value | - | +| **200** | successful operation | - | +| **400** | Invalid tag value | - | # **getPetById** @@ -330,9 +330,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -350,9 +350,9 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Pet not found | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | # **updatePet** @@ -396,9 +396,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -416,10 +416,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Pet not found | - | -**405** | Validation exception | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | # **updatePetWithForm** @@ -465,11 +465,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -487,7 +487,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**405** | Invalid input | - | +| **405** | Invalid input | - | # **uploadFile** @@ -534,11 +534,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -556,7 +556,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **uploadFileWithRequiredFile** @@ -603,11 +603,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type @@ -625,5 +625,5 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ReadOnlyFirst.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/SpecialModelName.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/SpecialModelName.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md index a86b478e55ab..76bdde9e995e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -49,9 +49,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -69,8 +69,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid ID supplied | - | -**404** | Order not found | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | # **getInventory** @@ -135,7 +135,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **getOrderById** @@ -177,9 +177,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -197,9 +197,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Order not found | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | # **placeOrder** @@ -239,9 +239,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -259,6 +259,6 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid Order | - | +| **200** | successful operation | - | +| **400** | Invalid Order | - | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Tag.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Tag.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderDefault.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderExample.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/User.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/User.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/UserApi.md index 7a90fb438b19..1012a68397e7 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -53,9 +53,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -73,7 +73,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **createUsersWithArrayInput** @@ -112,9 +112,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -132,7 +132,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **createUsersWithListInput** @@ -171,9 +171,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -191,7 +191,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **deleteUser** @@ -232,9 +232,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -252,8 +252,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **getUserByName** @@ -293,9 +293,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -313,9 +313,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **loginUser** @@ -356,10 +356,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -377,8 +377,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | -**400** | Invalid username/password supplied | - | +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +| **400** | Invalid username/password supplied | - | # **logoutUser** @@ -433,7 +433,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **updateUser** @@ -475,10 +475,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type @@ -496,6 +496,6 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid user supplied | - | -**404** | User not found | - | +| **400** | Invalid user supplied | - | +| **404** | User not found | - | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/XmlItem.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/XmlItem.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml index 8e858f0de745..b1cb064f7450 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml @@ -293,7 +293,7 @@ io.swagger.parser.v3 swagger-parser-v3 - 2.0.28 + 2.0.30 jakarta.annotation @@ -309,24 +309,24 @@ javax.ws.rs jsr311-api - 1.1.1 + ${jsr311-api-version} javax.ws.rs javax.ws.rs-api - 2.0 + ${javax.ws.rs-api-version} - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test org.mockito mockito-core - 3.12.4 + ${mockito-core-version} test @@ -335,14 +335,17 @@ ${java.version} ${java.version} 1.8.5 - 1.6.3 - 4.9.2 - 2.8.8 + 1.6.5 + 4.9.3 + 2.9.0 3.12.0 0.2.2 1.3.5 - 4.13.2 + 5.8.2 + 3.12.4 + 2.1.1 + 1.1.1 UTF-8 - 2.17.3 + 2.21.0 diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java index bb5a40250e79..c065d7d109fe 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java @@ -389,7 +389,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { /** *

    Set OffsetDateTimeFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { @@ -400,7 +400,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { /** *

    Set LocalDateFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { @@ -1229,7 +1229,7 @@ public Request buildRequest(String baseUrl, String path, String method, List formParams) { File file = (File) param.getValue(); addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { - List files = (List) param.getValue(); - for (File file : files) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } } } else { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java index 60e4f9a5e7e6..8a6d4981ca77 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java @@ -27,8 +27,6 @@ public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - private Object errorObject = null; - private GenericType errorObjectType = null; /** *

    Constructor for ApiException.

    @@ -155,40 +153,4 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } - - /** - * Get the error object type. - * - * @return Error object type - */ - public GenericType getErrorObjectType() { - return errorObjectType; - } - - /** - * Set the error object type. - * - * @param errorObjectType object type - */ - public void setErrorObjectType(GenericType errorObjectType) { - this.errorObjectType = errorObjectType; - } - - /** - * Get the error object. - * - * @return Error object - */ - public Object getErrorObject() { - return errorObject; - } - - /** - * Get the error object. - * - * @param errorObject Error object - */ - public void setErrorObject(Object errorObject) { - this.errorObject = errorObject; - } } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f364de8ca6fd..5125520afda4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -186,14 +186,8 @@ public Client call123testSpecialTags(Client body) throws ApiException { */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java index e0aeaef1d699..48d54b5cd8bd 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java @@ -319,14 +319,8 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -454,14 +448,8 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -589,14 +577,8 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -724,14 +706,8 @@ public String fakeOuterStringSerialize(String body) throws ApiException { */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1134,14 +1110,8 @@ public Client testClientModel(Client body) throws ApiException { */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { okhttp3.Call localVarCall = testClientModelValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 0a4db0f802cc..c7c5ed97a8c9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -186,14 +186,8 @@ public Client testClassname(Client body) throws ApiException { */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java index ed5ccbc7127a..2346d1de707e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java @@ -467,14 +467,8 @@ public List findPetsByStatus(List status) throws ApiException { */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -619,14 +613,8 @@ public Set findPetsByTags(Set tags) throws ApiException { @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(Set tags) throws ApiException { okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -769,14 +757,8 @@ public Pet getPetById(Long petId) throws ApiException { */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1215,14 +1197,8 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1377,14 +1353,8 @@ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java index be85241a91d0..dea0a6e4aafb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java @@ -313,14 +313,8 @@ public Map getInventory() throws ApiException { */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -459,14 +453,8 @@ public Order getOrderById(Long orderId) throws ApiException { */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -604,14 +592,8 @@ public Order placeOrder(Order body) throws ApiException { */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java index 5d0b2caf7a77..cc6742339d5d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java @@ -719,14 +719,8 @@ public User getUserByName(String username) throws ApiException { */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -874,14 +868,8 @@ public String loginUser(String username, String password) throws ApiException { */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index a5ee69405a1f..7e27ea5e65b4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -49,7 +48,7 @@ * AdditionalPropertiesAnyType */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -80,6 +79,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -89,20 +89,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesAnyType.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -146,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesAnyType is not found in the empty JSON string", AdditionalPropertiesAnyType.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -153,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesAnyType` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 4a21accd5d55..4a5b73a6054c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -23,9 +23,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; import java.util.List; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -39,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -50,7 +49,7 @@ * AdditionalPropertiesArray */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -81,6 +80,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -90,20 +90,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesArray.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -147,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesArray is not found in the empty JSON string", AdditionalPropertiesArray.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -154,6 +153,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesArray` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 789f183d1ae5..070f06150e5d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -49,7 +48,7 @@ * AdditionalPropertiesBoolean */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -80,6 +79,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -89,20 +89,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesBoolean.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -146,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesBoolean is not found in the empty JSON string", AdditionalPropertiesBoolean.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -153,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesBoolean` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 73cd939e3862..02c2ac782168 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -416,6 +417,7 @@ public void setAnytype3(Object anytype3) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -510,6 +512,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesClass is not found in the empty JSON string", AdditionalPropertiesClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 214e24d4d2a1..b22e41189239 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -49,7 +48,7 @@ * AdditionalPropertiesInteger */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -80,6 +79,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -89,20 +89,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesInteger.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -146,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesInteger is not found in the empty JSON string", AdditionalPropertiesInteger.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -153,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesInteger` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 44fed01edd67..968eee748c34 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -24,8 +24,6 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -39,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -50,7 +49,7 @@ * AdditionalPropertiesNumber */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -81,6 +80,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -90,20 +90,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesNumber.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -147,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesNumber is not found in the empty JSON string", AdditionalPropertiesNumber.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -154,6 +153,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesNumber` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 48741b8e4d00..f50e8bd73b57 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -23,7 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; import java.util.Map; import com.google.gson.Gson; @@ -38,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -49,7 +49,7 @@ * AdditionalPropertiesObject */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -80,6 +80,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -89,20 +90,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesObject.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -146,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesObject is not found in the empty JSON string", AdditionalPropertiesObject.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -153,6 +153,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesObject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index bf6acaaa3a5b..226958743959 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -49,7 +48,7 @@ * AdditionalPropertiesString */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -80,6 +79,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -89,20 +89,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesString.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -146,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesString is not found in the empty JSON string", AdditionalPropertiesString.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -153,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesString` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java index 679f62d604ce..f49c160b1bc1 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -109,6 +110,7 @@ public void setColor(String color) { } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 2bf41e969dca..b2b1a6b2469f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -89,6 +90,7 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -153,6 +155,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfArrayOfNumberOnly is not found in the empty JSON string", ArrayOfArrayOfNumberOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -160,6 +163,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + // ensure the json data is an array + if (jsonObj.get("ArrayArrayNumber") != null && !jsonObj.get("ArrayArrayNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ArrayArrayNumber` to be an array in the JSON string but got `%s`", jsonObj.get("ArrayArrayNumber").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 342249bc0199..6d17c1826d26 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -89,6 +90,7 @@ public void setArrayNumber(List arrayNumber) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -153,6 +155,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfNumberOnly is not found in the empty JSON string", ArrayOfNumberOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -160,6 +163,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + // ensure the json data is an array + if (jsonObj.get("ArrayNumber") != null && !jsonObj.get("ArrayNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ArrayNumber` to be an array in the JSON string but got `%s`", jsonObj.get("ArrayNumber").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java index e89a7a15b222..51d01d2a389c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -159,6 +160,7 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -229,6 +231,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTest is not found in the empty JSON string", ArrayTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -236,6 +239,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + // ensure the json data is an array + if (jsonObj.get("array_of_string") != null && !jsonObj.get("array_of_string").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_of_string` to be an array in the JSON string but got `%s`", jsonObj.get("array_of_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_array_of_integer") != null && !jsonObj.get("array_array_of_integer").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_array_of_integer` to be an array in the JSON string but got `%s`", jsonObj.get("array_array_of_integer").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_array_of_model") != null && !jsonObj.get("array_array_of_model").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_array_of_model` to be an array in the JSON string but got `%s`", jsonObj.get("array_array_of_model").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java index 0aade13d4fbe..1e61127c61e1 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -132,6 +133,7 @@ public void setKind(KindEnum kind) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -202,6 +204,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in BigCat is not found in the empty JSON string", BigCat.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 4a6501e4aed2..ba8b6753c1fb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -129,6 +130,7 @@ public void setKind(KindEnum kind) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -193,6 +195,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in BigCatAllOf is not found in the empty JSON string", BigCatAllOf.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -200,6 +203,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BigCatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java index 8584d4c02219..12a0f496eb4f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -213,6 +214,7 @@ public void setATTNAME(String ATT_NAME) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -292,6 +294,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Capitalization is not found in the empty JSON string", Capitalization.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -299,6 +302,24 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Capitalization` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("smallCamel") != null && !jsonObj.get("smallCamel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `smallCamel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("smallCamel").toString())); + } + if (jsonObj.get("CapitalCamel") != null && !jsonObj.get("CapitalCamel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `CapitalCamel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CapitalCamel").toString())); + } + if (jsonObj.get("small_Snake") != null && !jsonObj.get("small_Snake").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `small_Snake` to be a primitive type in the JSON string but got `%s`", jsonObj.get("small_Snake").toString())); + } + if (jsonObj.get("Capital_Snake") != null && !jsonObj.get("Capital_Snake").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `Capital_Snake` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Capital_Snake").toString())); + } + if (jsonObj.get("SCA_ETH_Flow_Points") != null && !jsonObj.get("SCA_ETH_Flow_Points").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `SCA_ETH_Flow_Points` to be a primitive type in the JSON string but got `%s`", jsonObj.get("SCA_ETH_Flow_Points").toString())); + } + if (jsonObj.get("ATT_NAME") != null && !jsonObj.get("ATT_NAME").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ATT_NAME` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ATT_NAME").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java index 265019ed5e70..05ce4e81065c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -82,6 +83,7 @@ public void setDeclawed(Boolean declawed) { } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java index 61efd362e4dc..8a5201bcfc42 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,7 @@ public void setDeclawed(Boolean declawed) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -142,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in CatAllOf is not found in the empty JSON string", CatAllOf.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java index a0b3ab7a893b..b8d5b31d26e9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -105,6 +106,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -173,6 +175,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -187,6 +190,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java index 8075c6a68c5a..bea305e83a39 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,7 @@ public void setPropertyClass(String propertyClass) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -143,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ClassModel is not found in the empty JSON string", ClassModel.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -150,6 +153,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClassModel` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("_class") != null && !jsonObj.get("_class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `_class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_class").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java index 73cf80af1972..f9e9b104d87c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,7 @@ public void setClient(String client) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -142,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Client is not found in the empty JSON string", Client.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -149,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Client` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("client") != null && !jsonObj.get("client").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java index 0afe4480c73c..a8ab2729c842 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -81,6 +82,7 @@ public void setBreed(String breed) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -150,6 +152,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Dog is not found in the empty JSON string", Dog.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java index afe1b3f3cc9d..a7feaacc9c69 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,7 @@ public void setBreed(String breed) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -142,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in DogAllOf is not found in the empty JSON string", DogAllOf.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -149,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DogAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java index 7f0040a14661..f7355cf6ec89 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -209,6 +210,7 @@ public void setArrayEnum(List arrayEnum) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -276,6 +278,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EnumArrays is not found in the empty JSON string", EnumArrays.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -283,6 +286,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnumArrays` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("just_symbol") != null && !jsonObj.get("just_symbol").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `just_symbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("just_symbol").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_enum") != null && !jsonObj.get("array_enum").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_enum` to be an array in the JSON string but got `%s`", jsonObj.get("array_enum").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java index ea69362e4ecb..b9d11861dffc 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -379,6 +380,7 @@ public void setOuterEnum(OuterEnum outerEnum) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -456,6 +458,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EnumTest is not found in the empty JSON string", EnumTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -470,6 +473,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("enum_string") != null && !jsonObj.get("enum_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enum_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_string").toString())); + } + if (jsonObj.get("enum_string_required") != null && !jsonObj.get("enum_string_required").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enum_string_required` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_string_required").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 6f533393a3b5..6ec83ac69dca 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -116,6 +117,7 @@ public void setFiles(List files) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -183,6 +185,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in FileSchemaTestClass is not found in the empty JSON string", FileSchemaTestClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -195,8 +198,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { ModelFile.validateJsonObject(jsonObj.getAsJsonObject("file")); } JsonArray jsonArrayfiles = jsonObj.getAsJsonArray("files"); - // validate the optional field `files` (array) if (jsonArrayfiles != null) { + // ensure the json data is an array + if (!jsonObj.get("files").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `files` to be an array in the JSON string but got `%s`", jsonObj.get("files").toString())); + } + + // validate the optional field `files` (array) for (int i = 0; i < jsonArrayfiles.size(); i++) { ModelFile.validateJsonObject(jsonArrayfiles.get(i).getAsJsonObject()); }; diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java index abf7307c3642..2871b5d349df 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -444,6 +445,7 @@ public void setBigDecimal(BigDecimal bigDecimal) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -551,6 +553,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in FormatTest is not found in the empty JSON string", FormatTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -565,6 +568,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string") != null && !jsonObj.get("string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string").toString())); + } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (jsonObj.get("password") != null && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 663f311185d9..6a2705dfaf40 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -97,6 +98,7 @@ public String getFoo() { + @Override public boolean equals(Object o) { if (this == o) { @@ -164,6 +166,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in HasOnlyReadOnly is not found in the empty JSON string", HasOnlyReadOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -171,6 +174,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HasOnlyReadOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); + } + if (jsonObj.get("foo") != null && !jsonObj.get("foo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foo").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java index 32e4f3c5e47a..52d485a7302d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -241,6 +242,7 @@ public void setIndirectMap(Map indirectMap) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -314,6 +316,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MapTest is not found in the empty JSON string", MapTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7f1ae480b867..93b6df854a7e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -42,6 +42,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -146,6 +147,7 @@ public void setMap(Map map) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -216,6 +218,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MixedPropertiesAndAdditionalPropertiesClass is not found in the empty JSON string", MixedPropertiesAndAdditionalPropertiesClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -223,6 +226,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MixedPropertiesAndAdditionalPropertiesClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java index ed075c728523..d8a11eac09f2 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,7 @@ public void setPropertyClass(String propertyClass) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -173,6 +175,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Model200Response is not found in the empty JSON string", Model200Response.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -180,6 +183,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Model200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("class") != null && !jsonObj.get("class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a1f9b9770876..332723cf37c3 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -132,6 +133,7 @@ public void setMessage(String message) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -202,6 +204,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelApiResponse is not found in the empty JSON string", ModelApiResponse.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -209,6 +212,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelApiResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (jsonObj.get("message") != null && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java index eaa7571ba202..d73e3b49a31b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,7 @@ public void setSourceURI(String sourceURI) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -143,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelFile is not found in the empty JSON string", ModelFile.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -150,6 +153,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelFile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("sourceURI") != null && !jsonObj.get("sourceURI").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sourceURI` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceURI").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java index df7332dde76b..c21791d118f0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,7 @@ public void set123list(String _123list) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -142,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelList is not found in the empty JSON string", ModelList.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -149,6 +152,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("123-list") != null && !jsonObj.get("123-list").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `123-list` to be a primitive type in the JSON string but got `%s`", jsonObj.get("123-list").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java index dd1250c697fa..ce3ecd43aabe 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,7 @@ public void setReturn(Integer _return) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -143,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelReturn is not found in the empty JSON string", ModelReturn.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java index 1c37e17f5218..e253e6e37927 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -152,6 +153,7 @@ public Integer get123number() { + @Override public boolean equals(Object o) { if (this == o) { @@ -226,6 +228,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Name is not found in the empty JSON string", Name.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -240,6 +243,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java index 44e8bc923f7e..11eb4a9390b0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,7 @@ public void setJustNumber(BigDecimal justNumber) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -143,6 +145,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in NumberOnly is not found in the empty JSON string", NumberOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java index b5479e546b4e..c4f00ec9c7d5 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -263,6 +264,7 @@ public void setComplete(Boolean complete) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -342,6 +344,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Order is not found in the empty JSON string", Order.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -349,6 +352,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Order` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java index e3051bdefef2..acc2fba781a3 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -133,6 +134,7 @@ public void setMyBoolean(Boolean myBoolean) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -203,6 +205,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in OuterComposite is not found in the empty JSON string", OuterComposite.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -210,6 +213,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OuterComposite` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("my_string") != null && !jsonObj.get("my_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `my_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("my_string").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java index d522ddae21ff..b8c3d9b927f8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java @@ -42,6 +42,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -281,6 +282,7 @@ public void setStatus(StatusEnum status) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -362,6 +364,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Pet is not found in the empty JSON string", Pet.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -380,13 +383,28 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.getAsJsonObject("category") != null) { Category.validateJsonObject(jsonObj.getAsJsonObject("category")); } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the json data is an array + if (jsonObj.get("photoUrls") != null && !jsonObj.get("photoUrls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString())); + } JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - // validate the optional field `tags` (array) if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) for (int i = 0; i < jsonArraytags.size(); i++) { Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); }; } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 402aa73e38b2..b535ed95846f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -104,6 +105,7 @@ public void setBaz(String baz) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -171,6 +173,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ReadOnlyFirst is not found in the empty JSON string", ReadOnlyFirst.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -178,6 +181,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadOnlyFirst` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); + } + if (jsonObj.get("baz") != null && !jsonObj.get("baz").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `baz` to be a primitive type in the JSON string but got `%s`", jsonObj.get("baz").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6e5447b59573..652842a1a56a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,7 @@ public SpecialModelName() { } + @Override public boolean equals(Object o) { if (this == o) { @@ -142,6 +144,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SpecialModelName is not found in the empty JSON string", SpecialModelName.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java index dda2805f34ed..e22d3eb088c8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -105,6 +106,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -172,6 +174,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -179,6 +182,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index af89ad949dad..e91430614dfb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -194,6 +195,7 @@ public void setArrayItem(List arrayItem) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -275,6 +277,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in TypeHolderDefault is not found in the empty JSON string", TypeHolderDefault.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -289,6 +292,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string_item") != null && !jsonObj.get("string_item").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string_item` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string_item").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_item") != null && !jsonObj.get("array_item").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_item` to be an array in the JSON string but got `%s`", jsonObj.get("array_item").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java index d71fa7860ef1..c1c3f05b6383 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -221,6 +222,7 @@ public void setArrayItem(List arrayItem) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -306,6 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in TypeHolderExample is not found in the empty JSON string", TypeHolderExample.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -320,6 +323,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string_item") != null && !jsonObj.get("string_item").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string_item` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string_item").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_item") != null && !jsonObj.get("array_item").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_item` to be an array in the JSON string but got `%s`", jsonObj.get("array_item").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java index bef92ee0e3fc..279649827147 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -267,6 +268,7 @@ public void setUserStatus(Integer userStatus) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -352,6 +354,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -359,6 +362,24 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("username") != null && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + } + if (jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + } + if (jsonObj.get("email") != null && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (jsonObj.get("password") != null && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java index 4c1d46edf572..9a29317b35a4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -909,6 +910,7 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -1057,6 +1059,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in XmlItem is not found in the empty JSON string", XmlItem.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -1064,6 +1067,57 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `XmlItem` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("attribute_string") != null && !jsonObj.get("attribute_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attribute_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attribute_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("wrapped_array") != null && !jsonObj.get("wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("wrapped_array").toString())); + } + if (jsonObj.get("name_string") != null && !jsonObj.get("name_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("name_array") != null && !jsonObj.get("name_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `name_array` to be an array in the JSON string but got `%s`", jsonObj.get("name_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("name_wrapped_array") != null && !jsonObj.get("name_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `name_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("name_wrapped_array").toString())); + } + if (jsonObj.get("prefix_string") != null && !jsonObj.get("prefix_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_array") != null && !jsonObj.get("prefix_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_wrapped_array") != null && !jsonObj.get("prefix_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_wrapped_array").toString())); + } + if (jsonObj.get("namespace_string") != null && !jsonObj.get("namespace_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("namespace_array") != null && !jsonObj.get("namespace_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_array` to be an array in the JSON string but got `%s`", jsonObj.get("namespace_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("namespace_wrapped_array") != null && !jsonObj.get("namespace_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("namespace_wrapped_array").toString())); + } + if (jsonObj.get("prefix_ns_string") != null && !jsonObj.get("prefix_ns_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_ns_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix_ns_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_ns_array") != null && !jsonObj.get("prefix_ns_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_ns_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_ns_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_ns_wrapped_array") != null && !jsonObj.get("prefix_ns_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_ns_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_ns_wrapped_array").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ApiClientTest.java index 80f2bba66b0e..cee7d2db8d57 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ApiClientTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ApiClientTest.java @@ -10,10 +10,8 @@ import java.util.*; import java.util.TimeZone; -import org.junit.*; -import static org.junit.Assert.*; -import static org.hamcrest.CoreMatchers.*; - +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class ApiClientTest { ApiClient apiClient; @@ -338,7 +336,7 @@ public void testSanitizeFilename() { public void testNewHttpClient() { OkHttpClient oldClient = apiClient.getHttpClient(); apiClient.setHttpClient(oldClient.newBuilder().build()); - assertThat(apiClient.getHttpClient(), is(not(oldClient))); + assertNotSame(apiClient.getHttpClient(), oldClient); } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ConfigurationTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ConfigurationTest.java index f05c230dc758..f4f1d877d572 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ConfigurationTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/ConfigurationTest.java @@ -1,8 +1,7 @@ package org.openapitools.client; -import org.junit.*; -import static org.junit.Assert.*; - +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class ConfigurationTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java index bcb72b19e429..4fdb824f6b15 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java @@ -16,14 +16,11 @@ import java.util.TimeZone; import okio.ByteString; -import org.junit.*; import java.time.LocalDate; import java.time.OffsetDateTime; -import org.threeten.bp.ZoneId; -import org.threeten.bp.ZoneOffset; -import org.threeten.bp.format.DateTimeFormatter; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class JSONTest { private ApiClient apiClient = null; @@ -199,4 +196,4 @@ public static String getCurrentTimezoneOffset() { return offset; } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/StringUtilTest.java index aa7c81759ec4..14826e31722d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/StringUtilTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/StringUtilTest.java @@ -1,8 +1,7 @@ package org.openapitools.client; -import org.junit.*; -import static org.junit.Assert.*; - +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class StringUtilTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 719300bc9853..331e9a6b8aa8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,26 +26,23 @@ /** * API tests for AnotherFakeApi */ -@Ignore +@Disabled public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); - /** * To test special tags * * To test special tags and operation ID starting with number * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void call123testSpecialTagsTest() throws ApiException { Client body = null; Client response = api.call123testSpecialTags(body); - // TODO: test validations } - + } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeApiTest.java index 7569f403ad85..c5064962312c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,8 +23,8 @@ import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -34,148 +34,116 @@ /** * API tests for FakeApi */ -@Ignore +@Disabled public class FakeApiTest { private final FakeApi api = new FakeApi(); - /** * creates an XmlItem * * this route creates an XmlItem * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createXmlItemTest() throws ApiException { XmlItem xmlItem = null; api.createXmlItem(xmlItem); - // TODO: test validations } - + /** - * - * * Test serialization of outer boolean types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterBooleanSerializeTest() throws ApiException { Boolean body = null; Boolean response = api.fakeOuterBooleanSerialize(body); - // TODO: test validations } - + /** - * - * * Test serialization of object with outer number type * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { OuterComposite body = null; OuterComposite response = api.fakeOuterCompositeSerialize(body); - // TODO: test validations } - + /** - * - * * Test serialization of outer number types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterNumberSerializeTest() throws ApiException { BigDecimal body = null; BigDecimal response = api.fakeOuterNumberSerialize(body); - // TODO: test validations } - + /** - * - * * Test serialization of outer string types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterStringSerializeTest() throws ApiException { String body = null; String response = api.fakeOuterStringSerialize(body); - // TODO: test validations } - + /** - * - * * For this test, the body for this request much reference a schema named `File`. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { FileSchemaTestClass body = null; api.testBodyWithFileSchema(body); - // TODO: test validations } - + /** - * - * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; User body = null; api.testBodyWithQueryParams(query, body); - // TODO: test validations } - + /** * To test \"client\" model * * To test \"client\" model * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClientModelTest() throws ApiException { Client body = null; Client response = api.testClientModel(body); - // TODO: test validations } - + /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEndpointParametersTest() throws ApiException { @@ -194,17 +162,15 @@ public void testEndpointParametersTest() throws ApiException { String password = null; String paramCallback = null; api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - // TODO: test validations } - + /** * To test enum parameters * * To test enum parameters * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEnumParametersTest() throws ApiException { @@ -217,17 +183,15 @@ public void testEnumParametersTest() throws ApiException { List enumFormStringArray = null; String enumFormString = null; api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - // TODO: test validations } - + /** * Fake endpoint to test group parameters (optional) * * Fake endpoint to test group parameters (optional) * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testGroupParametersTest() throws ApiException { @@ -242,41 +206,48 @@ public void testGroupParametersTest() throws ApiException { .booleanGroup(booleanGroup) .int64Group(int64Group) .execute(); - // TODO: test validations } - + /** * test inline additionalProperties * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { Map param = null; api.testInlineAdditionalProperties(param); - // TODO: test validations } - + /** * test json serialization of form data * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testJsonFormDataTest() throws ApiException { String param = null; String param2 = null; api.testJsonFormData(param, param2); + // TODO: test validations + } + /** + * To test the collection format in query parameters + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); // TODO: test validations } - + } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 72c85cd045fa..4899dbeac98c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,26 +26,23 @@ /** * API tests for FakeClassnameTags123Api */ -@Ignore +@Disabled public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); - /** * To test class name in snake case * * To test class name in snake case * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClassnameTest() throws ApiException { Client body = null; Client response = api.testClassname(body); - // TODO: test validations } - + } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/PetApiTest.java index f65184b608cd..2aa8a1881336 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -37,9 +37,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.junit.*; - -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; /** * API tests for PetApi @@ -312,14 +311,14 @@ public void testFindPetsByStatus() throws Exception { } @Test - @Ignore + @Disabled public void testFindPetsByTags() throws Exception { Pet pet = createPet(); pet.setName("monster"); pet.setStatus(Pet.StatusEnum.AVAILABLE); - List tags = new ArrayList(); - Tag tag1 = new Tag(); + List tags = new ArrayList(); + org.openapitools.client.model.Tag tag1 = new org.openapitools.client.model.Tag(); tag1.setName("friendly"); tags.add(tag1); pet.setTags(tags); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java index b10e977454f5..786a51c7d142 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,73 +26,62 @@ /** * API tests for StoreApi */ -@Ignore +@Disabled public class StoreApiTest { private final StoreApi api = new StoreApi(); - /** * Delete purchase order by ID * * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteOrderTest() throws ApiException { String orderId = null; api.deleteOrder(orderId); - // TODO: test validations } - + /** * Returns pet inventories by status * * Returns a map of status codes to quantities * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getInventoryTest() throws ApiException { Map response = api.getInventory(); - // TODO: test validations } - + /** * Find purchase order by ID * * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getOrderByIdTest() throws ApiException { Long orderId = null; Order response = api.getOrderById(orderId); - // TODO: test validations } - + /** * Place an order for a pet * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void placeOrderTest() throws ApiException { Order body = null; Order response = api.placeOrder(body); - // TODO: test validations } - + } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/UserApiTest.java index 7c392f77f99a..cb958423ece1 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,9 +14,10 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,139 +27,112 @@ /** * API tests for UserApi */ -@Ignore +@Disabled public class UserApiTest { private final UserApi api = new UserApi(); - /** * Create user * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUserTest() throws ApiException { User body = null; api.createUser(body); - // TODO: test validations } - + /** * Creates list of users with given input array * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithArrayInputTest() throws ApiException { List body = null; api.createUsersWithArrayInput(body); - // TODO: test validations } - + /** * Creates list of users with given input array * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithListInputTest() throws ApiException { List body = null; api.createUsersWithListInput(body); - // TODO: test validations } - + /** * Delete user * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteUserTest() throws ApiException { String username = null; api.deleteUser(username); - // TODO: test validations } - + /** * Get user by user name * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getUserByNameTest() throws ApiException { String username = null; User response = api.getUserByName(username); - // TODO: test validations } - + /** * Logs user into the system * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void loginUserTest() throws ApiException { String username = null; String password = null; String response = api.loginUser(username, password); - // TODO: test validations } - + /** * Logs out current logged in user session * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void logoutUserTest() throws ApiException { api.logoutUser(); - // TODO: test validations } - + /** * Updated user * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updateUserTest() throws ApiException { String username = null; User body = null; api.updateUser(username, body); - // TODO: test validations } - + } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index da25043b27e6..ed669e94797b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -6,9 +6,9 @@ import java.util.List; import org.openapitools.client.Pair; -import org.junit.*; +import org.junit.jupiter.api.*; import static org.junit.Assert.*; - +import static org.junit.jupiter.api.Assertions.*; public class ApiKeyAuthTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index e963ea24f7f3..154dc61b352c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -6,14 +6,14 @@ import java.util.List; import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class HttpBasicAuthTest { HttpBasicAuth auth = null; - @Before + @BeforeEach public void setup() { auth = new HttpBasicAuth(); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 656f05771615..d6ddcfbe4559 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index 4c5bdc4ffad6..63288bd12919 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index de976999c633..6ca84a09f7c6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 3c18ad38c7e3..4018fbdf70e4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,12 +21,12 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -44,19 +44,91 @@ public void testAdditionalPropertiesClass() { } /** - * Test the property 'mapProperty' + * Test the property 'mapString' */ @Test - public void mapPropertyTest() { - // TODO: test mapProperty + public void mapStringTest() { + // TODO: test mapString } /** - * Test the property 'mapOfMapProperty' + * Test the property 'mapNumber' */ @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty + public void mapNumberTest() { + // TODO: test mapNumber + } + + /** + * Test the property 'mapInteger' + */ + @Test + public void mapIntegerTest() { + // TODO: test mapInteger + } + + /** + * Test the property 'mapBoolean' + */ + @Test + public void mapBooleanTest() { + // TODO: test mapBoolean + } + + /** + * Test the property 'mapArrayInteger' + */ + @Test + public void mapArrayIntegerTest() { + // TODO: test mapArrayInteger + } + + /** + * Test the property 'mapArrayAnytype' + */ + @Test + public void mapArrayAnytypeTest() { + // TODO: test mapArrayAnytype + } + + /** + * Test the property 'mapMapString' + */ + @Test + public void mapMapStringTest() { + // TODO: test mapMapString + } + + /** + * Test the property 'mapMapAnytype' + */ + @Test + public void mapMapAnytypeTest() { + // TODO: test mapMapAnytype + } + + /** + * Test the property 'anytype1' + */ + @Test + public void anytype1Test() { + // TODO: test anytype1 + } + + /** + * Test the property 'anytype2' + */ + @Test + public void anytype2Test() { + // TODO: test anytype2 + } + + /** + * Test the property 'anytype3' + */ + @Test + public void anytype3Test() { + // TODO: test anytype3 } } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 712e0c131b12..d40d8056a4d4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index a2039fa83a55..69cd113d7385 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3c9fe9323b85..0a434005ef49 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 3a3942ab84d6..250590a3dad9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AnimalTest.java index 30ed464f5e1d..e9057af31c0b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,11 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.client.model.BigCat; +import org.openapitools.client.model.Cat; +import org.openapitools.client.model.Dog; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 27121aec515e..dc2a20f163d4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -25,9 +25,10 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; + +import org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 2f88d6ad4b9b..71c5b2c49ae2 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 3182aa654811..ae7c9ae171ba 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java index f7f725106d12..59025b11722a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java index 0cb50249725b..4d39b1f814eb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -23,9 +23,8 @@ import java.io.IOException; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CapitalizationTest.java index 1d029ba7c504..4fbb4c7b201f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 0473dc929e5d..c2f6bb72a5b7 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatTest.java index 718bb5b6baf6..e67f6005c855 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,10 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.client.model.BigCat; +import org.openapitools.client.model.CatAllOf; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CategoryTest.java index 79374c54e6f3..52b230df4ff8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClassModelTest.java index 4c66db89c4f6..07c08313db8c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClientTest.java index 1a9f6d6fc9e7..f4d80128c975 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 7780c14a386e..f877f02e849d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogTest.java index 8392c1745647..4bcd8e2c9eb0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.client.model.DogAllOf; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumArraysTest.java index a116bb028fc8..77ee97144aeb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,8 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumClassTest.java index 97855ba723a1..88c982a61df2 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,9 +14,8 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumTestTest.java index d43e3cace6da..7a8beabe1412 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumValueTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumValueTest.java deleted file mode 100644 index 73440e547b25..000000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/EnumValueTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.google.gson.Gson; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - // test serialization - Gson gson = new Gson(); - String json = gson.toJson(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_integer\":1,\"enum_number\":1.1}"); - - // test deserialization - EnumTest fromString = gson.fromJson(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumString().getValue(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertTrue(fromString.getEnumInteger().getValue() == 1); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - assertTrue(fromString.getEnumNumber().getValue() == 1.1); - } -} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a960673c6169..2c11116e3af4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.client.model.ModelFile; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -43,11 +43,11 @@ public void testFileSchemaTestClass() { } /** - * Test the property 'file' + * Test the property '_file' */ @Test - public void fileTest() { - // TODO: test file + public void _fileTest() { + // TODO: test _file } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FormatTestTest.java index 324f11ac4580..e6300c4253b1 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,12 +23,11 @@ import java.io.File; import java.io.IOException; import java.math.BigDecimal; -import java.util.UUID; import java.time.LocalDate; import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import java.util.UUID; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -149,4 +148,12 @@ public void passwordTest() { // TODO: test password } + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index d854c0c9daf2..ac3d1a4d4d7f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MapTestTest.java index 9f78d486659f..b29767eb7c41 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index af2d1b2db303..b4f447143948 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,15 +21,14 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; -import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index dcea58773348..a6660ce62365 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 46b8648fdccf..81a9bb5a4d7a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelFileTest.java index 132012d4c387..b55340ef6195 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelListTest.java index d3ed2075e9a4..dc7c6441885c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelReturnTest.java index 4135ead56864..7a55f2ab476f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NameTest.java index bdc04b000c18..5dc7f515a443 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 214a6d4538dc..637d4887e312 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OrderTest.java index 266bb3290d5f..838191fecd07 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 710bfedd5805..a532cf086637 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 064f84b3ff60..61cb88bb3dba 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,9 +14,8 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/PetTest.java index 3f4c1e8365d7..01395a956fc4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,12 +22,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -41,15 +42,7 @@ public class PetTest { */ @Test public void testPet() { - // test Pet - model.setId(1029L); - model.setName("Dog"); - - Pet model2 = new Pet(); - model2.setId(1029L); - model2.setName("Dog"); - - Assert.assertTrue(model.equals(model2)); + // TODO: test Pet } /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index c89b608f6096..3b8a3f64b7dd 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index d058c884e493..066348a3fc93 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TagTest.java index 27acc7ce8e77..ed6daf3602c6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index f120407395a8..4da5bca66e8e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index 5e99dff0caef..7adc92a265b0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -59,6 +58,14 @@ public void numberItemTest() { // TODO: test numberItem } + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + /** * Test the property 'integerItem' */ diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/UserTest.java index da1c9bda4b5d..147067ea011d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/XmlItemTest.java index 7ecbaf4fa980..0baea8f4fee0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,9 +24,8 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 358423dcb447..80cd5bef55e5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -12,8 +12,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -106,20 +106,20 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' + implementation 'io.swagger:swagger-annotations:1.6.5' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' + implementation 'com.squareup.okhttp3:okhttp:4.9.3' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' + implementation 'com.google.code.gson:gson:2.9.0' + implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.0' - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.2' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:3.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.mockito:mockito-core:3.12.4' } javadoc { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt index 79736b9e7024..cacc65d78988 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt @@ -9,20 +9,20 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.9.3", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", + "com.google.code.gson" % "gson" % "2.9.0", + "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.0", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", "org.openapitools" % "jackson-databind-nullable" % "0.2.2", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md index 8c348eb23069..c82a93daa893 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md index 2e7ed29b2554..e9d5836db7c2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md index bfe96e6ffdf1..0e757ef23361 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md index 1b443d6ddff5..3a11068b8e7c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md index c030cc566c5f..4d1104b4a736 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md index 34583587d639..f6bfc6846e82 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md index 3377cb6aedf1..5c707b35628b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md index 715c33fe11ea..c5aad6be6b85 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md index ebe563535646..ae2ce0126db9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md index 0565c2589b3c..d26a29ef8e26 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -47,9 +47,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -67,5 +67,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md index 824460e9b87a..35d3ea269859 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md index 74eeb0362a2d..8eaf38152c1b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md index e3af575009ee..8f89f5362701 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md index d69b9abe4a2a..64a96ad74aeb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md index e010e0307fde..b1dfbe0c7b3f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md index 3e27a481387d..7d9872100808 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md index 7595377e38e7..a4b8360402b3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md index a45e40c7ce8a..4e24aa875dfe 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md index 24205f7a0435..b5b119606f4f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md index d4cb7cafb439..67edef34a0ae 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md index cff52708e579..ee5a735c5696 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md index abcb3f477542..fd803e576b95 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md index d2a15068ecb1..71d59a7ea04e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md index 149054aa5878..80c93235108d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md index 8ef92cc9c09e..f1c7b26f3776 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index ed2724757eef..f804c0e19404 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -59,9 +59,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -79,7 +79,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **fakeOuterBooleanSerialize** @@ -121,9 +121,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -141,7 +141,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output boolean | - | +| **200** | Output boolean | - | # **fakeOuterCompositeSerialize** @@ -183,9 +183,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -203,7 +203,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output composite | - | +| **200** | Output composite | - | # **fakeOuterNumberSerialize** @@ -245,9 +245,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -265,7 +265,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output number | - | +| **200** | Output number | - | # **fakeOuterStringSerialize** @@ -307,9 +307,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -327,7 +327,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output string | - | +| **200** | Output string | - | # **testBodyWithFileSchema** @@ -368,9 +368,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -388,7 +388,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | # **testBodyWithQueryParams** @@ -428,10 +428,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -449,7 +449,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | # **testClientModel** @@ -491,9 +491,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -511,7 +511,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testEndpointParameters** @@ -571,22 +571,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -604,8 +604,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **testEnumParameters** @@ -653,16 +653,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -680,8 +680,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid request | - | -**404** | Not found | - | +| **400** | Invalid request | - | +| **404** | Not found | - | # **testGroupParameters** @@ -731,14 +731,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -756,7 +756,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +| **400** | Someting wrong | - | # **testInlineAdditionalProperties** @@ -795,9 +795,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -815,7 +815,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testJsonFormData** @@ -855,10 +855,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -876,7 +876,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testQueryParameterCollectionFormat** @@ -921,13 +921,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type @@ -945,5 +945,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md index bd934e360718..65061cde05bb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -54,9 +54,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -74,5 +74,5 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md index 799691cc83d1..4fa3d346ea5e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md index 0fa92f2f3c11..453c512d6107 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | ## Implemented Interfaces 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 d4eaa5acd406..4cf8211cfd48 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md index 7f90bb41e601..cf7ce3afb579 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md index b9f9e6e534bb..67a556da124d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md index 1d31df867e05..20aaf612db6f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md index 0b0fb72a7bd4..6d5387f9a58c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelFile.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelFile.md index 37ad0cfd8e93..a78cce44adb0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelFile.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelList.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelList.md index 232bbf2e0a8c..c922ba375a64 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelList.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md index e3febcad093c..1467e52330b4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | ## Implemented Interfaces 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 f5ca87856455..9b98abb758ef 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md index 7a8400d89193..36003207de17 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md index e2db24edc4aa..04a1f5b3c7e0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md index 63cb48f4d322..9117d2e6300d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md index c7fa5e62807c..701df9201543 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md index d1aa160676c1..4309006d5720 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -77,8 +77,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**405** | Invalid input | - | +| **200** | successful operation | - | +| **405** | Invalid input | - | # **deletePet** @@ -123,10 +123,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -144,8 +144,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid pet value | - | +| **200** | successful operation | - | +| **400** | Invalid pet value | - | # **findPetsByStatus** @@ -192,9 +192,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -212,8 +212,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid status value | - | +| **200** | successful operation | - | +| **400** | Invalid status value | - | # **findPetsByTags** @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -280,8 +280,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid tag value | - | +| **200** | successful operation | - | +| **400** | Invalid tag value | - | # **getPetById** @@ -330,9 +330,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -350,9 +350,9 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Pet not found | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | # **updatePet** @@ -396,9 +396,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -416,10 +416,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Pet not found | - | -**405** | Validation exception | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | # **updatePetWithForm** @@ -465,11 +465,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -487,7 +487,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**405** | Invalid input | - | +| **405** | Invalid input | - | # **uploadFile** @@ -534,11 +534,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -556,7 +556,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **uploadFileWithRequiredFile** @@ -603,11 +603,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type @@ -625,5 +625,5 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | 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 ad892c7be1ce..fc0e46cab35e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md index c98cd96db2e4..43985e5171f5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md index a86b478e55ab..76bdde9e995e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -49,9 +49,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -69,8 +69,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid ID supplied | - | -**404** | Order not found | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | # **getInventory** @@ -135,7 +135,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **getOrderById** @@ -177,9 +177,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -197,9 +197,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Order not found | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | # **placeOrder** @@ -239,9 +239,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -259,6 +259,6 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid Order | - | +| **200** | successful operation | - | +| **400** | Invalid Order | - | diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md index e90d5a34cb4c..690656ea89d2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md index 34ecab13e012..e0caa9c40357 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md index 53d3afebac91..cc076efe9d94 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md index 5561162eee02..d79a69484fd6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md index 7a90fb438b19..1012a68397e7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -53,9 +53,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -73,7 +73,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **createUsersWithArrayInput** @@ -112,9 +112,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -132,7 +132,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **createUsersWithListInput** @@ -171,9 +171,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -191,7 +191,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **deleteUser** @@ -232,9 +232,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -252,8 +252,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **getUserByName** @@ -293,9 +293,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -313,9 +313,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **loginUser** @@ -356,10 +356,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -377,8 +377,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | -**400** | Invalid username/password supplied | - | +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +| **400** | Invalid username/password supplied | - | # **logoutUser** @@ -433,7 +433,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **updateUser** @@ -475,10 +475,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type @@ -496,6 +496,6 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid user supplied | - | -**404** | User not found | - | +| **400** | Invalid user supplied | - | +| **404** | User not found | - | diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md index 4c0db5e9e280..cd8cf1ac26ec 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | ## Implemented Interfaces diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index 1788ea995090..bf2648a512f2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -311,24 +311,24 @@ javax.ws.rs jsr311-api - 1.1.1 + ${jsr311-api-version} javax.ws.rs javax.ws.rs-api - 2.0 + ${javax.ws.rs-api-version} - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test org.mockito mockito-core - 3.12.4 + ${mockito-core-version} test @@ -337,14 +337,17 @@ ${java.version} ${java.version} 1.8.5 - 1.6.3 - 4.9.2 - 2.8.8 + 1.6.5 + 4.9.3 + 2.9.0 3.12.0 0.2.2 1.3.5 - 4.13.2 + 5.8.2 + 3.12.4 + 2.1.1 + 1.1.1 UTF-8 - 2.17.3 + 2.21.0 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java index 627f9ac88d59..8ae5d16c3baf 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java @@ -378,7 +378,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { /** *

    Set OffsetDateTimeFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { @@ -389,7 +389,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { /** *

    Set LocalDateFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { @@ -1230,7 +1230,7 @@ public Request buildRequest(String baseUrl, String path, String method, List formParams) { File file = (File) param.getValue(); addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { - List files = (List) param.getValue(); - for (File file : files) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } } } else { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java index 60e4f9a5e7e6..8a6d4981ca77 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java @@ -27,8 +27,6 @@ public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - private Object errorObject = null; - private GenericType errorObjectType = null; /** *

    Constructor for ApiException.

    @@ -155,40 +153,4 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } - - /** - * Get the error object type. - * - * @return Error object type - */ - public GenericType getErrorObjectType() { - return errorObjectType; - } - - /** - * Set the error object type. - * - * @param errorObjectType object type - */ - public void setErrorObjectType(GenericType errorObjectType) { - this.errorObjectType = errorObjectType; - } - - /** - * Get the error object. - * - * @return Error object - */ - public Object getErrorObject() { - return errorObject; - } - - /** - * Get the error object. - * - * @param errorObject Error object - */ - public void setErrorObject(Object errorObject) { - this.errorObject = errorObject; - } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index e4e556f5565b..0b95c9d75933 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -175,14 +175,8 @@ public Client call123testSpecialTags(Client body) throws ApiException { */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index ad6d8797c599..4e91e597d772 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -300,14 +300,8 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -427,14 +421,8 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -554,14 +542,8 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -681,14 +663,8 @@ public String fakeOuterStringSerialize(String body) throws ApiException { */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1070,14 +1046,8 @@ public Client testClientModel(Client body) throws ApiException { */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { okhttp3.Call localVarCall = testClientModelValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index d22a391b6dd3..f6eda4c553ca 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -175,14 +175,8 @@ public Client testClassname(Client body) throws ApiException { */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index b9f6d5e70c7e..ee4c14afaae8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -446,14 +446,8 @@ public List findPetsByStatus(List status) throws ApiException { */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -593,14 +587,8 @@ public Set findPetsByTags(Set tags) throws ApiException { @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(Set tags) throws ApiException { okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -735,14 +723,8 @@ public Pet getPetById(Long petId) throws ApiException { */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1157,14 +1139,8 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1311,14 +1287,8 @@ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java index 513c7a98894c..380dbea8cb51 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java @@ -294,14 +294,8 @@ public Map getInventory() throws ApiException { */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -432,14 +426,8 @@ public Order getOrderById(Long orderId) throws ApiException { */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -569,14 +557,8 @@ public Order placeOrder(Order body) throws ApiException { */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index 83a8b871025f..58f08ee3ace2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -676,14 +676,8 @@ public User getUserByName(String username) throws ApiException { */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -829,14 +823,8 @@ public String loginUser(String username, String password) throws ApiException { */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 09ac7ef5e714..bedcf0a3b32f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -40,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -51,13 +50,12 @@ * AdditionalPropertiesAnyType */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesAnyType extends HashMap implements Parcelable { +public class AdditionalPropertiesAnyType implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesAnyType() { - super(); } public AdditionalPropertiesAnyType name(String name) { @@ -83,6 +81,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -92,20 +91,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesAnyType.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -124,12 +121,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesAnyType(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -172,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesAnyType is not found in the empty JSON string", AdditionalPropertiesAnyType.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -179,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesAnyType` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 92946f7882ab..b637892ac11a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -23,9 +23,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; import java.util.List; -import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -41,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -52,13 +51,12 @@ * AdditionalPropertiesArray */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesArray extends HashMap implements Parcelable { +public class AdditionalPropertiesArray implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesArray() { - super(); } public AdditionalPropertiesArray name(String name) { @@ -84,6 +82,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -93,20 +92,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesArray.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -125,12 +122,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesArray(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -173,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesArray is not found in the empty JSON string", AdditionalPropertiesArray.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -180,6 +176,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesArray` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 9463acb4c857..d023dd595657 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -40,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -51,13 +50,12 @@ * AdditionalPropertiesBoolean */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesBoolean extends HashMap implements Parcelable { +public class AdditionalPropertiesBoolean implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesBoolean() { - super(); } public AdditionalPropertiesBoolean name(String name) { @@ -83,6 +81,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -92,20 +91,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesBoolean.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -124,12 +121,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesBoolean(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -172,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesBoolean is not found in the empty JSON string", AdditionalPropertiesBoolean.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -179,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesBoolean` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0b813f54301e..99d2423f3a16 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -42,6 +42,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -418,6 +419,7 @@ public void setAnytype3(Object anytype3) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -553,6 +555,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesClass is not found in the empty JSON string", AdditionalPropertiesClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index eb7bd30aa1db..ab186d35b968 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -40,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -51,13 +50,12 @@ * AdditionalPropertiesInteger */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesInteger extends HashMap implements Parcelable { +public class AdditionalPropertiesInteger implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesInteger() { - super(); } public AdditionalPropertiesInteger name(String name) { @@ -83,6 +81,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -92,20 +91,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesInteger.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -124,12 +121,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesInteger(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -172,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesInteger is not found in the empty JSON string", AdditionalPropertiesInteger.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -179,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesInteger` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 081c25515a62..b3bc05c4a45d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -24,8 +24,6 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -41,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -52,13 +51,12 @@ * AdditionalPropertiesNumber */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesNumber extends HashMap implements Parcelable { +public class AdditionalPropertiesNumber implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesNumber() { - super(); } public AdditionalPropertiesNumber name(String name) { @@ -84,6 +82,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -93,20 +92,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesNumber.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -125,12 +122,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesNumber(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -173,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesNumber is not found in the empty JSON string", AdditionalPropertiesNumber.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -180,6 +176,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesNumber` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index dfaa116e7a9e..3f7f01262125 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -23,7 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -40,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -51,13 +51,12 @@ * AdditionalPropertiesObject */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesObject extends HashMap implements Parcelable { +public class AdditionalPropertiesObject implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesObject() { - super(); } public AdditionalPropertiesObject name(String name) { @@ -83,6 +82,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -92,20 +92,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesObject.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -124,12 +122,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesObject(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -172,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesObject is not found in the empty JSON string", AdditionalPropertiesObject.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -179,6 +176,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesObject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 1e54f3b8b8c4..581737f89737 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import android.os.Parcelable; import android.os.Parcel; @@ -40,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -51,13 +50,12 @@ * AdditionalPropertiesString */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesString extends HashMap implements Parcelable { +public class AdditionalPropertiesString implements Parcelable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public AdditionalPropertiesString() { - super(); } public AdditionalPropertiesString name(String name) { @@ -83,6 +81,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -92,20 +91,18 @@ public boolean equals(Object o) { return false; } AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); + return Objects.equals(this.name, additionalPropertiesString.name); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); @@ -124,12 +121,10 @@ private String toIndentedString(Object o) { public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); out.writeValue(name); } AdditionalPropertiesString(Parcel in) { - super(in); name = (String)in.readValue(null); } @@ -172,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesString is not found in the empty JSON string", AdditionalPropertiesString.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -179,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesString` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java index 16799fb49fb9..511c8520fd05 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -111,6 +112,7 @@ public void setColor(String color) { } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index fecfe4718c5b..f5f17ff974c8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -91,6 +92,7 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -176,6 +178,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfArrayOfNumberOnly is not found in the empty JSON string", ArrayOfArrayOfNumberOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -183,6 +186,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + // ensure the json data is an array + if (jsonObj.get("ArrayArrayNumber") != null && !jsonObj.get("ArrayArrayNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ArrayArrayNumber` to be an array in the JSON string but got `%s`", jsonObj.get("ArrayArrayNumber").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 78b2b94f040d..307336cb4a30 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -91,6 +92,7 @@ public void setArrayNumber(List arrayNumber) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -176,6 +178,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfNumberOnly is not found in the empty JSON string", ArrayOfNumberOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -183,6 +186,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + // ensure the json data is an array + if (jsonObj.get("ArrayNumber") != null && !jsonObj.get("ArrayNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ArrayNumber` to be an array in the JSON string but got `%s`", jsonObj.get("ArrayNumber").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java index a1aa4bfb6295..6cdb80e931bb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -161,6 +162,7 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -256,6 +258,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTest is not found in the empty JSON string", ArrayTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -263,6 +266,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + // ensure the json data is an array + if (jsonObj.get("array_of_string") != null && !jsonObj.get("array_of_string").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_of_string` to be an array in the JSON string but got `%s`", jsonObj.get("array_of_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_array_of_integer") != null && !jsonObj.get("array_array_of_integer").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_array_of_integer` to be an array in the JSON string but got `%s`", jsonObj.get("array_array_of_integer").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_array_of_model") != null && !jsonObj.get("array_array_of_model").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_array_of_model` to be an array in the JSON string but got `%s`", jsonObj.get("array_array_of_model").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java index 03471f0f0627..bea575a1e1b9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -135,6 +136,7 @@ public void setKind(KindEnum kind) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -228,6 +230,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in BigCat is not found in the empty JSON string", BigCat.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 2f63416be176..447847173756 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -131,6 +132,7 @@ public void setKind(KindEnum kind) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -216,6 +218,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in BigCatAllOf is not found in the empty JSON string", BigCatAllOf.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -223,6 +226,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BigCatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java index 52e0487e6d72..67bc10dd2ae3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -215,6 +216,7 @@ public void setATTNAME(String ATT_NAME) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -325,6 +327,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Capitalization is not found in the empty JSON string", Capitalization.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -332,6 +335,24 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Capitalization` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("smallCamel") != null && !jsonObj.get("smallCamel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `smallCamel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("smallCamel").toString())); + } + if (jsonObj.get("CapitalCamel") != null && !jsonObj.get("CapitalCamel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `CapitalCamel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CapitalCamel").toString())); + } + if (jsonObj.get("small_Snake") != null && !jsonObj.get("small_Snake").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `small_Snake` to be a primitive type in the JSON string but got `%s`", jsonObj.get("small_Snake").toString())); + } + if (jsonObj.get("Capital_Snake") != null && !jsonObj.get("Capital_Snake").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `Capital_Snake` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Capital_Snake").toString())); + } + if (jsonObj.get("SCA_ETH_Flow_Points") != null && !jsonObj.get("SCA_ETH_Flow_Points").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `SCA_ETH_Flow_Points` to be a primitive type in the JSON string but got `%s`", jsonObj.get("SCA_ETH_Flow_Points").toString())); + } + if (jsonObj.get("ATT_NAME") != null && !jsonObj.get("ATT_NAME").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ATT_NAME` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ATT_NAME").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java index fbb25b74ded1..5aad4e74db06 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -85,6 +86,7 @@ public void setDeclawed(Boolean declawed) { } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java index 0cde7d2dffbb..0d5ce189adc2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,7 @@ public void setDeclawed(Boolean declawed) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -165,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in CatAllOf is not found in the empty JSON string", CatAllOf.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java index 2c6ea2a997b3..77ef37b69b57 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -107,6 +108,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -198,6 +200,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -212,6 +215,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java index a9d40e6067dd..1140bceb647c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -81,6 +82,7 @@ public void setPropertyClass(String propertyClass) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -166,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ClassModel is not found in the empty JSON string", ClassModel.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -173,6 +176,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClassModel` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("_class") != null && !jsonObj.get("_class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `_class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_class").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java index 5c3f3221ab65..921b7aad8578 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,7 @@ public void setClient(String client) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -165,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Client is not found in the empty JSON string", Client.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -172,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Client` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("client") != null && !jsonObj.get("client").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java index c2057da1fca9..fd7f4945a5be 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -84,6 +85,7 @@ public void setBreed(String breed) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -176,6 +178,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Dog is not found in the empty JSON string", Dog.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java index 7ed773b4984c..39d79b9dc705 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,7 @@ public void setBreed(String breed) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -165,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in DogAllOf is not found in the empty JSON string", DogAllOf.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -172,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DogAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java index de346dfe2209..35cddfff9fd9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -211,6 +212,7 @@ public void setArrayEnum(List arrayEnum) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -301,6 +303,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EnumArrays is not found in the empty JSON string", EnumArrays.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -308,6 +311,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnumArrays` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("just_symbol") != null && !jsonObj.get("just_symbol").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `just_symbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("just_symbol").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_enum") != null && !jsonObj.get("array_enum").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_enum` to be an array in the JSON string but got `%s`", jsonObj.get("array_enum").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java index 40d8ef87b990..46d9c89ef9bf 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -381,6 +382,7 @@ public void setOuterEnum(OuterEnum outerEnum) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -487,6 +489,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EnumTest is not found in the empty JSON string", EnumTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -501,6 +504,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("enum_string") != null && !jsonObj.get("enum_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enum_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_string").toString())); + } + if (jsonObj.get("enum_string_required") != null && !jsonObj.get("enum_string_required").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enum_string_required` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_string_required").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8fa8bf830fac..9ba801b2f730 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -118,6 +119,7 @@ public void setFiles(List files) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -208,6 +210,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in FileSchemaTestClass is not found in the empty JSON string", FileSchemaTestClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -220,8 +223,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { ModelFile.validateJsonObject(jsonObj.getAsJsonObject("file")); } JsonArray jsonArrayfiles = jsonObj.getAsJsonArray("files"); - // validate the optional field `files` (array) if (jsonArrayfiles != null) { + // ensure the json data is an array + if (!jsonObj.get("files").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `files` to be an array in the JSON string but got `%s`", jsonObj.get("files").toString())); + } + + // validate the optional field `files` (array) for (int i = 0; i < jsonArrayfiles.size(); i++) { ModelFile.validateJsonObject(jsonArrayfiles.get(i).getAsJsonObject()); }; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java index 5cf47a82ca5e..0da94612ec41 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java @@ -43,6 +43,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -446,6 +447,7 @@ public void setBigDecimal(BigDecimal bigDecimal) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -600,6 +602,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in FormatTest is not found in the empty JSON string", FormatTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -614,6 +617,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string") != null && !jsonObj.get("string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string").toString())); + } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (jsonObj.get("password") != null && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index fc4a40b7c808..67380649b7bd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -99,6 +100,7 @@ public String getFoo() { + @Override public boolean equals(Object o) { if (this == o) { @@ -189,6 +191,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in HasOnlyReadOnly is not found in the empty JSON string", HasOnlyReadOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -196,6 +199,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HasOnlyReadOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); + } + if (jsonObj.get("foo") != null && !jsonObj.get("foo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foo").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java index e48a1b0439fe..37841017443d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -243,6 +244,7 @@ public void setIndirectMap(Map indirectMap) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -343,6 +345,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MapTest is not found in the empty JSON string", MapTest.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7724467725ae..5708bdaecc9d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -44,6 +44,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -148,6 +149,7 @@ public void setMap(Map map) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -243,6 +245,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MixedPropertiesAndAdditionalPropertiesClass is not found in the empty JSON string", MixedPropertiesAndAdditionalPropertiesClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -250,6 +253,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MixedPropertiesAndAdditionalPropertiesClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java index 5e6e0f717727..67b786bdf40d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -108,6 +109,7 @@ public void setPropertyClass(String propertyClass) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -198,6 +200,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Model200Response is not found in the empty JSON string", Model200Response.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -205,6 +208,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Model200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("class") != null && !jsonObj.get("class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 3dfcf54a9973..4062f0b6a47c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -134,6 +135,7 @@ public void setMessage(String message) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -229,6 +231,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelApiResponse is not found in the empty JSON string", ModelApiResponse.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -236,6 +239,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelApiResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (jsonObj.get("message") != null && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java index 6f84b4a958cb..6913b2d1123f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -81,6 +82,7 @@ public void setSourceURI(String sourceURI) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -166,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelFile is not found in the empty JSON string", ModelFile.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -173,6 +176,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelFile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("sourceURI") != null && !jsonObj.get("sourceURI").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sourceURI` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceURI").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java index 333f891cb50e..9589c2675233 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,7 @@ public void set123list(String _123list) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -165,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelList is not found in the empty JSON string", ModelList.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -172,6 +175,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("123-list") != null && !jsonObj.get("123-list").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `123-list` to be a primitive type in the JSON string but got `%s`", jsonObj.get("123-list").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java index deafb27997ca..707eed0c4ec4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -81,6 +82,7 @@ public void setReturn(Integer _return) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -166,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelReturn is not found in the empty JSON string", ModelReturn.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java index 9c4ddf0414a1..adddb5df7424 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -154,6 +155,7 @@ public Integer get123number() { + @Override public boolean equals(Object o) { if (this == o) { @@ -255,6 +257,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Name is not found in the empty JSON string", Name.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -269,6 +272,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java index a004082af48d..79b4b985a491 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -81,6 +82,7 @@ public void setJustNumber(BigDecimal justNumber) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -166,6 +168,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in NumberOnly is not found in the empty JSON string", NumberOnly.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java index 21127d1ab43b..fc924b6fc7f4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -265,6 +266,7 @@ public void setComplete(Boolean complete) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -375,6 +377,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Order is not found in the empty JSON string", Order.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -382,6 +385,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Order` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java index 7670a4aaa7f3..7bd4b9c27762 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -135,6 +136,7 @@ public void setMyBoolean(Boolean myBoolean) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -230,6 +232,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in OuterComposite is not found in the empty JSON string", OuterComposite.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -237,6 +240,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OuterComposite` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("my_string") != null && !jsonObj.get("my_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `my_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("my_string").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java index 2f96ec09135d..05d4d1cc89c7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java @@ -44,6 +44,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -283,6 +284,7 @@ public void setStatus(StatusEnum status) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -395,6 +397,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Pet is not found in the empty JSON string", Pet.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -413,13 +416,28 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.getAsJsonObject("category") != null) { Category.validateJsonObject(jsonObj.getAsJsonObject("category")); } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the json data is an array + if (jsonObj.get("photoUrls") != null && !jsonObj.get("photoUrls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString())); + } JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - // validate the optional field `tags` (array) if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) for (int i = 0; i < jsonArraytags.size(); i++) { Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); }; } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 5b8a24b4acbb..da565404650d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,7 @@ public void setBaz(String baz) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -196,6 +198,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ReadOnlyFirst is not found in the empty JSON string", ReadOnlyFirst.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -203,6 +206,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadOnlyFirst` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); + } + if (jsonObj.get("baz") != null && !jsonObj.get("baz").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `baz` to be a primitive type in the JSON string but got `%s`", jsonObj.get("baz").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java index e020d8300904..8382046b4b65 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,7 @@ public SpecialModelName() { } + @Override public boolean equals(Object o) { if (this == o) { @@ -165,6 +167,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SpecialModelName is not found in the empty JSON string", SpecialModelName.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java index 2b3c11605875..d943f3149441 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -107,6 +108,7 @@ public void setName(String name) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -197,6 +199,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -204,6 +207,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8dd711ad7984..4039c931e2d7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -196,6 +197,7 @@ public void setArrayItem(List arrayItem) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -306,6 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in TypeHolderDefault is not found in the empty JSON string", TypeHolderDefault.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -320,6 +323,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string_item") != null && !jsonObj.get("string_item").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string_item` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string_item").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_item") != null && !jsonObj.get("array_item").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_item` to be an array in the JSON string but got `%s`", jsonObj.get("array_item").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 88bd0d2f8ac9..6bd74b7a7404 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -223,6 +224,7 @@ public void setArrayItem(List arrayItem) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -339,6 +341,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in TypeHolderExample is not found in the empty JSON string", TypeHolderExample.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -353,6 +356,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string_item") != null && !jsonObj.get("string_item").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string_item` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string_item").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_item") != null && !jsonObj.get("array_item").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_item` to be an array in the JSON string but got `%s`", jsonObj.get("array_item").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java index e41340e68e69..2d7875283695 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -269,6 +270,7 @@ public void setUserStatus(Integer userStatus) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -389,6 +391,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -396,6 +399,24 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("username") != null && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + } + if (jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + } + if (jsonObj.get("email") != null && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (jsonObj.get("password") != null && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java index 2008211e1963..cf3eb5fb5dd9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -911,6 +912,7 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -1136,6 +1138,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in XmlItem is not found in the empty JSON string", XmlItem.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -1143,6 +1146,57 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `XmlItem` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("attribute_string") != null && !jsonObj.get("attribute_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attribute_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attribute_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("wrapped_array") != null && !jsonObj.get("wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("wrapped_array").toString())); + } + if (jsonObj.get("name_string") != null && !jsonObj.get("name_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("name_array") != null && !jsonObj.get("name_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `name_array` to be an array in the JSON string but got `%s`", jsonObj.get("name_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("name_wrapped_array") != null && !jsonObj.get("name_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `name_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("name_wrapped_array").toString())); + } + if (jsonObj.get("prefix_string") != null && !jsonObj.get("prefix_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_array") != null && !jsonObj.get("prefix_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_wrapped_array") != null && !jsonObj.get("prefix_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_wrapped_array").toString())); + } + if (jsonObj.get("namespace_string") != null && !jsonObj.get("namespace_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("namespace_array") != null && !jsonObj.get("namespace_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_array` to be an array in the JSON string but got `%s`", jsonObj.get("namespace_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("namespace_wrapped_array") != null && !jsonObj.get("namespace_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("namespace_wrapped_array").toString())); + } + if (jsonObj.get("prefix_ns_string") != null && !jsonObj.get("prefix_ns_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_ns_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix_ns_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_ns_array") != null && !jsonObj.get("prefix_ns_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_ns_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_ns_array").toString())); + } + // ensure the json data is an array + if (jsonObj.get("prefix_ns_wrapped_array") != null && !jsonObj.get("prefix_ns_wrapped_array").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `prefix_ns_wrapped_array` to be an array in the JSON string but got `%s`", jsonObj.get("prefix_ns_wrapped_array").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES index 46193871c2ea..617697215b86 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES @@ -11,6 +11,8 @@ docs/AnotherFakeApi.md docs/Apple.md docs/AppleReq.md docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfInlineAllOf.md +docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Banana.md @@ -130,6 +132,8 @@ src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/Apple.java src/main/java/org/openapitools/client/model/AppleReq.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java +src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Banana.java diff --git a/samples/client/petstore/java/okhttp-gson/README.md b/samples/client/petstore/java/okhttp-gson/README.md index b926b1131003..73e815f12080 100644 --- a/samples/client/petstore/java/okhttp-gson/README.md +++ b/samples/client/petstore/java/okhttp-gson/README.md @@ -161,6 +161,8 @@ Class | Method | HTTP request | Description - [Apple](docs/Apple.md) - [AppleReq](docs/AppleReq.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfInlineAllOf](docs/ArrayOfInlineAllOf.md) + - [ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf](docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [Banana](docs/Banana.md) diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index 80e1a7404d4a..0a6baa9fb946 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -68,7 +68,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: description: "" @@ -90,7 +90,7 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json servers: - url: http://petstore.swagger.io/v2 @@ -284,7 +284,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -328,7 +328,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -376,7 +376,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -452,7 +452,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: @@ -466,7 +466,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithList: post: @@ -480,7 +480,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/login: get: @@ -624,7 +624,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: @@ -644,7 +644,7 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -825,7 +825,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -842,7 +842,7 @@ paths: summary: To test "client" model tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: | @@ -943,7 +943,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -964,7 +964,7 @@ paths: description: Output number tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -985,7 +985,7 @@ paths: description: Output string tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -1006,7 +1006,7 @@ paths: description: Output boolean tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -1027,7 +1027,7 @@ paths: description: Output composite tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: @@ -1055,7 +1055,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1076,7 +1076,7 @@ paths: summary: test inline additionalProperties tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1100,7 +1100,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /another-fake/dummy: patch: @@ -1118,7 +1118,7 @@ paths: summary: To test special tags tags: - $another-fake? - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1136,7 +1136,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1238,7 +1238,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /fake/health: get: @@ -2332,6 +2332,23 @@ components: type: object xml: name: Pet + ArrayOfInlineAllOf: + properties: + id: + format: int64 + type: integer + name: + example: doggie + type: string + array_allof_dog_property: + items: + allOf: + - $ref: '#/components/schemas/Dog_allOf' + - $ref: '#/components/schemas/ArrayOfInlineAllOf_array_allof_dog_propertyItems_allOf' + type: array + required: + - name + type: object inline_response_default: example: string: @@ -2487,6 +2504,11 @@ components: declawed: type: boolean type: object + ArrayOfInlineAllOf_array_allof_dog_propertyItems_allOf: + properties: + color: + type: string + type: object securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 0b48d0e99789..670b7c8a0ba7 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -12,8 +12,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -106,20 +106,20 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' + implementation 'io.swagger:swagger-annotations:1.6.5' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' + implementation 'com.squareup.okhttp3:okhttp:4.9.3' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' + implementation 'com.google.code.gson:gson:2.9.0' + implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.0' - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.2' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:3.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.mockito:mockito-core:3.12.4' } javadoc { diff --git a/samples/client/petstore/java/okhttp-gson/build.sbt b/samples/client/petstore/java/okhttp-gson/build.sbt index 4dc1b764cd8c..ca1c3c7e64d7 100644 --- a/samples/client/petstore/java/okhttp-gson/build.sbt +++ b/samples/client/petstore/java/okhttp-gson/build.sbt @@ -9,20 +9,20 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.9.3", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", + "com.google.code.gson" % "gson" % "2.9.0", + "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.0", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", "org.openapitools" % "jackson-databind-nullable" % "0.2.2", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md index 3d032d4504ad..83051d9be44b 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapProperty** | **Map<String, String>** | | [optional] -**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] -**anytype1** | **Object** | | [optional] -**mapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] -**mapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] -**mapWithUndeclaredPropertiesAnytype3** | **Map<String, Object>** | | [optional] -**emptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] -**mapWithUndeclaredPropertiesString** | **Map<String, String>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype3** | **Map<String, Object>** | | [optional] | +|**emptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] | +|**mapWithUndeclaredPropertiesString** | **Map<String, String>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Animal.md b/samples/client/petstore/java/okhttp-gson/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Animal.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md index 149488eff9a0..5fd410e893aa 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -47,9 +47,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -67,5 +67,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Apple.md b/samples/client/petstore/java/okhttp-gson/docs/Apple.md index 513643aeb77f..0ef7a92c74d6 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Apple.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Apple.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cultivar** | **String** | | [optional] -**origin** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | [optional] | +|**origin** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/AppleReq.md b/samples/client/petstore/java/okhttp-gson/docs/AppleReq.md index d2fccd5306d8..989e1cfedd1e 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/AppleReq.md +++ b/samples/client/petstore/java/okhttp-gson/docs/AppleReq.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cultivar** | **String** | | -**mealy** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | | +|**mealy** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOf.md new file mode 100644 index 000000000000..e8358544d996 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOf.md @@ -0,0 +1,15 @@ + + +# ArrayOfInlineAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | +|**arrayAllofDogProperty** | [**List<DogAllOf>**](DogAllOf.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyInner.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyInner.md new file mode 100644 index 000000000000..35f349597734 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyInner.md @@ -0,0 +1,14 @@ + + +# ArrayOfInlineAllOfArrayAllofDogPropertyInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | +|**color** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItems.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItems.md new file mode 100644 index 000000000000..74da28d33a0e --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItems.md @@ -0,0 +1,14 @@ + + +# ArrayOfInlineAllOfArrayAllofDogPropertyItems + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | +|**color** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md new file mode 100644 index 000000000000..bddcc0b3b302 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md @@ -0,0 +1,13 @@ + + +# ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**color** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayTest.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ArrayTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Banana.md b/samples/client/petstore/java/okhttp-gson/docs/Banana.md index 7ddff9847aa6..5356d17ee700 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Banana.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Banana.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lengthCm** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lengthCm** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/BananaReq.md b/samples/client/petstore/java/okhttp-gson/docs/BananaReq.md index 35a773503b8e..22ebe1a7105f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/BananaReq.md +++ b/samples/client/petstore/java/okhttp-gson/docs/BananaReq.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lengthCm** | **BigDecimal** | | -**sweet** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lengthCm** | **BigDecimal** | | | +|**sweet** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/BasquePig.md b/samples/client/petstore/java/okhttp-gson/docs/BasquePig.md index 05d4cf397071..160cb71c321f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/BasquePig.md +++ b/samples/client/petstore/java/okhttp-gson/docs/BasquePig.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Capitalization.md b/samples/client/petstore/java/okhttp-gson/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Capitalization.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Cat.md b/samples/client/petstore/java/okhttp-gson/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Cat.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Category.md b/samples/client/petstore/java/okhttp-gson/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Category.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Client.md b/samples/client/petstore/java/okhttp-gson/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Client.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ComplexQuadrilateral.md b/samples/client/petstore/java/okhttp-gson/docs/ComplexQuadrilateral.md index 9e7a27f8a591..d0a4b1a0a758 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ComplexQuadrilateral.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ComplexQuadrilateral.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/DanishPig.md b/samples/client/petstore/java/okhttp-gson/docs/DanishPig.md index 0e86a6716583..0b366d3cf2ff 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/DanishPig.md +++ b/samples/client/petstore/java/okhttp-gson/docs/DanishPig.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/DefaultApi.md b/samples/client/petstore/java/okhttp-gson/docs/DefaultApi.md index 311c4fa6bbc1..d9693a7ff10b 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/DefaultApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/DefaultApi.md @@ -2,9 +2,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | @@ -61,5 +61,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | response | - | +| **0** | response | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/DeprecatedObject.md b/samples/client/petstore/java/okhttp-gson/docs/DeprecatedObject.md index d5128bdb84a2..48de1d624425 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/DeprecatedObject.md +++ b/samples/client/petstore/java/okhttp-gson/docs/DeprecatedObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Dog.md b/samples/client/petstore/java/okhttp-gson/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Dog.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md +++ b/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Drawing.md b/samples/client/petstore/java/okhttp-gson/docs/Drawing.md index 0874f4811de9..6b815fc4131b 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Drawing.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Drawing.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mainShape** | [**Shape**](Shape.md) | | [optional] -**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] -**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional] -**shapes** | [**List<Shape>**](Shape.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mainShape** | [**Shape**](Shape.md) | | [optional] | +|**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] | +|**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional] | +|**shapes** | [**List<Shape>**](Shape.md) | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/EnumArrays.md b/samples/client/petstore/java/okhttp-gson/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/EnumArrays.md +++ b/samples/client/petstore/java/okhttp-gson/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md index 342b462ccc06..3e226e18b50b 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md @@ -5,64 +5,64 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumIntegerOnly** | [**EnumIntegerOnlyEnum**](#EnumIntegerOnlyEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] -**outerEnumInteger** | **OuterEnumInteger** | | [optional] -**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] -**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumIntegerOnly** | [**EnumIntegerOnlyEnum**](#EnumIntegerOnlyEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumIntegerOnlyEnum -Name | Value ----- | ----- -NUMBER_2 | 2 -NUMBER_MINUS_2 | -2 +| Name | Value | +|---- | -----| +| NUMBER_2 | 2 | +| NUMBER_MINUS_2 | -2 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/okhttp-gson/docs/EquilateralTriangle.md b/samples/client/petstore/java/okhttp-gson/docs/EquilateralTriangle.md index e4b49735d658..eade817feb3e 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/EquilateralTriangle.md +++ b/samples/client/petstore/java/okhttp-gson/docs/EquilateralTriangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index e3ccb560a936..2b7eebac9564 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -2,23 +2,23 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums -[**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-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums | +| [**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-parameters | | @@ -75,7 +75,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The instance started successfully | - | +| **200** | The instance started successfully | - | # **fakeOuterBooleanSerialize** @@ -117,9 +117,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -137,7 +137,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output boolean | - | +| **200** | Output boolean | - | # **fakeOuterCompositeSerialize** @@ -179,9 +179,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -199,7 +199,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output composite | - | +| **200** | Output composite | - | # **fakeOuterNumberSerialize** @@ -241,9 +241,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -261,7 +261,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output number | - | +| **200** | Output number | - | # **fakeOuterStringSerialize** @@ -303,9 +303,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -323,7 +323,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Output string | - | +| **200** | Output string | - | # **getArrayOfEnums** @@ -379,7 +379,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Got named array of enums | - | +| **200** | Got named array of enums | - | # **testBodyWithFileSchema** @@ -420,9 +420,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -440,7 +440,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | # **testBodyWithQueryParams** @@ -480,10 +480,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **user** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -501,7 +501,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | # **testClientModel** @@ -543,9 +543,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -563,7 +563,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testEndpointParameters** @@ -623,22 +623,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] [default to 2010-02-01T10:20:10.111110+01:00] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] [default to 2010-02-01T10:20:10.111110+01:00] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -656,8 +656,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **testEnumParameters** @@ -705,16 +705,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -732,8 +732,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid request | - | -**404** | Not found | - | +| **400** | Invalid request | - | +| **404** | Not found | - | # **testGroupParameters** @@ -788,14 +788,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -813,7 +813,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +| **400** | Someting wrong | - | # **testInlineAdditionalProperties** @@ -854,9 +854,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -874,7 +874,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testJsonFormData** @@ -916,10 +916,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -937,7 +937,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **testQueryParameterCollectionFormat** @@ -982,13 +982,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type @@ -1006,5 +1006,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +| **200** | Success | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md index dbd12c37f053..a446412a5800 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -54,9 +54,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -74,5 +74,5 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FileSchemaTestClass.md b/samples/client/petstore/java/okhttp-gson/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Foo.md b/samples/client/petstore/java/okhttp-gson/docs/Foo.md index 7893cf3f4474..6b3f0556528a 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Foo.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Foo.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FormatTest.md b/samples/client/petstore/java/okhttp-gson/docs/FormatTest.md index 91da637f0880..01b8c777ae06 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FormatTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FormatTest.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**decimal** | **BigDecimal** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Fruit.md b/samples/client/petstore/java/okhttp-gson/docs/Fruit.md index 75fcaa52b2c9..f1915ef9b5b6 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Fruit.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Fruit.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**color** | **String** | | [optional] -**cultivar** | **String** | | [optional] -**origin** | **String** | | [optional] -**lengthCm** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**color** | **String** | | [optional] | +|**cultivar** | **String** | | [optional] | +|**origin** | **String** | | [optional] | +|**lengthCm** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FruitReq.md b/samples/client/petstore/java/okhttp-gson/docs/FruitReq.md index 2f45fd6d70ec..859a881b53ec 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FruitReq.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FruitReq.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cultivar** | **String** | | -**mealy** | **Boolean** | | [optional] -**lengthCm** | **BigDecimal** | | -**sweet** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | | +|**mealy** | **Boolean** | | [optional] | +|**lengthCm** | **BigDecimal** | | | +|**sweet** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/GmFruit.md b/samples/client/petstore/java/okhttp-gson/docs/GmFruit.md index 1536d689689e..1a301bf9600a 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/GmFruit.md +++ b/samples/client/petstore/java/okhttp-gson/docs/GmFruit.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**color** | **String** | | [optional] -**cultivar** | **String** | | [optional] -**origin** | **String** | | [optional] -**lengthCm** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**color** | **String** | | [optional] | +|**cultivar** | **String** | | [optional] | +|**origin** | **String** | | [optional] | +|**lengthCm** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/GrandparentAnimal.md b/samples/client/petstore/java/okhttp-gson/docs/GrandparentAnimal.md index 8c7632266ed1..9737408f2724 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/GrandparentAnimal.md +++ b/samples/client/petstore/java/okhttp-gson/docs/GrandparentAnimal.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**petType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**petType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/HealthCheckResult.md b/samples/client/petstore/java/okhttp-gson/docs/HealthCheckResult.md index 80ba4783bbd8..4885e6f1cada 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/HealthCheckResult.md +++ b/samples/client/petstore/java/okhttp-gson/docs/HealthCheckResult.md @@ -6,9 +6,9 @@ Just a string to inform instance is up and running. Make it nullable in hope to ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/InlineResponseDefault.md b/samples/client/petstore/java/okhttp-gson/docs/InlineResponseDefault.md index 1c7c639d48cb..41cadb0373c2 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/InlineResponseDefault.md +++ b/samples/client/petstore/java/okhttp-gson/docs/InlineResponseDefault.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/IsoscelesTriangle.md b/samples/client/petstore/java/okhttp-gson/docs/IsoscelesTriangle.md index 535e9216413f..0bd5045bc68f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/IsoscelesTriangle.md +++ b/samples/client/petstore/java/okhttp-gson/docs/IsoscelesTriangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Mammal.md b/samples/client/petstore/java/okhttp-gson/docs/Mammal.md index 891bc30d2885..71f0fce48839 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Mammal.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Mammal.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hasBaleen** | **Boolean** | | [optional] -**hasTeeth** | **Boolean** | | [optional] -**className** | **String** | | -**type** | [**TypeEnum**](#TypeEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasBaleen** | **Boolean** | | [optional] | +|**hasTeeth** | **Boolean** | | [optional] | +|**className** | **String** | | | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | ## Enum: TypeEnum -Name | Value ----- | ----- -PLAINS | "plains" -MOUNTAIN | "mountain" -GREVYS | "grevys" +| Name | Value | +|---- | -----| +| PLAINS | "plains" | +| MOUNTAIN | "mountain" | +| GREVYS | "grevys" | diff --git a/samples/client/petstore/java/okhttp-gson/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/okhttp-gson/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ModelApiResponse.md b/samples/client/petstore/java/okhttp-gson/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ModelFile.md b/samples/client/petstore/java/okhttp-gson/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ModelFile.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ModelList.md b/samples/client/petstore/java/okhttp-gson/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ModelList.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md b/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Name.md b/samples/client/petstore/java/okhttp-gson/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/NullableClass.md b/samples/client/petstore/java/okhttp-gson/docs/NullableClass.md index c8152be3d314..fa98c5c6d984 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/NullableClass.md +++ b/samples/client/petstore/java/okhttp-gson/docs/NullableClass.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integerProp** | **Integer** | | [optional] -**numberProp** | **BigDecimal** | | [optional] -**booleanProp** | **Boolean** | | [optional] -**stringProp** | **String** | | [optional] -**dateProp** | **LocalDate** | | [optional] -**datetimeProp** | **OffsetDateTime** | | [optional] -**arrayNullableProp** | **List<Object>** | | [optional] -**arrayAndItemsNullableProp** | **List<Object>** | | [optional] -**arrayItemsNullable** | **List<Object>** | | [optional] -**objectNullableProp** | **Map<String, Object>** | | [optional] -**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] -**objectItemsNullable** | **Map<String, Object>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/NullableShape.md b/samples/client/petstore/java/okhttp-gson/docs/NullableShape.md index 0b0307116e2a..c7000dc912de 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/NullableShape.md +++ b/samples/client/petstore/java/okhttp-gson/docs/NullableShape.md @@ -6,10 +6,10 @@ The value may be a shape or the 'null' value. The 'nullable' attribute was intro ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/NumberOnly.md b/samples/client/petstore/java/okhttp-gson/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/NumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/okhttp-gson/docs/ObjectWithDeprecatedFields.md index be55a96c3b7c..f1cf571f4c09 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ObjectWithDeprecatedFields.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ObjectWithDeprecatedFields.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**id** | **BigDecimal** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] -**bars** | **List<String>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Order.md b/samples/client/petstore/java/okhttp-gson/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Order.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/okhttp-gson/docs/OuterComposite.md b/samples/client/petstore/java/okhttp-gson/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/OuterComposite.md +++ b/samples/client/petstore/java/okhttp-gson/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ParentPet.md b/samples/client/petstore/java/okhttp-gson/docs/ParentPet.md index ad7e02196658..4992b88a6710 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ParentPet.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ParentPet.md @@ -5,8 +5,8 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| diff --git a/samples/client/petstore/java/okhttp-gson/docs/Pet.md b/samples/client/petstore/java/okhttp-gson/docs/Pet.md index 8aab74536872..08dfd8623602 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Pet.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **List<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md index cd1dfc640f82..c781e07e7b26 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -80,7 +80,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**405** | Invalid input | - | +| **405** | Invalid input | - | # **deletePet** @@ -127,10 +127,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -148,7 +148,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid pet value | - | +| **400** | Invalid pet value | - | # **findPetsByStatus** @@ -196,9 +196,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -216,8 +216,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid status value | - | +| **200** | successful operation | - | +| **400** | Invalid status value | - | # **findPetsByTags** @@ -265,9 +265,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | ### Return type @@ -285,8 +285,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid tag value | - | +| **200** | successful operation | - | +| **400** | Invalid tag value | - | # **getPetById** @@ -335,9 +335,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -355,9 +355,9 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Pet not found | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | # **updatePet** @@ -404,9 +404,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -424,9 +424,9 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid ID supplied | - | -**404** | Pet not found | - | -**405** | Validation exception | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | # **updatePetWithForm** @@ -474,11 +474,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -496,7 +496,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**405** | Invalid input | - | +| **405** | Invalid input | - | # **uploadFile** @@ -545,11 +545,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -567,7 +567,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **uploadFileWithRequiredFile** @@ -616,11 +616,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type @@ -638,5 +638,5 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/PetWithRequiredTags.md b/samples/client/petstore/java/okhttp-gson/docs/PetWithRequiredTags.md index 16525294ccd8..2f528f536e99 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/PetWithRequiredTags.md +++ b/samples/client/petstore/java/okhttp-gson/docs/PetWithRequiredTags.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **List<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Pig.md b/samples/client/petstore/java/okhttp-gson/docs/Pig.md index b3b94d035639..61079c61c498 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Pig.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Pig.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Quadrilateral.md b/samples/client/petstore/java/okhttp-gson/docs/Quadrilateral.md index 208f4899d27c..af9f89a6f710 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Quadrilateral.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Quadrilateral.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/QuadrilateralInterface.md b/samples/client/petstore/java/okhttp-gson/docs/QuadrilateralInterface.md index a26b27107797..99451f3bd020 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/QuadrilateralInterface.md +++ b/samples/client/petstore/java/okhttp-gson/docs/QuadrilateralInterface.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md b/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ScaleneTriangle.md b/samples/client/petstore/java/okhttp-gson/docs/ScaleneTriangle.md index f49fe5a12f33..c578f6cbfaab 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ScaleneTriangle.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ScaleneTriangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Shape.md b/samples/client/petstore/java/okhttp-gson/docs/Shape.md index ff25b8670e9b..0b0c93502f86 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Shape.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Shape.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ShapeInterface.md b/samples/client/petstore/java/okhttp-gson/docs/ShapeInterface.md index f8b65a8a9720..b4f981e3b566 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ShapeInterface.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ShapeInterface.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/ShapeOrNull.md b/samples/client/petstore/java/okhttp-gson/docs/ShapeOrNull.md index 633d68d670ca..1c084f8e3732 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ShapeOrNull.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ShapeOrNull.md @@ -6,10 +6,10 @@ The value may be a shape or the 'null' value. This is introduced in OAS schema > ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/SimpleQuadrilateral.md b/samples/client/petstore/java/okhttp-gson/docs/SimpleQuadrilateral.md index c2cf751d1b8a..52fb7d1a6a49 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/SimpleQuadrilateral.md +++ b/samples/client/petstore/java/okhttp-gson/docs/SimpleQuadrilateral.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/SpecialModelName.md b/samples/client/petstore/java/okhttp-gson/docs/SpecialModelName.md index 352611142df0..e17d0d797b7f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/SpecialModelName.md +++ b/samples/client/petstore/java/okhttp-gson/docs/SpecialModelName.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] -**specialModelName** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | +|**specialModelName** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md index 8fbf6a813c87..26866a89c1ac 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -49,9 +49,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -69,8 +69,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid ID supplied | - | -**404** | Order not found | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | # **getInventory** @@ -135,7 +135,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | +| **200** | successful operation | - | # **getOrderById** @@ -177,9 +177,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -197,9 +197,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid ID supplied | - | -**404** | Order not found | - | +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | # **placeOrder** @@ -241,9 +241,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -261,6 +261,6 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid Order | - | +| **200** | successful operation | - | +| **400** | Invalid Order | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Tag.md b/samples/client/petstore/java/okhttp-gson/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Tag.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Triangle.md b/samples/client/petstore/java/okhttp-gson/docs/Triangle.md index 0a3af5adc4ff..71de2174f744 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Triangle.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Triangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/TriangleInterface.md b/samples/client/petstore/java/okhttp-gson/docs/TriangleInterface.md index 525872029f5c..ef5fc7575f34 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/TriangleInterface.md +++ b/samples/client/petstore/java/okhttp-gson/docs/TriangleInterface.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**triangleType** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/User.md b/samples/client/petstore/java/okhttp-gson/docs/User.md index c29bce5c1261..9e97dc35485f 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/User.md +++ b/samples/client/petstore/java/okhttp-gson/docs/User.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] -**objectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**objectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] -**anyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] -**anyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | +|**objectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] | +|**objectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] | +|**anyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] | +|**anyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson/docs/UserApi.md index f5852fc0478e..2ee9941c62a7 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -53,9 +53,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -73,7 +73,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **createUsersWithArrayInput** @@ -114,9 +114,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -134,7 +134,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **createUsersWithListInput** @@ -175,9 +175,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -195,7 +195,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **deleteUser** @@ -236,9 +236,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -256,8 +256,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **getUserByName** @@ -299,9 +299,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -319,9 +319,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | - | -**400** | Invalid username supplied | - | -**404** | User not found | - | +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | # **loginUser** @@ -364,10 +364,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -385,8 +385,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | -**400** | Invalid username/password supplied | - | +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +| **400** | Invalid username/password supplied | - | # **logoutUser** @@ -443,7 +443,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**0** | successful operation | - | +| **0** | successful operation | - | # **updateUser** @@ -485,10 +485,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -506,6 +506,6 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Invalid user supplied | - | -**404** | User not found | - | +| **400** | Invalid user supplied | - | +| **404** | User not found | - | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Whale.md b/samples/client/petstore/java/okhttp-gson/docs/Whale.md index 87470ae5fac7..30ce4bb82151 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Whale.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Whale.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hasBaleen** | **Boolean** | | [optional] -**hasTeeth** | **Boolean** | | [optional] -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasBaleen** | **Boolean** | | [optional] | +|**hasTeeth** | **Boolean** | | [optional] | +|**className** | **String** | | | diff --git a/samples/client/petstore/java/okhttp-gson/docs/Zebra.md b/samples/client/petstore/java/okhttp-gson/docs/Zebra.md index eafe1861f2be..f7c4389b6456 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Zebra.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Zebra.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**TypeEnum**](#TypeEnum) | | [optional] -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**className** | **String** | | | ## Enum: TypeEnum -Name | Value ----- | ----- -PLAINS | "plains" -MOUNTAIN | "mountain" -GREVYS | "grevys" +| Name | Value | +|---- | -----| +| PLAINS | "plains" | +| MOUNTAIN | "mountain" | +| GREVYS | "grevys" | diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index 6d0f7cc97ce3..3a71322355cb 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -304,24 +304,24 @@ javax.ws.rs jsr311-api - 1.1.1 + ${jsr311-api-version} javax.ws.rs javax.ws.rs-api - 2.0 + ${javax.ws.rs-api-version} - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test org.mockito mockito-core - 3.12.4 + ${mockito-core-version} test @@ -330,14 +330,17 @@ ${java.version} ${java.version} 1.8.5 - 1.6.3 - 4.9.2 - 2.8.8 + 1.6.5 + 4.9.3 + 2.9.0 3.12.0 0.2.2 1.3.5 - 4.13.2 + 5.8.2 + 3.12.4 + 2.1.1 + 1.1.1 UTF-8 - 2.17.3 + 2.21.0 diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index 081e1c1f34c0..0e626694f6f9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -384,7 +384,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { /** *

    Set OffsetDateTimeFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { @@ -395,7 +395,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { /** *

    Set LocalDateFormat.

    * - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { @@ -1249,7 +1249,7 @@ public Request buildRequest(String baseUrl, String path, String method, List formParams) { File file = (File) param.getValue(); addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { - List files = (List) param.getValue(); - for (File file : files) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } } } else { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java index 60e4f9a5e7e6..8a6d4981ca77 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java @@ -27,8 +27,6 @@ public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - private Object errorObject = null; - private GenericType errorObjectType = null; /** *

    Constructor for ApiException.

    @@ -155,40 +153,4 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } - - /** - * Get the error object type. - * - * @return Error object type - */ - public GenericType getErrorObjectType() { - return errorObjectType; - } - - /** - * Set the error object type. - * - * @param errorObjectType object type - */ - public void setErrorObjectType(GenericType errorObjectType) { - this.errorObjectType = errorObjectType; - } - - /** - * Get the error object. - * - * @return Error object - */ - public Object getErrorObject() { - return errorObject; - } - - /** - * Get the error object. - * - * @param errorObject Error object - */ - public void setErrorObject(Object errorObject) { - this.errorObject = errorObject; - } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java index 5c6bc189f483..ac8397eb12b3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java @@ -224,6 +224,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri .registerTypeAdapterFactory(new org.openapitools.client.model.Apple.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new org.openapitools.client.model.AppleReq.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfArrayOfNumberOnly.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfInlineAllOf.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfNumberOnly.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTest.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new org.openapitools.client.model.Banana.CustomTypeAdapterFactory()) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 0c245e718f44..f38e4499a618 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -175,14 +175,8 @@ public Client call123testSpecialTags(Client client) throws ApiException { */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client client) throws ApiException { okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(client, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java index 4a11f75dddf0..b5e9d2f95ff9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -167,14 +167,8 @@ public InlineResponseDefault fooGet() throws ApiException { */ public ApiResponse fooGetWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = fooGetValidateBeforeCall(null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index ff6e379842e0..0452a3a613d3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -176,14 +176,8 @@ public HealthCheckResult fakeHealthGet() throws ApiException { */ public ApiResponse fakeHealthGetWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = fakeHealthGetValidateBeforeCall(null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -302,14 +296,8 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -429,14 +417,8 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException { okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(outerComposite, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -556,14 +538,8 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -683,14 +659,8 @@ public String fakeOuterStringSerialize(String body) throws ApiException { */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -807,14 +777,8 @@ public List getArrayOfEnums() throws ApiException { */ public ApiResponse> getArrayOfEnumsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getArrayOfEnumsValidateBeforeCall(null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1195,14 +1159,8 @@ public Client testClientModel(Client client) throws ApiException { */ public ApiResponse testClientModelWithHttpInfo(Client client) throws ApiException { okhttp3.Call localVarCall = testClientModelValidateBeforeCall(client, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index ad78a8e0872d..0437e89e5c4b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -175,14 +175,8 @@ public Client testClassname(Client client) throws ApiException { */ public ApiResponse testClassnameWithHttpInfo(Client client) throws ApiException { okhttp3.Call localVarCall = testClassnameValidateBeforeCall(client, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index d0e37b16f242..45e183a465e1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -437,14 +437,8 @@ public List findPetsByStatus(List status) throws ApiException { */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -584,14 +578,8 @@ public List findPetsByTags(List tags) throws ApiException { @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -726,14 +714,8 @@ public Pet getPetById(Long petId) throws ApiException { */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1144,14 +1126,8 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1298,14 +1274,8 @@ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java index e3d425cd3964..165a3df932a9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -294,14 +294,8 @@ public Map getInventory() throws ApiException { */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null); - try { - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken>(){}.getType())); - e.setErrorObjectType(new GenericType>(){}); - throw e; - } + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -432,14 +426,8 @@ public Order getOrderById(Long orderId) throws ApiException { */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -569,14 +557,8 @@ public Order placeOrder(Order order) throws ApiException { */ public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiException { okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index b96e2b3207a3..a4e78ed0b438 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -676,14 +676,8 @@ public User getUserByName(String username) throws ApiException { */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -829,14 +823,8 @@ public String loginUser(String username, String password) throws ApiException { */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null); - try { - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } catch (ApiException e) { - e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); - e.setErrorObjectType(new GenericType(){}); - throw e; - } + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index d5515774814c..e5b58e6a45f6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -302,6 +303,42 @@ public void setMapWithUndeclaredPropertiesString(Map mapWithUnde this.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public AdditionalPropertiesClass putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -319,7 +356,8 @@ public boolean equals(Object o) { Objects.equals(this.mapWithUndeclaredPropertiesAnytype2, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype2) && Objects.equals(this.mapWithUndeclaredPropertiesAnytype3, additionalPropertiesClass.mapWithUndeclaredPropertiesAnytype3) && Objects.equals(this.emptyMap, additionalPropertiesClass.emptyMap) && - Objects.equals(this.mapWithUndeclaredPropertiesString, additionalPropertiesClass.mapWithUndeclaredPropertiesString); + Objects.equals(this.mapWithUndeclaredPropertiesString, additionalPropertiesClass.mapWithUndeclaredPropertiesString)&& + Objects.equals(this.additionalProperties, additionalPropertiesClass.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -328,7 +366,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(mapProperty, mapOfMapProperty, anytype1, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, emptyMap, mapWithUndeclaredPropertiesString); + return Objects.hash(mapProperty, mapOfMapProperty, anytype1, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, emptyMap, mapWithUndeclaredPropertiesString, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -350,6 +388,7 @@ public String toString() { sb.append(" mapWithUndeclaredPropertiesAnytype3: ").append(toIndentedString(mapWithUndeclaredPropertiesAnytype3)).append("\n"); sb.append(" emptyMap: ").append(toIndentedString(emptyMap)).append("\n"); sb.append(" mapWithUndeclaredPropertiesString: ").append(toIndentedString(mapWithUndeclaredPropertiesString)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -399,13 +438,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalPropertiesClass is not found in the empty JSON string", AdditionalPropertiesClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AdditionalPropertiesClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -423,6 +455,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, AdditionalPropertiesClass value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -430,7 +479,25 @@ public void write(JsonWriter out, AdditionalPropertiesClass value) throws IOExce public AdditionalPropertiesClass read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + AdditionalPropertiesClass instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java index 96d2c99d350e..514e9d27cd9d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -107,6 +108,42 @@ public void setColor(String color) { this.color = color; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Animal putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -118,12 +155,13 @@ public boolean equals(Object o) { } Animal animal = (Animal) o; return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); + Objects.equals(this.color, animal.color)&& + Objects.equals(this.additionalProperties, animal.additionalProperties); } @Override public int hashCode() { - return Objects.hash(className, color); + return Objects.hash(className, color, additionalProperties); } @Override @@ -132,6 +170,7 @@ public String toString() { sb.append("class Animal {\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java index c73aa425f040..2adf6cbbb626 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -104,6 +105,42 @@ public void setOrigin(String origin) { this.origin = origin; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Apple putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -115,12 +152,13 @@ public boolean equals(Object o) { } Apple apple = (Apple) o; return Objects.equals(this.cultivar, apple.cultivar) && - Objects.equals(this.origin, apple.origin); + Objects.equals(this.origin, apple.origin)&& + Objects.equals(this.additionalProperties, apple.additionalProperties); } @Override public int hashCode() { - return Objects.hash(cultivar, origin); + return Objects.hash(cultivar, origin, additionalProperties); } @Override @@ -129,6 +167,7 @@ public String toString() { sb.append("class Apple {\n"); sb.append(" cultivar: ").append(toIndentedString(cultivar)).append("\n"); sb.append(" origin: ").append(toIndentedString(origin)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -172,12 +211,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Apple is not found in the empty JSON string", Apple.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Apple.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Apple` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("cultivar") != null && !jsonObj.get("cultivar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cultivar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cultivar").toString())); + } + if (jsonObj.get("origin") != null && !jsonObj.get("origin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `origin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origin").toString())); } } @@ -196,6 +234,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Apple value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -203,7 +258,25 @@ public void write(JsonWriter out, Apple value) throws IOException { public Apple read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Apple instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java index c4ccb2e8ec5c..93103ecab9de 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -105,6 +106,7 @@ public void setMealy(Boolean mealy) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -173,6 +175,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in AppleReq is not found in the empty JSON string", AppleReq.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -187,6 +190,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("cultivar") != null && !jsonObj.get("cultivar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cultivar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cultivar").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 2bf41e969dca..62462f94862d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -88,6 +89,42 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ArrayOfArrayOfNumberOnly putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -98,12 +135,13 @@ public boolean equals(Object o) { return false; } ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber)&& + Objects.equals(this.additionalProperties, arrayOfArrayOfNumberOnly.additionalProperties); } @Override public int hashCode() { - return Objects.hash(arrayArrayNumber); + return Objects.hash(arrayArrayNumber, additionalProperties); } @Override @@ -111,6 +149,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -153,12 +192,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfArrayOfNumberOnly is not found in the empty JSON string", ArrayOfArrayOfNumberOnly.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ArrayOfArrayOfNumberOnly.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + // ensure the json data is an array + if (jsonObj.get("ArrayArrayNumber") != null && !jsonObj.get("ArrayArrayNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ArrayArrayNumber` to be an array in the JSON string but got `%s`", jsonObj.get("ArrayArrayNumber").toString())); } } @@ -177,6 +213,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayOfArrayOfNumberOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -184,7 +237,25 @@ public void write(JsonWriter out, ArrayOfArrayOfNumberOnly value) throws IOExcep public ArrayOfArrayOfNumberOnly read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ArrayOfArrayOfNumberOnly instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java new file mode 100644 index 000000000000..bb02f3676a07 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java @@ -0,0 +1,365 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf; +import org.openapitools.client.model.DogAllOf; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * ArrayOfInlineAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArrayOfInlineAllOf { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Long id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ARRAY_ALLOF_DOG_PROPERTY = "array_allof_dog_property"; + @SerializedName(SERIALIZED_NAME_ARRAY_ALLOF_DOG_PROPERTY) + private List arrayAllofDogProperty = null; + + public ArrayOfInlineAllOf() { + } + + public ArrayOfInlineAllOf id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public ArrayOfInlineAllOf name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + @ApiModelProperty(example = "doggie", required = true, value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public ArrayOfInlineAllOf arrayAllofDogProperty(List arrayAllofDogProperty) { + + this.arrayAllofDogProperty = arrayAllofDogProperty; + return this; + } + + public ArrayOfInlineAllOf addArrayAllofDogPropertyItem(DogAllOf arrayAllofDogPropertyItem) { + if (this.arrayAllofDogProperty == null) { + this.arrayAllofDogProperty = new ArrayList<>(); + } + this.arrayAllofDogProperty.add(arrayAllofDogPropertyItem); + return this; + } + + /** + * Get arrayAllofDogProperty + * @return arrayAllofDogProperty + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List getArrayAllofDogProperty() { + return arrayAllofDogProperty; + } + + + public void setArrayAllofDogProperty(List arrayAllofDogProperty) { + this.arrayAllofDogProperty = arrayAllofDogProperty; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ArrayOfInlineAllOf putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfInlineAllOf arrayOfInlineAllOf = (ArrayOfInlineAllOf) o; + return Objects.equals(this.id, arrayOfInlineAllOf.id) && + Objects.equals(this.name, arrayOfInlineAllOf.name) && + Objects.equals(this.arrayAllofDogProperty, arrayOfInlineAllOf.arrayAllofDogProperty)&& + Objects.equals(this.additionalProperties, arrayOfInlineAllOf.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, arrayAllofDogProperty, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfInlineAllOf {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" arrayAllofDogProperty: ").append(toIndentedString(arrayAllofDogProperty)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("array_allof_dog_property"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ArrayOfInlineAllOf + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (ArrayOfInlineAllOf.openapiRequiredFields.isEmpty()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfInlineAllOf is not found in the empty JSON string", ArrayOfInlineAllOf.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ArrayOfInlineAllOf.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + JsonArray jsonArrayarrayAllofDogProperty = jsonObj.getAsJsonArray("array_allof_dog_property"); + if (jsonArrayarrayAllofDogProperty != null) { + // ensure the json data is an array + if (!jsonObj.get("array_allof_dog_property").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_allof_dog_property` to be an array in the JSON string but got `%s`", jsonObj.get("array_allof_dog_property").toString())); + } + + // validate the optional field `array_allof_dog_property` (array) + for (int i = 0; i < jsonArrayarrayAllofDogProperty.size(); i++) { + DogAllOf.validateJsonObject(jsonArrayarrayAllofDogProperty.get(i).getAsJsonObject()); + }; + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ArrayOfInlineAllOf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ArrayOfInlineAllOf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ArrayOfInlineAllOf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ArrayOfInlineAllOf value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ArrayOfInlineAllOf read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ArrayOfInlineAllOf instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ArrayOfInlineAllOf given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayOfInlineAllOf + * @throws IOException if the JSON string is invalid with respect to ArrayOfInlineAllOf + */ + public static ArrayOfInlineAllOf fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ArrayOfInlineAllOf.class); + } + + /** + * Convert an instance of ArrayOfInlineAllOf to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java new file mode 100644 index 000000000000..f1a86344f1b3 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java @@ -0,0 +1,308 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf; +import org.openapitools.client.model.DogAllOf; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * ArrayOfInlineAllOfArrayAllofDogPropertyInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArrayOfInlineAllOfArrayAllofDogPropertyInner { + public static final String SERIALIZED_NAME_BREED = "breed"; + @SerializedName(SERIALIZED_NAME_BREED) + private String breed; + + public static final String SERIALIZED_NAME_COLOR = "color"; + @SerializedName(SERIALIZED_NAME_COLOR) + private String color; + + public ArrayOfInlineAllOfArrayAllofDogPropertyInner() { + } + + public ArrayOfInlineAllOfArrayAllofDogPropertyInner breed(String breed) { + + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getBreed() { + return breed; + } + + + public void setBreed(String breed) { + this.breed = breed; + } + + + public ArrayOfInlineAllOfArrayAllofDogPropertyInner color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getColor() { + return color; + } + + + public void setColor(String color) { + this.color = color; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ArrayOfInlineAllOfArrayAllofDogPropertyInner putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfInlineAllOfArrayAllofDogPropertyInner arrayOfInlineAllOfArrayAllofDogPropertyInner = (ArrayOfInlineAllOfArrayAllofDogPropertyInner) o; + return Objects.equals(this.breed, arrayOfInlineAllOfArrayAllofDogPropertyInner.breed) && + Objects.equals(this.color, arrayOfInlineAllOfArrayAllofDogPropertyInner.color)&& + Objects.equals(this.additionalProperties, arrayOfInlineAllOfArrayAllofDogPropertyInner.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(breed, color, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfInlineAllOfArrayAllofDogPropertyInner {\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("breed"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyInner + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (ArrayOfInlineAllOfArrayAllofDogPropertyInner.openapiRequiredFields.isEmpty()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfInlineAllOfArrayAllofDogPropertyInner is not found in the empty JSON string", ArrayOfInlineAllOfArrayAllofDogPropertyInner.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); + } + if (jsonObj.get("color") != null && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ArrayOfInlineAllOfArrayAllofDogPropertyInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ArrayOfInlineAllOfArrayAllofDogPropertyInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ArrayOfInlineAllOfArrayAllofDogPropertyInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ArrayOfInlineAllOfArrayAllofDogPropertyInner read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ArrayOfInlineAllOfArrayAllofDogPropertyInner instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ArrayOfInlineAllOfArrayAllofDogPropertyInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayOfInlineAllOfArrayAllofDogPropertyInner + * @throws IOException if the JSON string is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyInner + */ + public static ArrayOfInlineAllOfArrayAllofDogPropertyInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ArrayOfInlineAllOfArrayAllofDogPropertyInner.class); + } + + /** + * Convert an instance of ArrayOfInlineAllOfArrayAllofDogPropertyInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java new file mode 100644 index 000000000000..b71641713fd8 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java @@ -0,0 +1,273 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf { + public static final String SERIALIZED_NAME_COLOR = "color"; + @SerializedName(SERIALIZED_NAME_COLOR) + private String color; + + public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf() { + } + + public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getColor() { + return color; + } + + + public void setColor(String color) { + this.color = color; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf = (ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf) o; + return Objects.equals(this.color, arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.color)&& + Objects.equals(this.additionalProperties, arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(color, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf {\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.openapiRequiredFields.isEmpty()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf is not found in the empty JSON string", ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("color") != null && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + * @throws IOException if the JSON string is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + */ + public static ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.class); + } + + /** + * Convert an instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 342249bc0199..44f3b1db199c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -88,6 +89,42 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ArrayOfNumberOnly putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -98,12 +135,13 @@ public boolean equals(Object o) { return false; } ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber)&& + Objects.equals(this.additionalProperties, arrayOfNumberOnly.additionalProperties); } @Override public int hashCode() { - return Objects.hash(arrayNumber); + return Objects.hash(arrayNumber, additionalProperties); } @Override @@ -111,6 +149,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -153,12 +192,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfNumberOnly is not found in the empty JSON string", ArrayOfNumberOnly.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ArrayOfNumberOnly.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + // ensure the json data is an array + if (jsonObj.get("ArrayNumber") != null && !jsonObj.get("ArrayNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ArrayNumber` to be an array in the JSON string but got `%s`", jsonObj.get("ArrayNumber").toString())); } } @@ -177,6 +213,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayOfNumberOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -184,7 +237,25 @@ public void write(JsonWriter out, ArrayOfNumberOnly value) throws IOException { public ArrayOfNumberOnly read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ArrayOfNumberOnly instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java index e89a7a15b222..207dea369b3d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -158,6 +159,42 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ArrayTest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -170,12 +207,13 @@ public boolean equals(Object o) { ArrayTest arrayTest = (ArrayTest) o; return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel)&& + Objects.equals(this.additionalProperties, arrayTest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel, additionalProperties); } @Override @@ -185,6 +223,7 @@ public String toString() { sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -229,12 +268,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTest is not found in the empty JSON string", ArrayTest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ArrayTest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + // ensure the json data is an array + if (jsonObj.get("array_of_string") != null && !jsonObj.get("array_of_string").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_of_string` to be an array in the JSON string but got `%s`", jsonObj.get("array_of_string").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_array_of_integer") != null && !jsonObj.get("array_array_of_integer").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_array_of_integer` to be an array in the JSON string but got `%s`", jsonObj.get("array_array_of_integer").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_array_of_model") != null && !jsonObj.get("array_array_of_model").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_array_of_model` to be an array in the JSON string but got `%s`", jsonObj.get("array_array_of_model").toString())); } } @@ -253,6 +297,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -260,7 +321,25 @@ public void write(JsonWriter out, ArrayTest value) throws IOException { public ArrayTest read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ArrayTest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java index c43a01e24c1b..08800366b7d5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,42 @@ public void setLengthCm(BigDecimal lengthCm) { this.lengthCm = lengthCm; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Banana putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -88,12 +125,13 @@ public boolean equals(Object o) { return false; } Banana banana = (Banana) o; - return Objects.equals(this.lengthCm, banana.lengthCm); + return Objects.equals(this.lengthCm, banana.lengthCm)&& + Objects.equals(this.additionalProperties, banana.additionalProperties); } @Override public int hashCode() { - return Objects.hash(lengthCm); + return Objects.hash(lengthCm, additionalProperties); } @Override @@ -101,6 +139,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Banana {\n"); sb.append(" lengthCm: ").append(toIndentedString(lengthCm)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Banana is not found in the empty JSON string", Banana.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Banana.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Banana` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -167,6 +199,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Banana value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -174,7 +223,25 @@ public void write(JsonWriter out, Banana value) throws IOException { public Banana read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Banana instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java index a836fb51f6dc..a34aa1232821 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,7 @@ public void setSweet(Boolean sweet) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -174,6 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in BananaReq is not found in the empty JSON string", BananaReq.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java index ebbcfe3ab5ad..7f144c363101 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setClassName(String className) { this.className = className; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public BasquePig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } BasquePig basquePig = (BasquePig) o; - return Objects.equals(this.className, basquePig.className); + return Objects.equals(this.className, basquePig.className)&& + Objects.equals(this.additionalProperties, basquePig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(className); + return Objects.hash(className, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BasquePig {\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in BasquePig is not found in the empty JSON string", BasquePig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BasquePig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BasquePig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : BasquePig.openapiRequiredFields) { @@ -157,6 +189,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("className") != null && !jsonObj.get("className").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `className` to be a primitive type in the JSON string but got `%s`", jsonObj.get("className").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -174,6 +209,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, BasquePig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -181,7 +233,25 @@ public void write(JsonWriter out, BasquePig value) throws IOException { public BasquePig read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + BasquePig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java index 8584d4c02219..6ed0d3d2981e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -212,6 +213,42 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Capitalization putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -227,12 +264,13 @@ public boolean equals(Object o) { Objects.equals(this.smallSnake, capitalization.smallSnake) && Objects.equals(this.capitalSnake, capitalization.capitalSnake) && Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME)&& + Objects.equals(this.additionalProperties, capitalization.additionalProperties); } @Override public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME, additionalProperties); } @Override @@ -245,6 +283,7 @@ public String toString() { sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -292,12 +331,23 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Capitalization is not found in the empty JSON string", Capitalization.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Capitalization.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Capitalization` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("smallCamel") != null && !jsonObj.get("smallCamel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `smallCamel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("smallCamel").toString())); + } + if (jsonObj.get("CapitalCamel") != null && !jsonObj.get("CapitalCamel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `CapitalCamel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CapitalCamel").toString())); + } + if (jsonObj.get("small_Snake") != null && !jsonObj.get("small_Snake").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `small_Snake` to be a primitive type in the JSON string but got `%s`", jsonObj.get("small_Snake").toString())); + } + if (jsonObj.get("Capital_Snake") != null && !jsonObj.get("Capital_Snake").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `Capital_Snake` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Capital_Snake").toString())); + } + if (jsonObj.get("SCA_ETH_Flow_Points") != null && !jsonObj.get("SCA_ETH_Flow_Points").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `SCA_ETH_Flow_Points` to be a primitive type in the JSON string but got `%s`", jsonObj.get("SCA_ETH_Flow_Points").toString())); + } + if (jsonObj.get("ATT_NAME") != null && !jsonObj.get("ATT_NAME").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ATT_NAME` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ATT_NAME").toString())); } } @@ -316,6 +366,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Capitalization value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -323,7 +390,25 @@ public void write(JsonWriter out, Capitalization value) throws IOException { public Capitalization read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Capitalization instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java index 2cbae435775e..0985cc027022 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,42 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Cat putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -90,13 +127,14 @@ public boolean equals(Object o) { return false; } Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && + return Objects.equals(this.declawed, cat.declawed)&& + Objects.equals(this.additionalProperties, cat.additionalProperties) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(declawed, super.hashCode()); + return Objects.hash(declawed, super.hashCode(), additionalProperties); } @Override @@ -105,6 +143,7 @@ public String toString() { sb.append("class Cat {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -150,13 +189,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Cat is not found in the empty JSON string", Cat.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Cat.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Cat` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Cat.openapiRequiredFields) { @@ -181,6 +213,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Cat value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -188,7 +237,25 @@ public void write(JsonWriter out, Cat value) throws IOException { public Cat read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Cat instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java index 61efd362e4dc..74101142175c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public CatAllOf putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); + return Objects.equals(this.declawed, catAllOf.declawed)&& + Objects.equals(this.additionalProperties, catAllOf.additionalProperties); } @Override public int hashCode() { - return Objects.hash(declawed); + return Objects.hash(declawed, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,13 +181,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in CatAllOf is not found in the empty JSON string", CatAllOf.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CatAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -166,6 +198,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, CatAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -173,7 +222,25 @@ public void write(JsonWriter out, CatAllOf value) throws IOException { public CatAllOf read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + CatAllOf instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index a0b3ab7a893b..ec5e5fcf2d75 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -104,6 +105,42 @@ public void setName(String name) { this.name = name; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Category putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -115,12 +152,13 @@ public boolean equals(Object o) { } Category category = (Category) o; return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); + Objects.equals(this.name, category.name)&& + Objects.equals(this.additionalProperties, category.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(id, name, additionalProperties); } @Override @@ -129,6 +167,7 @@ public String toString() { sb.append("class Category {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -173,13 +212,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Category.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Category` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Category.openapiRequiredFields) { @@ -187,6 +219,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -204,6 +239,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Category value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -211,7 +263,25 @@ public void write(JsonWriter out, Category value) throws IOException { public Category read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Category instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java index 8075c6a68c5a..ad4d551f512c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,42 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ClassModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -88,12 +125,13 @@ public boolean equals(Object o) { return false; } ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); + return Objects.equals(this.propertyClass, classModel.propertyClass)&& + Objects.equals(this.additionalProperties, classModel.additionalProperties); } @Override public int hashCode() { - return Objects.hash(propertyClass); + return Objects.hash(propertyClass, additionalProperties); } @Override @@ -101,6 +139,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,12 +182,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ClassModel is not found in the empty JSON string", ClassModel.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ClassModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClassModel` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("_class") != null && !jsonObj.get("_class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `_class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_class").toString())); } } @@ -167,6 +202,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ClassModel value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -174,7 +226,25 @@ public void write(JsonWriter out, ClassModel value) throws IOException { public ClassModel read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ClassModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java index 73cf80af1972..381036120a1b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setClient(String client) { this.client = client; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Client putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } Client client = (Client) o; - return Objects.equals(this.client, client.client); + return Objects.equals(this.client, client.client)&& + Objects.equals(this.additionalProperties, client.additionalProperties); } @Override public int hashCode() { - return Objects.hash(client); + return Objects.hash(client, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,12 +181,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Client is not found in the empty JSON string", Client.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Client.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Client` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("client") != null && !jsonObj.get("client").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client").toString())); } } @@ -166,6 +201,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Client value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -173,7 +225,25 @@ public void write(JsonWriter out, Client value) throws IOException { public Client read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Client instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index 7a51d3df02b1..1a73911047f5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,42 @@ public void setQuadrilateralType(String quadrilateralType) { this.quadrilateralType = quadrilateralType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ComplexQuadrilateral putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -117,12 +154,13 @@ public boolean equals(Object o) { } ComplexQuadrilateral complexQuadrilateral = (ComplexQuadrilateral) o; return Objects.equals(this.shapeType, complexQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, complexQuadrilateral.quadrilateralType); + Objects.equals(this.quadrilateralType, complexQuadrilateral.quadrilateralType)&& + Objects.equals(this.additionalProperties, complexQuadrilateral.additionalProperties); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType); + return Objects.hash(shapeType, quadrilateralType, additionalProperties); } @Override @@ -131,6 +169,7 @@ public String toString() { sb.append("class ComplexQuadrilateral {\n"); sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); sb.append(" quadrilateralType: ").append(toIndentedString(quadrilateralType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,13 +215,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ComplexQuadrilateral is not found in the empty JSON string", ComplexQuadrilateral.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ComplexQuadrilateral.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ComplexQuadrilateral` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ComplexQuadrilateral.openapiRequiredFields) { @@ -190,6 +222,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("shapeType") != null && !jsonObj.get("shapeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shapeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shapeType").toString())); + } + if (jsonObj.get("quadrilateralType") != null && !jsonObj.get("quadrilateralType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quadrilateralType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quadrilateralType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -207,6 +245,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ComplexQuadrilateral value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -214,7 +269,25 @@ public void write(JsonWriter out, ComplexQuadrilateral value) throws IOException public ComplexQuadrilateral read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ComplexQuadrilateral instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java index 401709738b84..02c390dcd7e3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setClassName(String className) { this.className = className; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public DanishPig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } DanishPig danishPig = (DanishPig) o; - return Objects.equals(this.className, danishPig.className); + return Objects.equals(this.className, danishPig.className)&& + Objects.equals(this.additionalProperties, danishPig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(className); + return Objects.hash(className, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DanishPig {\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in DanishPig is not found in the empty JSON string", DanishPig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DanishPig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DanishPig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : DanishPig.openapiRequiredFields) { @@ -157,6 +189,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("className") != null && !jsonObj.get("className").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `className` to be a primitive type in the JSON string but got `%s`", jsonObj.get("className").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -174,6 +209,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DanishPig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -181,7 +233,25 @@ public void write(JsonWriter out, DanishPig value) throws IOException { public DanishPig read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + DanishPig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 9a449ebf8da2..d1e24af7ffd0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,42 @@ public void setName(String name) { this.name = name; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public DeprecatedObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -89,12 +126,13 @@ public boolean equals(Object o) { return false; } DeprecatedObject deprecatedObject = (DeprecatedObject) o; - return Objects.equals(this.name, deprecatedObject.name); + return Objects.equals(this.name, deprecatedObject.name)&& + Objects.equals(this.additionalProperties, deprecatedObject.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name); + return Objects.hash(name, additionalProperties); } @Override @@ -102,6 +140,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeprecatedObject {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -144,12 +183,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in DeprecatedObject is not found in the empty JSON string", DeprecatedObject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeprecatedObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeprecatedObject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } @@ -168,6 +203,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DeprecatedObject value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -175,7 +227,25 @@ public void write(JsonWriter out, DeprecatedObject value) throws IOException { public DeprecatedObject read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + DeprecatedObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java index 0afe4480c73c..8975d4f1ecf3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -80,6 +81,42 @@ public void setBreed(String breed) { this.breed = breed; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Dog putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -90,13 +127,14 @@ public boolean equals(Object o) { return false; } Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && + return Objects.equals(this.breed, dog.breed)&& + Objects.equals(this.additionalProperties, dog.additionalProperties) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(breed, super.hashCode()); + return Objects.hash(breed, super.hashCode(), additionalProperties); } @Override @@ -105,6 +143,7 @@ public String toString() { sb.append("class Dog {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -150,13 +189,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Dog is not found in the empty JSON string", Dog.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Dog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Dog` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Dog.openapiRequiredFields) { @@ -181,6 +213,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Dog value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -188,7 +237,25 @@ public void write(JsonWriter out, Dog value) throws IOException { public Dog read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Dog instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java index afe1b3f3cc9d..a15a3e0929ac 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setBreed(String breed) { this.breed = breed; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public DogAllOf putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); + return Objects.equals(this.breed, dogAllOf.breed)&& + Objects.equals(this.additionalProperties, dogAllOf.additionalProperties); } @Override public int hashCode() { - return Objects.hash(breed); + return Objects.hash(breed, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,12 +181,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in DogAllOf is not found in the empty JSON string", DogAllOf.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DogAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DogAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); } } @@ -166,6 +201,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DogAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -173,7 +225,25 @@ public void write(JsonWriter out, DogAllOf value) throws IOException { public DogAllOf read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + DogAllOf instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java index fa3e53034eb6..5318f5afc988 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java @@ -24,9 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.openapitools.client.model.Fruit; import org.openapitools.client.model.NullableShape; import org.openapitools.client.model.Shape; @@ -45,6 +43,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -56,7 +55,7 @@ * Drawing */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Drawing extends HashMap { +public class Drawing { public static final String SERIALIZED_NAME_MAIN_SHAPE = "mainShape"; @SerializedName(SERIALIZED_NAME_MAIN_SHAPE) private Shape mainShape; @@ -176,6 +175,7 @@ public void setShapes(List shapes) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -188,8 +188,7 @@ public boolean equals(Object o) { return Objects.equals(this.mainShape, drawing.mainShape) && Objects.equals(this.shapeOrNull, drawing.shapeOrNull) && Objects.equals(this.nullableShape, drawing.nullableShape) && - Objects.equals(this.shapes, drawing.shapes) && - super.equals(o); + Objects.equals(this.shapes, drawing.shapes); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -198,7 +197,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(mainShape, shapeOrNull, nullableShape, shapes, super.hashCode()); + return Objects.hash(mainShape, shapeOrNull, nullableShape, shapes); } private static int hashCodeNullable(JsonNullable a) { @@ -212,7 +211,6 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Drawing {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" mainShape: ").append(toIndentedString(mainShape)).append("\n"); sb.append(" shapeOrNull: ").append(toIndentedString(shapeOrNull)).append("\n"); sb.append(" nullableShape: ").append(toIndentedString(nullableShape)).append("\n"); @@ -262,6 +260,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Drawing is not found in the empty JSON string", Drawing.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -282,8 +281,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { NullableShape.validateJsonObject(jsonObj.getAsJsonObject("nullableShape")); } JsonArray jsonArrayshapes = jsonObj.getAsJsonArray("shapes"); - // validate the optional field `shapes` (array) if (jsonArrayshapes != null) { + // ensure the json data is an array + if (!jsonObj.get("shapes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shapes` to be an array in the JSON string but got `%s`", jsonObj.get("shapes").toString())); + } + + // validate the optional field `shapes` (array) for (int i = 0; i < jsonArrayshapes.size(); i++) { Shape.validateJsonObject(jsonArrayshapes.get(i).getAsJsonObject()); }; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java index 7f0040a14661..3a705da91612 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -208,6 +209,42 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public EnumArrays putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -219,12 +256,13 @@ public boolean equals(Object o) { } EnumArrays enumArrays = (EnumArrays) o; return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + Objects.equals(this.arrayEnum, enumArrays.arrayEnum)&& + Objects.equals(this.additionalProperties, enumArrays.additionalProperties); } @Override public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); + return Objects.hash(justSymbol, arrayEnum, additionalProperties); } @Override @@ -233,6 +271,7 @@ public String toString() { sb.append("class EnumArrays {\n"); sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -276,12 +315,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EnumArrays is not found in the empty JSON string", EnumArrays.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!EnumArrays.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnumArrays` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("just_symbol") != null && !jsonObj.get("just_symbol").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `just_symbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("just_symbol").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_enum") != null && !jsonObj.get("array_enum").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_enum` to be an array in the JSON string but got `%s`", jsonObj.get("array_enum").toString())); } } @@ -300,6 +339,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, EnumArrays value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -307,7 +363,25 @@ public void write(JsonWriter out, EnumArrays value) throws IOException { public EnumArrays read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + EnumArrays instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index ed5547a569f5..0a5892a2034c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -537,6 +538,42 @@ public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEn this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public EnumTest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -555,7 +592,8 @@ public boolean equals(Object o) { Objects.equals(this.outerEnum, enumTest.outerEnum) && Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && - Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue)&& + Objects.equals(this.additionalProperties, enumTest.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -564,7 +602,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumIntegerOnly, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumIntegerOnly, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -587,6 +625,7 @@ public String toString() { sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -638,13 +677,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EnumTest is not found in the empty JSON string", EnumTest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!EnumTest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnumTest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EnumTest.openapiRequiredFields) { @@ -652,6 +684,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("enum_string") != null && !jsonObj.get("enum_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enum_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_string").toString())); + } + if (jsonObj.get("enum_string_required") != null && !jsonObj.get("enum_string_required").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enum_string_required` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_string_required").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -669,6 +707,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, EnumTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -676,7 +731,25 @@ public void write(JsonWriter out, EnumTest value) throws IOException { public EnumTest read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + EnumTest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 3077c5fe280c..37e46b978d4b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,42 @@ public void setTriangleType(String triangleType) { this.triangleType = triangleType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public EquilateralTriangle putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -117,12 +154,13 @@ public boolean equals(Object o) { } EquilateralTriangle equilateralTriangle = (EquilateralTriangle) o; return Objects.equals(this.shapeType, equilateralTriangle.shapeType) && - Objects.equals(this.triangleType, equilateralTriangle.triangleType); + Objects.equals(this.triangleType, equilateralTriangle.triangleType)&& + Objects.equals(this.additionalProperties, equilateralTriangle.additionalProperties); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return Objects.hash(shapeType, triangleType, additionalProperties); } @Override @@ -131,6 +169,7 @@ public String toString() { sb.append("class EquilateralTriangle {\n"); sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,13 +215,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in EquilateralTriangle is not found in the empty JSON string", EquilateralTriangle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!EquilateralTriangle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EquilateralTriangle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EquilateralTriangle.openapiRequiredFields) { @@ -190,6 +222,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("shapeType") != null && !jsonObj.get("shapeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shapeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shapeType").toString())); + } + if (jsonObj.get("triangleType") != null && !jsonObj.get("triangleType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `triangleType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("triangleType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -207,6 +245,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, EquilateralTriangle value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -214,7 +269,25 @@ public void write(JsonWriter out, EquilateralTriangle value) throws IOException public EquilateralTriangle read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + EquilateralTriangle instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 6f533393a3b5..4bfdfe254c84 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -115,6 +116,42 @@ public void setFiles(List files) { this.files = files; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public FileSchemaTestClass putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -126,12 +163,13 @@ public boolean equals(Object o) { } FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); + Objects.equals(this.files, fileSchemaTestClass.files)&& + Objects.equals(this.additionalProperties, fileSchemaTestClass.additionalProperties); } @Override public int hashCode() { - return Objects.hash(_file, files); + return Objects.hash(_file, files, additionalProperties); } @Override @@ -140,6 +178,7 @@ public String toString() { sb.append("class FileSchemaTestClass {\n"); sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -183,20 +222,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in FileSchemaTestClass is not found in the empty JSON string", FileSchemaTestClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FileSchemaTestClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileSchemaTestClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // validate the optional field `file` if (jsonObj.getAsJsonObject("file") != null) { ModelFile.validateJsonObject(jsonObj.getAsJsonObject("file")); } JsonArray jsonArrayfiles = jsonObj.getAsJsonArray("files"); - // validate the optional field `files` (array) if (jsonArrayfiles != null) { + // ensure the json data is an array + if (!jsonObj.get("files").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `files` to be an array in the JSON string but got `%s`", jsonObj.get("files").toString())); + } + + // validate the optional field `files` (array) for (int i = 0; i < jsonArrayfiles.size(); i++) { ModelFile.validateJsonObject(jsonArrayfiles.get(i).getAsJsonObject()); }; @@ -218,6 +255,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FileSchemaTestClass value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -225,7 +279,25 @@ public void write(JsonWriter out, FileSchemaTestClass value) throws IOException public FileSchemaTestClass read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + FileSchemaTestClass instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java index 72f427382dda..4d0a5b1fe75e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setBar(String bar) { this.bar = bar; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Foo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } Foo foo = (Foo) o; - return Objects.equals(this.bar, foo.bar); + return Objects.equals(this.bar, foo.bar)&& + Objects.equals(this.additionalProperties, foo.additionalProperties); } @Override public int hashCode() { - return Objects.hash(bar); + return Objects.hash(bar, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Foo {\n"); sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,12 +181,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Foo is not found in the empty JSON string", Foo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Foo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Foo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); } } @@ -166,6 +201,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Foo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -173,7 +225,25 @@ public void write(JsonWriter out, Foo value) throws IOException { public Foo read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Foo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java index 0a810116384c..0813672f10a3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -41,6 +41,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -497,6 +498,42 @@ public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimite this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public FormatTest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -522,12 +559,13 @@ public boolean equals(Object o) { Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && - Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter)&& + Objects.equals(this.additionalProperties, formatTest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter, additionalProperties); } @Override @@ -550,6 +588,7 @@ public String toString() { sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -611,13 +650,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in FormatTest is not found in the empty JSON string", FormatTest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FormatTest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormatTest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FormatTest.openapiRequiredFields) { @@ -625,6 +657,21 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("string") != null && !jsonObj.get("string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string").toString())); + } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (jsonObj.get("password") != null && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if (jsonObj.get("pattern_with_digits") != null && !jsonObj.get("pattern_with_digits").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pattern_with_digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pattern_with_digits").toString())); + } + if (jsonObj.get("pattern_with_digits_and_delimiter") != null && !jsonObj.get("pattern_with_digits_and_delimiter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pattern_with_digits_and_delimiter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pattern_with_digits_and_delimiter").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -642,6 +689,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FormatTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -649,7 +713,25 @@ public void write(JsonWriter out, FormatTest value) throws IOException { public FormatTest read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + FormatTest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 55cc5cc95402..faa905c767ef 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,42 @@ public void setPetType(String petType) { this.petType = petType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public GrandparentAnimal putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -89,12 +126,13 @@ public boolean equals(Object o) { return false; } GrandparentAnimal grandparentAnimal = (GrandparentAnimal) o; - return Objects.equals(this.petType, grandparentAnimal.petType); + return Objects.equals(this.petType, grandparentAnimal.petType)&& + Objects.equals(this.additionalProperties, grandparentAnimal.additionalProperties); } @Override public int hashCode() { - return Objects.hash(petType); + return Objects.hash(petType, additionalProperties); } @Override @@ -102,6 +140,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GrandparentAnimal {\n"); sb.append(" petType: ").append(toIndentedString(petType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 663f311185d9..654a34acbb39 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -96,6 +97,42 @@ public String getFoo() { + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public HasOnlyReadOnly putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -107,12 +144,13 @@ public boolean equals(Object o) { } HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); + Objects.equals(this.foo, hasOnlyReadOnly.foo)&& + Objects.equals(this.additionalProperties, hasOnlyReadOnly.additionalProperties); } @Override public int hashCode() { - return Objects.hash(bar, foo); + return Objects.hash(bar, foo, additionalProperties); } @Override @@ -121,6 +159,7 @@ public String toString() { sb.append("class HasOnlyReadOnly {\n"); sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -164,12 +203,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in HasOnlyReadOnly is not found in the empty JSON string", HasOnlyReadOnly.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!HasOnlyReadOnly.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HasOnlyReadOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); + } + if (jsonObj.get("foo") != null && !jsonObj.get("foo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foo").toString())); } } @@ -188,6 +226,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, HasOnlyReadOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -195,7 +250,25 @@ public void write(JsonWriter out, HasOnlyReadOnly value) throws IOException { public HasOnlyReadOnly read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + HasOnlyReadOnly instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java index b2d554e23445..9053adf5a356 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -79,6 +80,42 @@ public void setNullableMessage(String nullableMessage) { this.nullableMessage = nullableMessage; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public HealthCheckResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -89,7 +126,8 @@ public boolean equals(Object o) { return false; } HealthCheckResult healthCheckResult = (HealthCheckResult) o; - return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage); + return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage)&& + Objects.equals(this.additionalProperties, healthCheckResult.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -98,7 +136,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(nullableMessage); + return Objects.hash(nullableMessage, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -113,6 +151,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HealthCheckResult {\n"); sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -155,12 +194,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in HealthCheckResult is not found in the empty JSON string", HealthCheckResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!HealthCheckResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HealthCheckResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("NullableMessage") != null && !jsonObj.get("NullableMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `NullableMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("NullableMessage").toString())); } } @@ -179,6 +214,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, HealthCheckResult value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -186,7 +238,25 @@ public void write(JsonWriter out, HealthCheckResult value) throws IOException { public HealthCheckResult read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + HealthCheckResult instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java index d649c8fa27eb..1bb1be954d4e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,42 @@ public void setString(Foo string) { this.string = string; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public InlineResponseDefault putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -88,12 +125,13 @@ public boolean equals(Object o) { return false; } InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o; - return Objects.equals(this.string, inlineResponseDefault.string); + return Objects.equals(this.string, inlineResponseDefault.string)&& + Objects.equals(this.additionalProperties, inlineResponseDefault.additionalProperties); } @Override public int hashCode() { - return Objects.hash(string); + return Objects.hash(string, additionalProperties); } @Override @@ -101,6 +139,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InlineResponseDefault {\n"); sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in InlineResponseDefault is not found in the empty JSON string", InlineResponseDefault.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!InlineResponseDefault.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InlineResponseDefault` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // validate the optional field `string` if (jsonObj.getAsJsonObject("string") != null) { Foo.validateJsonObject(jsonObj.getAsJsonObject("string")); @@ -171,6 +203,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, InlineResponseDefault value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -178,7 +227,25 @@ public void write(JsonWriter out, InlineResponseDefault value) throws IOExceptio public InlineResponseDefault read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + InlineResponseDefault instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index ea81deb3218d..df7563afde93 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -107,6 +108,7 @@ public void setTriangleType(String triangleType) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -176,6 +178,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in IsoscelesTriangle is not found in the empty JSON string", IsoscelesTriangle.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -190,6 +193,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("shapeType") != null && !jsonObj.get("shapeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shapeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shapeType").toString())); + } + if (jsonObj.get("triangleType") != null && !jsonObj.get("triangleType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `triangleType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("triangleType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index 32e4f3c5e47a..ec4fe579483a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -39,6 +39,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -240,6 +241,42 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public MapTest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -253,12 +290,13 @@ public boolean equals(Object o) { return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); + Objects.equals(this.indirectMap, mapTest.indirectMap)&& + Objects.equals(this.additionalProperties, mapTest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap, additionalProperties); } @Override @@ -269,6 +307,7 @@ public String toString() { sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -314,13 +353,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MapTest is not found in the empty JSON string", MapTest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MapTest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MapTest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -338,6 +370,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, MapTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -345,7 +394,25 @@ public void write(JsonWriter out, MapTest value) throws IOException { public MapTest read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + MapTest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7f1ae480b867..f7692be1f1ce 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -42,6 +42,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -145,6 +146,42 @@ public void setMap(Map map) { this.map = map; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public MixedPropertiesAndAdditionalPropertiesClass putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -157,12 +194,13 @@ public boolean equals(Object o) { MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map)&& + Objects.equals(this.additionalProperties, mixedPropertiesAndAdditionalPropertiesClass.additionalProperties); } @Override public int hashCode() { - return Objects.hash(uuid, dateTime, map); + return Objects.hash(uuid, dateTime, map, additionalProperties); } @Override @@ -172,6 +210,7 @@ public String toString() { sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -216,12 +255,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in MixedPropertiesAndAdditionalPropertiesClass is not found in the empty JSON string", MixedPropertiesAndAdditionalPropertiesClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MixedPropertiesAndAdditionalPropertiesClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MixedPropertiesAndAdditionalPropertiesClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } } @@ -240,6 +275,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, MixedPropertiesAndAdditionalPropertiesClass value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -247,7 +299,25 @@ public void write(JsonWriter out, MixedPropertiesAndAdditionalPropertiesClass va public MixedPropertiesAndAdditionalPropertiesClass read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + MixedPropertiesAndAdditionalPropertiesClass instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java index ed075c728523..2a50f1d5dd60 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -105,6 +106,42 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Model200Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -116,12 +153,13 @@ public boolean equals(Object o) { } Model200Response _200response = (Model200Response) o; return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); + Objects.equals(this.propertyClass, _200response.propertyClass)&& + Objects.equals(this.additionalProperties, _200response.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, propertyClass); + return Objects.hash(name, propertyClass, additionalProperties); } @Override @@ -130,6 +168,7 @@ public String toString() { sb.append("class Model200Response {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -173,12 +212,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Model200Response is not found in the empty JSON string", Model200Response.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Model200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Model200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("class") != null && !jsonObj.get("class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); } } @@ -197,6 +232,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Model200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -204,7 +256,25 @@ public void write(JsonWriter out, Model200Response value) throws IOException { public Model200Response read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Model200Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a1f9b9770876..ceae89017c97 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -131,6 +132,42 @@ public void setMessage(String message) { this.message = message; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ModelApiResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -143,12 +180,13 @@ public boolean equals(Object o) { ModelApiResponse _apiResponse = (ModelApiResponse) o; return Objects.equals(this.code, _apiResponse.code) && Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); + Objects.equals(this.message, _apiResponse.message)&& + Objects.equals(this.additionalProperties, _apiResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(code, type, message); + return Objects.hash(code, type, message, additionalProperties); } @Override @@ -158,6 +196,7 @@ public String toString() { sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -202,12 +241,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelApiResponse is not found in the empty JSON string", ModelApiResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ModelApiResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelApiResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (jsonObj.get("message") != null && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -226,6 +264,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ModelApiResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -233,7 +288,25 @@ public void write(JsonWriter out, ModelApiResponse value) throws IOException { public ModelApiResponse read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ModelApiResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java index eaa7571ba202..19b8d3416533 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,42 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ModelFile putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -88,12 +125,13 @@ public boolean equals(Object o) { return false; } ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); + return Objects.equals(this.sourceURI, _file.sourceURI)&& + Objects.equals(this.additionalProperties, _file.additionalProperties); } @Override public int hashCode() { - return Objects.hash(sourceURI); + return Objects.hash(sourceURI, additionalProperties); } @Override @@ -101,6 +139,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelFile {\n"); sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,12 +182,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelFile is not found in the empty JSON string", ModelFile.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ModelFile.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelFile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("sourceURI") != null && !jsonObj.get("sourceURI").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sourceURI` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceURI").toString())); } } @@ -167,6 +202,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ModelFile value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -174,7 +226,25 @@ public void write(JsonWriter out, ModelFile value) throws IOException { public ModelFile read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ModelFile instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java index df7332dde76b..c11740aa774c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void set123list(String _123list) { this._123list = _123list; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ModelList putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); + return Objects.equals(this._123list, _list._123list)&& + Objects.equals(this.additionalProperties, _list.additionalProperties); } @Override public int hashCode() { - return Objects.hash(_123list); + return Objects.hash(_123list, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,12 +181,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelList is not found in the empty JSON string", ModelList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ModelList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("123-list") != null && !jsonObj.get("123-list").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `123-list` to be a primitive type in the JSON string but got `%s`", jsonObj.get("123-list").toString())); } } @@ -166,6 +201,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ModelList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -173,7 +225,25 @@ public void write(JsonWriter out, ModelList value) throws IOException { public ModelList read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ModelList instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index dd1250c697fa..27677e517b39 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,42 @@ public void setReturn(Integer _return) { this._return = _return; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ModelReturn putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -88,12 +125,13 @@ public boolean equals(Object o) { return false; } ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); + return Objects.equals(this._return, _return._return)&& + Objects.equals(this.additionalProperties, _return.additionalProperties); } @Override public int hashCode() { - return Objects.hash(_return); + return Objects.hash(_return, additionalProperties); } @Override @@ -101,6 +139,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ModelReturn is not found in the empty JSON string", ModelReturn.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ModelReturn.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelReturn` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -167,6 +199,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ModelReturn value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -174,7 +223,25 @@ public void write(JsonWriter out, ModelReturn value) throws IOException { public ModelReturn read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ModelReturn instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java index 1c37e17f5218..b0ff9da6091d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -151,6 +152,42 @@ public Integer get123number() { + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Name putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -164,12 +201,13 @@ public boolean equals(Object o) { return Objects.equals(this.name, name.name) && Objects.equals(this.snakeCase, name.snakeCase) && Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); + Objects.equals(this._123number, name._123number)&& + Objects.equals(this.additionalProperties, name.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); + return Objects.hash(name, snakeCase, property, _123number, additionalProperties); } @Override @@ -180,6 +218,7 @@ public String toString() { sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -226,13 +265,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Name is not found in the empty JSON string", Name.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Name.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Name` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Name.openapiRequiredFields) { @@ -240,6 +272,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -257,6 +292,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Name value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -264,7 +316,25 @@ public void write(JsonWriter out, Name value) throws IOException { public Name read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Name instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java index 9ca8c89a415d..6c1d46e4f2c4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java @@ -44,6 +44,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -55,7 +56,7 @@ * NullableClass */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NullableClass extends HashMap { +public class NullableClass { public static final String SERIALIZED_NAME_INTEGER_PROP = "integer_prop"; @SerializedName(SERIALIZED_NAME_INTEGER_PROP) private Integer integerProp; @@ -431,6 +432,7 @@ public void setObjectItemsNullable(Map objectItemsNullable) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -451,8 +453,7 @@ public boolean equals(Object o) { Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && Objects.equals(this.objectNullableProp, nullableClass.objectNullableProp) && Objects.equals(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && - Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && - super.equals(o); + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -461,7 +462,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable, super.hashCode()); + return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable); } private static int hashCodeNullable(JsonNullable a) { @@ -475,7 +476,6 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NullableClass {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); @@ -541,6 +541,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in NullableClass is not found in the empty JSON string", NullableClass.openapiRequiredFields.toString())); } } + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { @@ -548,6 +549,21 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NullableClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } + if (jsonObj.get("string_prop") != null && !jsonObj.get("string_prop").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `string_prop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("string_prop").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_nullable_prop") != null && !jsonObj.get("array_nullable_prop").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_nullable_prop` to be an array in the JSON string but got `%s`", jsonObj.get("array_nullable_prop").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_and_items_nullable_prop") != null && !jsonObj.get("array_and_items_nullable_prop").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_and_items_nullable_prop` to be an array in the JSON string but got `%s`", jsonObj.get("array_and_items_nullable_prop").toString())); + } + // ensure the json data is an array + if (jsonObj.get("array_items_nullable") != null && !jsonObj.get("array_items_nullable").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_items_nullable` to be an array in the JSON string but got `%s`", jsonObj.get("array_items_nullable").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java index 44e8bc923f7e..7dea8b0ecfed 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -78,6 +79,42 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public NumberOnly putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -88,12 +125,13 @@ public boolean equals(Object o) { return false; } NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); + return Objects.equals(this.justNumber, numberOnly.justNumber)&& + Objects.equals(this.additionalProperties, numberOnly.additionalProperties); } @Override public int hashCode() { - return Objects.hash(justNumber); + return Objects.hash(justNumber, additionalProperties); } @Override @@ -101,6 +139,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in NumberOnly is not found in the empty JSON string", NumberOnly.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NumberOnly.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NumberOnly` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -167,6 +199,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NumberOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -174,7 +223,25 @@ public void write(JsonWriter out, NumberOnly value) throws IOException { public NumberOnly read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + NumberOnly instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 681d5e15800d..7454088d2e8e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -176,6 +177,42 @@ public void setBars(List bars) { this.bars = bars; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ObjectWithDeprecatedFields putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -189,12 +226,13 @@ public boolean equals(Object o) { return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && Objects.equals(this.id, objectWithDeprecatedFields.id) && Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && - Objects.equals(this.bars, objectWithDeprecatedFields.bars); + Objects.equals(this.bars, objectWithDeprecatedFields.bars)&& + Objects.equals(this.additionalProperties, objectWithDeprecatedFields.additionalProperties); } @Override public int hashCode() { - return Objects.hash(uuid, id, deprecatedRef, bars); + return Objects.hash(uuid, id, deprecatedRef, bars, additionalProperties); } @Override @@ -205,6 +243,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); sb.append(" bars: ").append(toIndentedString(bars)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -250,17 +289,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectWithDeprecatedFields is not found in the empty JSON string", ObjectWithDeprecatedFields.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectWithDeprecatedFields.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectWithDeprecatedFields` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } // validate the optional field `deprecatedRef` if (jsonObj.getAsJsonObject("deprecatedRef") != null) { DeprecatedObject.validateJsonObject(jsonObj.getAsJsonObject("deprecatedRef")); } + // ensure the json data is an array + if (jsonObj.get("bars") != null && !jsonObj.get("bars").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `bars` to be an array in the JSON string but got `%s`", jsonObj.get("bars").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,6 +317,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ObjectWithDeprecatedFields value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -285,7 +341,25 @@ public void write(JsonWriter out, ObjectWithDeprecatedFields value) throws IOExc public ObjectWithDeprecatedFields read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ObjectWithDeprecatedFields instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java index d17b255ef7e8..a56fa5f28a81 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -262,6 +263,42 @@ public void setComplete(Boolean complete) { this.complete = complete; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Order putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -277,12 +314,13 @@ public boolean equals(Object o) { Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); + Objects.equals(this.complete, order.complete)&& + Objects.equals(this.additionalProperties, order.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete, additionalProperties); } @Override @@ -295,6 +333,7 @@ public String toString() { sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -342,12 +381,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Order is not found in the empty JSON string", Order.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Order.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Order` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } } @@ -366,6 +401,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Order value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -373,7 +425,25 @@ public void write(JsonWriter out, Order value) throws IOException { public Order read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Order instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index e3051bdefef2..011acb3a58c4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -132,6 +133,42 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public OuterComposite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -144,12 +181,13 @@ public boolean equals(Object o) { OuterComposite outerComposite = (OuterComposite) o; return Objects.equals(this.myNumber, outerComposite.myNumber) && Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); + Objects.equals(this.myBoolean, outerComposite.myBoolean)&& + Objects.equals(this.additionalProperties, outerComposite.additionalProperties); } @Override public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); + return Objects.hash(myNumber, myString, myBoolean, additionalProperties); } @Override @@ -159,6 +197,7 @@ public String toString() { sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -203,12 +242,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in OuterComposite is not found in the empty JSON string", OuterComposite.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OuterComposite.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OuterComposite` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("my_string") != null && !jsonObj.get("my_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `my_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("my_string").toString())); } } @@ -227,6 +262,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, OuterComposite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -234,7 +286,25 @@ public void write(JsonWriter out, OuterComposite value) throws IOException { public OuterComposite read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + OuterComposite instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java index b7234c67f65b..25313f8266cf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -52,6 +53,42 @@ public class ParentPet extends GrandparentAnimal { public ParentPet() { this.petType = this.getClass().getSimpleName(); } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ParentPet putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -66,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), additionalProperties); } @Override @@ -74,6 +111,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ParentPet {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -117,13 +155,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ParentPet is not found in the empty JSON string", ParentPet.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ParentPet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ParentPet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ParentPet.openapiRequiredFields) { @@ -148,6 +179,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ParentPet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -155,7 +203,25 @@ public void write(JsonWriter out, ParentPet value) throws IOException { public ParentPet read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ParentPet instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index 6856a8ada278..8078f1b07dca 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -278,6 +279,42 @@ public void setStatus(StatusEnum status) { this.status = status; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Pet putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -293,12 +330,13 @@ public boolean equals(Object o) { Objects.equals(this.name, pet.name) && Objects.equals(this.photoUrls, pet.photoUrls) && Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); + Objects.equals(this.status, pet.status)&& + Objects.equals(this.additionalProperties, pet.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return Objects.hash(id, category, name, photoUrls, tags, status, additionalProperties); } @Override @@ -311,6 +349,7 @@ public String toString() { sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -360,13 +399,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Pet is not found in the empty JSON string", Pet.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Pet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Pet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Pet.openapiRequiredFields) { @@ -378,13 +410,28 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.getAsJsonObject("category") != null) { Category.validateJsonObject(jsonObj.getAsJsonObject("category")); } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the json data is an array + if (jsonObj.get("photoUrls") != null && !jsonObj.get("photoUrls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString())); + } JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - // validate the optional field `tags` (array) if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) for (int i = 0; i < jsonArraytags.size(); i++) { Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); }; } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -402,6 +449,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Pet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -409,7 +473,25 @@ public void write(JsonWriter out, Pet value) throws IOException { public Pet read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Pet instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java index 644e0f205eb8..3fde0c9b9c15 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java @@ -40,6 +40,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -275,6 +276,42 @@ public void setStatus(StatusEnum status) { this.status = status; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public PetWithRequiredTags putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -290,12 +327,13 @@ public boolean equals(Object o) { Objects.equals(this.name, petWithRequiredTags.name) && Objects.equals(this.photoUrls, petWithRequiredTags.photoUrls) && Objects.equals(this.tags, petWithRequiredTags.tags) && - Objects.equals(this.status, petWithRequiredTags.status); + Objects.equals(this.status, petWithRequiredTags.status)&& + Objects.equals(this.additionalProperties, petWithRequiredTags.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return Objects.hash(id, category, name, photoUrls, tags, status, additionalProperties); } @Override @@ -308,6 +346,7 @@ public String toString() { sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -358,13 +397,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in PetWithRequiredTags is not found in the empty JSON string", PetWithRequiredTags.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PetWithRequiredTags.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PetWithRequiredTags` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PetWithRequiredTags.openapiRequiredFields) { @@ -376,13 +408,28 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.getAsJsonObject("category") != null) { Category.validateJsonObject(jsonObj.getAsJsonObject("category")); } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the json data is an array + if (jsonObj.get("photoUrls") != null && !jsonObj.get("photoUrls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString())); + } JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - // validate the optional field `tags` (array) if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) for (int i = 0; i < jsonArraytags.size(); i++) { Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); }; } + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -400,6 +447,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, PetWithRequiredTags value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -407,7 +471,25 @@ public void write(JsonWriter out, PetWithRequiredTags value) throws IOException public PetWithRequiredTags read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + PetWithRequiredTags instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index 39da18b1baba..e2c3d4b33cdd 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setQuadrilateralType(String quadrilateralType) { this.quadrilateralType = quadrilateralType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public QuadrilateralInterface putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } QuadrilateralInterface quadrilateralInterface = (QuadrilateralInterface) o; - return Objects.equals(this.quadrilateralType, quadrilateralInterface.quadrilateralType); + return Objects.equals(this.quadrilateralType, quadrilateralInterface.quadrilateralType)&& + Objects.equals(this.additionalProperties, quadrilateralInterface.additionalProperties); } @Override public int hashCode() { - return Objects.hash(quadrilateralType); + return Objects.hash(quadrilateralType, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QuadrilateralInterface {\n"); sb.append(" quadrilateralType: ").append(toIndentedString(quadrilateralType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in QuadrilateralInterface is not found in the empty JSON string", QuadrilateralInterface.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!QuadrilateralInterface.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuadrilateralInterface` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : QuadrilateralInterface.openapiRequiredFields) { @@ -157,6 +189,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("quadrilateralType") != null && !jsonObj.get("quadrilateralType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quadrilateralType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quadrilateralType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -174,6 +209,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, QuadrilateralInterface value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -181,7 +233,25 @@ public void write(JsonWriter out, QuadrilateralInterface value) throws IOExcepti public QuadrilateralInterface read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + QuadrilateralInterface instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 402aa73e38b2..f5c37a84d457 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -103,6 +104,42 @@ public void setBaz(String baz) { this.baz = baz; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ReadOnlyFirst putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -114,12 +151,13 @@ public boolean equals(Object o) { } ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); + Objects.equals(this.baz, readOnlyFirst.baz)&& + Objects.equals(this.additionalProperties, readOnlyFirst.additionalProperties); } @Override public int hashCode() { - return Objects.hash(bar, baz); + return Objects.hash(bar, baz, additionalProperties); } @Override @@ -128,6 +166,7 @@ public String toString() { sb.append("class ReadOnlyFirst {\n"); sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -171,12 +210,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ReadOnlyFirst is not found in the empty JSON string", ReadOnlyFirst.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ReadOnlyFirst.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadOnlyFirst` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString())); + } + if (jsonObj.get("baz") != null && !jsonObj.get("baz").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `baz` to be a primitive type in the JSON string but got `%s`", jsonObj.get("baz").toString())); } } @@ -195,6 +233,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ReadOnlyFirst value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -202,7 +257,25 @@ public void write(JsonWriter out, ReadOnlyFirst value) throws IOException { public ReadOnlyFirst read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ReadOnlyFirst instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 5a7501cd6dd7..a15c2fa880f4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,42 @@ public void setTriangleType(String triangleType) { this.triangleType = triangleType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ScaleneTriangle putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -117,12 +154,13 @@ public boolean equals(Object o) { } ScaleneTriangle scaleneTriangle = (ScaleneTriangle) o; return Objects.equals(this.shapeType, scaleneTriangle.shapeType) && - Objects.equals(this.triangleType, scaleneTriangle.triangleType); + Objects.equals(this.triangleType, scaleneTriangle.triangleType)&& + Objects.equals(this.additionalProperties, scaleneTriangle.additionalProperties); } @Override public int hashCode() { - return Objects.hash(shapeType, triangleType); + return Objects.hash(shapeType, triangleType, additionalProperties); } @Override @@ -131,6 +169,7 @@ public String toString() { sb.append("class ScaleneTriangle {\n"); sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,13 +215,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ScaleneTriangle is not found in the empty JSON string", ScaleneTriangle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ScaleneTriangle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScaleneTriangle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ScaleneTriangle.openapiRequiredFields) { @@ -190,6 +222,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("shapeType") != null && !jsonObj.get("shapeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shapeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shapeType").toString())); + } + if (jsonObj.get("triangleType") != null && !jsonObj.get("triangleType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `triangleType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("triangleType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -207,6 +245,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ScaleneTriangle value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -214,7 +269,25 @@ public void write(JsonWriter out, ScaleneTriangle value) throws IOException { public ScaleneTriangle read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ScaleneTriangle instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java index 9a5baf72e9a2..4eba102348e9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setShapeType(String shapeType) { this.shapeType = shapeType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public ShapeInterface putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } ShapeInterface shapeInterface = (ShapeInterface) o; - return Objects.equals(this.shapeType, shapeInterface.shapeType); + return Objects.equals(this.shapeType, shapeInterface.shapeType)&& + Objects.equals(this.additionalProperties, shapeInterface.additionalProperties); } @Override public int hashCode() { - return Objects.hash(shapeType); + return Objects.hash(shapeType, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShapeInterface {\n"); sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in ShapeInterface is not found in the empty JSON string", ShapeInterface.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ShapeInterface.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ShapeInterface` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ShapeInterface.openapiRequiredFields) { @@ -157,6 +189,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("shapeType") != null && !jsonObj.get("shapeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shapeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shapeType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -174,6 +209,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ShapeInterface value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -181,7 +233,25 @@ public void write(JsonWriter out, ShapeInterface value) throws IOException { public ShapeInterface read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + ShapeInterface instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 402c31911ed2..d08035d83332 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -38,6 +38,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -106,6 +107,42 @@ public void setQuadrilateralType(String quadrilateralType) { this.quadrilateralType = quadrilateralType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public SimpleQuadrilateral putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -117,12 +154,13 @@ public boolean equals(Object o) { } SimpleQuadrilateral simpleQuadrilateral = (SimpleQuadrilateral) o; return Objects.equals(this.shapeType, simpleQuadrilateral.shapeType) && - Objects.equals(this.quadrilateralType, simpleQuadrilateral.quadrilateralType); + Objects.equals(this.quadrilateralType, simpleQuadrilateral.quadrilateralType)&& + Objects.equals(this.additionalProperties, simpleQuadrilateral.additionalProperties); } @Override public int hashCode() { - return Objects.hash(shapeType, quadrilateralType); + return Objects.hash(shapeType, quadrilateralType, additionalProperties); } @Override @@ -131,6 +169,7 @@ public String toString() { sb.append("class SimpleQuadrilateral {\n"); sb.append(" shapeType: ").append(toIndentedString(shapeType)).append("\n"); sb.append(" quadrilateralType: ").append(toIndentedString(quadrilateralType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,13 +215,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleQuadrilateral is not found in the empty JSON string", SimpleQuadrilateral.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SimpleQuadrilateral.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SimpleQuadrilateral` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SimpleQuadrilateral.openapiRequiredFields) { @@ -190,6 +222,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("shapeType") != null && !jsonObj.get("shapeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shapeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shapeType").toString())); + } + if (jsonObj.get("quadrilateralType") != null && !jsonObj.get("quadrilateralType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quadrilateralType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quadrilateralType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -207,6 +245,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SimpleQuadrilateral value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -214,7 +269,25 @@ public void write(JsonWriter out, SimpleQuadrilateral value) throws IOException public SimpleQuadrilateral read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + SimpleQuadrilateral instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java index 57864e46d66e..c9c51593e804 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -104,6 +105,42 @@ public void setSpecialModelName(String specialModelName) { this.specialModelName = specialModelName; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public SpecialModelName putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -115,12 +152,13 @@ public boolean equals(Object o) { } SpecialModelName specialModelName = (SpecialModelName) o; return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName) && - Objects.equals(this.specialModelName, specialModelName.specialModelName); + Objects.equals(this.specialModelName, specialModelName.specialModelName)&& + Objects.equals(this.additionalProperties, specialModelName.additionalProperties); } @Override public int hashCode() { - return Objects.hash($specialPropertyName, specialModelName); + return Objects.hash($specialPropertyName, specialModelName, additionalProperties); } @Override @@ -129,6 +167,7 @@ public String toString() { sb.append("class SpecialModelName {\n"); sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append(" specialModelName: ").append(toIndentedString(specialModelName)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -172,12 +211,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in SpecialModelName is not found in the empty JSON string", SpecialModelName.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SpecialModelName.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SpecialModelName` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("_special_model.name_") != null && !jsonObj.get("_special_model.name_").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `_special_model.name_` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_special_model.name_").toString())); } } @@ -196,6 +231,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SpecialModelName value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -203,7 +255,25 @@ public void write(JsonWriter out, SpecialModelName value) throws IOException { public SpecialModelName read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + SpecialModelName instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index dda2805f34ed..34a2a5d9d4f7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -104,6 +105,42 @@ public void setName(String name) { this.name = name; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Tag putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -115,12 +152,13 @@ public boolean equals(Object o) { } Tag tag = (Tag) o; return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + Objects.equals(this.name, tag.name)&& + Objects.equals(this.additionalProperties, tag.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(id, name, additionalProperties); } @Override @@ -129,6 +167,7 @@ public String toString() { sb.append("class Tag {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -172,12 +211,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Tag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } @@ -196,6 +231,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Tag value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -203,7 +255,25 @@ public void write(JsonWriter out, Tag value) throws IOException { public Tag read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Tag instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java index ba4355351745..c4a2b0dfd3cb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -77,6 +78,42 @@ public void setTriangleType(String triangleType) { this.triangleType = triangleType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public TriangleInterface putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -87,12 +124,13 @@ public boolean equals(Object o) { return false; } TriangleInterface triangleInterface = (TriangleInterface) o; - return Objects.equals(this.triangleType, triangleInterface.triangleType); + return Objects.equals(this.triangleType, triangleInterface.triangleType)&& + Objects.equals(this.additionalProperties, triangleInterface.additionalProperties); } @Override public int hashCode() { - return Objects.hash(triangleType); + return Objects.hash(triangleType, additionalProperties); } @Override @@ -100,6 +138,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TriangleInterface {\n"); sb.append(" triangleType: ").append(toIndentedString(triangleType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,13 +182,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in TriangleInterface is not found in the empty JSON string", TriangleInterface.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!TriangleInterface.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TriangleInterface` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TriangleInterface.openapiRequiredFields) { @@ -157,6 +189,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("triangleType") != null && !jsonObj.get("triangleType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `triangleType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("triangleType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -174,6 +209,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TriangleInterface value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -181,7 +233,25 @@ public void write(JsonWriter out, TriangleInterface value) throws IOException { public TriangleInterface read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + TriangleInterface instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java index dd7286b37793..8cfe38da4ae1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java @@ -37,6 +37,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -375,6 +376,42 @@ public void setAnyTypePropNullable(Object anyTypePropNullable) { this.anyTypePropNullable = anyTypePropNullable; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public User putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -396,7 +433,8 @@ public boolean equals(Object o) { Objects.equals(this.objectWithNoDeclaredProps, user.objectWithNoDeclaredProps) && Objects.equals(this.objectWithNoDeclaredPropsNullable, user.objectWithNoDeclaredPropsNullable) && Objects.equals(this.anyTypeProp, user.anyTypeProp) && - Objects.equals(this.anyTypePropNullable, user.anyTypePropNullable); + Objects.equals(this.anyTypePropNullable, user.anyTypePropNullable)&& + Objects.equals(this.additionalProperties, user.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -405,7 +443,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, anyTypeProp, anyTypePropNullable); + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, anyTypeProp, anyTypePropNullable, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -431,6 +469,7 @@ public String toString() { sb.append(" objectWithNoDeclaredPropsNullable: ").append(toIndentedString(objectWithNoDeclaredPropsNullable)).append("\n"); sb.append(" anyTypeProp: ").append(toIndentedString(anyTypeProp)).append("\n"); sb.append(" anyTypePropNullable: ").append(toIndentedString(anyTypePropNullable)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -484,12 +523,23 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!User.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } + if (jsonObj.get("username") != null && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + } + if (jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + } + if (jsonObj.get("email") != null && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (jsonObj.get("password") != null && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); } } @@ -508,6 +558,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, User value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -515,7 +582,25 @@ public void write(JsonWriter out, User value) throws IOException { public User read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + User instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java index 7620dbea551b..32e54ee066ed 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java @@ -36,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -131,6 +132,42 @@ public void setClassName(String className) { this.className = className; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Whale putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -143,12 +180,13 @@ public boolean equals(Object o) { Whale whale = (Whale) o; return Objects.equals(this.hasBaleen, whale.hasBaleen) && Objects.equals(this.hasTeeth, whale.hasTeeth) && - Objects.equals(this.className, whale.className); + Objects.equals(this.className, whale.className)&& + Objects.equals(this.additionalProperties, whale.additionalProperties); } @Override public int hashCode() { - return Objects.hash(hasBaleen, hasTeeth, className); + return Objects.hash(hasBaleen, hasTeeth, className, additionalProperties); } @Override @@ -158,6 +196,7 @@ public String toString() { sb.append(" hasBaleen: ").append(toIndentedString(hasBaleen)).append("\n"); sb.append(" hasTeeth: ").append(toIndentedString(hasTeeth)).append("\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -203,13 +242,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Whale is not found in the empty JSON string", Whale.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Whale.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Whale` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Whale.openapiRequiredFields) { @@ -217,6 +249,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("className") != null && !jsonObj.get("className").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `className` to be a primitive type in the JSON string but got `%s`", jsonObj.get("className").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -234,6 +269,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Whale value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -241,7 +293,25 @@ public void write(JsonWriter out, Whale value) throws IOException { public Whale read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Whale instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java index 7a7e191a1f14..788ac740b1da 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java @@ -23,8 +23,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,6 +36,7 @@ import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -49,7 +48,7 @@ * Zebra */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Zebra extends HashMap { +public class Zebra { /** * Gets or Sets type */ @@ -155,6 +154,42 @@ public void setClassName(String className) { this.className = className; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + public Zebra putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + @Override public boolean equals(Object o) { @@ -166,22 +201,22 @@ public boolean equals(Object o) { } Zebra zebra = (Zebra) o; return Objects.equals(this.type, zebra.type) && - Objects.equals(this.className, zebra.className) && - super.equals(o); + Objects.equals(this.className, zebra.className)&& + Objects.equals(this.additionalProperties, zebra.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, className, super.hashCode()); + return Objects.hash(type, className, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Zebra {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -226,13 +261,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in Zebra is not found in the empty JSON string", Zebra.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Zebra.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Zebra` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Zebra.openapiRequiredFields) { @@ -240,6 +268,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (jsonObj.get("className") != null && !jsonObj.get("className").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `className` to be a primitive type in the JSON string but got `%s`", jsonObj.get("className").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -257,6 +291,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Zebra value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additonal properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -264,7 +315,25 @@ public void write(JsonWriter out, Zebra value) throws IOException { public Zebra read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + // store additional fields in the deserialized instance + Zebra instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else { // non-primitive type + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java index 9edd0ae7bedc..05c47e82206e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java @@ -1,18 +1,18 @@ package org.openapitools.client; -import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import java.util.*; + import okhttp3.OkHttpClient; -import org.junit.*; +import org.junit.jupiter.api.*; import org.openapitools.client.auth.*; public class ApiClientTest { ApiClient apiClient; JSON json; - @Before + @BeforeEach public void setup() { apiClient = new ApiClient(); json = apiClient.getJSON(); @@ -49,16 +49,16 @@ public void testSelectHeaderAccept() { String[] accepts = {"application/json", "application/xml"}; assertEquals("application/json", apiClient.selectHeaderAccept(accepts)); - accepts = new String[] {"APPLICATION/XML", "APPLICATION/JSON"}; + accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts)); - accepts = new String[] {"application/xml", "application/json; charset=UTF8"}; + accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts)); - accepts = new String[] {"text/plain", "application/xml"}; + accepts = new String[]{"text/plain", "application/xml"}; assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts)); - accepts = new String[] {}; + accepts = new String[]{}; assertNull(apiClient.selectHeaderAccept(accepts)); } @@ -67,17 +67,17 @@ public void testSelectHeaderContentType() { String[] contentTypes = {"application/json", "application/xml"}; assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[] {"APPLICATION/JSON", "APPLICATION/XML"}; + contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[] {"application/xml", "application/json; charset=UTF8"}; + contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; assertEquals( "application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[] {"text/plain", "application/xml"}; + contentTypes = new String[]{"text/plain", "application/xml"}; assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[] {}; + contentTypes = new String[]{}; assertNull(apiClient.selectHeaderContentType(contentTypes)); } @@ -334,12 +334,17 @@ public void testSanitizeFilename() { public void testNewHttpClient() { OkHttpClient oldClient = apiClient.getHttpClient(); apiClient.setHttpClient(oldClient.newBuilder().build()); - assertThat(apiClient.getHttpClient(), is(not(oldClient))); + assertNotSame(apiClient.getHttpClient(), oldClient); } - /** Tests the invariant that the HttpClient for the ApiClient must never be null */ - @Test(expected = NullPointerException.class) + /** + * Tests the invariant that the HttpClient for the ApiClient must never be null + */ + @Test public void testNullHttpClient() { - apiClient.setHttpClient(null); + NullPointerException thrown = Assertions.assertThrows(NullPointerException.class, () -> { + apiClient.setHttpClient(null); + }); + Assertions.assertEquals("HttpClient must not be null!", thrown.getMessage()); } } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java index 3d6ab82bd3e6..e5b9d146a4eb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java @@ -1,8 +1,8 @@ package org.openapitools.client; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.*; +import org.junit.jupiter.api.*; public class ConfigurationTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java index 27fe00abbec4..b24033df2e98 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java @@ -1,10 +1,11 @@ package org.openapitools.client; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; + import java.io.IOException; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; @@ -20,8 +21,9 @@ import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; + import okio.ByteString; -import org.junit.*; +import org.junit.jupiter.api.*; import org.openapitools.client.model.Order; import org.openapitools.client.model.*; @@ -31,7 +33,7 @@ public class JSONTest { private JSON json = null; private Order order = null; - @Before + @BeforeEach public void setup() { apiClient = new ApiClient(); json = apiClient.getJSON(); @@ -145,7 +147,8 @@ public void testDefaultDate() throws Exception { order.setShipDate(OffsetDateTime.from(datetimeFormat.parse(dateStr))); String str = json.serialize(order); - Type type = new TypeToken() {}.getType(); + Type type = new TypeToken() { + }.getType(); Order o = json.deserialize(str, type); assertEquals(dateStr, datetimeFormat.format(o.getShipDate())); } @@ -158,7 +161,8 @@ public void testCustomDate() throws Exception { order.setShipDate(OffsetDateTime.from(datetimeFormat.parse(dateStr))); String str = json.serialize(order); - Type type = new TypeToken() {}.getType(); + Type type = new TypeToken() { + }.getType(); Order o = json.deserialize(str, type); assertEquals(dateStr, datetimeFormat.format(o.getShipDate())); } @@ -191,7 +195,8 @@ public void testByteArrayTypeAdapterDeserialization() { final ByteString expectedByteString = ByteString.of(expectedBytes); final String serializedBytes = expectedByteString.base64(); final String serializedBytesWithQuotes = "\"" + serializedBytes + "\""; - Type type = new TypeToken() {}.getType(); + Type type = new TypeToken() { + }.getType(); // Act byte[] actualDeserializedBytes = json.deserialize(serializedBytesWithQuotes, type); @@ -201,28 +206,34 @@ public void testByteArrayTypeAdapterDeserialization() { expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8)); } - @Test(expected = IllegalArgumentException.class) + @Test public void testRequiredFieldException() { - // test json string missing required field(s) to ensure exception is thrown - Gson gson = json.getGson(); - //Gson gson = new GsonBuilder() - // .registerTypeAdapter(Pet.class, new Pet.CustomDeserializer()) - // .create(); - String json = "{\"id\": 5847, \"name\":\"tag test 1\"}"; // missing photoUrls (required field) - //String json = "{\"id2\": 5847, \"name\":\"tag test 1\"}"; - //String json = "{\"id\": 5847}"; - Pet p = gson.fromJson(json, Pet.class); + IllegalArgumentException thrown = Assertions.assertThrows(IllegalArgumentException.class, () -> { + // test json string missing required field(s) to ensure exception is thrown + Gson gson = json.getGson(); + //Gson gson = new GsonBuilder() + // .registerTypeAdapter(Pet.class, new Pet.CustomDeserializer()) + // .create(); + String json = "{\"id\": 5847, \"name\":\"tag test 1\"}"; // missing photoUrls (required field) + //String json = "{\"id2\": 5847, \"name\":\"tag test 1\"}"; + //String json = "{\"id\": 5847}"; + Pet p = gson.fromJson(json, Pet.class); + }); + + Assertions.assertEquals("The required field `photoUrls` is not found in the JSON string: {\"id\":5847,\"name\":\"tag test 1\"}", thrown.getMessage()); } - @Test(expected = IllegalArgumentException.class) + @Test + @Disabled("No longer need the following test as additional field(s) should be stored in `additionalProperties`") public void testAdditionalFieldException() { - // test json string with additional field(s) to ensure exception is thrown - Gson gson = json.getGson(); - //Gson gson = new GsonBuilder() - // .registerTypeAdapter(Tag.class, new Tag.CustomDeserializer()) - // .create(); - String json = "{\"id\": 5847, \"name\":\"tag test 1\", \"new-field\": true}"; - Tag t = gson.fromJson(json, Tag.class); + IllegalArgumentException thrown = Assertions.assertThrows(IllegalArgumentException.class, () -> { + // test json string with additional field(s) to ensure exception is thrown + Gson gson = json.getGson(); + String json = "{\"id\": 5847, \"name\":\"tag test 1\", \"new-field\": true}"; + org.openapitools.client.model.Tag t = gson.fromJson(json, org.openapitools.client.model.Tag.class); + }); + + Assertions.assertEquals("The field `new-field` in the JSON string is not defined in the `Tag` properties. JSON: {\"id\":5847,\"name\":\"tag test 1\",\"new-field\":true}", thrown.getMessage()); } @Test @@ -234,60 +245,66 @@ public void testCustomDeserializer() { // .create(); // id and name String json = "{\"id\": 5847, \"name\":\"tag test 1\"}"; - Tag t = gson.fromJson(json, Tag.class); + org.openapitools.client.model.Tag t = gson.fromJson(json, org.openapitools.client.model.Tag.class); assertEquals(t.getName(), "tag test 1"); assertEquals(t.getId(), Long.valueOf(5847L)); // name only String json2 = "{\"name\":\"tag test 1\"}"; - Tag t2 = gson.fromJson(json2, Tag.class); + org.openapitools.client.model.Tag t2 = gson.fromJson(json2, org.openapitools.client.model.Tag.class); assertEquals(t2.getName(), "tag test 1"); assertEquals(t2.getId(), null); - + // with all required fields String json3 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"]}"; Pet t3 = gson.fromJson(json3, Pet.class); assertEquals(t3.getName(), "pet test 1"); assertEquals(t3.getId(), Long.valueOf(5847)); - + // with all required fields and tags (optional) String json4 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"id\":\"tag 123\"}]}"; Pet t4 = gson.fromJson(json3, Pet.class); assertEquals(t4.getName(), "pet test 1"); assertEquals(t4.getId(), Long.valueOf(5847)); + } + @Test + @Disabled("Unknown fields are now correctly deserialized into `additionalProperties`") + public void testUnknownFields() { + // test unknown fields in the payload + Gson gson = json.getGson(); // test Tag String json5 = "{\"unknown_field\": 543, \"id\":\"tag 123\"}"; Exception exception5 = assertThrows(java.lang.IllegalArgumentException.class, () -> { - Tag t5 = gson.fromJson(json5, Tag.class); - }); + org.openapitools.client.model.Tag t5 = gson.fromJson(json5, org.openapitools.client.model.Tag.class); + }); assertTrue(exception5.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}")); // test Pet with invalid tags String json6 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"unknown_field\": 543, \"id\":\"tag 123\"}]}"; Exception exception6 = assertThrows(java.lang.IllegalArgumentException.class, () -> { - Pet t6 = gson.fromJson(json6, Pet.class); - }); + Pet t6 = gson.fromJson(json6, Pet.class); + }); assertTrue(exception6.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}")); // test Pet with invalid tags (required) String json7 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"unknown_field\": 543, \"id\":\"tag 123\"}]}"; Exception exception7 = assertThrows(java.lang.IllegalArgumentException.class, () -> { - PetWithRequiredTags t7 = gson.fromJson(json7, PetWithRequiredTags.class); - }); + PetWithRequiredTags t7 = gson.fromJson(json7, PetWithRequiredTags.class); + }); assertTrue(exception7.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}")); // test Pet with invalid tags (missing reqired) String json8 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"]}"; Exception exception8 = assertThrows(java.lang.IllegalArgumentException.class, () -> { - PetWithRequiredTags t8 = gson.fromJson(json8, PetWithRequiredTags.class); - }); + PetWithRequiredTags t8 = gson.fromJson(json8, PetWithRequiredTags.class); + }); assertTrue(exception8.getMessage().contains("The required field `tags` is not found in the JSON string: {\"id\":5847,\"name\":\"pet test 1\",\"photoUrls\":[\"https://a.com\",\"https://b.com\"]}")); - - } - /** Model tests for Pet */ + /** + * Model tests for Pet + */ @Test public void testPet() { // test Pet @@ -299,7 +316,7 @@ public void testPet() { model2.setId(1029L); model2.setName("Dog"); - Assert.assertTrue(model.equals(model2)); + assertTrue(model.equals(model2)); } // Obtained 22JAN2018 from stackoverflow answer by PuguaSoft @@ -346,6 +363,7 @@ public void testAnyOfSchemaWithoutDiscriminator() throws Exception { assertEquals(json.getGson().toJson(o), "{\"cultivar\":\"golden delicious\",\"origin\":\"japan\"}"); assertEquals(o.toJson(), "{\"cultivar\":\"golden delicious\",\"origin\":\"japan\"}"); + /* comment out the following as we've added "additionalProperties" support String str2 = "{ \"origin_typo\": \"japan\" }"; // no match Exception exception = assertThrows(java.lang.IllegalArgumentException.class, () -> { @@ -361,12 +379,13 @@ public void testAnyOfSchemaWithoutDiscriminator() throws Exception { Exception exception4 = assertThrows(com.google.gson.JsonSyntaxException.class, () -> { GmFruit o2 = json.getGson().fromJson(str2, GmFruit.class); }); + */ } } /** * Validate a oneOf schema can be deserialized into the expected class. - * The oneOf schema has a discriminator. + * The oneOf schema has a discriminator. */ @Test public void testOneOfSchemaWithDiscriminator() throws Exception { @@ -394,15 +413,15 @@ public void testOneOfSchemaWithDiscriminator() throws Exception { // make sure deserialization works for pojo object Zebra z = Zebra.fromJson(str2); - assertEquals(z.toJson(), "{\"className\":\"zebra\",\"type\":\"plains\"}"); + assertEquals(z.toJson(), "{\"type\":\"plains\",\"className\":\"zebra\"}"); Mammal o2 = json.getGson().fromJson(str2, Mammal.class); assertTrue(o2.getActualInstance() instanceof Zebra); Zebra inst2 = (Zebra) o2.getActualInstance(); - assertEquals(json.getGson().toJson(inst2), "{\"className\":\"zebra\",\"type\":\"plains\"}"); - assertEquals(inst2.toJson(), "{\"className\":\"zebra\",\"type\":\"plains\"}"); - assertEquals(json.getGson().toJson(o2), "{\"className\":\"zebra\",\"type\":\"plains\"}"); - assertEquals(o2.toJson(), "{\"className\":\"zebra\",\"type\":\"plains\"}"); + assertEquals(json.getGson().toJson(inst2), "{\"type\":\"plains\",\"className\":\"zebra\"}"); + assertEquals(inst2.toJson(), "{\"type\":\"plains\",\"className\":\"zebra\"}"); + assertEquals(json.getGson().toJson(o2), "{\"type\":\"plains\",\"className\":\"zebra\"}"); + assertEquals(o2.toJson(), "{\"type\":\"plains\",\"className\":\"zebra\"}"); } { // incorrect payload results in exception @@ -423,9 +442,27 @@ public void testOneOfSchemaWithDiscriminator() throws Exception { } } + /** + * Test JSON validation method + */ + @Test + public void testJsonValidation() throws Exception { + String str = "{ \"cultivar\": [\"golden delicious\"], \"mealy\": false }"; + Exception exception = assertThrows(java.lang.IllegalArgumentException.class, () -> { + AppleReq a = json.getGson().fromJson(str, AppleReq.class); + }); + assertTrue(exception.getMessage().contains("Expected the field `cultivar` to be a primitive type in the JSON string but got `[\"golden delicious\"]`")); + + String str2 = "{ \"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": 123 }"; + Exception exception2 = assertThrows(java.lang.IllegalArgumentException.class, () -> { + Pet p1 = json.getGson().fromJson(str2, Pet.class); + }); + assertTrue(exception2.getMessage().contains("Expected the field `photoUrls` to be an array in the JSON string but got `123`")); + } + /** * Validate a oneOf schema can be deserialized into the expected class. - * The oneOf schema does not have a discriminator. + * The oneOf schema does not have a discriminator. */ @Test public void testOneOfSchemaWithoutDiscriminator() throws Exception { @@ -506,4 +543,21 @@ public void testOneOfSchemaWithoutDiscriminator() throws Exception { assertTrue(exception.getMessage().contains("Failed deserialization for FruitReq: 0 classes match result, expected 1")); } } + + /** + * Test additional properties. + */ + @Test + public void testAdditionalProperties() throws Exception { + String str = "{ \"className\": \"zebra\", \"type\": \"plains\", \"from_json\": 4567, \"from_json_map\": {\"nested_string\": \"nested_value\"} }"; + Zebra z = Zebra.fromJson(str); + z.putAdditionalProperty("new_key", "new_value"); + z.putAdditionalProperty("new_number", 1.23); + z.putAdditionalProperty("new_boolean", true); + org.openapitools.client.model.Tag t = new org.openapitools.client.model.Tag(); + t.setId(34L); + t.setName("just a tag"); + z.putAdditionalProperty("new_object", t); + assertEquals(z.toJson(), "{\"type\":\"plains\",\"className\":\"zebra\",\"new_key\":\"new_value\",\"new_boolean\":true,\"new_object\":{\"id\":34,\"name\":\"just a tag\"},\"from_json\":4567,\"from_json_map\":{\"nested_string\":\"nested_value\"},\"new_number\":1.23}"); + } } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java index f6b87fbaaa12..4e25432abb23 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java @@ -1,8 +1,8 @@ package org.openapitools.client; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.*; +import org.junit.jupiter.api.*; public class StringUtilTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index af8a9594410c..0f49c5e2e01c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -13,13 +13,13 @@ package org.openapitools.client.api; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; /** API tests for AnotherFakeApi */ -@Ignore +@Disabled public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/DefaultApiTest.java index 5459b4b2c1d4..6ef597933ac7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -15,8 +15,8 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.InlineResponseDefault; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for DefaultApi */ -@Ignore +@Disabled public class DefaultApiTest { private final DefaultApi api = new DefaultApi(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java index 1f30e84453cf..4dea80f5e403 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -24,8 +24,8 @@ import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.OuterEnum; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; import java.util.ArrayList; import java.util.HashMap; @@ -35,7 +35,7 @@ /** * API tests for FakeApi */ -@Ignore +@Disabled public class FakeApiTest { private final FakeApi api = new FakeApi(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 16b1c5afa719..3eb19491b9b0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -13,13 +13,13 @@ package org.openapitools.client.api; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; /** API tests for FakeClassnameTags123Api */ -@Ignore +@Disabled public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java index a4e3dcec14c2..5223152adbaf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -12,7 +12,7 @@ package org.openapitools.client.api; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import java.io.BufferedWriter; import java.io.File; @@ -29,7 +29,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import org.junit.*; + +import org.junit.jupiter.api.*; import org.openapitools.client.*; import org.openapitools.client.ApiException; import org.openapitools.client.auth.*; @@ -38,7 +39,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** API tests for PetApi */ +/** + * API tests for PetApi + */ public class PetApiTest { private PetApi api = new PetApi(); @@ -47,7 +50,7 @@ public class PetApiTest { // to 127.0.0.1 private static String basePath = "http://petstore.swagger.io:80/v2"; - @Before + @BeforeEach public void setup() { // setup authentication ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); @@ -323,14 +326,14 @@ public void testFindPetsByStatus() throws Exception { } @Test - @Ignore + @Disabled public void testFindPetsByTags() throws Exception { Pet pet = createPet(); pet.setName("monster"); pet.setStatus(Pet.StatusEnum.AVAILABLE); - List tags = new ArrayList(); - Tag tag1 = new Tag(); + List tags = new ArrayList(); + org.openapitools.client.model.Tag tag1 = new org.openapitools.client.model.Tag(); tag1.setName("friendly"); tags.add(tag1); pet.setTags(tags); @@ -368,7 +371,7 @@ public void testUpdatePetWithForm() throws Exception { } @Test - @Ignore + @Disabled public void testDeletePet() throws Exception { Pet pet = createPet(); api.addPet(pet); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java index 41c551458ed8..b9c5785e5ca3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,13 +14,13 @@ import java.util.Map; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.Order; /** API tests for StoreApi */ -@Ignore +@Disabled public class StoreApiTest { private final StoreApi api = new StoreApi(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java index 364b90cab318..50a958f2fd01 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -14,13 +14,13 @@ import java.util.List; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.User; /** API tests for UserApi */ -@Ignore +@Disabled public class UserApiTest { private final UserApi api = new UserApi(); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index f7c2ecec9e1e..c4b8362967d0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -1,12 +1,12 @@ package org.openapitools.client.auth; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.*; +import org.junit.jupiter.api.*; import org.openapitools.client.ApiException; import org.openapitools.client.Pair; diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index a077d394ada2..1230a9d9d2e9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -1,19 +1,19 @@ package org.openapitools.client.auth; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.*; +import org.junit.jupiter.api.*; import org.openapitools.client.ApiException; import org.openapitools.client.Pair; public class HttpBasicAuthTest { HttpBasicAuth auth = null; - @Before + @BeforeEach public void setup() { auth = new HttpBasicAuth(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java index 2d0d0743caf5..13d9276a7874 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java @@ -1,6 +1,6 @@ package org.openapitools.client.auth; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -12,6 +12,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; + import okhttp3.*; import okhttp3.Interceptor.Chain; import okhttp3.Response.Builder; @@ -21,8 +22,8 @@ import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; import org.apache.oltu.oauth2.common.exception.OAuthProblemException; import org.apache.oltu.oauth2.common.exception.OAuthSystemException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.*; +import org.junit.jupiter.api.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -30,7 +31,7 @@ public class RetryingOAuthTest { private RetryingOAuth oauth; - @Before + @BeforeEach public void setUp() throws Exception { oauth = new RetryingOAuth( diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index ba387a41bf5d..d1ccfcd55c72 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -25,9 +25,9 @@ import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java index b11ec766286b..b0c5c78dca72 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleReqTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleReqTest.java index 9b071657eae6..65b289f4fefc 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleReqTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleReqTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleTest.java index d70d4bca5f94..f8864ab036dc 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AppleTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java new file mode 100644 index 000000000000..6c7738e8c96a --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf; +import org.openapitools.client.model.DogAllOf; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyInner + */ +public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest { + private final ArrayOfInlineAllOfArrayAllofDogPropertyInner model = new ArrayOfInlineAllOfArrayAllofDogPropertyInner(); + + /** + * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyInner + */ + @Test + public void testArrayOfInlineAllOfArrayAllofDogPropertyInner() { + // TODO: test ArrayOfInlineAllOfArrayAllofDogPropertyInner + } + + /** + * Test the property 'breed' + */ + @Test + public void breedTest() { + // TODO: test breed + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java new file mode 100644 index 000000000000..7a2a0b26a42e --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + */ +public class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest { + private final ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf model = new ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf(); + + /** + * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + */ + @Test + public void testArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf() { + // TODO: test ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java new file mode 100644 index 000000000000..519386a03290 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Dog; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for ArrayOfInlineAllOf + */ +public class ArrayOfInlineAllOfTest { + private final ArrayOfInlineAllOf model = new ArrayOfInlineAllOf(); + + /** + * Model tests for ArrayOfInlineAllOf + */ + @Test + public void testArrayOfInlineAllOf() { + // TODO: test ArrayOfInlineAllOf + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'arrayAllofDog' + */ + @Test + public void arrayAllofDogTest() { + // TODO: test arrayAllofDog + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 9afc3397f46c..ef2f2ce19b63 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -24,9 +24,9 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java index fab9a30565f3..b73340c46cc3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -24,9 +24,9 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaReqTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaReqTest.java index c1457da87002..07c3f215cad6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaReqTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaReqTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaTest.java index ff0fbf231a78..8d81ba6c3a4a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BananaTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BasquePigTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BasquePigTest.java index 5aa6806a8f76..131f5c843c0a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BasquePigTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BasquePigTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java index ced4f48eb5f9..dda3faa83dc9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 384ab21b773b..7a536f8eb6d3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java index b2b3e7e048d9..b5ec6aa0f073 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.Animal; import org.openapitools.client.model.CatAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java index a6efa6e1fbc6..90745b3007c0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java index 1233feec65ec..9c5ef29df863 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java index 456fab74c4d7..edabad192eb8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java index 2f8aa865194e..38b3c55e8169 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.QuadrilateralInterface; import org.openapitools.client.model.ShapeInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DanishPigTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DanishPigTest.java index 459a6abf0f71..95db6f7f05f8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DanishPigTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DanishPigTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index 9b3d2aee6a83..7921a054910c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 0d695b15a639..314f73e1fc3d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java index 124bc99c1f12..0c25d2015ff2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DrawingTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DrawingTest.java index 3e61e46812e4..e5342c9ca518 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DrawingTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DrawingTest.java @@ -30,9 +30,9 @@ import org.openapitools.client.model.Shape; import org.openapitools.client.model.ShapeOrNull; import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java index c25b05e9f0d1..fb5450837c87 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java index 329454658e33..3ea794f4a570 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java index 54c181bf9f3f..c95163e48212 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -26,9 +26,9 @@ import org.openapitools.client.model.OuterEnumInteger; import org.openapitools.client.model.OuterEnumIntegerDefaultValue; import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java index f3bae7cd78b2..2c37417dad61 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.ShapeInterface; import org.openapitools.client.model.TriangleInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 5660bd5e9016..7e1a67477419 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -24,9 +24,9 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ModelFile; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FooTest.java index 417b05ea7fad..83462961a7ca 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FooTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FooTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java index cd995e7fa052..d1bc47d0a8f2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -24,9 +24,9 @@ import java.io.IOException; import java.math.BigDecimal; import java.util.UUID; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitReqTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitReqTest.java index d279752b095c..9d5c07ac3ea5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitReqTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitReqTest.java @@ -24,9 +24,9 @@ import java.math.BigDecimal; import org.openapitools.client.model.AppleReq; import org.openapitools.client.model.BananaReq; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitTest.java index b9e1f8af86c9..85ca18076e06 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FruitTest.java @@ -24,9 +24,9 @@ import java.math.BigDecimal; import org.openapitools.client.model.Apple; import org.openapitools.client.model.Banana; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GmFruitTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GmFruitTest.java index cd93334d89fa..b57699521c48 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GmFruitTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GmFruitTest.java @@ -24,9 +24,9 @@ import java.math.BigDecimal; import org.openapitools.client.model.Apple; import org.openapitools.client.model.Banana; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java index 63221458573c..d24e05f8b96c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.ParentPet; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index 0272d7b80004..7db4f6a3afe8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java index 11572abcf303..42f43b6b2f97 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java index 58831cea0bdc..c4fe8ec11cf0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Foo; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java index 2f21d3e37c76..ebf480618428 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.ShapeInterface; import org.openapitools.client.model.TriangleInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MammalTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MammalTest.java index 531d9b28688e..598de116e904 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MammalTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MammalTest.java @@ -24,9 +24,9 @@ import org.openapitools.client.model.Pig; import org.openapitools.client.model.Whale; import org.openapitools.client.model.Zebra; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java index f86a1303fc88..1f5c64ebceb7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,9 +24,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 8f5b70d27fea..db21e4fa4295 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -26,9 +26,9 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index d81fa5a0f669..8c5471c1c790 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 91bd8fada260..1527397259b2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelFileTest.java index 132012d4c387..8a45ca7ab63f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelListTest.java index d3ed2075e9a4..2660197c63e9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java index f317fef485ea..c25c6ef6d0fe 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java index 1ed41a0f80c7..678c472eceec 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableClassTest.java index 3d13b21e707e..577c506c3752 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -27,9 +27,9 @@ import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableShapeTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableShapeTest.java index d6c946fff37f..762bf006e499 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableShapeTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NullableShapeTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.Quadrilateral; import org.openapitools.client.model.Triangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 15b74f7ef8bf..9c1c666f9d0e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index f8403d9abc40..94d5f7c8cb75 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -25,9 +25,9 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.DeprecatedObject; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java index 2e0171dac8af..4c6950f3c06b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 67ee59963636..26014b50a033 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java index e6d40222de0c..3d7df9bb6e39 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java index c030716b5612..8934c074227a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java index 67b2f5ede6da..9be653ccec64 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 220d40e83cbb..b51729f1915b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ParentPetTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ParentPetTest.java index 729352ddf64d..83dd27071cd3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ParentPetTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ParentPetTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.GrandparentAnimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetWithRequiredTagsTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetWithRequiredTagsTest.java index 4d78953915e2..88825c83d744 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetWithRequiredTagsTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetWithRequiredTagsTest.java @@ -25,9 +25,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PigTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PigTest.java index 003af60bcc47..1ced78bf9551 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PigTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PigTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.BasquePig; import org.openapitools.client.model.DanishPig; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PineappleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PineappleTest.java index 33c1e27f36e5..8e1181fdbe5a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PineappleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PineappleTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java index a27f30704afa..4f05f2ace7ac 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralTest.java index 96985f4b6f56..b5fa8b1feefa 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/QuadrilateralTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.ComplexQuadrilateral; import org.openapitools.client.model.SimpleQuadrilateral; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 2dc9cb2ae2cd..4705b60c7c4c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java index 62bfbaa7d72f..680914c565f0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.ShapeInterface; import org.openapitools.client.model.TriangleInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java index 21b9d7478852..94f3f90abdd5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java index 9ea2ec9fa044..40b081923817 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.Quadrilateral; import org.openapitools.client.model.Triangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeTest.java index 1ed82e64e36d..b7e0a6e7e00a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ShapeTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.Quadrilateral; import org.openapitools.client.model.Triangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java index 7396def4a463..814f49f1b52a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import org.openapitools.client.model.QuadrilateralInterface; import org.openapitools.client.model.ShapeInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 0c723c8cd0cc..25bd7adbd5b3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java index 83f536d2fa39..b18e4cfe85eb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java index e17fdd94cf2b..d0d91cad2a9b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleTest.java index 071646b6645b..2ade6cb0ceff 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TriangleTest.java @@ -24,9 +24,9 @@ import org.openapitools.client.model.EquilateralTriangle; import org.openapitools.client.model.IsoscelesTriangle; import org.openapitools.client.model.ScaleneTriangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java index 3b673daf5442..a088fd5e2b67 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/WhaleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/WhaleTest.java index 6b38ea184bbd..81d50c13bbc1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/WhaleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/WhaleTest.java @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ZebraTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ZebraTest.java index b622d7822bf5..14282a5d5a19 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ZebraTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ZebraTest.java @@ -23,9 +23,9 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md b/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md index 8763b590990a..6ac1bbdeca34 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -32,9 +32,9 @@ api.call123testSpecialTags() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md b/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md b/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Cat.md b/samples/client/petstore/java/rest-assured-jackson/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Cat.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Category.md b/samples/client/petstore/java/rest-assured-jackson/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Category.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md b/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Client.md b/samples/client/petstore/java/rest-assured-jackson/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Client.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Dog.md b/samples/client/petstore/java/rest-assured-jackson/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Dog.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md b/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md index 9e36bee7aaea..a890ff7a5191 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -45,9 +45,9 @@ api.createXmlItem() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -86,9 +86,9 @@ api.fakeOuterBooleanSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -127,9 +127,9 @@ api.fakeOuterCompositeSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -168,9 +168,9 @@ api.fakeOuterNumberSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -209,9 +209,9 @@ api.fakeOuterStringSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -251,9 +251,9 @@ api.testBodyWithFileSchema() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -292,10 +292,10 @@ api.testBodyWithQueryParams() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -335,9 +335,9 @@ api.testClientModel() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -380,22 +380,22 @@ api.testEndpointParameters() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -434,16 +434,16 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -485,14 +485,14 @@ api.testGroupParameters() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -530,9 +530,9 @@ api.testInlineAdditionalProperties() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -571,10 +571,10 @@ api.testJsonFormData() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -618,13 +618,13 @@ api.testQueryParameterCollectionFormat() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md index 7aa78d36b357..e3fd85c4a9dd 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -32,9 +32,9 @@ api.testClassname() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md b/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md b/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ModelFile.md b/samples/client/petstore/java/rest-assured-jackson/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ModelFile.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ModelList.md b/samples/client/petstore/java/rest-assured-jackson/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ModelList.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md b/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Name.md b/samples/client/petstore/java/rest-assured-jackson/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Name.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Order.md b/samples/client/petstore/java/rest-assured-jackson/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Order.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md b/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md b/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md index ea946e82b739..50834ca6f349 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -38,9 +38,9 @@ api.addPet() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -78,10 +78,10 @@ api.deletePet() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -121,9 +121,9 @@ api.findPetsByStatus() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -163,9 +163,9 @@ api.findPetsByTags() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -205,9 +205,9 @@ api.getPetById() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -245,9 +245,9 @@ api.updatePet() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -285,11 +285,11 @@ api.updatePetWithForm() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -327,11 +327,11 @@ api.uploadFile() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -370,11 +370,11 @@ api.uploadFileWithRequiredFile() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md b/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md b/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md index 2fc7a8ebbbf0..5466205059cd 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -35,9 +35,9 @@ api.deleteOrder() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -115,9 +115,9 @@ api.getOrderById() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -155,9 +155,9 @@ api.placeOrder() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md b/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/User.md b/samples/client/petstore/java/rest-assured-jackson/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/User.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md index 5f5a5dbd3627..7ee7cb848655 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -39,9 +39,9 @@ api.createUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -79,9 +79,9 @@ api.createUsersWithArrayInput() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -119,9 +119,9 @@ api.createUsersWithListInput() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -161,9 +161,9 @@ api.deleteUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -201,9 +201,9 @@ api.getUserByName() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -242,10 +242,10 @@ api.loginUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -322,10 +322,10 @@ api.updateUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md b/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java index 093a7285df9f..3b0b60e1fd44 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +42,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java index 44188dcd33f7..9e7bcbcf9303 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java index 72b9932e92dc..e51b98508e98 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java index 121b65548f05..c17656dc1207 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Animal.md b/samples/client/petstore/java/rest-assured/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/rest-assured/docs/Animal.md +++ b/samples/client/petstore/java/rest-assured/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md b/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md index 8763b590990a..6ac1bbdeca34 100644 --- a/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -32,9 +32,9 @@ api.call123testSpecialTags() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/rest-assured/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/rest-assured/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/rest-assured/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/rest-assured/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/rest-assured/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/rest-assured/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/ArrayTest.md b/samples/client/petstore/java/rest-assured/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/rest-assured/docs/ArrayTest.md +++ b/samples/client/petstore/java/rest-assured/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/BigCat.md b/samples/client/petstore/java/rest-assured/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/rest-assured/docs/BigCat.md +++ b/samples/client/petstore/java/rest-assured/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md b/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/rest-assured/docs/Capitalization.md b/samples/client/petstore/java/rest-assured/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/rest-assured/docs/Capitalization.md +++ b/samples/client/petstore/java/rest-assured/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Cat.md b/samples/client/petstore/java/rest-assured/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/rest-assured/docs/Cat.md +++ b/samples/client/petstore/java/rest-assured/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/CatAllOf.md b/samples/client/petstore/java/rest-assured/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/rest-assured/docs/CatAllOf.md +++ b/samples/client/petstore/java/rest-assured/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Category.md b/samples/client/petstore/java/rest-assured/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/rest-assured/docs/Category.md +++ b/samples/client/petstore/java/rest-assured/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/rest-assured/docs/ClassModel.md b/samples/client/petstore/java/rest-assured/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/rest-assured/docs/ClassModel.md +++ b/samples/client/petstore/java/rest-assured/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Client.md b/samples/client/petstore/java/rest-assured/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/rest-assured/docs/Client.md +++ b/samples/client/petstore/java/rest-assured/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Dog.md b/samples/client/petstore/java/rest-assured/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/rest-assured/docs/Dog.md +++ b/samples/client/petstore/java/rest-assured/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/DogAllOf.md b/samples/client/petstore/java/rest-assured/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/rest-assured/docs/DogAllOf.md +++ b/samples/client/petstore/java/rest-assured/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/EnumArrays.md b/samples/client/petstore/java/rest-assured/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/rest-assured/docs/EnumArrays.md +++ b/samples/client/petstore/java/rest-assured/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/rest-assured/docs/EnumTest.md b/samples/client/petstore/java/rest-assured/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/rest-assured/docs/EnumTest.md +++ b/samples/client/petstore/java/rest-assured/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/rest-assured/docs/FakeApi.md b/samples/client/petstore/java/rest-assured/docs/FakeApi.md index 9e36bee7aaea..a890ff7a5191 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -45,9 +45,9 @@ api.createXmlItem() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -86,9 +86,9 @@ api.fakeOuterBooleanSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -127,9 +127,9 @@ api.fakeOuterCompositeSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -168,9 +168,9 @@ api.fakeOuterNumberSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -209,9 +209,9 @@ api.fakeOuterStringSerialize().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -251,9 +251,9 @@ api.testBodyWithFileSchema() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -292,10 +292,10 @@ api.testBodyWithQueryParams() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -335,9 +335,9 @@ api.testClientModel() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -380,22 +380,22 @@ api.testEndpointParameters() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -434,16 +434,16 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -485,14 +485,14 @@ api.testGroupParameters() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -530,9 +530,9 @@ api.testInlineAdditionalProperties() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -571,10 +571,10 @@ api.testJsonFormData() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -618,13 +618,13 @@ api.testQueryParameterCollectionFormat() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md index 7aa78d36b357..e3fd85c4a9dd 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -32,9 +32,9 @@ api.testClassname() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/FileSchemaTestClass.md b/samples/client/petstore/java/rest-assured/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/rest-assured/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/rest-assured/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/FormatTest.md b/samples/client/petstore/java/rest-assured/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/rest-assured/docs/FormatTest.md +++ b/samples/client/petstore/java/rest-assured/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/rest-assured/docs/MapTest.md b/samples/client/petstore/java/rest-assured/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/rest-assured/docs/MapTest.md +++ b/samples/client/petstore/java/rest-assured/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/rest-assured/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/rest-assured/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Model200Response.md b/samples/client/petstore/java/rest-assured/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/rest-assured/docs/Model200Response.md +++ b/samples/client/petstore/java/rest-assured/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/ModelApiResponse.md b/samples/client/petstore/java/rest-assured/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/rest-assured/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/rest-assured/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/ModelFile.md b/samples/client/petstore/java/rest-assured/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/rest-assured/docs/ModelFile.md +++ b/samples/client/petstore/java/rest-assured/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/ModelList.md b/samples/client/petstore/java/rest-assured/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/rest-assured/docs/ModelList.md +++ b/samples/client/petstore/java/rest-assured/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/ModelReturn.md b/samples/client/petstore/java/rest-assured/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/rest-assured/docs/ModelReturn.md +++ b/samples/client/petstore/java/rest-assured/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Name.md b/samples/client/petstore/java/rest-assured/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/rest-assured/docs/Name.md +++ b/samples/client/petstore/java/rest-assured/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/rest-assured/docs/NumberOnly.md b/samples/client/petstore/java/rest-assured/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/rest-assured/docs/NumberOnly.md +++ b/samples/client/petstore/java/rest-assured/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Order.md b/samples/client/petstore/java/rest-assured/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/rest-assured/docs/Order.md +++ b/samples/client/petstore/java/rest-assured/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/rest-assured/docs/OuterComposite.md b/samples/client/petstore/java/rest-assured/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/rest-assured/docs/OuterComposite.md +++ b/samples/client/petstore/java/rest-assured/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/Pet.md b/samples/client/petstore/java/rest-assured/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/rest-assured/docs/Pet.md +++ b/samples/client/petstore/java/rest-assured/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/rest-assured/docs/PetApi.md b/samples/client/petstore/java/rest-assured/docs/PetApi.md index ea946e82b739..50834ca6f349 100644 --- a/samples/client/petstore/java/rest-assured/docs/PetApi.md +++ b/samples/client/petstore/java/rest-assured/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -38,9 +38,9 @@ api.addPet() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -78,10 +78,10 @@ api.deletePet() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -121,9 +121,9 @@ api.findPetsByStatus() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -163,9 +163,9 @@ api.findPetsByTags() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -205,9 +205,9 @@ api.getPetById() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -245,9 +245,9 @@ api.updatePet() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -285,11 +285,11 @@ api.updatePetWithForm() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -327,11 +327,11 @@ api.uploadFile() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -370,11 +370,11 @@ api.uploadFileWithRequiredFile() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md b/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/SpecialModelName.md b/samples/client/petstore/java/rest-assured/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/rest-assured/docs/SpecialModelName.md +++ b/samples/client/petstore/java/rest-assured/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/StoreApi.md b/samples/client/petstore/java/rest-assured/docs/StoreApi.md index 2fc7a8ebbbf0..5466205059cd 100644 --- a/samples/client/petstore/java/rest-assured/docs/StoreApi.md +++ b/samples/client/petstore/java/rest-assured/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -35,9 +35,9 @@ api.deleteOrder() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -115,9 +115,9 @@ api.getOrderById() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -155,9 +155,9 @@ api.placeOrder() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/Tag.md b/samples/client/petstore/java/rest-assured/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/rest-assured/docs/Tag.md +++ b/samples/client/petstore/java/rest-assured/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/TypeHolderDefault.md b/samples/client/petstore/java/rest-assured/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/rest-assured/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/rest-assured/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/rest-assured/docs/TypeHolderExample.md b/samples/client/petstore/java/rest-assured/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/rest-assured/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/rest-assured/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/rest-assured/docs/User.md b/samples/client/petstore/java/rest-assured/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/rest-assured/docs/User.md +++ b/samples/client/petstore/java/rest-assured/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/UserApi.md b/samples/client/petstore/java/rest-assured/docs/UserApi.md index 5f5a5dbd3627..7ee7cb848655 100644 --- a/samples/client/petstore/java/rest-assured/docs/UserApi.md +++ b/samples/client/petstore/java/rest-assured/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -39,9 +39,9 @@ api.createUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -79,9 +79,9 @@ api.createUsersWithArrayInput() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -119,9 +119,9 @@ api.createUsersWithListInput() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -161,9 +161,9 @@ api.deleteUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -201,9 +201,9 @@ api.getUserByName() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -242,10 +242,10 @@ api.loginUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -322,10 +322,10 @@ api.updateUser() ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/XmlItem.md b/samples/client/petstore/java/rest-assured/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/rest-assured/docs/XmlItem.md +++ b/samples/client/petstore/java/rest-assured/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Animal.md b/samples/client/petstore/java/resteasy/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/resteasy/docs/Animal.md +++ b/samples/client/petstore/java/resteasy/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/resteasy/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/resteasy/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/resteasy/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/resteasy/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/resteasy/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/resteasy/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/ArrayTest.md b/samples/client/petstore/java/resteasy/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/resteasy/docs/ArrayTest.md +++ b/samples/client/petstore/java/resteasy/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/BigCat.md b/samples/client/petstore/java/resteasy/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/resteasy/docs/BigCat.md +++ b/samples/client/petstore/java/resteasy/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md b/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/resteasy/docs/Capitalization.md b/samples/client/petstore/java/resteasy/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/resteasy/docs/Capitalization.md +++ b/samples/client/petstore/java/resteasy/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Cat.md b/samples/client/petstore/java/resteasy/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/resteasy/docs/Cat.md +++ b/samples/client/petstore/java/resteasy/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/CatAllOf.md b/samples/client/petstore/java/resteasy/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/resteasy/docs/CatAllOf.md +++ b/samples/client/petstore/java/resteasy/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Category.md b/samples/client/petstore/java/resteasy/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/resteasy/docs/Category.md +++ b/samples/client/petstore/java/resteasy/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/resteasy/docs/ClassModel.md b/samples/client/petstore/java/resteasy/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/resteasy/docs/ClassModel.md +++ b/samples/client/petstore/java/resteasy/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Client.md b/samples/client/petstore/java/resteasy/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/resteasy/docs/Client.md +++ b/samples/client/petstore/java/resteasy/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Dog.md b/samples/client/petstore/java/resteasy/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/resteasy/docs/Dog.md +++ b/samples/client/petstore/java/resteasy/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/DogAllOf.md b/samples/client/petstore/java/resteasy/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/resteasy/docs/DogAllOf.md +++ b/samples/client/petstore/java/resteasy/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/EnumArrays.md b/samples/client/petstore/java/resteasy/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/resteasy/docs/EnumArrays.md +++ b/samples/client/petstore/java/resteasy/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/resteasy/docs/EnumTest.md b/samples/client/petstore/java/resteasy/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/resteasy/docs/EnumTest.md +++ b/samples/client/petstore/java/resteasy/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 6ced5f29b128..25301e7502c3 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/FileSchemaTestClass.md b/samples/client/petstore/java/resteasy/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/resteasy/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/resteasy/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/FormatTest.md b/samples/client/petstore/java/resteasy/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/resteasy/docs/FormatTest.md +++ b/samples/client/petstore/java/resteasy/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/resteasy/docs/MapTest.md b/samples/client/petstore/java/resteasy/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/resteasy/docs/MapTest.md +++ b/samples/client/petstore/java/resteasy/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/resteasy/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/resteasy/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resteasy/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Model200Response.md b/samples/client/petstore/java/resteasy/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/resteasy/docs/Model200Response.md +++ b/samples/client/petstore/java/resteasy/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/ModelApiResponse.md b/samples/client/petstore/java/resteasy/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/resteasy/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/resteasy/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/ModelFile.md b/samples/client/petstore/java/resteasy/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/resteasy/docs/ModelFile.md +++ b/samples/client/petstore/java/resteasy/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/ModelList.md b/samples/client/petstore/java/resteasy/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/resteasy/docs/ModelList.md +++ b/samples/client/petstore/java/resteasy/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/ModelReturn.md b/samples/client/petstore/java/resteasy/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/resteasy/docs/ModelReturn.md +++ b/samples/client/petstore/java/resteasy/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Name.md b/samples/client/petstore/java/resteasy/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/resteasy/docs/Name.md +++ b/samples/client/petstore/java/resteasy/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/resteasy/docs/NumberOnly.md b/samples/client/petstore/java/resteasy/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/resteasy/docs/NumberOnly.md +++ b/samples/client/petstore/java/resteasy/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Order.md b/samples/client/petstore/java/resteasy/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/resteasy/docs/Order.md +++ b/samples/client/petstore/java/resteasy/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/resteasy/docs/OuterComposite.md b/samples/client/petstore/java/resteasy/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/resteasy/docs/OuterComposite.md +++ b/samples/client/petstore/java/resteasy/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/Pet.md b/samples/client/petstore/java/resteasy/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/resteasy/docs/Pet.md +++ b/samples/client/petstore/java/resteasy/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md index acc142fa0221..1e79e30ef6c2 100644 --- a/samples/client/petstore/java/resteasy/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/SpecialModelName.md b/samples/client/petstore/java/resteasy/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/resteasy/docs/SpecialModelName.md +++ b/samples/client/petstore/java/resteasy/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/StoreApi.md b/samples/client/petstore/java/resteasy/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/resteasy/docs/StoreApi.md +++ b/samples/client/petstore/java/resteasy/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/Tag.md b/samples/client/petstore/java/resteasy/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/resteasy/docs/Tag.md +++ b/samples/client/petstore/java/resteasy/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/TypeHolderDefault.md b/samples/client/petstore/java/resteasy/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/resteasy/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/resteasy/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/resteasy/docs/TypeHolderExample.md b/samples/client/petstore/java/resteasy/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/resteasy/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/resteasy/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/resteasy/docs/User.md b/samples/client/petstore/java/resteasy/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/resteasy/docs/User.md +++ b/samples/client/petstore/java/resteasy/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/UserApi.md b/samples/client/petstore/java/resteasy/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/resteasy/docs/UserApi.md +++ b/samples/client/petstore/java/resteasy/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/XmlItem.md b/samples/client/petstore/java/resteasy/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/resteasy/docs/XmlItem.md +++ b/samples/client/petstore/java/resteasy/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java index 6f303f173ae2..be898d61d2ea 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java index 03e9592e224b..aa939d0b1f35 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java index 1f3434c2ec64..01f3a54cb5db 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index 8c9390d221e4..e7f672b73a15 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -102,7 +102,7 @@ ext { jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" - spring_web_version = "5.2.5.RELEASE" + spring_web_version = "5.3.18" jodatime_version = "2.9.9" junit_version = "4.13.2" } diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Animal.md b/samples/client/petstore/java/resttemplate-withXml/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Animal.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ArrayTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ArrayTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/BigCat.md b/samples/client/petstore/java/resttemplate-withXml/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/BigCat.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md b/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Capitalization.md b/samples/client/petstore/java/resttemplate-withXml/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Capitalization.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Cat.md b/samples/client/petstore/java/resttemplate-withXml/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Cat.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md b/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Category.md b/samples/client/petstore/java/resttemplate-withXml/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Category.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md b/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Client.md b/samples/client/petstore/java/resttemplate-withXml/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Client.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Dog.md b/samples/client/petstore/java/resttemplate-withXml/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Dog.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md b/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/EnumArrays.md b/samples/client/petstore/java/resttemplate-withXml/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/EnumArrays.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 6ced5f29b128..25301e7502c3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FileSchemaTestClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md b/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ModelApiResponse.md b/samples/client/petstore/java/resttemplate-withXml/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ModelFile.md b/samples/client/petstore/java/resttemplate-withXml/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ModelFile.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ModelList.md b/samples/client/petstore/java/resttemplate-withXml/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ModelList.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md b/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Name.md b/samples/client/petstore/java/resttemplate-withXml/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Name.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/NumberOnly.md b/samples/client/petstore/java/resttemplate-withXml/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/NumberOnly.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Order.md b/samples/client/petstore/java/resttemplate-withXml/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Order.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/OuterComposite.md b/samples/client/petstore/java/resttemplate-withXml/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/OuterComposite.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Pet.md b/samples/client/petstore/java/resttemplate-withXml/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Pet.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md index acc142fa0221..1e79e30ef6c2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/SpecialModelName.md b/samples/client/petstore/java/resttemplate-withXml/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/SpecialModelName.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Tag.md b/samples/client/petstore/java/resttemplate-withXml/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Tag.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderDefault.md b/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderExample.md b/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/User.md b/samples/client/petstore/java/resttemplate-withXml/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/User.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/XmlItem.md b/samples/client/petstore/java/resttemplate-withXml/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/XmlItem.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index 31e9c25da768..a4cd58ae7950 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -280,7 +280,7 @@ UTF-8 1.5.22 - 5.2.5.RELEASE + 5.3.18 2.10.5 2.10.5.1 0.2.2 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 06309d589f67..ee7824ee743c 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 @@ -597,8 +597,7 @@ public String generateQueryUri(MultiValueMap queryParams, Map, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/FileSchemaTestClass.md b/samples/client/petstore/java/resttemplate/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/resttemplate/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/resttemplate/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/FormatTest.md b/samples/client/petstore/java/resttemplate/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/resttemplate/docs/FormatTest.md +++ b/samples/client/petstore/java/resttemplate/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/resttemplate/docs/MapTest.md b/samples/client/petstore/java/resttemplate/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/resttemplate/docs/MapTest.md +++ b/samples/client/petstore/java/resttemplate/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/resttemplate/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/resttemplate/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/Model200Response.md b/samples/client/petstore/java/resttemplate/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/resttemplate/docs/Model200Response.md +++ b/samples/client/petstore/java/resttemplate/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/ModelApiResponse.md b/samples/client/petstore/java/resttemplate/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/resttemplate/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/resttemplate/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/ModelFile.md b/samples/client/petstore/java/resttemplate/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/resttemplate/docs/ModelFile.md +++ b/samples/client/petstore/java/resttemplate/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/ModelList.md b/samples/client/petstore/java/resttemplate/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/resttemplate/docs/ModelList.md +++ b/samples/client/petstore/java/resttemplate/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/ModelReturn.md b/samples/client/petstore/java/resttemplate/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/resttemplate/docs/ModelReturn.md +++ b/samples/client/petstore/java/resttemplate/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/Name.md b/samples/client/petstore/java/resttemplate/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/resttemplate/docs/Name.md +++ b/samples/client/petstore/java/resttemplate/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/resttemplate/docs/NumberOnly.md b/samples/client/petstore/java/resttemplate/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/resttemplate/docs/NumberOnly.md +++ b/samples/client/petstore/java/resttemplate/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/Order.md b/samples/client/petstore/java/resttemplate/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/resttemplate/docs/Order.md +++ b/samples/client/petstore/java/resttemplate/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/resttemplate/docs/OuterComposite.md b/samples/client/petstore/java/resttemplate/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/resttemplate/docs/OuterComposite.md +++ b/samples/client/petstore/java/resttemplate/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/Pet.md b/samples/client/petstore/java/resttemplate/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/resttemplate/docs/Pet.md +++ b/samples/client/petstore/java/resttemplate/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md index acc142fa0221..1e79e30ef6c2 100644 --- a/samples/client/petstore/java/resttemplate/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/SpecialModelName.md b/samples/client/petstore/java/resttemplate/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/resttemplate/docs/SpecialModelName.md +++ b/samples/client/petstore/java/resttemplate/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/StoreApi.md b/samples/client/petstore/java/resttemplate/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/resttemplate/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/Tag.md b/samples/client/petstore/java/resttemplate/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/resttemplate/docs/Tag.md +++ b/samples/client/petstore/java/resttemplate/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/TypeHolderDefault.md b/samples/client/petstore/java/resttemplate/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/resttemplate/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/resttemplate/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/resttemplate/docs/TypeHolderExample.md b/samples/client/petstore/java/resttemplate/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/resttemplate/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/resttemplate/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/resttemplate/docs/User.md b/samples/client/petstore/java/resttemplate/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/resttemplate/docs/User.md +++ b/samples/client/petstore/java/resttemplate/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/UserApi.md b/samples/client/petstore/java/resttemplate/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/resttemplate/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/XmlItem.md b/samples/client/petstore/java/resttemplate/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/resttemplate/docs/XmlItem.md +++ b/samples/client/petstore/java/resttemplate/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 4032009a3254..4bbd9379b02a 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -272,7 +272,7 @@ UTF-8 1.5.22 - 5.2.5.RELEASE + 5.3.18 2.10.5 2.10.5.1 0.2.2 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 97f686f6cfdb..48a4c3e57941 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 @@ -592,8 +592,7 @@ public String generateQueryUri(MultiValueMap queryParams, Map, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md index f0469bd488b7..ae51f2df60b7 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FileSchemaTestClass.md b/samples/client/petstore/java/retrofit2-play26/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FormatTest.md b/samples/client/petstore/java/retrofit2-play26/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FormatTest.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/MapTest.md b/samples/client/petstore/java/retrofit2-play26/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play26/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md b/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ModelApiResponse.md b/samples/client/petstore/java/retrofit2-play26/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ModelFile.md b/samples/client/petstore/java/retrofit2-play26/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ModelFile.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ModelList.md b/samples/client/petstore/java/retrofit2-play26/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ModelList.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Name.md b/samples/client/petstore/java/retrofit2-play26/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/NumberOnly.md b/samples/client/petstore/java/retrofit2-play26/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/NumberOnly.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Order.md b/samples/client/petstore/java/retrofit2-play26/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Order.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/OuterComposite.md b/samples/client/petstore/java/retrofit2-play26/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/OuterComposite.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Pet.md b/samples/client/petstore/java/retrofit2-play26/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Pet.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md index fb13fad3e054..27140114a49d 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/SpecialModelName.md b/samples/client/petstore/java/retrofit2-play26/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/SpecialModelName.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md index 477e464d88ac..e6ae80525ddf 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Tag.md b/samples/client/petstore/java/retrofit2-play26/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Tag.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderDefault.md b/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderExample.md b/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/User.md b/samples/client/petstore/java/retrofit2-play26/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/User.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md index 8c197c2263d2..8425a5f810ed 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/docs/XmlItem.md b/samples/client/petstore/java/retrofit2-play26/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/XmlItem.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java index d08460a47c48..3baf0b0983f0 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java index 2c3ec8c9a5a1..a1573f9a7df9 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java index 4530736d7ca1..ffa9618ea45d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java index 4fca866a8c12..58620ec5a3be 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Animal.md b/samples/client/petstore/java/retrofit2/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/retrofit2/docs/Animal.md +++ b/samples/client/petstore/java/retrofit2/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md index 35fdbbbeaaed..ffa2dcec928b 100644 --- a/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/retrofit2/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/retrofit2/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/retrofit2/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/retrofit2/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/retrofit2/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/retrofit2/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/ArrayTest.md b/samples/client/petstore/java/retrofit2/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/retrofit2/docs/ArrayTest.md +++ b/samples/client/petstore/java/retrofit2/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/BigCat.md b/samples/client/petstore/java/retrofit2/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/retrofit2/docs/BigCat.md +++ b/samples/client/petstore/java/retrofit2/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/retrofit2/docs/Capitalization.md b/samples/client/petstore/java/retrofit2/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/retrofit2/docs/Capitalization.md +++ b/samples/client/petstore/java/retrofit2/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Cat.md b/samples/client/petstore/java/retrofit2/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/retrofit2/docs/Cat.md +++ b/samples/client/petstore/java/retrofit2/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/retrofit2/docs/CatAllOf.md +++ b/samples/client/petstore/java/retrofit2/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Category.md b/samples/client/petstore/java/retrofit2/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/retrofit2/docs/Category.md +++ b/samples/client/petstore/java/retrofit2/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/retrofit2/docs/ClassModel.md b/samples/client/petstore/java/retrofit2/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/retrofit2/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Client.md b/samples/client/petstore/java/retrofit2/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/retrofit2/docs/Client.md +++ b/samples/client/petstore/java/retrofit2/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Dog.md b/samples/client/petstore/java/retrofit2/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/retrofit2/docs/Dog.md +++ b/samples/client/petstore/java/retrofit2/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/retrofit2/docs/DogAllOf.md +++ b/samples/client/petstore/java/retrofit2/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/EnumArrays.md b/samples/client/petstore/java/retrofit2/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/retrofit2/docs/EnumArrays.md +++ b/samples/client/petstore/java/retrofit2/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/retrofit2/docs/EnumTest.md b/samples/client/petstore/java/retrofit2/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/retrofit2/docs/EnumTest.md +++ b/samples/client/petstore/java/retrofit2/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 45cf7beb0695..44193574acce 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md index f0469bd488b7..ae51f2df60b7 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/FileSchemaTestClass.md b/samples/client/petstore/java/retrofit2/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/retrofit2/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/retrofit2/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/FormatTest.md b/samples/client/petstore/java/retrofit2/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/retrofit2/docs/FormatTest.md +++ b/samples/client/petstore/java/retrofit2/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2/docs/MapTest.md b/samples/client/petstore/java/retrofit2/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/retrofit2/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Model200Response.md b/samples/client/petstore/java/retrofit2/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/retrofit2/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md b/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/ModelFile.md b/samples/client/petstore/java/retrofit2/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/retrofit2/docs/ModelFile.md +++ b/samples/client/petstore/java/retrofit2/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/ModelList.md b/samples/client/petstore/java/retrofit2/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/retrofit2/docs/ModelList.md +++ b/samples/client/petstore/java/retrofit2/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/retrofit2/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Name.md b/samples/client/petstore/java/retrofit2/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/retrofit2/docs/Name.md +++ b/samples/client/petstore/java/retrofit2/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2/docs/NumberOnly.md b/samples/client/petstore/java/retrofit2/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/retrofit2/docs/NumberOnly.md +++ b/samples/client/petstore/java/retrofit2/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Order.md b/samples/client/petstore/java/retrofit2/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/retrofit2/docs/Order.md +++ b/samples/client/petstore/java/retrofit2/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/retrofit2/docs/OuterComposite.md b/samples/client/petstore/java/retrofit2/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/retrofit2/docs/OuterComposite.md +++ b/samples/client/petstore/java/retrofit2/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/Pet.md b/samples/client/petstore/java/retrofit2/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/retrofit2/docs/Pet.md +++ b/samples/client/petstore/java/retrofit2/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md index fb13fad3e054..27140114a49d 100644 --- a/samples/client/petstore/java/retrofit2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md b/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md +++ b/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2/docs/StoreApi.md index 477e464d88ac..e6ae80525ddf 100644 --- a/samples/client/petstore/java/retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/Tag.md b/samples/client/petstore/java/retrofit2/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/retrofit2/docs/Tag.md +++ b/samples/client/petstore/java/retrofit2/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/TypeHolderDefault.md b/samples/client/petstore/java/retrofit2/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/retrofit2/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/retrofit2/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2/docs/TypeHolderExample.md b/samples/client/petstore/java/retrofit2/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/retrofit2/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/retrofit2/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2/docs/User.md b/samples/client/petstore/java/retrofit2/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/retrofit2/docs/User.md +++ b/samples/client/petstore/java/retrofit2/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/retrofit2/docs/UserApi.md b/samples/client/petstore/java/retrofit2/docs/UserApi.md index 8c197c2263d2..8425a5f810ed 100644 --- a/samples/client/petstore/java/retrofit2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/XmlItem.md b/samples/client/petstore/java/retrofit2/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/retrofit2/docs/XmlItem.md +++ b/samples/client/petstore/java/retrofit2/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Animal.md b/samples/client/petstore/java/retrofit2rx2/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Animal.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md index 35fdbbbeaaed..ffa2dcec928b 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ArrayTest.md b/samples/client/petstore/java/retrofit2rx2/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ArrayTest.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/BigCat.md b/samples/client/petstore/java/retrofit2rx2/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/BigCat.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Capitalization.md b/samples/client/petstore/java/retrofit2rx2/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Capitalization.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Cat.md b/samples/client/petstore/java/retrofit2rx2/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Cat.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Category.md b/samples/client/petstore/java/retrofit2rx2/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Category.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md b/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Client.md b/samples/client/petstore/java/retrofit2rx2/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Client.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Dog.md b/samples/client/petstore/java/retrofit2rx2/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Dog.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/EnumArrays.md b/samples/client/petstore/java/retrofit2rx2/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/EnumArrays.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/EnumTest.md b/samples/client/petstore/java/retrofit2rx2/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/EnumTest.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 45cf7beb0695..44193574acce 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md index f0469bd488b7..ae51f2df60b7 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FileSchemaTestClass.md b/samples/client/petstore/java/retrofit2rx2/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FormatTest.md b/samples/client/petstore/java/retrofit2rx2/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FormatTest.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md b/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx2/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md b/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ModelApiResponse.md b/samples/client/petstore/java/retrofit2rx2/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ModelFile.md b/samples/client/petstore/java/retrofit2rx2/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ModelFile.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ModelList.md b/samples/client/petstore/java/retrofit2rx2/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ModelList.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Name.md b/samples/client/petstore/java/retrofit2rx2/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Name.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/NumberOnly.md b/samples/client/petstore/java/retrofit2rx2/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/NumberOnly.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Order.md b/samples/client/petstore/java/retrofit2rx2/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Order.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/OuterComposite.md b/samples/client/petstore/java/retrofit2rx2/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/OuterComposite.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Pet.md b/samples/client/petstore/java/retrofit2rx2/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Pet.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md index fb13fad3e054..27140114a49d 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/SpecialModelName.md b/samples/client/petstore/java/retrofit2rx2/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/SpecialModelName.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md index 477e464d88ac..e6ae80525ddf 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Tag.md b/samples/client/petstore/java/retrofit2rx2/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Tag.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderDefault.md b/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderExample.md b/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/User.md b/samples/client/petstore/java/retrofit2rx2/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/User.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md index 8c197c2263d2..8425a5f810ed 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/XmlItem.md b/samples/client/petstore/java/retrofit2rx2/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/XmlItem.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Animal.md b/samples/client/petstore/java/retrofit2rx3/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Animal.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md index 35fdbbbeaaed..ffa2dcec928b 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ArrayTest.md b/samples/client/petstore/java/retrofit2rx3/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ArrayTest.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/BigCat.md b/samples/client/petstore/java/retrofit2rx3/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/BigCat.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Capitalization.md b/samples/client/petstore/java/retrofit2rx3/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Capitalization.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Cat.md b/samples/client/petstore/java/retrofit2rx3/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Cat.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Category.md b/samples/client/petstore/java/retrofit2rx3/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Category.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ClassModel.md b/samples/client/petstore/java/retrofit2rx3/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Client.md b/samples/client/petstore/java/retrofit2rx3/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Client.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Dog.md b/samples/client/petstore/java/retrofit2rx3/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Dog.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/EnumArrays.md b/samples/client/petstore/java/retrofit2rx3/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/EnumArrays.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/EnumTest.md b/samples/client/petstore/java/retrofit2rx3/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/EnumTest.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index 45cf7beb0695..44193574acce 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeClassnameTags123Api.md index f0469bd488b7..ae51f2df60b7 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FileSchemaTestClass.md b/samples/client/petstore/java/retrofit2rx3/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FormatTest.md b/samples/client/petstore/java/retrofit2rx3/docs/FormatTest.md index a35f0b3962c4..9c68c3080e13 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FormatTest.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2rx3/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/MapTest.md b/samples/client/petstore/java/retrofit2rx3/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx3/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Model200Response.md b/samples/client/petstore/java/retrofit2rx3/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ModelApiResponse.md b/samples/client/petstore/java/retrofit2rx3/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ModelFile.md b/samples/client/petstore/java/retrofit2rx3/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ModelFile.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ModelList.md b/samples/client/petstore/java/retrofit2rx3/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ModelList.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2rx3/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Name.md b/samples/client/petstore/java/retrofit2rx3/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Name.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/NumberOnly.md b/samples/client/petstore/java/retrofit2rx3/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/NumberOnly.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Order.md b/samples/client/petstore/java/retrofit2rx3/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Order.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/OuterComposite.md b/samples/client/petstore/java/retrofit2rx3/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/OuterComposite.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Pet.md b/samples/client/petstore/java/retrofit2rx3/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Pet.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md index fb13fad3e054..27140114a49d 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2rx3/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/SpecialModelName.md b/samples/client/petstore/java/retrofit2rx3/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/SpecialModelName.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md index 477e464d88ac..e6ae80525ddf 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/docs/Tag.md b/samples/client/petstore/java/retrofit2rx3/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/Tag.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderDefault.md b/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderExample.md b/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/User.md b/samples/client/petstore/java/retrofit2rx3/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/User.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/retrofit2rx3/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx3/docs/UserApi.md index 8c197c2263d2..8425a5f810ed 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/docs/XmlItem.md b/samples/client/petstore/java/retrofit2rx3/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/XmlItem.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Animal.md b/samples/client/petstore/java/vertx-no-nullable/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Animal.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ArrayTest.md b/samples/client/petstore/java/vertx-no-nullable/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ArrayTest.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/BigCat.md b/samples/client/petstore/java/vertx-no-nullable/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/BigCat.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md b/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Capitalization.md b/samples/client/petstore/java/vertx-no-nullable/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Capitalization.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Cat.md b/samples/client/petstore/java/vertx-no-nullable/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Cat.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md b/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Category.md b/samples/client/petstore/java/vertx-no-nullable/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Category.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ClassModel.md b/samples/client/petstore/java/vertx-no-nullable/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ClassModel.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Client.md b/samples/client/petstore/java/vertx-no-nullable/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Client.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Dog.md b/samples/client/petstore/java/vertx-no-nullable/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Dog.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md b/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/EnumArrays.md b/samples/client/petstore/java/vertx-no-nullable/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/EnumArrays.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/EnumTest.md b/samples/client/petstore/java/vertx-no-nullable/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/EnumTest.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index a676a4353fd8..f6ce519861c9 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **AsyncFile**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **AsyncFile**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FileSchemaTestClass.md b/samples/client/petstore/java/vertx-no-nullable/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FormatTest.md b/samples/client/petstore/java/vertx-no-nullable/docs/FormatTest.md index 8a77a27772f4..dd441705a182 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FormatTest.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **AsyncFile** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **AsyncFile** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/vertx-no-nullable/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/MapTest.md b/samples/client/petstore/java/vertx-no-nullable/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/MapTest.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/vertx-no-nullable/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Model200Response.md b/samples/client/petstore/java/vertx-no-nullable/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Model200Response.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ModelApiResponse.md b/samples/client/petstore/java/vertx-no-nullable/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ModelFile.md b/samples/client/petstore/java/vertx-no-nullable/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ModelFile.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ModelList.md b/samples/client/petstore/java/vertx-no-nullable/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ModelList.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ModelReturn.md b/samples/client/petstore/java/vertx-no-nullable/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ModelReturn.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Name.md b/samples/client/petstore/java/vertx-no-nullable/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Name.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/NumberOnly.md b/samples/client/petstore/java/vertx-no-nullable/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/NumberOnly.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Order.md b/samples/client/petstore/java/vertx-no-nullable/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Order.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/OuterComposite.md b/samples/client/petstore/java/vertx-no-nullable/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/OuterComposite.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Pet.md b/samples/client/petstore/java/vertx-no-nullable/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Pet.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md index 302b642d2043..ecb2af3e7a99 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **AsyncFile**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **AsyncFile**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **AsyncFile**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **AsyncFile**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/ReadOnlyFirst.md b/samples/client/petstore/java/vertx-no-nullable/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/SpecialModelName.md b/samples/client/petstore/java/vertx-no-nullable/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/SpecialModelName.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/Tag.md b/samples/client/petstore/java/vertx-no-nullable/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/Tag.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderDefault.md b/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderExample.md b/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/User.md b/samples/client/petstore/java/vertx-no-nullable/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/User.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/UserApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/UserApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/XmlItem.md b/samples/client/petstore/java/vertx-no-nullable/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/XmlItem.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java index 6f303f173ae2..be898d61d2ea 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java index 03e9592e224b..aa939d0b1f35 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java index 1f3434c2ec64..01f3a54cb5db 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 9489c24fc63c..9652c1b4a8c5 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: operationId: updatePet @@ -81,7 +81,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -268,7 +268,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -307,7 +307,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -356,7 +356,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /store/order/{order_id}: delete: @@ -434,7 +434,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithArray: post: @@ -456,7 +456,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/createWithList: post: @@ -478,7 +478,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /user/login: get: @@ -614,7 +614,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json /fake_classname_test: patch: @@ -640,7 +640,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -791,7 +791,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -814,7 +814,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: |- @@ -915,7 +915,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -938,7 +938,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/string: post: @@ -961,7 +961,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/boolean: post: @@ -984,7 +984,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/outer/composite: post: @@ -1007,7 +1007,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' /fake/jsonFormData: get: @@ -1034,7 +1034,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1056,7 +1056,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1080,7 +1080,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/create_xml_item: post: @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json /another-fake/dummy: patch: @@ -1140,7 +1140,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1160,7 +1160,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1256,7 +1256,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json components: schemas: diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesAnyType.md index 7bbe63d23f80..5158bd815e67 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesAnyType.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesArray.md index bdbf2962f201..9edcf46b0e44 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesArray.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesBoolean.md index 81aeb9ae1e78..1e1ed764a56e 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesBoolean.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md index f936ebe14261..79402f75c68c 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md @@ -5,19 +5,19 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | **Map<String, BigDecimal>** | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] -**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] -**mapMapString** | **Map<String, Map<String, String>>** | | [optional] -**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] -**anytype1** | **Object** | | [optional] -**anytype2** | **Object** | | [optional] -**anytype3** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapString** | **Map<String, String>** | | [optional] | +|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | +|**mapInteger** | **Map<String, Integer>** | | [optional] | +|**mapBoolean** | **Map<String, Boolean>** | | [optional] | +|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | +|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | +|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**anytype2** | **Object** | | [optional] | +|**anytype3** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesInteger.md index ae3391237145..cbc1673c059b 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesInteger.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesNumber.md index 8f414ad02fdc..0bd133ccf09a 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesNumber.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesObject.md index 41892793f0b0..3f419f8551ff 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesString.md index a2dfbc116f9b..269a1961cf88 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesString.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Animal.md b/samples/client/petstore/java/vertx/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/vertx/docs/Animal.md +++ b/samples/client/petstore/java/vertx/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md index 12e20b22218c..f1ca8fe00b57 100644 --- a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/vertx/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/vertx/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/vertx/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/vertx/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/vertx/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/vertx/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/ArrayTest.md b/samples/client/petstore/java/vertx/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/vertx/docs/ArrayTest.md +++ b/samples/client/petstore/java/vertx/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/BigCat.md b/samples/client/petstore/java/vertx/docs/BigCat.md index 020fbc787d81..d317a0617f37 100644 --- a/samples/client/petstore/java/vertx/docs/BigCat.md +++ b/samples/client/petstore/java/vertx/docs/BigCat.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/vertx/docs/BigCatAllOf.md b/samples/client/petstore/java/vertx/docs/BigCatAllOf.md index 2bcace910ec8..2bee213a607f 100644 --- a/samples/client/petstore/java/vertx/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/vertx/docs/BigCatAllOf.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | [**KindEnum**](#KindEnum) | | [optional] | ## Enum: KindEnum -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" +| Name | Value | +|---- | -----| +| LIONS | "lions" | +| TIGERS | "tigers" | +| LEOPARDS | "leopards" | +| JAGUARS | "jaguars" | diff --git a/samples/client/petstore/java/vertx/docs/Capitalization.md b/samples/client/petstore/java/vertx/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/vertx/docs/Capitalization.md +++ b/samples/client/petstore/java/vertx/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Cat.md b/samples/client/petstore/java/vertx/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/vertx/docs/Cat.md +++ b/samples/client/petstore/java/vertx/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/CatAllOf.md b/samples/client/petstore/java/vertx/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/vertx/docs/CatAllOf.md +++ b/samples/client/petstore/java/vertx/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Category.md b/samples/client/petstore/java/vertx/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/vertx/docs/Category.md +++ b/samples/client/petstore/java/vertx/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/vertx/docs/ClassModel.md b/samples/client/petstore/java/vertx/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/vertx/docs/ClassModel.md +++ b/samples/client/petstore/java/vertx/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Client.md b/samples/client/petstore/java/vertx/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/vertx/docs/Client.md +++ b/samples/client/petstore/java/vertx/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Dog.md b/samples/client/petstore/java/vertx/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/vertx/docs/Dog.md +++ b/samples/client/petstore/java/vertx/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/DogAllOf.md b/samples/client/petstore/java/vertx/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/vertx/docs/DogAllOf.md +++ b/samples/client/petstore/java/vertx/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/EnumArrays.md b/samples/client/petstore/java/vertx/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/vertx/docs/EnumArrays.md +++ b/samples/client/petstore/java/vertx/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/vertx/docs/EnumTest.md b/samples/client/petstore/java/vertx/docs/EnumTest.md index 6b3aa33fae88..bf2def484c6d 100644 --- a/samples/client/petstore/java/vertx/docs/EnumTest.md +++ b/samples/client/petstore/java/vertx/docs/EnumTest.md @@ -5,51 +5,51 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index a676a4353fd8..f6ce519861c9 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -2,22 +2,22 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | ### Return type @@ -128,9 +128,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -194,9 +194,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -260,9 +260,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -326,9 +326,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -391,9 +391,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -455,10 +455,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **body** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **body** | [**User**](User.md)| | | ### Return type @@ -522,9 +522,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type @@ -606,22 +606,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **AsyncFile**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **AsyncFile**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -692,16 +692,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -770,14 +770,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -838,9 +838,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -902,10 +902,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -972,13 +972,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md index ea4765a69ad0..10d5ea30aa21 100644 --- a/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/FileSchemaTestClass.md b/samples/client/petstore/java/vertx/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/vertx/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/vertx/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/FormatTest.md b/samples/client/petstore/java/vertx/docs/FormatTest.md index 8a77a27772f4..dd441705a182 100644 --- a/samples/client/petstore/java/vertx/docs/FormatTest.md +++ b/samples/client/petstore/java/vertx/docs/FormatTest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **AsyncFile** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**bigDecimal** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **AsyncFile** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**bigDecimal** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/vertx/docs/MapTest.md b/samples/client/petstore/java/vertx/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/vertx/docs/MapTest.md +++ b/samples/client/petstore/java/vertx/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/vertx/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/vertx/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/vertx/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Model200Response.md b/samples/client/petstore/java/vertx/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/vertx/docs/Model200Response.md +++ b/samples/client/petstore/java/vertx/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/ModelApiResponse.md b/samples/client/petstore/java/vertx/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/vertx/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/vertx/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/ModelFile.md b/samples/client/petstore/java/vertx/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/vertx/docs/ModelFile.md +++ b/samples/client/petstore/java/vertx/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/ModelList.md b/samples/client/petstore/java/vertx/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/vertx/docs/ModelList.md +++ b/samples/client/petstore/java/vertx/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/ModelReturn.md b/samples/client/petstore/java/vertx/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/vertx/docs/ModelReturn.md +++ b/samples/client/petstore/java/vertx/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Name.md b/samples/client/petstore/java/vertx/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/vertx/docs/Name.md +++ b/samples/client/petstore/java/vertx/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/vertx/docs/NumberOnly.md b/samples/client/petstore/java/vertx/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/vertx/docs/NumberOnly.md +++ b/samples/client/petstore/java/vertx/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Order.md b/samples/client/petstore/java/vertx/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/vertx/docs/Order.md +++ b/samples/client/petstore/java/vertx/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/vertx/docs/OuterComposite.md b/samples/client/petstore/java/vertx/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/vertx/docs/OuterComposite.md +++ b/samples/client/petstore/java/vertx/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/Pet.md b/samples/client/petstore/java/vertx/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/vertx/docs/Pet.md +++ b/samples/client/petstore/java/vertx/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md index 302b642d2043..ecb2af3e7a99 100644 --- a/samples/client/petstore/java/vertx/docs/PetApi.md +++ b/samples/client/petstore/java/vertx/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -60,9 +60,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -130,10 +130,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -203,9 +203,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -275,9 +275,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -349,9 +349,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -419,9 +419,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -492,11 +492,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -565,11 +565,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **AsyncFile**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **AsyncFile**| file to upload | [optional] | ### Return type @@ -638,11 +638,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **AsyncFile**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **AsyncFile**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md b/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/SpecialModelName.md b/samples/client/petstore/java/vertx/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/vertx/docs/SpecialModelName.md +++ b/samples/client/petstore/java/vertx/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/StoreApi.md b/samples/client/petstore/java/vertx/docs/StoreApi.md index 2e59caca46e7..571e808abdfb 100644 --- a/samples/client/petstore/java/vertx/docs/StoreApi.md +++ b/samples/client/petstore/java/vertx/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/Tag.md b/samples/client/petstore/java/vertx/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/vertx/docs/Tag.md +++ b/samples/client/petstore/java/vertx/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/TypeHolderDefault.md b/samples/client/petstore/java/vertx/docs/TypeHolderDefault.md index 8340befcae5c..71a9f3dc9027 100644 --- a/samples/client/petstore/java/vertx/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/vertx/docs/TypeHolderDefault.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/vertx/docs/TypeHolderExample.md b/samples/client/petstore/java/vertx/docs/TypeHolderExample.md index 2396fdf17653..9e410c666e44 100644 --- a/samples/client/petstore/java/vertx/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/vertx/docs/TypeHolderExample.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stringItem** | **String** | | | +|**numberItem** | **BigDecimal** | | | +|**floatItem** | **Float** | | | +|**integerItem** | **Integer** | | | +|**boolItem** | **Boolean** | | | +|**arrayItem** | **List<Integer>** | | | diff --git a/samples/client/petstore/java/vertx/docs/User.md b/samples/client/petstore/java/vertx/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/vertx/docs/User.md +++ b/samples/client/petstore/java/vertx/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/UserApi.md b/samples/client/petstore/java/vertx/docs/UserApi.md index d651e8b349d3..dfdb4a7c0ebd 100644 --- a/samples/client/petstore/java/vertx/docs/UserApi.md +++ b/samples/client/petstore/java/vertx/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**User**](User.md)| Created user object | | ### Return type @@ -119,9 +119,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -182,9 +182,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -247,9 +247,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -312,9 +312,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -379,10 +379,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -506,10 +506,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **body** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/XmlItem.md b/samples/client/petstore/java/vertx/docs/XmlItem.md index 8c184da283df..349b62bed64e 100644 --- a/samples/client/petstore/java/vertx/docs/XmlItem.md +++ b/samples/client/petstore/java/vertx/docs/XmlItem.md @@ -5,37 +5,37 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeString** | **String** | | [optional] | +|**attributeNumber** | **BigDecimal** | | [optional] | +|**attributeInteger** | **Integer** | | [optional] | +|**attributeBoolean** | **Boolean** | | [optional] | +|**wrappedArray** | **List<Integer>** | | [optional] | +|**nameString** | **String** | | [optional] | +|**nameNumber** | **BigDecimal** | | [optional] | +|**nameInteger** | **Integer** | | [optional] | +|**nameBoolean** | **Boolean** | | [optional] | +|**nameArray** | **List<Integer>** | | [optional] | +|**nameWrappedArray** | **List<Integer>** | | [optional] | +|**prefixString** | **String** | | [optional] | +|**prefixNumber** | **BigDecimal** | | [optional] | +|**prefixInteger** | **Integer** | | [optional] | +|**prefixBoolean** | **Boolean** | | [optional] | +|**prefixArray** | **List<Integer>** | | [optional] | +|**prefixWrappedArray** | **List<Integer>** | | [optional] | +|**namespaceString** | **String** | | [optional] | +|**namespaceNumber** | **BigDecimal** | | [optional] | +|**namespaceInteger** | **Integer** | | [optional] | +|**namespaceBoolean** | **Boolean** | | [optional] | +|**namespaceArray** | **List<Integer>** | | [optional] | +|**namespaceWrappedArray** | **List<Integer>** | | [optional] | +|**prefixNsString** | **String** | | [optional] | +|**prefixNsNumber** | **BigDecimal** | | [optional] | +|**prefixNsInteger** | **Integer** | | [optional] | +|**prefixNsBoolean** | **Boolean** | | [optional] | +|**prefixNsArray** | **List<Integer>** | | [optional] | +|**prefixNsWrappedArray** | **List<Integer>** | | [optional] | diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java index 6f303f173ae2..be898d61d2ea 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -38,7 +39,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java index 03e9592e224b..aa939d0b1f35 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ BigCat.JSON_PROPERTY_KIND }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class BigCat extends Cat { /** diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java index 1f3434c2ec64..01f3a54cb5db 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle b/samples/client/petstore/java/webclient-nulable-arrays/build.gradle index fb230b14e14d..729ffbdb6fc0 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle +++ b/samples/client/petstore/java/webclient-nulable-arrays/build.gradle @@ -113,7 +113,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.6.3" - spring_web_version = "2.4.3" + spring_boot_version = "2.6.6" jackson_version = "2.11.4" jackson_databind_version = "2.11.4" jackson_databind_nullable_version = "0.2.2" @@ -128,7 +128,7 @@ dependencies { implementation "io.swagger:swagger-annotations:$swagger_annotations_version" implementation "com.google.code.findbugs:jsr305:3.0.2" implementation "io.projectreactor:reactor-core:$reactor_version" - implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_web_version" + implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" diff --git a/samples/client/petstore/java/webclient-nulable-arrays/docs/ByteArrayObject.md b/samples/client/petstore/java/webclient-nulable-arrays/docs/ByteArrayObject.md index 44cedf0bd5dc..3feb9e093e87 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/docs/ByteArrayObject.md +++ b/samples/client/petstore/java/webclient-nulable-arrays/docs/ByteArrayObject.md @@ -5,13 +5,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nullableArray** | **byte[]** | byte array. | [optional] -**normalArray** | **byte[]** | byte array. | [optional] -**nullableString** | **String** | | [optional] -**stringField** | **String** | | [optional] -**intField** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableArray** | **byte[]** | byte array. | [optional] | +|**normalArray** | **byte[]** | byte array. | [optional] | +|**nullableString** | **String** | | [optional] | +|**stringField** | **String** | | [optional] | +|**intField** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/webclient-nulable-arrays/docs/DefaultApi.md b/samples/client/petstore/java/webclient-nulable-arrays/docs/DefaultApi.md index 5b7929abf3e3..904a441a9f87 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/docs/DefaultApi.md +++ b/samples/client/petstore/java/webclient-nulable-arrays/docs/DefaultApi.md @@ -2,9 +2,9 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**nullableArrayTestGet**](DefaultApi.md#nullableArrayTestGet) | **GET** /nullable-array-test | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**nullableArrayTestGet**](DefaultApi.md#nullableArrayTestGet) | **GET** /nullable-array-test | | diff --git a/samples/client/petstore/java/webclient-nulable-arrays/gradlew b/samples/client/petstore/java/webclient-nulable-arrays/gradlew old mode 100755 new mode 100644 diff --git a/samples/client/petstore/java/webclient-nulable-arrays/pom.xml b/samples/client/petstore/java/webclient-nulable-arrays/pom.xml index 276eb83ad9d9..04c903d6b9c3 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/pom.xml +++ b/samples/client/petstore/java/webclient-nulable-arrays/pom.xml @@ -82,7 +82,7 @@ org.springframework.boot spring-boot-starter-webflux - ${spring-web-version} + ${spring-boot-version} @@ -126,7 +126,7 @@ UTF-8 1.6.3 - 2.4.3 + 2.6.6 2.11.3 2.11.4 0.2.2 diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java b/samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java index aff761e19e63..1f4738db4def 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java +++ b/samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java @@ -20,6 +20,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; @@ -58,4 +60,28 @@ public void normalArrayTest() { // TODO: test normalArray } + /** + * Test the property 'nullableString' + */ + @Test + public void nullableStringTest() { + // TODO: test nullableString + } + + /** + * Test the property 'stringField' + */ + @Test + public void stringFieldTest() { + // TODO: test stringField + } + + /** + * Test the property 'intField' + */ + @Test + public void intFieldTest() { + // TODO: test intField + } + } diff --git a/samples/client/petstore/java/webclient/.openapi-generator/FILES b/samples/client/petstore/java/webclient/.openapi-generator/FILES index 4e0bb18ff087..178024019af7 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient/.openapi-generator/FILES @@ -6,6 +6,7 @@ api/openapi.yaml build.gradle build.sbt docs/AdditionalPropertiesClass.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md @@ -53,6 +54,7 @@ docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md @@ -87,6 +89,7 @@ src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/auth/OAuth.java src/main/java/org/openapitools/client/auth/OAuthFlow.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -129,6 +132,7 @@ src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/User.java diff --git a/samples/client/petstore/java/webclient/README.md b/samples/client/petstore/java/webclient/README.md index 1204655c39c5..fe3c7ecf3acc 100644 --- a/samples/client/petstore/java/webclient/README.md +++ b/samples/client/petstore/java/webclient/README.md @@ -159,6 +159,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) @@ -201,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - [User](docs/User.md) diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 177bc923ce04..f90b0a7d9ab0 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -69,7 +69,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: description: "" @@ -92,7 +92,8 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-webclient-blocking: true + x-content-type: application/json x-accepts: application/json servers: - url: http://petstore.swagger.io/v2 @@ -141,6 +142,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -185,6 +187,7 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: @@ -252,6 +255,7 @@ paths: summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: description: "" @@ -291,7 +295,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -335,7 +339,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -383,7 +387,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -459,7 +463,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: @@ -473,7 +477,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithList: post: @@ -487,7 +491,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/login: get: @@ -631,7 +635,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: @@ -651,7 +655,7 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -800,6 +804,15 @@ paths: format: double type: number style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: $ref: '#/components/requestBodies/inline_object_2' content: @@ -832,7 +845,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -849,7 +862,7 @@ paths: summary: To test "client" model tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: | @@ -948,7 +961,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -969,7 +982,7 @@ paths: description: Output number tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/property/enum-int: post: @@ -991,7 +1004,7 @@ paths: description: Output enum (int) tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -1012,7 +1025,7 @@ paths: description: Output string tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -1033,7 +1046,7 @@ paths: description: Output boolean tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -1054,7 +1067,7 @@ paths: description: Output composite tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: @@ -1082,7 +1095,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1103,7 +1116,7 @@ paths: summary: test inline additionalProperties tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1127,7 +1140,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /another-fake/dummy: patch: @@ -1145,7 +1158,7 @@ paths: summary: To test special tags tags: - $another-fake? - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1163,7 +1176,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-binary: put: @@ -1183,7 +1196,7 @@ paths: description: Success tags: - fake - x-contentType: image/png + x-content-type: image/png x-accepts: application/json /fake/test-query-parameters: put: @@ -1303,7 +1316,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /fake/health: get: @@ -1348,7 +1361,7 @@ paths: summary: test http signature authentication tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json components: requestBodies: @@ -2101,6 +2114,20 @@ components: $ref: '#/components/schemas/Bar' type: array type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string inline_response_default: example: string: diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index e0c9aa2ddb0b..fb3b59a62149 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -113,7 +113,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.6.3" - spring_web_version = "2.4.3" + spring_boot_version = "2.6.6" jackson_version = "2.11.4" jackson_databind_version = "2.11.4" jackson_databind_nullable_version = "0.2.2" @@ -128,7 +128,7 @@ dependencies { implementation "io.swagger:swagger-annotations:$swagger_annotations_version" implementation "com.google.code.findbugs:jsr305:3.0.2" implementation "io.projectreactor:reactor-core:$reactor_version" - implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_web_version" + implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index 7bbe63d23f80..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesAnyType - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesArray.md deleted file mode 100644 index bdbf2962f201..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesArray - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index 81aeb9ae1e78..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesBoolean - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md index 37401723280b..fe69a56eebf4 100644 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapProperty** | **Map<String, String>** | | [optional] -**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index ae3391237145..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesInteger - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8f414ad02fdc..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesNumber - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 41892793f0b0..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesObject - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesString.md deleted file mode 100644 index a2dfbc116f9b..000000000000 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AdditionalPropertiesString - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/webclient/docs/AllOfWithSingleRef.md new file mode 100644 index 000000000000..0a9e61bc682d --- /dev/null +++ b/samples/client/petstore/java/webclient/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/webclient/docs/Animal.md b/samples/client/petstore/java/webclient/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/client/petstore/java/webclient/docs/Animal.md +++ b/samples/client/petstore/java/webclient/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/AnimalFarm.md b/samples/client/petstore/java/webclient/docs/AnimalFarm.md deleted file mode 100644 index c7c7f1ddcce6..000000000000 --- a/samples/client/petstore/java/webclient/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ - -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - - diff --git a/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md b/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md index 6d363b35f169..73c966d2d549 100644 --- a/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/webclient/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/client/petstore/java/webclient/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/webclient/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/webclient/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/client/petstore/java/webclient/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/webclient/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ArrayTest.md b/samples/client/petstore/java/webclient/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/client/petstore/java/webclient/docs/ArrayTest.md +++ b/samples/client/petstore/java/webclient/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/BigCat.md b/samples/client/petstore/java/webclient/docs/BigCat.md deleted file mode 100644 index 020fbc787d81..000000000000 --- a/samples/client/petstore/java/webclient/docs/BigCat.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCat - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] - - - -## Enum: KindEnum - -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" - - - diff --git a/samples/client/petstore/java/webclient/docs/BigCatAllOf.md b/samples/client/petstore/java/webclient/docs/BigCatAllOf.md deleted file mode 100644 index 2bcace910ec8..000000000000 --- a/samples/client/petstore/java/webclient/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] - - - -## Enum: KindEnum - -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" - - - diff --git a/samples/client/petstore/java/webclient/docs/Capitalization.md b/samples/client/petstore/java/webclient/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/client/petstore/java/webclient/docs/Capitalization.md +++ b/samples/client/petstore/java/webclient/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Cat.md b/samples/client/petstore/java/webclient/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/client/petstore/java/webclient/docs/Cat.md +++ b/samples/client/petstore/java/webclient/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/CatAllOf.md b/samples/client/petstore/java/webclient/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/client/petstore/java/webclient/docs/CatAllOf.md +++ b/samples/client/petstore/java/webclient/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Category.md b/samples/client/petstore/java/webclient/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/client/petstore/java/webclient/docs/Category.md +++ b/samples/client/petstore/java/webclient/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/client/petstore/java/webclient/docs/ClassModel.md b/samples/client/petstore/java/webclient/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/client/petstore/java/webclient/docs/ClassModel.md +++ b/samples/client/petstore/java/webclient/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Client.md b/samples/client/petstore/java/webclient/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/client/petstore/java/webclient/docs/Client.md +++ b/samples/client/petstore/java/webclient/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/DefaultApi.md b/samples/client/petstore/java/webclient/docs/DefaultApi.md index fe4a68a23223..c85b8aa9061c 100644 --- a/samples/client/petstore/java/webclient/docs/DefaultApi.md +++ b/samples/client/petstore/java/webclient/docs/DefaultApi.md @@ -2,9 +2,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | diff --git a/samples/client/petstore/java/webclient/docs/DeprecatedObject.md b/samples/client/petstore/java/webclient/docs/DeprecatedObject.md index d5128bdb84a2..48de1d624425 100644 --- a/samples/client/petstore/java/webclient/docs/DeprecatedObject.md +++ b/samples/client/petstore/java/webclient/docs/DeprecatedObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Dog.md b/samples/client/petstore/java/webclient/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/client/petstore/java/webclient/docs/Dog.md +++ b/samples/client/petstore/java/webclient/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/DogAllOf.md b/samples/client/petstore/java/webclient/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/client/petstore/java/webclient/docs/DogAllOf.md +++ b/samples/client/petstore/java/webclient/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/EnumArrays.md b/samples/client/petstore/java/webclient/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/client/petstore/java/webclient/docs/EnumArrays.md +++ b/samples/client/petstore/java/webclient/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/client/petstore/java/webclient/docs/EnumTest.md b/samples/client/petstore/java/webclient/docs/EnumTest.md index 87f1158ba269..380a2aef0bc3 100644 --- a/samples/client/petstore/java/webclient/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient/docs/EnumTest.md @@ -5,54 +5,54 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] -**outerEnumInteger** | **OuterEnumInteger** | | [optional] -**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] -**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index aa6e8c425ce9..1b6b9507990d 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -2,25 +2,25 @@ 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 -[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication -[**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 | -[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | -[**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | -[**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-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | +| [**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 | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | +| [**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-parameters | | @@ -127,11 +127,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - **query1** | **String**| query parameter | [optional] - **header1** | **String**| header parameter | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -195,9 +195,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -261,9 +261,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -327,9 +327,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -393,9 +393,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -459,9 +459,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | ### Return type @@ -524,9 +524,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **File**| image to upload | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | ### Return type @@ -589,9 +589,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -653,10 +653,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **user** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -720,9 +720,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -804,22 +804,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -844,7 +844,7 @@ null (empty response body) ## testEnumParameters -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -872,10 +872,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -890,16 +891,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -973,14 +975,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -1043,9 +1045,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**Map<String, String>**](String.md)| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1109,10 +1111,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -1181,15 +1183,15 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<String>**](String.md)| | - **ioutil** | [**List<String>**](String.md)| | - **http** | [**List<String>**](String.md)| | - **url** | [**List<String>**](String.md)| | - **context** | [**List<String>**](String.md)| | - **allowEmpty** | **String**| | - **language** | [**Map<String, String>**](String.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | [**List<String>**](String.md)| | | +| **ioutil** | [**List<String>**](String.md)| | | +| **http** | [**List<String>**](String.md)| | | +| **url** | [**List<String>**](String.md)| | | +| **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md index f017675b70d8..e4ff70ed909b 100644 --- a/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/FileSchemaTestClass.md b/samples/client/petstore/java/webclient/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/client/petstore/java/webclient/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/webclient/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Foo.md b/samples/client/petstore/java/webclient/docs/Foo.md index 7893cf3f4474..6b3f0556528a 100644 --- a/samples/client/petstore/java/webclient/docs/Foo.md +++ b/samples/client/petstore/java/webclient/docs/Foo.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/FormatTest.md b/samples/client/petstore/java/webclient/docs/FormatTest.md index 91da637f0880..01b8c777ae06 100644 --- a/samples/client/petstore/java/webclient/docs/FormatTest.md +++ b/samples/client/petstore/java/webclient/docs/FormatTest.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**decimal** | **BigDecimal** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/webclient/docs/HealthCheckResult.md b/samples/client/petstore/java/webclient/docs/HealthCheckResult.md index 80ba4783bbd8..4885e6f1cada 100644 --- a/samples/client/petstore/java/webclient/docs/HealthCheckResult.md +++ b/samples/client/petstore/java/webclient/docs/HealthCheckResult.md @@ -6,9 +6,9 @@ Just a string to inform instance is up and running. Make it nullable in hope to ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/InlineResponseDefault.md b/samples/client/petstore/java/webclient/docs/InlineResponseDefault.md index 1c7c639d48cb..41cadb0373c2 100644 --- a/samples/client/petstore/java/webclient/docs/InlineResponseDefault.md +++ b/samples/client/petstore/java/webclient/docs/InlineResponseDefault.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/MapTest.md b/samples/client/petstore/java/webclient/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/client/petstore/java/webclient/docs/MapTest.md +++ b/samples/client/petstore/java/webclient/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/client/petstore/java/webclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/webclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/client/petstore/java/webclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/webclient/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Model200Response.md b/samples/client/petstore/java/webclient/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/client/petstore/java/webclient/docs/Model200Response.md +++ b/samples/client/petstore/java/webclient/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ModelApiResponse.md b/samples/client/petstore/java/webclient/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/client/petstore/java/webclient/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/webclient/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ModelFile.md b/samples/client/petstore/java/webclient/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/client/petstore/java/webclient/docs/ModelFile.md +++ b/samples/client/petstore/java/webclient/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ModelList.md b/samples/client/petstore/java/webclient/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/client/petstore/java/webclient/docs/ModelList.md +++ b/samples/client/petstore/java/webclient/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ModelReturn.md b/samples/client/petstore/java/webclient/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/client/petstore/java/webclient/docs/ModelReturn.md +++ b/samples/client/petstore/java/webclient/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Name.md b/samples/client/petstore/java/webclient/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/client/petstore/java/webclient/docs/Name.md +++ b/samples/client/petstore/java/webclient/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/client/petstore/java/webclient/docs/NullableClass.md b/samples/client/petstore/java/webclient/docs/NullableClass.md index c8152be3d314..fa98c5c6d984 100644 --- a/samples/client/petstore/java/webclient/docs/NullableClass.md +++ b/samples/client/petstore/java/webclient/docs/NullableClass.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integerProp** | **Integer** | | [optional] -**numberProp** | **BigDecimal** | | [optional] -**booleanProp** | **Boolean** | | [optional] -**stringProp** | **String** | | [optional] -**dateProp** | **LocalDate** | | [optional] -**datetimeProp** | **OffsetDateTime** | | [optional] -**arrayNullableProp** | **List<Object>** | | [optional] -**arrayAndItemsNullableProp** | **List<Object>** | | [optional] -**arrayItemsNullable** | **List<Object>** | | [optional] -**objectNullableProp** | **Map<String, Object>** | | [optional] -**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] -**objectItemsNullable** | **Map<String, Object>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/NumberOnly.md b/samples/client/petstore/java/webclient/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/client/petstore/java/webclient/docs/NumberOnly.md +++ b/samples/client/petstore/java/webclient/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/webclient/docs/ObjectWithDeprecatedFields.md index be55a96c3b7c..f1cf571f4c09 100644 --- a/samples/client/petstore/java/webclient/docs/ObjectWithDeprecatedFields.md +++ b/samples/client/petstore/java/webclient/docs/ObjectWithDeprecatedFields.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**id** | **BigDecimal** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] -**bars** | **List<String>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/Order.md b/samples/client/petstore/java/webclient/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/client/petstore/java/webclient/docs/Order.md +++ b/samples/client/petstore/java/webclient/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/client/petstore/java/webclient/docs/OuterComposite.md b/samples/client/petstore/java/webclient/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/client/petstore/java/webclient/docs/OuterComposite.md +++ b/samples/client/petstore/java/webclient/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/webclient/docs/OuterObjectWithEnumProperty.md index 086d26a7e904..0fafaaa27154 100644 --- a/samples/client/petstore/java/webclient/docs/OuterObjectWithEnumProperty.md +++ b/samples/client/petstore/java/webclient/docs/OuterObjectWithEnumProperty.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **OuterEnumInteger** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | diff --git a/samples/client/petstore/java/webclient/docs/Pet.md b/samples/client/petstore/java/webclient/docs/Pet.md index e9116d637187..54af77a9f5a7 100644 --- a/samples/client/petstore/java/webclient/docs/Pet.md +++ b/samples/client/petstore/java/webclient/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **Set<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **Set<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/client/petstore/java/webclient/docs/PetApi.md b/samples/client/petstore/java/webclient/docs/PetApi.md index e8ea9f843bd9..e2515d9bb9bb 100644 --- a/samples/client/petstore/java/webclient/docs/PetApi.md +++ b/samples/client/petstore/java/webclient/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -62,9 +62,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -134,10 +134,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -207,9 +207,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -279,9 +279,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**Set<String>**](String.md)| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**Set<String>**](String.md)| Tags to filter by | | ### Return type @@ -353,9 +353,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -425,9 +425,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -500,11 +500,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -576,11 +576,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -651,11 +651,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md b/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/SingleRefType.md b/samples/client/petstore/java/webclient/docs/SingleRefType.md new file mode 100644 index 000000000000..cc269bb871fd --- /dev/null +++ b/samples/client/petstore/java/webclient/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/webclient/docs/SpecialModelName.md b/samples/client/petstore/java/webclient/docs/SpecialModelName.md index 2692c1caafe1..4b6a06e36224 100644 --- a/samples/client/petstore/java/webclient/docs/SpecialModelName.md +++ b/samples/client/petstore/java/webclient/docs/SpecialModelName.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/StoreApi.md b/samples/client/petstore/java/webclient/docs/StoreApi.md index b00ac45b00b2..e3b7d7b910cc 100644 --- a/samples/client/petstore/java/webclient/docs/StoreApi.md +++ b/samples/client/petstore/java/webclient/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -256,9 +256,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/StringBooleanMap.md b/samples/client/petstore/java/webclient/docs/StringBooleanMap.md deleted file mode 100644 index cac7afc80e07..000000000000 --- a/samples/client/petstore/java/webclient/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ - -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - - diff --git a/samples/client/petstore/java/webclient/docs/Tag.md b/samples/client/petstore/java/webclient/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/client/petstore/java/webclient/docs/Tag.md +++ b/samples/client/petstore/java/webclient/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/TypeHolderDefault.md b/samples/client/petstore/java/webclient/docs/TypeHolderDefault.md deleted file mode 100644 index 8340befcae5c..000000000000 --- a/samples/client/petstore/java/webclient/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# TypeHolderDefault - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | - - - diff --git a/samples/client/petstore/java/webclient/docs/TypeHolderExample.md b/samples/client/petstore/java/webclient/docs/TypeHolderExample.md deleted file mode 100644 index 2396fdf17653..000000000000 --- a/samples/client/petstore/java/webclient/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# TypeHolderExample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **BigDecimal** | | -**floatItem** | **Float** | | -**integerItem** | **Integer** | | -**boolItem** | **Boolean** | | -**arrayItem** | **List<Integer>** | | - - - diff --git a/samples/client/petstore/java/webclient/docs/User.md b/samples/client/petstore/java/webclient/docs/User.md index 05ec5fb40b8f..08813e4b10b4 100644 --- a/samples/client/petstore/java/webclient/docs/User.md +++ b/samples/client/petstore/java/webclient/docs/User.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/webclient/docs/UserApi.md b/samples/client/petstore/java/webclient/docs/UserApi.md index f0660e264409..305fd6e66dfb 100644 --- a/samples/client/petstore/java/webclient/docs/UserApi.md +++ b/samples/client/petstore/java/webclient/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -121,9 +121,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -186,9 +186,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -251,9 +251,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -318,9 +318,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -387,10 +387,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -516,10 +516,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/XmlItem.md b/samples/client/petstore/java/webclient/docs/XmlItem.md deleted file mode 100644 index 8c184da283df..000000000000 --- a/samples/client/petstore/java/webclient/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# XmlItem - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **BigDecimal** | | [optional] -**attributeInteger** | **Integer** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **List<Integer>** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **BigDecimal** | | [optional] -**nameInteger** | **Integer** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **List<Integer>** | | [optional] -**nameWrappedArray** | **List<Integer>** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **BigDecimal** | | [optional] -**prefixInteger** | **Integer** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **List<Integer>** | | [optional] -**prefixWrappedArray** | **List<Integer>** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **BigDecimal** | | [optional] -**namespaceInteger** | **Integer** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **List<Integer>** | | [optional] -**namespaceWrappedArray** | **List<Integer>** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **BigDecimal** | | [optional] -**prefixNsInteger** | **Integer** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **List<Integer>** | | [optional] -**prefixNsWrappedArray** | **List<Integer>** | | [optional] - - - diff --git a/samples/client/petstore/java/webclient/gradlew b/samples/client/petstore/java/webclient/gradlew old mode 100755 new mode 100644 diff --git a/samples/client/petstore/java/webclient/pom.xml b/samples/client/petstore/java/webclient/pom.xml index 4b93ca630697..a57fd0d99120 100644 --- a/samples/client/petstore/java/webclient/pom.xml +++ b/samples/client/petstore/java/webclient/pom.xml @@ -82,7 +82,7 @@ org.springframework.boot spring-boot-starter-webflux - ${spring-web-version} + ${spring-boot-version} @@ -126,7 +126,7 @@ UTF-8 1.6.3 - 2.4.3 + 2.6.6 2.11.3 2.11.4 0.2.2 diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java index fdaa53623ef4..cae69eb04512 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -4,6 +4,7 @@ import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; import org.openapitools.client.model.HealthCheckResult; @@ -756,11 +757,12 @@ public Mono> testEndpointParametersWithHttpInfo(BigDecimal * @param enumQueryString Query parameter enum test (string) * @param enumQueryInteger Query parameter enum test (double) * @param enumQueryDouble Query parameter enum test (double) + * @param enumQueryModelArray The enumQueryModelArray parameter * @param enumFormStringArray Form parameter enum test (string array) * @param enumFormString Form parameter enum test (string) * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ - private ResponseSpec testEnumParametersRequestCreation(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws WebClientResponseException { + private ResponseSpec testEnumParametersRequestCreation(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws WebClientResponseException { Object postBody = null; // create path and map variables final Map pathParams = new HashMap(); @@ -774,6 +776,7 @@ private ResponseSpec testEnumParametersRequestCreation(List enumHeaderSt queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_integer", enumQueryInteger)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_double", enumQueryDouble)); + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "enum_query_model_array", enumQueryModelArray)); if (enumHeaderStringArray != null) headerParams.add("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); @@ -808,18 +811,19 @@ private ResponseSpec testEnumParametersRequestCreation(List enumHeaderSt * @param enumQueryString Query parameter enum test (string) * @param enumQueryInteger Query parameter enum test (double) * @param enumQueryDouble Query parameter enum test (double) + * @param enumQueryModelArray The enumQueryModelArray parameter * @param enumFormStringArray Form parameter enum test (string array) * @param enumFormString Form parameter enum test (string) * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ - public Mono testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws WebClientResponseException { + public Mono testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return testEnumParametersRequestCreation(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString).bodyToMono(localVarReturnType); + return testEnumParametersRequestCreation(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString).bodyToMono(localVarReturnType); } - public Mono> testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws WebClientResponseException { + public Mono> testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return testEnumParametersRequestCreation(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString).toEntity(localVarReturnType); + return testEnumParametersRequestCreation(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString).toEntity(localVarReturnType); } /** * Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java index d79756967b00..2d690b40b8b0 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java @@ -204,14 +204,14 @@ private ResponseSpec findPetsByStatusRequestCreation(List status) throws * @return List<Pet> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ - public Flux findPetsByStatus(List status) throws WebClientResponseException { + public List findPetsByStatus(List status) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return findPetsByStatusRequestCreation(status).bodyToFlux(localVarReturnType); + return findPetsByStatusRequestCreation(status).bodyToFlux(localVarReturnType).collectList().block(); } - public Mono>> findPetsByStatusWithHttpInfo(List status) throws WebClientResponseException { + public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return findPetsByStatusRequestCreation(status).toEntityList(localVarReturnType); + return findPetsByStatusRequestCreation(status).toEntityList(localVarReturnType).block(); } /** * Finds Pets by tags @@ -262,14 +262,14 @@ private ResponseSpec findPetsByTagsRequestCreation(Set tags) throws WebC * @return Set<Pet> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ - public Flux findPetsByTags(Set tags) throws WebClientResponseException { + public Set findPetsByTags(Set tags) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return findPetsByTagsRequestCreation(tags).bodyToFlux(localVarReturnType); + return findPetsByTagsRequestCreation(tags).bodyToFlux(localVarReturnType).collect(Collectors.toSet()).block(); } - public Mono>> findPetsByTagsWithHttpInfo(Set tags) throws WebClientResponseException { + public ResponseEntity> findPetsByTagsWithHttpInfo(Set tags) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return findPetsByTagsRequestCreation(tags).toEntityList(localVarReturnType); + return findPetsByTagsRequestCreation(tags).toEntityList(localVarReturnType).block(); } /** * Find pet by ID @@ -320,14 +320,14 @@ private ResponseSpec getPetByIdRequestCreation(Long petId) throws WebClientRespo * @return Pet * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ - public Mono getPetById(Long petId) throws WebClientResponseException { + public Pet getPetById(Long petId) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return getPetByIdRequestCreation(petId).bodyToMono(localVarReturnType); + return getPetByIdRequestCreation(petId).bodyToMono(localVarReturnType).block(); } - public Mono> getPetByIdWithHttpInfo(Long petId) throws WebClientResponseException { + public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return getPetByIdRequestCreation(petId).toEntity(localVarReturnType); + return getPetByIdRequestCreation(petId).toEntity(localVarReturnType).block(); } /** * Update an existing pet @@ -376,14 +376,14 @@ private ResponseSpec updatePetRequestCreation(Pet pet) throws WebClientResponseE * @param pet Pet object that needs to be added to the store * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ - public Mono updatePet(Pet pet) throws WebClientResponseException { + public void updatePet(Pet pet) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return updatePetRequestCreation(pet).bodyToMono(localVarReturnType); + updatePetRequestCreation(pet).bodyToMono(localVarReturnType).block(); } - public Mono> updatePetWithHttpInfo(Pet pet) throws WebClientResponseException { + public ResponseEntity updatePetWithHttpInfo(Pet pet) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; - return updatePetRequestCreation(pet).toEntity(localVarReturnType); + return updatePetRequestCreation(pet).toEntity(localVarReturnType).block(); } /** * Updates a pet in the store with form data diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index 12d050d984fd..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesAnyType - */ -@JsonPropertyOrder({ - AdditionalPropertiesAnyType.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesAnyType") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesAnyType extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesAnyType name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java deleted file mode 100644 index e49704ab9787..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesArray - */ -@JsonPropertyOrder({ - AdditionalPropertiesArray.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesArray") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesArray extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesArray name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index 68a308a96f22..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesBoolean - */ -@JsonPropertyOrder({ - AdditionalPropertiesBoolean.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesBoolean") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesBoolean extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesBoolean name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java deleted file mode 100644 index e1ac25182808..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesInteger - */ -@JsonPropertyOrder({ - AdditionalPropertiesInteger.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesInteger") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesInteger extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesInteger name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java deleted file mode 100644 index a12b774105ff..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesNumber - */ -@JsonPropertyOrder({ - AdditionalPropertiesNumber.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesNumber") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesNumber extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesNumber name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java deleted file mode 100644 index 8091ce0d5122..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesObject - */ -@JsonPropertyOrder({ - AdditionalPropertiesObject.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesObject") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesObject extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesObject name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java deleted file mode 100644 index 0b6866c4fd92..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesString - */ -@JsonPropertyOrder({ - AdditionalPropertiesString.JSON_PROPERTY_NAME -}) -@JsonTypeName("AdditionalPropertiesString") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesString extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesString name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 000000000000..6bde2cae3098 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,164 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.SingleRefType; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private JsonNullable singleRefType = JsonNullable.undefined(); + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + this.singleRefType = JsonNullable.of(singleRefType); + + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public SingleRefType getSingleRefType() { + return singleRefType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSingleRefType_JsonNullable() { + return singleRefType; + } + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + public void setSingleRefType_JsonNullable(JsonNullable singleRefType) { + this.singleRefType = singleRefType; + } + + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = JsonNullable.of(singleRefType); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + equalsNullable(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, hashCodeNullable(singleRefType)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java index 845e30d5a772..6f1a5d6fd804 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -37,7 +38,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/BigCat.java deleted file mode 100644 index 91ebb2a767ab..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/BigCat.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCat - */ -@JsonPropertyOrder({ - BigCat.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) - -public class BigCat extends Cat { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCat kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 58588f53dcdf..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java index 9f6822877f8f..626ba24bdb0f 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java index 806f7a66fe90..b3dbcc82a346 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,7 +37,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 000000000000..f99224547559 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java deleted file mode 100644 index 8d33275e4c1f..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TypeHolderDefault - */ -@JsonPropertyOrder({ - TypeHolderDefault.JSON_PROPERTY_STRING_ITEM, - TypeHolderDefault.JSON_PROPERTY_NUMBER_ITEM, - TypeHolderDefault.JSON_PROPERTY_INTEGER_ITEM, - TypeHolderDefault.JSON_PROPERTY_BOOL_ITEM, - TypeHolderDefault.JSON_PROPERTY_ARRAY_ITEM -}) -@JsonTypeName("TypeHolderDefault") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TypeHolderDefault { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem = "what"; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem = true; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList<>(); - - - public TypeHolderDefault stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getStringItem() { - return stringItem; - } - - - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderDefault numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumberItem() { - return numberItem; - } - - - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderDefault integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getIntegerItem() { - return integerItem; - } - - - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderDefault boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getBoolItem() { - return boolItem; - } - - - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderDefault arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public List getArrayItem() { - return arrayItem; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java deleted file mode 100644 index 035f6970f5aa..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TypeHolderExample - */ -@JsonPropertyOrder({ - TypeHolderExample.JSON_PROPERTY_STRING_ITEM, - TypeHolderExample.JSON_PROPERTY_NUMBER_ITEM, - TypeHolderExample.JSON_PROPERTY_FLOAT_ITEM, - TypeHolderExample.JSON_PROPERTY_INTEGER_ITEM, - TypeHolderExample.JSON_PROPERTY_BOOL_ITEM, - TypeHolderExample.JSON_PROPERTY_ARRAY_ITEM -}) -@JsonTypeName("TypeHolderExample") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TypeHolderExample { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; - private Float floatItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList<>(); - - - public TypeHolderExample stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "what", required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getStringItem() { - return stringItem; - } - - - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderExample numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumberItem() { - return numberItem; - } - - - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderExample floatItem(Float floatItem) { - - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Float getFloatItem() { - return floatItem; - } - - - @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - - public TypeHolderExample integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "-2", required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getIntegerItem() { - return integerItem; - } - - - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderExample boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "true", required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getBoolItem() { - return boolItem; - } - - - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderExample arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public List getArrayItem() { - return arrayItem; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java deleted file mode 100644 index 1090a5110a2f..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java +++ /dev/null @@ -1,1104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * XmlItem - */ -@JsonPropertyOrder({ - XmlItem.JSON_PROPERTY_ATTRIBUTE_STRING, - XmlItem.JSON_PROPERTY_ATTRIBUTE_NUMBER, - XmlItem.JSON_PROPERTY_ATTRIBUTE_INTEGER, - XmlItem.JSON_PROPERTY_ATTRIBUTE_BOOLEAN, - XmlItem.JSON_PROPERTY_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_NAME_STRING, - XmlItem.JSON_PROPERTY_NAME_NUMBER, - XmlItem.JSON_PROPERTY_NAME_INTEGER, - XmlItem.JSON_PROPERTY_NAME_BOOLEAN, - XmlItem.JSON_PROPERTY_NAME_ARRAY, - XmlItem.JSON_PROPERTY_NAME_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_STRING, - XmlItem.JSON_PROPERTY_PREFIX_NUMBER, - XmlItem.JSON_PROPERTY_PREFIX_INTEGER, - XmlItem.JSON_PROPERTY_PREFIX_BOOLEAN, - XmlItem.JSON_PROPERTY_PREFIX_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_NAMESPACE_STRING, - XmlItem.JSON_PROPERTY_NAMESPACE_NUMBER, - XmlItem.JSON_PROPERTY_NAMESPACE_INTEGER, - XmlItem.JSON_PROPERTY_NAMESPACE_BOOLEAN, - XmlItem.JSON_PROPERTY_NAMESPACE_ARRAY, - XmlItem.JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_NS_STRING, - XmlItem.JSON_PROPERTY_PREFIX_NS_NUMBER, - XmlItem.JSON_PROPERTY_PREFIX_NS_INTEGER, - XmlItem.JSON_PROPERTY_PREFIX_NS_BOOLEAN, - XmlItem.JSON_PROPERTY_PREFIX_NS_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY -}) -@JsonTypeName("XmlItem") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class XmlItem { - public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; - private String attributeString; - - public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; - private BigDecimal attributeNumber; - - public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; - private Integer attributeInteger; - - public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; - private Boolean attributeBoolean; - - public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; - private List wrappedArray = null; - - public static final String JSON_PROPERTY_NAME_STRING = "name_string"; - private String nameString; - - public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; - private BigDecimal nameNumber; - - public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; - private Integer nameInteger; - - public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; - private Boolean nameBoolean; - - 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"; - private List nameWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; - private String prefixString; - - public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; - private BigDecimal prefixNumber; - - public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; - private Integer prefixInteger; - - public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; - private Boolean prefixBoolean; - - 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"; - private List prefixWrappedArray = null; - - public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; - private String namespaceString; - - public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; - private BigDecimal namespaceNumber; - - public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; - private Integer namespaceInteger; - - public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; - private Boolean namespaceBoolean; - - 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"; - private List namespaceWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; - private String prefixNsString; - - public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; - private BigDecimal prefixNsNumber; - - public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; - private Integer prefixNsInteger; - - public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; - private Boolean prefixNsBoolean; - - 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"; - private List prefixNsWrappedArray = null; - - - public XmlItem attributeString(String attributeString) { - - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAttributeString() { - return attributeString; - } - - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - - public XmlItem attributeNumber(BigDecimal attributeNumber) { - - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - - public XmlItem attributeInteger(Integer attributeInteger) { - - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAttributeInteger() { - return attributeInteger; - } - - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - - public XmlItem attributeBoolean(Boolean attributeBoolean) { - - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - - public XmlItem wrappedArray(List wrappedArray) { - - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList<>(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getWrappedArray() { - return wrappedArray; - } - - - @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - - public XmlItem nameString(String nameString) { - - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAME_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getNameString() { - return nameString; - } - - - @JsonProperty(JSON_PROPERTY_NAME_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameString(String nameString) { - this.nameString = nameString; - } - - - public XmlItem nameNumber(BigDecimal nameNumber) { - - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAME_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getNameNumber() { - return nameNumber; - } - - - @JsonProperty(JSON_PROPERTY_NAME_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - - public XmlItem nameInteger(Integer nameInteger) { - - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAME_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNameInteger() { - return nameInteger; - } - - - @JsonProperty(JSON_PROPERTY_NAME_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - - public XmlItem nameBoolean(Boolean nameBoolean) { - - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getNameBoolean() { - return nameBoolean; - } - - - @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - - public XmlItem nameArray(List nameArray) { - - this.nameArray = nameArray; - return this; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList<>(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNameArray() { - return nameArray; - } - - - @JsonProperty(JSON_PROPERTY_NAME_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - - public XmlItem nameWrappedArray(List nameWrappedArray) { - - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList<>(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNameWrappedArray() { - return nameWrappedArray; - } - - - @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - - public XmlItem prefixString(String prefixString) { - - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPrefixString() { - return prefixString; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - - public XmlItem prefixNumber(BigDecimal prefixNumber) { - - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - - public XmlItem prefixInteger(Integer prefixInteger) { - - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPrefixInteger() { - return prefixInteger; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - - public XmlItem prefixBoolean(Boolean prefixBoolean) { - - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - - public XmlItem prefixArray(List prefixArray) { - - this.prefixArray = prefixArray; - return this; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList<>(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixArray() { - return prefixArray; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList<>(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - - public XmlItem namespaceString(String namespaceString) { - - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getNamespaceString() { - return namespaceString; - } - - - @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - - @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - - public XmlItem namespaceInteger(Integer namespaceInteger) { - - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - - @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - - @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - - public XmlItem namespaceArray(List namespaceArray) { - - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList<>(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNamespaceArray() { - return namespaceArray; - } - - - @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList<>(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - - @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - - public XmlItem prefixNsString(String prefixNsString) { - - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPrefixNsString() { - return prefixNsString; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - - public XmlItem prefixNsArray(List prefixNsArray) { - - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList<>(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixNsArray() { - return prefixNsArray; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList<>(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index e0487304635e..963f3a25c7c6 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * API tests for AnotherFakeApi diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeApiTest.java index aeb8379aee71..c67c0b507a2a 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,9 +17,13 @@ import org.openapitools.client.model.Client; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; +import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; @@ -28,6 +32,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * API tests for FakeApi @@ -38,6 +43,33 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * Health check endpoint + * + * + */ + @Test + public void fakeHealthGetTest() { + HealthCheckResult response = api.fakeHealthGet().block(); + + // TODO: test validations + } + + /** + * test http signature authentication + * + * + */ + @Test + public void fakeHttpSignatureTestTest() { + Pet pet = null; + String query1 = null; + String header1 = null; + api.fakeHttpSignatureTest(pet, query1, header1).block(); + + // TODO: test validations + } + /** * * @@ -93,7 +125,33 @@ public void fakeOuterStringSerializeTest() { /** * * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() { + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty).block(); + + // TODO: test validations + } + + /** + * + * + * For this test, the body has to be a binary file. + */ + @Test + public void testBodyWithBinaryTest() { + File body = null; + api.testBodyWithBinary(body).block(); + + // TODO: test validations + } + + /** + * + * + * For this test, the body for this request must reference a schema named `File`. */ @Test public void testBodyWithFileSchemaTest() { @@ -166,12 +224,13 @@ public void testEnumParametersTest() { List enumHeaderStringArray = null; String enumHeaderString = null; List enumQueryStringArray = null; + List enumQueryModelArray = null; String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString).block(); + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString).block(); // TODO: test validations } @@ -221,4 +280,23 @@ public void testJsonFormDataTest() { // TODO: test validations } + /** + * + * + * To test the collection format in query parameters + */ + @Test + public void testQueryParameterCollectionFormatTest() { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + String allowEmpty = null; + Map language = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language).block(); + + // TODO: test validations + } + } diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index ffa015e8f5fb..6ce8be5ccbad 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * API tests for FakeClassnameTags123Api diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/PetApiTest.java index e33c0bb9796a..b4f8d9ec9621 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,6 +16,7 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.junit.Test; import org.junit.Ignore; @@ -23,7 +24,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; +import java.util.stream.Collectors; /** * API tests for PetApi @@ -69,7 +70,7 @@ public void deletePetTest() { @Test public void findPetsByStatusTest() { List status = null; - List response = api.findPetsByStatus(status).collectList().block(); + List response = api.findPetsByStatus(status); // TODO: test validations } @@ -82,7 +83,7 @@ public void findPetsByStatusTest() { @Test public void findPetsByTagsTest() { Set tags = null; - List response = api.findPetsByTags(tags).collectList().block(); + Set response = api.findPetsByTags(tags); // TODO: test validations } @@ -95,7 +96,7 @@ public void findPetsByTagsTest() { @Test public void getPetByIdTest() { Long petId = null; - Pet response = api.getPetById(petId).block(); + Pet response = api.getPetById(petId); // TODO: test validations } @@ -108,7 +109,7 @@ public void getPetByIdTest() { @Test public void updatePetTest() { Pet pet = null; - api.updatePet(pet).block(); + api.updatePet(pet); // TODO: test validations } @@ -137,8 +138,8 @@ public void updatePetWithFormTest() { public void uploadFileTest() { Long petId = null; String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file).block(); + File _file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file).block(); // TODO: test validations } diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java index 09fb1c5a1b2a..bb3455afaa50 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * API tests for StoreApi diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/UserApiTest.java index 146f6b08bce5..7a3561a9b35d 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; @@ -21,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * API tests for UserApi diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 2b0bd0bbaefe..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index c6dd88eea82c..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index 9d474c0dd801..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index c6bcc988bf94..d7f3ce7261db 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index bf1b1c427b64..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java deleted file mode 100644 index b9cb6470e38d..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesNumber - */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - - /** - * Model tests for AdditionalPropertiesNumber - */ - @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java deleted file mode 100644 index 3cbcb8ec3b0f..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesObject - */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - - /** - * Model tests for AdditionalPropertiesObject - */ - @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java deleted file mode 100644 index 1d3c05075eaa..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesString - */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - - /** - * Model tests for AdditionalPropertiesString - */ - @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 000000000000..923680efecf0 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -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: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.SingleRefType; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AnimalTest.java index beb02882b30e..ccbffdf2b2d5 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,13 +13,17 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Cat; +import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index ae7970522b15..928e2973997f 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 6151b7068b75..0c02796dc797 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 4bb62b6569ae..bc5ac744672d 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index a9b13011f001..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 006c80707427..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CapitalizationTest.java index eae9be7938c9..ffa72405fa86 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 69b226745d79..7884c04c72eb 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatTest.java index dcb9f2d4cae6..163c3eae43de 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,17 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CategoryTest.java index 1df27cf03202..7f149cec8544 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClassModelTest.java index 04eb02f835e2..afac01e835cb 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClientTest.java index 03b6bb41a529..cf90750a9114 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 1b83dcefc4f5..0ac24507de6b 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogTest.java index 06ac28f804ad..2903f6657e0f 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,17 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 11b5f01985fe..3130e2a5a057 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumClassTest.java index cb51ca50c958..9e45543facd2 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumTestTest.java index 13122a0cb978..7951ac306b07 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,21 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -78,4 +87,28 @@ public void outerEnumTest() { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a6b0d8ff7b05..5bca7e5605f3 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,13 +13,16 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -40,11 +43,11 @@ public void testFileSchemaTestClass() { } /** - * Test the property 'file' + * Test the property '_file' */ @Test - public void fileTest() { - // TODO: test file + public void _fileTest() { + // TODO: test _file } /** diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FormatTestTest.java index 9cbc69fd1dca..44668cc353d0 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -90,6 +92,14 @@ public void _doubleTest() { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -146,4 +156,20 @@ public void passwordTest() { // TODO: test password } + /** + * Test the property 'patternWithDigits' + */ + @Test + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter + } + } diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index 2c4b2470b983..e28f7d7441bd 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java index 02bac644397c..24ff22b89ea3 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MapTestTest.java index 0f08d8c88f07..8d1b64dfce77 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 504be4cd00ba..e90ad8889a5f 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 1ad55ca32ea6..20dee01ae5da 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 73d28676aeae..5dfb76f406a7 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b073fda00140..a1517b158a59 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NameTest.java index e81ebc38e652..d54b90ad166e 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NullableClassTest.java index fe9c2841bb92..a11a1fd205a1 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NullableClassTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 565c8bd0627e..4238632f54b8 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OrderTest.java index d65ce716e13e..007f1aaea8a1 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 49b656a93faf..527a5df91af9 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 61154c6d8818..cf0ebae0faf0 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/PetTest.java index bf6908e4a455..12c8e969f69a 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,13 +13,18 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import org.junit.Assert; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index e48b31a39fda..5d460c3c6979 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 000000000000..155e2a89b0b0 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 1696eee82dad..da6a64c20f6b 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TagTest.java index b37aca5fdfc8..51852d800581 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java deleted file mode 100644 index 409076e80a3a..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderDefault - */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); - - /** - * Model tests for TypeHolderDefault - */ - @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index ffd8f3ddc33e..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/UserTest.java index 76733c9e72f2..335a8f560bbf 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 55e75391e00e..000000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNamespaceString' - */ - @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString - } - - /** - * Test the property 'prefixNamespaceNumber' - */ - @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber - } - - /** - * Test the property 'prefixNamespaceInteger' - */ - @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger - } - - /** - * Test the property 'prefixNamespaceBoolean' - */ - @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean - } - - /** - * Test the property 'prefixNamespaceArray' - */ - @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray - } - - /** - * Test the property 'prefixNamespaceWrappedArray' - */ - @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray - } - -} diff --git a/samples/client/petstore/javascript-es6/docs/FakeApi.md b/samples/client/petstore/javascript-es6/docs/FakeApi.md index f26857107f47..5b76c0a7f503 100644 --- a/samples/client/petstore/javascript-es6/docs/FakeApi.md +++ b/samples/client/petstore/javascript-es6/docs/FakeApi.md @@ -625,6 +625,7 @@ let opts = { 'enumQueryString': "'-efg'", // String | Query parameter enum test (string) 'enumQueryInteger': 56, // Number | Query parameter enum test (double) 'enumQueryDouble': 3.4, // Number | Query parameter enum test (double) + 'enumQueryModelArray': [new OpenApiPetstore.EnumClass()], // [EnumClass] | 'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array) 'enumFormString': "'-efg'" // String | Form parameter enum test (string) }; @@ -648,6 +649,7 @@ Name | Type | Description | Notes **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] **enumQueryInteger** | **Number**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **Number**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**[EnumClass]**](EnumClass.md)| | [optional] **enumFormStringArray** | [**[String]**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/client/petstore/javascript-es6/docs/SingleRefType.md b/samples/client/petstore/javascript-es6/docs/SingleRefType.md new file mode 100644 index 000000000000..6a7ac770c274 --- /dev/null +++ b/samples/client/petstore/javascript-es6/docs/SingleRefType.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.SingleRefType + +## Enum + + +* `admin` (value: `"admin"`) + +* `user` (value: `"user"`) + + diff --git a/samples/client/petstore/javascript-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-es6/src/api/FakeApi.js index 734e1e3a3db3..d19a521f8a4a 100644 --- a/samples/client/petstore/javascript-es6/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-es6/src/api/FakeApi.js @@ -14,6 +14,7 @@ import ApiClient from "../ApiClient"; import Client from '../model/Client'; +import EnumClass from '../model/EnumClass'; import FileSchemaTestClass from '../model/FileSchemaTestClass'; import HealthCheckResult from '../model/HealthCheckResult'; import OuterComposite from '../model/OuterComposite'; @@ -586,6 +587,7 @@ export default class FakeApi { * @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to '-efg') * @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double) * @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double) + * @param {Array.} opts.enumQueryModelArray * @param {Array.} opts.enumFormStringArray Form parameter enum test (string array) (default to '$') * @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to '-efg') * @param {module:api/FakeApi~testEnumParametersCallback} callback The callback function, accepting three arguments: error, data, response @@ -600,7 +602,8 @@ export default class FakeApi { 'enum_query_string_array': this.apiClient.buildCollectionParam(opts['enumQueryStringArray'], 'multi'), 'enum_query_string': opts['enumQueryString'], 'enum_query_integer': opts['enumQueryInteger'], - 'enum_query_double': opts['enumQueryDouble'] + 'enum_query_double': opts['enumQueryDouble'], + 'enum_query_model_array': this.apiClient.buildCollectionParam(opts['enumQueryModelArray'], 'multi') }; let headerParams = { 'enum_header_string_array': opts['enumHeaderStringArray'], diff --git a/samples/client/petstore/javascript-es6/src/model/SingleRefType.js b/samples/client/petstore/javascript-es6/src/model/SingleRefType.js new file mode 100644 index 000000000000..999a69e288b7 --- /dev/null +++ b/samples/client/petstore/javascript-es6/src/model/SingleRefType.js @@ -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: \" \\ + * + * 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. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class SingleRefType. +* @enum {} +* @readonly +*/ +export default class SingleRefType { + + /** + * value: "admin" + * @const + */ + "admin" = "admin"; + + + /** + * value: "user" + * @const + */ + "user" = "user"; + + + + /** + * Returns a SingleRefType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/SingleRefType} The enum SingleRefType value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js b/samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js new file mode 100644 index 000000000000..c0bbb3c018a1 --- /dev/null +++ b/samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('SingleRefType', function() { + it('should create an instance of SingleRefType', function() { + // uncomment below and update the code to test SingleRefType + //var instance = new OpenApiPetstore.SingleRefType(); + //expect(instance).to.be.a(OpenApiPetstore.SingleRefType); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md index 4a0c5f1ca08d..e59d487ccfc2 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md @@ -613,6 +613,7 @@ let opts = { 'enumQueryString': "'-efg'", // String | Query parameter enum test (string) 'enumQueryInteger': 56, // Number | Query parameter enum test (double) 'enumQueryDouble': 3.4, // Number | Query parameter enum test (double) + 'enumQueryModelArray': [new OpenApiPetstore.EnumClass()], // [EnumClass] | 'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array) 'enumFormString': "'-efg'" // String | Form parameter enum test (string) }; @@ -635,6 +636,7 @@ Name | Type | Description | Notes **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] **enumQueryInteger** | **Number**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **Number**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**[EnumClass]**](EnumClass.md)| | [optional] **enumFormStringArray** | [**[String]**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md b/samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md new file mode 100644 index 000000000000..6a7ac770c274 --- /dev/null +++ b/samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.SingleRefType + +## Enum + + +* `admin` (value: `"admin"`) + +* `user` (value: `"user"`) + + diff --git a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js index 96a4ac2648ce..3fb9c81307d3 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js @@ -14,6 +14,7 @@ import ApiClient from "../ApiClient"; import Client from '../model/Client'; +import EnumClass from '../model/EnumClass'; import FileSchemaTestClass from '../model/FileSchemaTestClass'; import HealthCheckResult from '../model/HealthCheckResult'; import OuterComposite from '../model/OuterComposite'; @@ -654,6 +655,7 @@ export default class FakeApi { * @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to '-efg') * @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double) * @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double) + * @param {Array.} opts.enumQueryModelArray * @param {Array.} opts.enumFormStringArray Form parameter enum test (string array) (default to '$') * @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to '-efg') * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response @@ -668,7 +670,8 @@ export default class FakeApi { 'enum_query_string_array': this.apiClient.buildCollectionParam(opts['enumQueryStringArray'], 'multi'), 'enum_query_string': opts['enumQueryString'], 'enum_query_integer': opts['enumQueryInteger'], - 'enum_query_double': opts['enumQueryDouble'] + 'enum_query_double': opts['enumQueryDouble'], + 'enum_query_model_array': this.apiClient.buildCollectionParam(opts['enumQueryModelArray'], 'multi') }; let headerParams = { 'enum_header_string_array': opts['enumHeaderStringArray'], @@ -700,6 +703,7 @@ export default class FakeApi { * @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to '-efg') * @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double) * @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double) + * @param {Array.} opts.enumQueryModelArray * @param {Array.} opts.enumFormStringArray Form parameter enum test (string array) (default to '$') * @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to '-efg') * @return {Promise} a {@link https://www.promisejs.org/|Promise} diff --git a/samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js b/samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js new file mode 100644 index 000000000000..999a69e288b7 --- /dev/null +++ b/samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js @@ -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: \" \\ + * + * 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. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class SingleRefType. +* @enum {} +* @readonly +*/ +export default class SingleRefType { + + /** + * value: "admin" + * @const + */ + "admin" = "admin"; + + + /** + * value: "user" + * @const + */ + "user" = "user"; + + + + /** + * Returns a SingleRefType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/SingleRefType} The enum SingleRefType value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js new file mode 100644 index 000000000000..c0bbb3c018a1 --- /dev/null +++ b/samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('SingleRefType', function() { + it('should create an instance of SingleRefType', function() { + // uncomment below and update the code to test SingleRefType + //var instance = new OpenApiPetstore.SingleRefType(); + //expect(instance).to.be.a(OpenApiPetstore.SingleRefType); + }); + + }); + +})); diff --git a/samples/client/petstore/k6/script.js b/samples/client/petstore/k6/script.js index 4febaa387d45..e0d097d68b25 100644 --- a/samples/client/petstore/k6/script.js +++ b/samples/client/petstore/k6/script.js @@ -32,10 +32,11 @@ export default function() { let enumQueryString = 'TODO_EDIT_THE_ENUM_QUERY_STRING'; // specify value as there is no example value for this parameter in OpenAPI spec let enumQueryStringArray = 'TODO_EDIT_THE_ENUM_QUERY_STRING_ARRAY'; // specify value as there is no example value for this parameter in OpenAPI spec let enumQueryDouble = 'TODO_EDIT_THE_ENUM_QUERY_DOUBLE'; // specify value as there is no example value for this parameter in OpenAPI spec + let enumQueryModelArray = 'TODO_EDIT_THE_ENUM_QUERY_MODEL_ARRAY'; // specify value as there is no example value for this parameter in OpenAPI spec // Request No. 1 { - let url = BASE_URL + `/fake?enum_query_string_array=${enum_query_string_array}&enum_query_string=${enum_query_string}&enum_query_integer=${enum_query_integer}&enum_query_double=${enum_query_double}`; + let url = BASE_URL + `/fake?enum_query_string_array=${enum_query_string_array}&enum_query_string=${enum_query_string}&enum_query_integer=${enum_query_integer}&enum_query_double=${enum_query_double}&enum_query_model_array=${enum_query_model_array}`; // TODO: edit the parameters of the request body. let body = {"enumFormStringArray": "list", "enumFormString": "string"}; let params = {headers: {"Content-Type": "application/x-www-form-urlencoded", "enum_header_string_array": `${enumHeaderStringArray}`, "enum_header_string": `${enumHeaderString}`, "Accept": "application/json"}}; diff --git a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES index d731beb9d87a..2d00928eb930 100644 --- a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES @@ -17,6 +17,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index 3a6862048908..40a4e4707f15 100644 --- a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -32,6 +32,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index dc423d8a17df..c3639b96e1cf 100644 --- a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/FILES b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/FILES index edff1ccea7b5..23e025a3bbac 100644 --- a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/FILES @@ -18,6 +18,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index 3925a4181e8a..413b8d2a5a6f 100644 --- a/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index dc423d8a17df..c3639b96e1cf 100644 --- a/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/FILES b/samples/client/petstore/kotlin-gson/.openapi-generator/FILES index 4bfcf9fb54e9..11e6ffb28906 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/FILES @@ -25,6 +25,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 54b52a811860..820ebed32c29 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 5dff82cca137..3f3533cb6bfe 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 3cd3a17289b9..c9ccc491c909 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index f25dd2bb9fa1..cf6463edfe28 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.gson.toJson(content, T::class.java) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -122,21 +116,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.gson.fromJson(bodyContent, (object: TypeToken(){}).getType()) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/FILES b/samples/client/petstore/kotlin-jackson/.openapi-generator/FILES index 26ee35abac5c..34bf95b7ef48 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/FILES @@ -22,6 +22,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index b07f6fb114f3..58dd195b591d 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 5f5f7ecffe81..f749c070ff81 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 332503b18953..0e91b2e1897b 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2c33cebc9cbb..245c4b723808 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.jacksonObjectMapper.writeValueAsString(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -122,21 +116,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.jacksonObjectMapper.readValue(bodyContent, object: TypeReference() {}) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/FILES b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 5c62ed5b98f7..5a758ad7528c 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -524,7 +525,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -537,8 +538,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -599,7 +602,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -612,8 +615,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 916a865f7acc..72b1bb3fc5ae 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 1c294b5e2215..66aba7a248a6 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2e95b6cbadca..3fcca4f30fed 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -11,6 +11,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -66,53 +67,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -124,10 +118,6 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile val f = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { @@ -137,13 +127,15 @@ open class ApiClient(val baseUrl: String) { createTempFile("tmp.net.medicineone.teleconsultationandroid.openapi.openapicommon", null) } f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES index 4bfcf9fb54e9..11e6ffb28906 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES @@ -25,6 +25,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 6b26a13e51ae..83569408489a 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -36,6 +36,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -534,7 +535,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { suspend fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse = withContext(Dispatchers.IO) { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return@withContext request, Unit>( + return@withContext request>, Unit>( localVariableConfig ) } @@ -547,8 +548,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -609,7 +612,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { suspend fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse = withContext(Dispatchers.IO) { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return@withContext request, ModelApiResponse>( + return@withContext request>, ModelApiResponse>( localVariableConfig ) } @@ -622,8 +625,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ffa098db6ca1..3d8dca029049 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -35,6 +35,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 724e2d6fd2e8..86d590568c21 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -35,6 +35,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 8ed9955f6448..c8cfe7c0deaa 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -68,53 +69,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.gson.toJson(content, T::class.java) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -125,21 +119,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.gson.fromJson(bodyContent, (object: TypeToken(){}).getType()) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 24c2ccc75bdd..f7e870bd019e 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 7a773bb79ef1..d3523bd0a6df 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index eac1ec32436e..705e4364456c 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2abf02f23b42..1cce280abfe5 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/FILES b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 601ca6b01f88..10c06c849f7e 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 916a865f7acc..72b1bb3fc5ae 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 1c294b5e2215..66aba7a248a6 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2abf02f23b42..1cce280abfe5 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES index c917cc86876d..633537acb582 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES @@ -24,6 +24,7 @@ src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/commonMain/kotlin/org/openapitools/client/models/Category.kt diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/FILES b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt 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 index 4eefd44019f8..ea535d24bc38 100644 --- 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 @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" 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 index e5d64330d94d..efa55a4b1bbc 100644 --- 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 @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 index 363f3924a001..5ed88f77825e 100644 --- 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 @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 index 90c872b1e36a..69401893569b 100644 --- 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 @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ internal open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ internal open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..2da623bb7079 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +internal data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/FILES b/samples/client/petstore/kotlin-nullable/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 9e40a8d6be31..92e75fe253d6 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index a305a6661a0c..31818a851192 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index bc8b00bc288a..e0bdf90a640a 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2abf02f23b42..1cce280abfe5 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/FILES b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/FILES index 2710ee42441f..1c7bf3702210 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt 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 index 601ca6b01f88..10c06c849f7e 100644 --- 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 @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" 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 index 916a865f7acc..72b1bb3fc5ae 100644 --- 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 @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 index 1c294b5e2215..66aba7a248a6 100644 --- 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 @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 index 08053e0e04bc..a57c9c9931d1 100644 --- 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 @@ -63,51 +63,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> RequestBody.create(MediaType.parse(mediaType), content) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.of( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = MediaType.parse(guessContentTypeFromFile(value)) - addPart(partHeaders, RequestBody.create(fileMediaType, value)) - } else { - val partHeaders = Headers.of( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - RequestBody.create(null, parameterToString(value)) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(Headers.of(headers), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> RequestBody.create(MediaType.parse(mediaType ?: guessContentTypeFromFile(content)), content) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { RequestBody.create( - MediaType.parse(mediaType), Serializer.moshi.adapter(T::class.java).toJson(content) + MediaType.parse(mediaType ?: JsonMediaType), Serializer.moshi.adapter(T::class.java).toJson(content) ) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") @@ -120,21 +115,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/FILES b/samples/client/petstore/kotlin-string/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-string/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 870811a2c93a..506b6e727ec9 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 916a865f7acc..72b1bb3fc5ae 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 1c294b5e2215..66aba7a248a6 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 2abf02f23b42..1cce280abfe5 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 @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/FILES b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 601ca6b01f88..10c06c849f7e 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 916a865f7acc..72b1bb3fc5ae 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 1c294b5e2215..66aba7a248a6 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 8467a2ab7da3..04b43a81c66e 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 @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/FILES b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/FILES index 113f981ccd51..9a212390c6b9 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/FILES @@ -18,6 +18,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt index 325c66305b88..eb501fcd5220 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index dc423d8a17df..c3639b96e1cf 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/kotlin/.openapi-generator/FILES b/samples/client/petstore/kotlin/.openapi-generator/FILES index c7a409ac169e..ab27444a312c 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin/.openapi-generator/FILES @@ -27,6 +27,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 601ca6b01f88..10c06c849f7e 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -34,6 +34,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType @@ -532,7 +533,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) - return request, Unit>( + return request>, Unit>( localVariableConfig ) } @@ -545,8 +546,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param status Updated status of the pet (optional) * @return RequestConfig */ - fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { - val localVariableBody = mapOf("name" to name, "status" to status) + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig>> { + val localVariableBody = mapOf( + "name" to PartConfig(body = name, headers = mutableMapOf()), + "status" to PartConfig(body = status, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") @@ -607,7 +610,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) - return request, ModelApiResponse>( + return request>, ModelApiResponse>( localVariableConfig ) } @@ -620,8 +623,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * @param file file to upload (optional) * @return RequestConfig */ - fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { - val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig>> { + val localVariableBody = mapOf( + "additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()), + "file" to PartConfig(body = file, headers = mutableMapOf()),) val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") localVariableHeaders["Accept"] = "application/json" diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 916a865f7acc..72b1bb3fc5ae 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 1c294b5e2215..66aba7a248a6 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -33,6 +33,7 @@ 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.PartConfig import org.openapitools.client.infrastructure.RequestConfig import org.openapitools.client.infrastructure.RequestMethod import org.openapitools.client.infrastructure.ResponseType 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 2abf02f23b42..1cce280abfe5 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 @@ -10,6 +10,7 @@ import okhttp3.ResponseBody import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.MultipartBody import okhttp3.Call import okhttp3.Callback @@ -65,53 +66,46 @@ open class ApiClient(val baseUrl: String) { return contentType ?: "application/octet-stream" } - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = when { - content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) - mediaType == FormDataMediaType -> { + mediaType == FormDataMediaType -> MultipartBody.Builder() .setType(MultipartBody.FORM) .apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - if (value is File) { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"; filename=\"${value.name}\"" - ) - val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() - addPart(partHeaders, value.asRequestBody(fileMediaType)) - } else { - val partHeaders = Headers.headersOf( - "Content-Disposition", - "form-data; name=\"$key\"" - ) - addPart( - partHeaders, - parameterToString(value).toRequestBody(null) - ) + (content as Map>).forEach { (name, part) -> + val contentType = part.headers.remove("Content-Type") + val bodies = if (part.body is Iterable<*>) part.body else listOf(part.body) + bodies.forEach { body -> + val headers = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"" + if (body is File) "; filename=\"${body.name}\"" else "") + addPart(headers.toHeaders(), + requestSingleBody(body, contentType)) } } }.build() - } + else -> requestSingleBody(content, mediaType) + } + + protected inline fun requestSingleBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { - // content's type *must* be Map + // content's type *must* be Map> @Suppress("UNCHECKED_CAST") - (content as Map).forEach { (key, value) -> - add(key, parameterToString(value)) + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) } }.build() } - mediaType.startsWith("application/") && mediaType.endsWith("json") -> + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> if (content == null) { EMPTY_REQUEST } else { Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody( - mediaType.toMediaTypeOrNull() - ) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) } mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers @@ -123,21 +117,20 @@ open class ApiClient(val baseUrl: String) { if(body == null) { return null } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } if (T::class.java == File::class.java) { // return tempfile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() f.deleteOnExit() - val out = BufferedWriter(FileWriter(f)) - out.write(bodyContent) - out.close() + body.byteStream().use { java.nio.file.Files.copy(it, f.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } return f as T } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> Serializer.moshi.adapter().fromJson(bodyContent) else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt new file mode 100644 index 000000000000..be00e38fbaee --- /dev/null +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/samples/client/petstore/perl/.openapi-generator/FILES b/samples/client/petstore/perl/.openapi-generator/FILES index ffe1c03f40e1..838d176f1034 100644 --- a/samples/client/petstore/perl/.openapi-generator/FILES +++ b/samples/client/petstore/perl/.openapi-generator/FILES @@ -3,6 +3,7 @@ README.md bin/autodoc docs/AdditionalPropertiesClass.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ApiResponse.md @@ -50,6 +51,7 @@ docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md @@ -64,6 +66,7 @@ lib/WWW/OpenAPIClient/DefaultApi.pm lib/WWW/OpenAPIClient/FakeApi.pm lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +lib/WWW/OpenAPIClient/Object/AllOfWithSingleRef.pm lib/WWW/OpenAPIClient/Object/Animal.pm lib/WWW/OpenAPIClient/Object/ApiResponse.pm lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm @@ -106,6 +109,7 @@ lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm lib/WWW/OpenAPIClient/Object/OuterObjectWithEnumProperty.pm lib/WWW/OpenAPIClient/Object/Pet.pm lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm +lib/WWW/OpenAPIClient/Object/SingleRefType.pm lib/WWW/OpenAPIClient/Object/SpecialModelName.pm lib/WWW/OpenAPIClient/Object/Tag.pm lib/WWW/OpenAPIClient/Object/User.pm diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 6d20b2459d84..6d6bf7fccd9d 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -243,6 +243,7 @@ use WWW::OpenAPIClient::UserApi; To load the models: ```perl use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; +use WWW::OpenAPIClient::Object::AllOfWithSingleRef; use WWW::OpenAPIClient::Object::Animal; use WWW::OpenAPIClient::Object::ApiResponse; use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly; @@ -285,6 +286,7 @@ use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; +use WWW::OpenAPIClient::Object::SingleRefType; use WWW::OpenAPIClient::Object::SpecialModelName; use WWW::OpenAPIClient::Object::Tag; use WWW::OpenAPIClient::Object::User; @@ -309,6 +311,7 @@ use WWW::OpenAPIClient::UserApi; # load the models use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; +use WWW::OpenAPIClient::Object::AllOfWithSingleRef; use WWW::OpenAPIClient::Object::Animal; use WWW::OpenAPIClient::Object::ApiResponse; use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly; @@ -351,6 +354,7 @@ use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; +use WWW::OpenAPIClient::Object::SingleRefType; use WWW::OpenAPIClient::Object::SpecialModelName; use WWW::OpenAPIClient::Object::Tag; use WWW::OpenAPIClient::Object::User; @@ -425,6 +429,7 @@ Class | Method | HTTP request | Description # DOCUMENTATION FOR MODELS - [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [WWW::OpenAPIClient::Object::AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [WWW::OpenAPIClient::Object::Animal](docs/Animal.md) - [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md) - [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -467,6 +472,7 @@ Class | Method | HTTP request | Description - [WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [WWW::OpenAPIClient::Object::Pet](docs/Pet.md) - [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [WWW::OpenAPIClient::Object::SingleRefType](docs/SingleRefType.md) - [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md) - [WWW::OpenAPIClient::Object::Tag](docs/Tag.md) - [WWW::OpenAPIClient::Object::User](docs/User.md) diff --git a/samples/client/petstore/perl/docs/AllOfWithSingleRef.md b/samples/client/petstore/perl/docs/AllOfWithSingleRef.md new file mode 100644 index 000000000000..738bb859a6ce --- /dev/null +++ b/samples/client/petstore/perl/docs/AllOfWithSingleRef.md @@ -0,0 +1,16 @@ +# WWW::OpenAPIClient::Object::AllOfWithSingleRef + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::AllOfWithSingleRef; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | | [optional] +**single_ref_type** | [**SingleRefType**](SingleRefType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 1b1380c2dace..fbd1c1d042f9 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -606,7 +606,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_enum_parameters** -> test_enum_parameters(enum_header_string_array => $enum_header_string_array, enum_header_string => $enum_header_string, enum_query_string_array => $enum_query_string_array, enum_query_string => $enum_query_string, enum_query_integer => $enum_query_integer, enum_query_double => $enum_query_double, enum_form_string_array => $enum_form_string_array, enum_form_string => $enum_form_string) +> test_enum_parameters(enum_header_string_array => $enum_header_string_array, enum_header_string => $enum_header_string, enum_query_string_array => $enum_query_string_array, enum_query_string => $enum_query_string, enum_query_integer => $enum_query_integer, enum_query_double => $enum_query_double, enum_query_model_array => $enum_query_model_array, enum_form_string_array => $enum_form_string_array, enum_form_string => $enum_form_string) To test enum parameters @@ -625,11 +625,12 @@ my $enum_query_string_array = [("'$'")]; # ARRAY[string] | Query parameter enum my $enum_query_string = '-efg'; # string | Query parameter enum test (string) my $enum_query_integer = 56; # int | Query parameter enum test (double) my $enum_query_double = 3.4; # double | Query parameter enum test (double) +my $enum_query_model_array = [(new WWW::OpenAPIClient.EnumClass())]; # ARRAY[EnumClass] | my $enum_form_string_array = ['$']; # ARRAY[string] | Form parameter enum test (string array) my $enum_form_string = '-efg'; # string | Form parameter enum test (string) eval { - $api_instance->test_enum_parameters(enum_header_string_array => $enum_header_string_array, enum_header_string => $enum_header_string, enum_query_string_array => $enum_query_string_array, enum_query_string => $enum_query_string, enum_query_integer => $enum_query_integer, enum_query_double => $enum_query_double, enum_form_string_array => $enum_form_string_array, enum_form_string => $enum_form_string); + $api_instance->test_enum_parameters(enum_header_string_array => $enum_header_string_array, enum_header_string => $enum_header_string, enum_query_string_array => $enum_query_string_array, enum_query_string => $enum_query_string, enum_query_integer => $enum_query_integer, enum_query_double => $enum_query_double, enum_query_model_array => $enum_query_model_array, enum_form_string_array => $enum_form_string_array, enum_form_string => $enum_form_string); }; if ($@) { warn "Exception when calling FakeApi->test_enum_parameters: $@\n"; @@ -646,6 +647,7 @@ Name | Type | Description | Notes **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **double**| Query parameter enum test (double) | [optional] + **enum_query_model_array** | [**ARRAY[EnumClass]**](EnumClass.md)| | [optional] **enum_form_string_array** | [**ARRAY[string]**](string.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/client/petstore/perl/docs/SingleRefType.md b/samples/client/petstore/perl/docs/SingleRefType.md new file mode 100644 index 000000000000..85578fce38bf --- /dev/null +++ b/samples/client/petstore/perl/docs/SingleRefType.md @@ -0,0 +1,14 @@ +# WWW::OpenAPIClient::Object::SingleRefType + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::SingleRefType; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index f13af8a695a9..9c702e1c1d65 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -975,6 +975,7 @@ sub test_endpoint_parameters { # @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg') # @param int $enum_query_integer Query parameter enum test (double) (optional) # @param double $enum_query_double Query parameter enum test (double) (optional) +# @param ARRAY[EnumClass] $enum_query_model_array (optional) # @param ARRAY[string] $enum_form_string_array Form parameter enum test (string array) (optional, default to '$') # @param string $enum_form_string Form parameter enum test (string) (optional, default to '-efg') { @@ -1009,6 +1010,11 @@ sub test_endpoint_parameters { description => 'Query parameter enum test (double)', required => '0', }, + 'enum_query_model_array' => { + data_type => 'ARRAY[EnumClass]', + description => '', + required => '0', + }, 'enum_form_string_array' => { data_type => 'ARRAY[string]', description => 'Form parameter enum test (string array)', @@ -1066,6 +1072,11 @@ sub test_enum_parameters { $query_params->{'enum_query_double'} = $self->{api_client}->to_query_value($args{'enum_query_double'}); } + # query params + if ( exists $args{'enum_query_model_array'}) { + $query_params->{'enum_query_model_array'} = $self->{api_client}->to_query_value($args{'enum_query_model_array'}); + } + # header params if ( exists $args{'enum_header_string_array'}) { $header_params->{'enum_header_string_array'} = $self->{api_client}->to_header_value($args{'enum_header_string_array'}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AllOfWithSingleRef.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AllOfWithSingleRef.pm new file mode 100644 index 000000000000..f946b72b81e4 --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AllOfWithSingleRef.pm @@ -0,0 +1,193 @@ +=begin comment + +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +package WWW::OpenAPIClient::Object::AllOfWithSingleRef; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use JSON qw(decode_json); +use Data::Dumper; +use Module::Runtime qw(use_module); +use Log::Any qw($log); +use Date::Parse; +use DateTime; + +use WWW::OpenAPIClient::Object::SingleRefType; + +use base ("Class::Accessor", "Class::Data::Inheritable"); + +# +# +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. +# REF: https://openapi-generator.tech +# + +=begin comment + +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +__PACKAGE__->mk_classdata('attribute_map' => {}); +__PACKAGE__->mk_classdata('openapi_types' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('class_documentation' => {}); + +# new plain object +sub new { + my ($class, %args) = @_; + + my $self = bless {}, $class; + + $self->init(%args); + + return $self; +} + +# initialize the object +sub init +{ + my ($self, %args) = @_; + + foreach my $attribute (keys %{$self->attribute_map}) { + my $args_key = $self->attribute_map->{$attribute}; + $self->$attribute( $args{ $args_key } ); + } +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); + + return $_hash; +} + +# used by JSON for serialization +sub TO_JSON { + my $self = shift; + my $_data = {}; + foreach my $_key (keys %{$self->attribute_map}) { + if (defined $self->{$_key}) { + $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; + } + } + + return $_data; +} + +# from Perl hashref +sub from_hash { + my ($self, $hash) = @_; + + # loop through attributes and use openapi_types to deserialize the data + while ( my ($_key, $_type) = each %{$self->openapi_types} ) { + my $_json_attribute = $self->attribute_map->{$_key}; + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; + my @_array = (); + foreach my $_element (@{$hash->{$_json_attribute}}) { + push @_array, $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; + } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime + $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); + } else { + $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); + } + } + + return $self; +} + +# deserialize non-array data +sub _deserialize { + my ($self, $type, $data) = @_; + $log->debugf("deserializing %s with %s",Dumper($data), $type); + + if ($type eq 'DateTime') { + return DateTime->from_epoch(epoch => str2time($data)); + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + return $data; + } else { # hash(model) + my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; + return $_instance->from_hash($data); + } +} + + +__PACKAGE__->class_documentation({description => '', + class => 'AllOfWithSingleRef', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'username' => { + datatype => 'string', + base_name => 'username', + description => '', + format => '', + read_only => '', + }, + 'single_ref_type' => { + datatype => 'SingleRefType', + base_name => 'SingleRefType', + description => '', + format => '', + read_only => '', + }, +}); + +__PACKAGE__->openapi_types( { + 'username' => 'string', + 'single_ref_type' => 'SingleRefType' +} ); + +__PACKAGE__->attribute_map( { + 'username' => 'username', + 'single_ref_type' => 'SingleRefType' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SingleRefType.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SingleRefType.pm new file mode 100644 index 000000000000..3211fd33ea7e --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SingleRefType.pm @@ -0,0 +1,176 @@ +=begin comment + +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +package WWW::OpenAPIClient::Object::SingleRefType; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use JSON qw(decode_json); +use Data::Dumper; +use Module::Runtime qw(use_module); +use Log::Any qw($log); +use Date::Parse; +use DateTime; + + +use base ("Class::Accessor", "Class::Data::Inheritable"); + +# +# +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. +# REF: https://openapi-generator.tech +# + +=begin comment + +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +__PACKAGE__->mk_classdata('attribute_map' => {}); +__PACKAGE__->mk_classdata('openapi_types' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('class_documentation' => {}); + +# new plain object +sub new { + my ($class, %args) = @_; + + my $self = bless {}, $class; + + $self->init(%args); + + return $self; +} + +# initialize the object +sub init +{ + my ($self, %args) = @_; + + foreach my $attribute (keys %{$self->attribute_map}) { + my $args_key = $self->attribute_map->{$attribute}; + $self->$attribute( $args{ $args_key } ); + } +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); + + return $_hash; +} + +# used by JSON for serialization +sub TO_JSON { + my $self = shift; + my $_data = {}; + foreach my $_key (keys %{$self->attribute_map}) { + if (defined $self->{$_key}) { + $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; + } + } + + return $_data; +} + +# from Perl hashref +sub from_hash { + my ($self, $hash) = @_; + + # loop through attributes and use openapi_types to deserialize the data + while ( my ($_key, $_type) = each %{$self->openapi_types} ) { + my $_json_attribute = $self->attribute_map->{$_key}; + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; + my @_array = (); + foreach my $_element (@{$hash->{$_json_attribute}}) { + push @_array, $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; + } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime + $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); + } else { + $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); + } + } + + return $self; +} + +# deserialize non-array data +sub _deserialize { + my ($self, $type, $data) = @_; + $log->debugf("deserializing %s with %s",Dumper($data), $type); + + if ($type eq 'DateTime') { + return DateTime->from_epoch(epoch => str2time($data)); + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + return $data; + } else { # hash(model) + my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; + return $_instance->from_hash($data); + } +} + + +__PACKAGE__->class_documentation({description => '', + class => 'SingleRefType', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ +}); + +__PACKAGE__->openapi_types( { + +} ); + +__PACKAGE__->attribute_map( { + +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/t/AllOfWithSingleRefTest.t b/samples/client/petstore/perl/t/AllOfWithSingleRefTest.t new file mode 100644 index 000000000000..af22084b9639 --- /dev/null +++ b/samples/client/petstore/perl/t/AllOfWithSingleRefTest.t @@ -0,0 +1,34 @@ +=begin comment + +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by the OpenAPI Generator +# Please update the test cases below to test the model. +# Ref: https://openapi-generator.tech +# +use Test::More tests => 2; +use Test::Exception; + +use lib 'lib'; +use strict; +use warnings; + + +use_ok('WWW::OpenAPIClient::Object::AllOfWithSingleRef'); + +# uncomment below and update the test +#my $instance = WWW::OpenAPIClient::Object::AllOfWithSingleRef->new(); +# +#isa_ok($instance, 'WWW::OpenAPIClient::Object::AllOfWithSingleRef'); + diff --git a/samples/client/petstore/perl/t/SingleRefTypeTest.t b/samples/client/petstore/perl/t/SingleRefTypeTest.t new file mode 100644 index 000000000000..652ac5797d0d --- /dev/null +++ b/samples/client/petstore/perl/t/SingleRefTypeTest.t @@ -0,0 +1,34 @@ +=begin comment + +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by the OpenAPI Generator +# Please update the test cases below to test the model. +# Ref: https://openapi-generator.tech +# +use Test::More tests => 2; +use Test::Exception; + +use lib 'lib'; +use strict; +use warnings; + + +use_ok('WWW::OpenAPIClient::Object::SingleRefType'); + +# uncomment below and update the test +#my $instance = WWW::OpenAPIClient::Object::SingleRefType->new(); +# +#isa_ok($instance, 'WWW::OpenAPIClient::Object::SingleRefType'); + diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index 7d0b2295b615..c41da42e1fca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -11,6 +11,7 @@ docs/Api/PetApi.md docs/Api/StoreApi.md docs/Api/UserApi.md docs/Model/AdditionalPropertiesClass.md +docs/Model/AllOfWithSingleRef.md docs/Model/Animal.md docs/Model/ApiResponse.md docs/Model/ArrayOfArrayOfNumberOnly.md @@ -53,6 +54,7 @@ docs/Model/OuterEnumIntegerDefaultValue.md docs/Model/OuterObjectWithEnumProperty.md docs/Model/Pet.md docs/Model/ReadOnlyFirst.md +docs/Model/SingleRefType.md docs/Model/SpecialModelName.md docs/Model/Tag.md docs/Model/User.md @@ -68,6 +70,7 @@ lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AdditionalPropertiesClass.php +lib/Model/AllOfWithSingleRef.php lib/Model/Animal.php lib/Model/ApiResponse.php lib/Model/ArrayOfArrayOfNumberOnly.php @@ -111,6 +114,7 @@ lib/Model/OuterEnumIntegerDefaultValue.php lib/Model/OuterObjectWithEnumProperty.php lib/Model/Pet.php lib/Model/ReadOnlyFirst.php +lib/Model/SingleRefType.php lib/Model/SpecialModelName.php lib/Model/Tag.php lib/Model/User.php diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index bc3464008a1b..d59fd1a98758 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -8,7 +8,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod ### Requirements PHP 7.3 and later. -Should also work with PHP 8.0 but has not been tested. +Should also work with PHP 8.0 or 8.1 but has not been tested. ### Composer @@ -117,6 +117,7 @@ Class | Method | HTTP request | Description ## Models - [AdditionalPropertiesClass](docs/Model/AdditionalPropertiesClass.md) +- [AllOfWithSingleRef](docs/Model/AllOfWithSingleRef.md) - [Animal](docs/Model/Animal.md) - [ApiResponse](docs/Model/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/Model/ArrayOfArrayOfNumberOnly.md) @@ -159,6 +160,7 @@ Class | Method | HTTP request | Description - [OuterObjectWithEnumProperty](docs/Model/OuterObjectWithEnumProperty.md) - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) +- [SingleRefType](docs/Model/SingleRefType.md) - [SpecialModelName](docs/Model/SpecialModelName.md) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index d1497c5322bb..d511a482a179 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -724,7 +724,7 @@ void (empty response body) ## `testEnumParameters()` ```php -testEnumParameters($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string) +testEnumParameters($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string) ``` To test enum parameters @@ -750,11 +750,12 @@ $enum_query_string_array = array('enum_query_string_array_example'); // string[] $enum_query_string = '-efg'; // string | Query parameter enum test (string) $enum_query_integer = 56; // int | Query parameter enum test (double) $enum_query_double = 3.4; // double | Query parameter enum test (double) +$enum_query_model_array = array(new \OpenAPI\Client\Model\\OpenAPI\Client\Model\EnumClass()); // \OpenAPI\Client\Model\EnumClass[] $enum_form_string_array = array('$'); // string[] | Form parameter enum test (string array) $enum_form_string = '-efg'; // string | Form parameter enum test (string) try { - $apiInstance->testEnumParameters($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string); + $apiInstance->testEnumParameters($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string); } catch (Exception $e) { echo 'Exception when calling FakeApi->testEnumParameters: ', $e->getMessage(), PHP_EOL; } @@ -770,6 +771,7 @@ Name | Type | Description | Notes **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **double**| Query parameter enum test (double) | [optional] + **enum_query_model_array** | [**\OpenAPI\Client\Model\EnumClass[]**](../Model/\OpenAPI\Client\Model\EnumClass.md)| | [optional] **enum_form_string_array** | [**string[]**](../Model/string.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AllOfWithSingleRef.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AllOfWithSingleRef.md new file mode 100644 index 000000000000..a8da431674c0 --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AllOfWithSingleRef.md @@ -0,0 +1,10 @@ +# # AllOfWithSingleRef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | | [optional] +**single_ref_type** | [**SingleRefType**](SingleRefType.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/SingleRefType.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/SingleRefType.md new file mode 100644 index 000000000000..6ef5c7e7bf92 --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/SingleRefType.md @@ -0,0 +1,8 @@ +# # SingleRefType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 62f9f163e073..de4874241698 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -188,6 +188,9 @@ public function call123TestSpecialTagsWithHttpInfo($client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Client' !== 'string') { + $content = json_decode($content); + } } return [ @@ -202,6 +205,9 @@ public function call123TestSpecialTagsWithHttpInfo($client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -268,6 +274,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -359,7 +368,7 @@ public function call123TestSpecialTagsRequest($client) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -375,7 +384,7 @@ public function call123TestSpecialTagsRequest($client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 8d912d914d6a..92b7e95b2d1d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -182,6 +182,9 @@ public function fooGetWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\InlineResponseDefault' !== 'string') { + $content = json_decode($content); + } } return [ @@ -196,6 +199,9 @@ public function fooGetWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -256,6 +262,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -334,7 +343,7 @@ public function fooGetRequest() } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -350,7 +359,7 @@ public function fooGetRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 4aba5d1907ce..a6bdf39f6c07 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -186,6 +186,9 @@ public function fakeHealthGetWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\HealthCheckResult' !== 'string') { + $content = json_decode($content); + } } return [ @@ -200,6 +203,9 @@ public function fakeHealthGetWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -264,6 +270,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -342,7 +351,7 @@ public function fakeHealthGetRequest() } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -358,7 +367,7 @@ public function fakeHealthGetRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -535,16 +544,13 @@ public function fakeHttpSignatureTestRequest($pet, $query_1 = null, $header_1 = $multipart = false; // query params - if ($query_1 !== null) { - if('form' === 'form' && is_array($query_1)) { - foreach($query_1 as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['query_1'] = $query_1; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_1, + 'query_1', // param base name + 'string', // openApiType + 'form', // style + true // explode + ) ?? []); // header params if ($header_1 !== null) { @@ -591,7 +597,7 @@ public function fakeHttpSignatureTestRequest($pet, $query_1 = null, $header_1 = } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -607,7 +613,7 @@ public function fakeHttpSignatureTestRequest($pet, $query_1 = null, $header_1 = $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -685,6 +691,9 @@ public function fakeOuterBooleanSerializeWithHttpInfo($body = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('bool' !== 'string') { + $content = json_decode($content); + } } return [ @@ -699,6 +708,9 @@ public function fakeOuterBooleanSerializeWithHttpInfo($body = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -761,6 +773,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -846,7 +861,7 @@ public function fakeOuterBooleanSerializeRequest($body = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -862,7 +877,7 @@ public function fakeOuterBooleanSerializeRequest($body = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -940,6 +955,9 @@ public function fakeOuterCompositeSerializeWithHttpInfo($outer_composite = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\OuterComposite' !== 'string') { + $content = json_decode($content); + } } return [ @@ -954,6 +972,9 @@ public function fakeOuterCompositeSerializeWithHttpInfo($outer_composite = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1016,6 +1037,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1101,7 +1125,7 @@ public function fakeOuterCompositeSerializeRequest($outer_composite = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1117,7 +1141,7 @@ public function fakeOuterCompositeSerializeRequest($outer_composite = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1195,6 +1219,9 @@ public function fakeOuterNumberSerializeWithHttpInfo($body = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('float' !== 'string') { + $content = json_decode($content); + } } return [ @@ -1209,6 +1236,9 @@ public function fakeOuterNumberSerializeWithHttpInfo($body = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1271,6 +1301,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1356,7 +1389,7 @@ public function fakeOuterNumberSerializeRequest($body = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1372,7 +1405,7 @@ public function fakeOuterNumberSerializeRequest($body = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1450,6 +1483,9 @@ public function fakeOuterStringSerializeWithHttpInfo($body = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } } return [ @@ -1464,6 +1500,9 @@ public function fakeOuterStringSerializeWithHttpInfo($body = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1526,6 +1565,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1611,7 +1653,7 @@ public function fakeOuterStringSerializeRequest($body = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1627,7 +1669,7 @@ public function fakeOuterStringSerializeRequest($body = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1705,6 +1747,9 @@ public function fakePropertyEnumIntegerSerializeWithHttpInfo($outer_object_with_ $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\OuterObjectWithEnumProperty' !== 'string') { + $content = json_decode($content); + } } return [ @@ -1719,6 +1764,9 @@ public function fakePropertyEnumIntegerSerializeWithHttpInfo($outer_object_with_ $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1781,6 +1829,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1872,7 +1923,7 @@ public function fakePropertyEnumIntegerSerializeRequest($outer_object_with_enum_ } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1888,7 +1939,7 @@ public function fakePropertyEnumIntegerSerializeRequest($outer_object_with_enum_ $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2088,7 +2139,7 @@ public function testBodyWithBinaryRequest($body) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2104,7 +2155,7 @@ public function testBodyWithBinaryRequest($body) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2304,7 +2355,7 @@ public function testBodyWithFileSchemaRequest($file_schema_test_class) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2320,7 +2371,7 @@ public function testBodyWithFileSchemaRequest($file_schema_test_class) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2490,16 +2541,13 @@ public function testBodyWithQueryParamsRequest($query, $user) $multipart = false; // query params - if ($query !== null) { - if('form' === 'form' && is_array($query)) { - foreach($query as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['query'] = $query; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query, + 'query', // param base name + 'string', // openApiType + 'form', // style + true // explode + ) ?? []); @@ -2542,7 +2590,7 @@ public function testBodyWithQueryParamsRequest($query, $user) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2558,7 +2606,7 @@ public function testBodyWithQueryParamsRequest($query, $user) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2640,6 +2688,9 @@ public function testClientModelWithHttpInfo($client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Client' !== 'string') { + $content = json_decode($content); + } } return [ @@ -2654,6 +2705,9 @@ public function testClientModelWithHttpInfo($client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2720,6 +2774,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2811,7 +2868,7 @@ public function testClientModelRequest($client) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2827,7 +2884,7 @@ public function testClientModelRequest($client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3223,7 +3280,7 @@ public function testEndpointParametersRequest($number, $double, $pattern_without } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -3243,7 +3300,7 @@ public function testEndpointParametersRequest($number, $double, $pattern_without $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3263,6 +3320,7 @@ public function testEndpointParametersRequest($number, $double, $pattern_without * @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg') * @param int $enum_query_integer Query parameter enum test (double) (optional) * @param double $enum_query_double Query parameter enum test (double) (optional) + * @param \OpenAPI\Client\Model\EnumClass[] $enum_query_model_array enum_query_model_array (optional) * @param string[] $enum_form_string_array Form parameter enum test (string array) (optional, default to '$') * @param string $enum_form_string Form parameter enum test (string) (optional, default to '-efg') * @@ -3270,9 +3328,9 @@ public function testEndpointParametersRequest($number, $double, $pattern_without * @throws \InvalidArgumentException * @return void */ - public function testEnumParameters($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') + public function testEnumParameters($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_query_model_array = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { - $this->testEnumParametersWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string); + $this->testEnumParametersWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string); } /** @@ -3286,6 +3344,7 @@ public function testEnumParameters($enum_header_string_array = null, $enum_heade * @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg') * @param int $enum_query_integer Query parameter enum test (double) (optional) * @param double $enum_query_double Query parameter enum test (double) (optional) + * @param \OpenAPI\Client\Model\EnumClass[] $enum_query_model_array (optional) * @param string[] $enum_form_string_array Form parameter enum test (string array) (optional, default to '$') * @param string $enum_form_string Form parameter enum test (string) (optional, default to '-efg') * @@ -3293,9 +3352,9 @@ public function testEnumParameters($enum_header_string_array = null, $enum_heade * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function testEnumParametersWithHttpInfo($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') + public function testEnumParametersWithHttpInfo($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_query_model_array = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { - $request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string); + $request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string); try { $options = $this->createHttpClientOption(); @@ -3352,15 +3411,16 @@ public function testEnumParametersWithHttpInfo($enum_header_string_array = null, * @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg') * @param int $enum_query_integer Query parameter enum test (double) (optional) * @param double $enum_query_double Query parameter enum test (double) (optional) + * @param \OpenAPI\Client\Model\EnumClass[] $enum_query_model_array (optional) * @param string[] $enum_form_string_array Form parameter enum test (string array) (optional, default to '$') * @param string $enum_form_string Form parameter enum test (string) (optional, default to '-efg') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function testEnumParametersAsync($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') + public function testEnumParametersAsync($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_query_model_array = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { - return $this->testEnumParametersAsyncWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string) + return $this->testEnumParametersAsyncWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string) ->then( function ($response) { return $response[0]; @@ -3379,16 +3439,17 @@ function ($response) { * @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg') * @param int $enum_query_integer Query parameter enum test (double) (optional) * @param double $enum_query_double Query parameter enum test (double) (optional) + * @param \OpenAPI\Client\Model\EnumClass[] $enum_query_model_array (optional) * @param string[] $enum_form_string_array Form parameter enum test (string array) (optional, default to '$') * @param string $enum_form_string Form parameter enum test (string) (optional, default to '-efg') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function testEnumParametersAsyncWithHttpInfo($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') + public function testEnumParametersAsyncWithHttpInfo($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_query_model_array = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { $returnType = ''; - $request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string); + $request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3422,13 +3483,14 @@ function ($exception) { * @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg') * @param int $enum_query_integer Query parameter enum test (double) (optional) * @param double $enum_query_double Query parameter enum test (double) (optional) + * @param \OpenAPI\Client\Model\EnumClass[] $enum_query_model_array (optional) * @param string[] $enum_form_string_array Form parameter enum test (string array) (optional, default to '$') * @param string $enum_form_string Form parameter enum test (string) (optional, default to '-efg') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function testEnumParametersRequest($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') + public function testEnumParametersRequest($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_query_model_array = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { $resourcePath = '/fake'; @@ -3439,49 +3501,45 @@ public function testEnumParametersRequest($enum_header_string_array = null, $enu $multipart = false; // query params - if ($enum_query_string_array !== null) { - if('form' === 'form' && is_array($enum_query_string_array)) { - foreach($enum_query_string_array as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['enum_query_string_array'] = $enum_query_string_array; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enum_query_string_array, + 'enum_query_string_array', // param base name + 'array', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($enum_query_string !== null) { - if('form' === 'form' && is_array($enum_query_string)) { - foreach($enum_query_string as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['enum_query_string'] = $enum_query_string; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enum_query_string, + 'enum_query_string', // param base name + 'string', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($enum_query_integer !== null) { - if('form' === 'form' && is_array($enum_query_integer)) { - foreach($enum_query_integer as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['enum_query_integer'] = $enum_query_integer; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enum_query_integer, + 'enum_query_integer', // param base name + 'integer', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($enum_query_double !== null) { - if('form' === 'form' && is_array($enum_query_double)) { - foreach($enum_query_double as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['enum_query_double'] = $enum_query_double; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enum_query_double, + 'enum_query_double', // param base name + 'number', // openApiType + 'form', // style + true // explode + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enum_query_model_array, + 'enum_query_model_array', // param base name + 'array', // openApiType + 'form', // style + true // explode + ) ?? []); // header params if (is_array($enum_header_string_array)) { @@ -3537,7 +3595,7 @@ public function testEnumParametersRequest($enum_header_string_array = null, $enu } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -3553,7 +3611,7 @@ public function testEnumParametersRequest($enum_header_string_array = null, $enu $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3775,49 +3833,37 @@ public function testGroupParametersRequest($associative_array) $multipart = false; // query params - if ($required_string_group !== null) { - if('form' === 'form' && is_array($required_string_group)) { - foreach($required_string_group as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['required_string_group'] = $required_string_group; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $required_string_group, + 'required_string_group', // param base name + 'integer', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($required_int64_group !== null) { - if('form' === 'form' && is_array($required_int64_group)) { - foreach($required_int64_group as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['required_int64_group'] = $required_int64_group; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $required_int64_group, + 'required_int64_group', // param base name + 'integer', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($string_group !== null) { - if('form' === 'form' && is_array($string_group)) { - foreach($string_group as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['string_group'] = $string_group; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $string_group, + 'string_group', // param base name + 'integer', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($int64_group !== null) { - if('form' === 'form' && is_array($int64_group)) { - foreach($int64_group as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['int64_group'] = $int64_group; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $int64_group, + 'int64_group', // param base name + 'integer', // openApiType + 'form', // style + true // explode + ) ?? []); // header params if ($required_boolean_group !== null) { @@ -3862,7 +3908,7 @@ public function testGroupParametersRequest($associative_array) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -3882,7 +3928,7 @@ public function testGroupParametersRequest($associative_array) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -4090,7 +4136,7 @@ public function testInlineAdditionalPropertiesRequest($request_body) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -4106,7 +4152,7 @@ public function testInlineAdditionalPropertiesRequest($request_body) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -4327,7 +4373,7 @@ public function testJsonFormDataRequest($param, $param2) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -4343,7 +4389,7 @@ public function testJsonFormDataRequest($param, $param2) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -4562,66 +4608,61 @@ public function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $multipart = false; // query params - if (is_array($pipe)) { - $pipe = ObjectSerializer::serializeCollection($pipe, 'pipeDelimited', true); - } - if ($pipe !== null) { - $queryParams['pipe'] = $pipe; - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pipe, + 'pipe', // param base name + 'array', // openApiType + 'pipeDelimited', // style + false // explode + ) ?? []); // query params - if (is_array($ioutil)) { - $ioutil = ObjectSerializer::serializeCollection($ioutil, 'form', true); - } - if ($ioutil !== null) { - $queryParams['ioutil'] = $ioutil; - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $ioutil, + 'ioutil', // param base name + 'array', // openApiType + 'form', // style + false // explode + ) ?? []); // query params - if (is_array($http)) { - $http = ObjectSerializer::serializeCollection($http, 'spaceDelimited', true); - } - if ($http !== null) { - $queryParams['http'] = $http; - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $http, + 'http', // param base name + 'array', // openApiType + 'spaceDelimited', // style + false // explode + ) ?? []); // query params - if (is_array($url)) { - $url = ObjectSerializer::serializeCollection($url, 'form', true); - } - if ($url !== null) { - $queryParams['url'] = $url; - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $url, + 'url', // param base name + 'array', // openApiType + 'form', // style + false // explode + ) ?? []); // query params - if ($context !== null) { - if('form' === 'form' && is_array($context)) { - foreach($context as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['context'] = $context; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $context, + 'context', // param base name + 'array', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($language !== null) { - if('form' === 'form' && is_array($language)) { - foreach($language as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['language'] = $language; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $language, + 'language', // param base name + 'object', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($allow_empty !== null) { - if('form' === 'form' && is_array($allow_empty)) { - foreach($allow_empty as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['allowEmpty'] = $allow_empty; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $allow_empty, + 'allowEmpty', // param base name + 'string', // openApiType + 'form', // style + true // explode + ) ?? []); @@ -4658,7 +4699,7 @@ public function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -4674,7 +4715,7 @@ public function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 611b7d5bba05..faead8d187f8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -188,6 +188,9 @@ public function testClassnameWithHttpInfo($client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Client' !== 'string') { + $content = json_decode($content); + } } return [ @@ -202,6 +205,9 @@ public function testClassnameWithHttpInfo($client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -268,6 +274,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -359,7 +368,7 @@ public function testClassnameRequest($client) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -380,7 +389,7 @@ public function testClassnameRequest($client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index dd8b59aed77a..a874cf18b1c3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -334,7 +334,7 @@ public function addPetRequest($pet) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -360,7 +360,7 @@ public function addPetRequest($pet) } $operationHost = $operationHosts[$this->hostIndex]; - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -579,7 +579,7 @@ public function deletePetRequest($pet_id, $api_key = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -599,7 +599,7 @@ public function deletePetRequest($pet_id, $api_key = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -681,6 +681,9 @@ public function findPetsByStatusWithHttpInfo($status) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Pet[]' !== 'string') { + $content = json_decode($content); + } } return [ @@ -695,6 +698,9 @@ public function findPetsByStatusWithHttpInfo($status) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -761,6 +767,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -811,12 +820,13 @@ public function findPetsByStatusRequest($status) $multipart = false; // query params - if (is_array($status)) { - $status = ObjectSerializer::serializeCollection($status, 'form', true); - } - if ($status !== null) { - $queryParams['status'] = $status; - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $status, + 'status', // param base name + 'array', // openApiType + 'form', // style + false // explode + ) ?? []); @@ -853,7 +863,7 @@ public function findPetsByStatusRequest($status) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -873,7 +883,7 @@ public function findPetsByStatusRequest($status) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -957,6 +967,9 @@ public function findPetsByTagsWithHttpInfo($tags) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Pet[]' !== 'string') { + $content = json_decode($content); + } } return [ @@ -971,6 +984,9 @@ public function findPetsByTagsWithHttpInfo($tags) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1039,6 +1055,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1091,12 +1110,13 @@ public function findPetsByTagsRequest($tags) $multipart = false; // query params - if (is_array($tags)) { - $tags = ObjectSerializer::serializeCollection($tags, 'form', true); - } - if ($tags !== null) { - $queryParams['tags'] = $tags; - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tags, + 'tags', // param base name + 'array', // openApiType + 'form', // style + false // explode + ) ?? []); @@ -1133,7 +1153,7 @@ public function findPetsByTagsRequest($tags) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1153,7 +1173,7 @@ public function findPetsByTagsRequest($tags) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1235,6 +1255,9 @@ public function getPetByIdWithHttpInfo($pet_id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Pet' !== 'string') { + $content = json_decode($content); + } } return [ @@ -1249,6 +1272,9 @@ public function getPetByIdWithHttpInfo($pet_id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1315,6 +1341,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1408,7 +1437,7 @@ public function getPetByIdRequest($pet_id) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1429,7 +1458,7 @@ public function getPetByIdRequest($pet_id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1657,7 +1686,7 @@ public function updatePetRequest($pet) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1683,7 +1712,7 @@ public function updatePetRequest($pet) } $operationHost = $operationHosts[$this->hostIndex]; - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1911,7 +1940,7 @@ public function updatePetWithFormRequest($pet_id, $name = null, $status = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1931,7 +1960,7 @@ public function updatePetWithFormRequest($pet_id, $name = null, $status = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2017,6 +2046,9 @@ public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $fi $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\ApiResponse' !== 'string') { + $content = json_decode($content); + } } return [ @@ -2031,6 +2063,9 @@ public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $fi $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2101,6 +2136,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2212,7 +2250,7 @@ public function uploadFileRequest($pet_id, $additional_metadata = null, $file = } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2232,7 +2270,7 @@ public function uploadFileRequest($pet_id, $additional_metadata = null, $file = $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2318,6 +2356,9 @@ public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $required_file, $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\ApiResponse' !== 'string') { + $content = json_decode($content); + } } return [ @@ -2332,6 +2373,9 @@ public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $required_file, $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2402,6 +2446,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2519,7 +2566,7 @@ public function uploadFileWithRequiredFileRequest($pet_id, $required_file, $addi } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2539,7 +2586,7 @@ public function uploadFileWithRequiredFileRequest($pet_id, $required_file, $addi $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index cb3fc4d2f366..b246f828202d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -316,7 +316,7 @@ public function deleteOrderRequest($order_id) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -332,7 +332,7 @@ public function deleteOrderRequest($order_id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -412,6 +412,9 @@ public function getInventoryWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('array<string,int>' !== 'string') { + $content = json_decode($content); + } } return [ @@ -426,6 +429,9 @@ public function getInventoryWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -490,6 +496,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -568,7 +577,7 @@ public function getInventoryRequest() } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -589,7 +598,7 @@ public function getInventoryRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -671,6 +680,9 @@ public function getOrderByIdWithHttpInfo($order_id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Order' !== 'string') { + $content = json_decode($content); + } } return [ @@ -685,6 +697,9 @@ public function getOrderByIdWithHttpInfo($order_id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -751,6 +766,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -851,7 +869,7 @@ public function getOrderByIdRequest($order_id) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -867,7 +885,7 @@ public function getOrderByIdRequest($order_id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -949,6 +967,9 @@ public function placeOrderWithHttpInfo($order) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Order' !== 'string') { + $content = json_decode($content); + } } return [ @@ -963,6 +984,9 @@ public function placeOrderWithHttpInfo($order) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1029,6 +1053,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1120,7 +1147,7 @@ public function placeOrderRequest($order) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1136,7 +1163,7 @@ public function placeOrderRequest($order) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index f1e8fbe811f2..54fb9239a67d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -314,7 +314,7 @@ public function createUserRequest($user) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -330,7 +330,7 @@ public function createUserRequest($user) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -538,7 +538,7 @@ public function createUsersWithArrayInputRequest($user) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -554,7 +554,7 @@ public function createUsersWithArrayInputRequest($user) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -762,7 +762,7 @@ public function createUsersWithListInputRequest($user) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -778,7 +778,7 @@ public function createUsersWithListInputRequest($user) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -988,7 +988,7 @@ public function deleteUserRequest($username) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1004,7 +1004,7 @@ public function deleteUserRequest($username) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1086,6 +1086,9 @@ public function getUserByNameWithHttpInfo($username) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\User' !== 'string') { + $content = json_decode($content); + } } return [ @@ -1100,6 +1103,9 @@ public function getUserByNameWithHttpInfo($username) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1166,6 +1172,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1259,7 +1268,7 @@ public function getUserByNameRequest($username) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1275,7 +1284,7 @@ public function getUserByNameRequest($username) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1359,6 +1368,9 @@ public function loginUserWithHttpInfo($username, $password) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } } return [ @@ -1373,6 +1385,9 @@ public function loginUserWithHttpInfo($username, $password) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1441,6 +1456,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1498,27 +1516,21 @@ public function loginUserRequest($username, $password) $multipart = false; // query params - if ($username !== null) { - if('form' === 'form' && is_array($username)) { - foreach($username as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['username'] = $username; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $username, + 'username', // param base name + 'string', // openApiType + 'form', // style + true // explode + ) ?? []); // query params - if ($password !== null) { - if('form' === 'form' && is_array($password)) { - foreach($password as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['password'] = $password; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $password, + 'password', // param base name + 'string', // openApiType + 'form', // style + true // explode + ) ?? []); @@ -1555,7 +1567,7 @@ public function loginUserRequest($username, $password) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1571,7 +1583,7 @@ public function loginUserRequest($username, $password) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1762,7 +1774,7 @@ public function logoutUserRequest() } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1778,7 +1790,7 @@ public function logoutUserRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2005,7 +2017,7 @@ public function updateUserRequest($username, $user) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2021,7 +2033,7 @@ public function updateUserRequest($username, $user) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index bc8a2f0d7d75..7fe1760f7c06 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -265,7 +265,7 @@ public function setMapOfMapProperty($map_of_map_property) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -277,6 +277,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -290,7 +291,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,7 +307,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -318,6 +319,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php new file mode 100644 index 000000000000..2e244847e6ee --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php @@ -0,0 +1,352 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AllOfWithSingleRef implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AllOfWithSingleRef'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'username' => 'string', + 'single_ref_type' => 'SingleRefType' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'username' => null, + 'single_ref_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'username' => 'username', + 'single_ref_type' => 'SingleRefType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'username' => 'setUsername', + 'single_ref_type' => 'setSingleRefType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'username' => 'getUsername', + 'single_ref_type' => 'getSingleRefType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['username'] = $data['username'] ?? null; + $this->container['single_ref_type'] = $data['single_ref_type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets username + * + * @return string|null + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username username + * + * @return self + */ + public function setUsername($username) + { + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets single_ref_type + * + * @return SingleRefType|null + */ + public function getSingleRefType() + { + return $this->container['single_ref_type']; + } + + /** + * Sets single_ref_type + * + * @param SingleRefType|null $single_ref_type single_ref_type + * + * @return self + */ + public function setSingleRefType($single_ref_type) + { + $this->container['single_ref_type'] = $single_ref_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 8f18c935f4b7..8124e749d769 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -271,7 +271,7 @@ public function setColor($color) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -283,6 +283,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -296,7 +297,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -312,7 +313,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -324,6 +325,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 25ff3a47baab..f3b5b1f3ffa4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -295,7 +295,7 @@ public function setMessage($message) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -307,6 +307,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -320,7 +321,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -336,7 +337,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -348,6 +349,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 0be6f3f87298..8b1c00ff9157 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -235,7 +235,7 @@ public function setArrayArrayNumber($array_array_number) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 82d492d02085..fe1cb0a5cbc5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -235,7 +235,7 @@ public function setArrayNumber($array_number) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index dd82c329f297..6500a78c1b1a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -310,7 +310,7 @@ public function setArrayArrayOfModel($array_array_of_model) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -322,6 +322,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -335,7 +336,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -351,7 +352,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -363,6 +364,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 0c38e22578a1..5295a9af0d66 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -385,7 +385,7 @@ public function setAttName($att_name) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -397,6 +397,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -410,7 +411,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -426,7 +427,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -438,6 +439,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 50d29b904a2f..d16497f464d8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -229,7 +229,7 @@ public function setDeclawed($declawed) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -241,6 +241,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -254,7 +255,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -270,7 +271,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -282,6 +283,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index 9edfd1ba02d2..ac1f6818ff93 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -235,7 +235,7 @@ public function setDeclawed($declawed) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 2f4d71f600a3..d5dcda26b284 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -268,7 +268,7 @@ public function setName($name) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -280,6 +280,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -293,7 +294,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -309,7 +310,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -321,6 +322,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index e8d2a230dd2f..da21c71d5d45 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -236,7 +236,7 @@ public function setClass($_class) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +248,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +262,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +290,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index dd20c4ad3ce9..d3fe6e7c12af 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -235,7 +235,7 @@ public function setClient($client) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php index 6d719cd76edf..a16624c39d14 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php @@ -235,7 +235,7 @@ public function setName($name) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index f3d6dead7f8c..b5e28d06b55d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -229,7 +229,7 @@ public function setBreed($breed) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -241,6 +241,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -254,7 +255,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -270,7 +271,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -282,6 +283,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index 6175deed1be1..8208f92c08ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -235,7 +235,7 @@ public function setBreed($breed) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 796d98f08afc..42fb38e00d33 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -323,7 +323,7 @@ public function setArrayEnum($array_enum) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -335,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -348,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -364,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -376,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 3318fae0a309..95616eb83ed9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -588,7 +588,7 @@ public function setOuterEnumIntegerDefaultValue($outer_enum_integer_default_valu * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -600,6 +600,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -613,7 +614,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -629,7 +630,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -641,6 +642,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index 7c33f6f0fe7a..28759fd711d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -236,7 +236,7 @@ public function setSourceUri($source_uri) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +248,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +262,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +290,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index 615926a80294..ee8db3b3a77f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -265,7 +265,7 @@ public function setFiles($files) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -277,6 +277,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -290,7 +291,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,7 +307,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -318,6 +319,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index e0933edb6391..752d3eb6f9d5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -235,7 +235,7 @@ public function setBar($bar) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 4969dbac63c8..8447d794be36 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -819,7 +819,7 @@ public function setPatternWithDigitsAndDelimiter($pattern_with_digits_and_delimi * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -831,6 +831,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -844,7 +845,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -860,7 +861,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -872,6 +873,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index b6c793587331..070bcda1e6bc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -265,7 +265,7 @@ public function setFoo($foo) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -277,6 +277,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -290,7 +291,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,7 +307,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -318,6 +319,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index 3621b85dd613..52897fded0ff 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -236,7 +236,7 @@ public function setNullableMessage($nullable_message) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +248,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +262,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +290,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index 73db6b06bd15..9c19fd6a0a8c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -235,7 +235,7 @@ public function setString($string) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 1be32bfd319d..209b437269ee 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -349,7 +349,7 @@ public function setIndirectMap($indirect_map) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -361,6 +361,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -374,7 +375,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -390,7 +391,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -402,6 +403,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 8a9c2971b0cd..e3a69ea6899e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -295,7 +295,7 @@ public function setMap($map) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -307,6 +307,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -320,7 +321,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -336,7 +337,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -348,6 +349,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 4695e4bd7828..8f5c3c6d1ca6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -266,7 +266,7 @@ public function setClass($class) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,6 +278,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -291,7 +292,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -307,7 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -319,6 +320,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 8180610c29d4..97cc7aaa612a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -235,7 +235,7 @@ public function set123List($_123_list) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index e800a5a82a06..60b77d29253a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -236,7 +236,7 @@ public function setReturn($return) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +248,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +262,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +290,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 70c9081df07e..632346409b7f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -329,7 +329,7 @@ public function set123Number($_123_number) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -341,6 +341,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -354,7 +355,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -370,7 +371,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -382,6 +383,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index f121e225c12c..f545804f713a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -565,7 +565,7 @@ public function setObjectItemsNullable($object_items_nullable) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -577,6 +577,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -590,7 +591,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -606,7 +607,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -618,6 +619,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index b96647db6a77..83a712516d1a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -235,7 +235,7 @@ public function setJustNumber($just_number) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php index b26d4333856a..0f3768b6fe45 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php @@ -331,7 +331,7 @@ public function setBars($bars) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -343,6 +343,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -356,7 +357,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -372,7 +373,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -384,6 +385,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index 2cd2e6585a0a..0deed17c1141 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -421,7 +421,7 @@ public function setComplete($complete) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -433,6 +433,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -446,7 +447,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -462,7 +463,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -474,6 +475,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 216024794b13..cb5dea9f9d9b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -295,7 +295,7 @@ public function setMyBoolean($my_boolean) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -307,6 +307,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -320,7 +321,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -336,7 +337,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -348,6 +349,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php index 9057d802d2e9..7a27b23ad121 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -238,7 +238,7 @@ public function setValue($value) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -250,6 +250,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -263,7 +264,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -279,7 +280,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -291,6 +292,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 5c6cbb8a8694..d648ac61aa43 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -429,7 +429,7 @@ public function setStatus($status) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -441,6 +441,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -454,7 +455,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -470,7 +471,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -482,6 +483,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 60320189cbbb..53442b32dcdc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -265,7 +265,7 @@ public function setBaz($baz) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -277,6 +277,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -290,7 +291,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,7 +307,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -318,6 +319,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php new file mode 100644 index 000000000000..ff92f27cd1da --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php @@ -0,0 +1,62 @@ +container[$offset]); } @@ -247,6 +247,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -260,7 +261,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,7 +277,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -288,6 +289,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 7d3ab93bb2a8..e627b2dfca75 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -265,7 +265,7 @@ public function setName($name) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -277,6 +277,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -290,7 +291,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,7 +307,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -318,6 +319,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 074090c4434d..d1219bf6ab09 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -445,7 +445,7 @@ public function setUserStatus($user_status) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -457,6 +457,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -470,7 +471,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -486,7 +487,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -498,6 +499,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 9bd27f580625..599da5492da8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -158,22 +158,61 @@ public static function toPathValue($value) } /** - * Take value and turn it into a string suitable for inclusion in - * the query, by imploding comma-separated if it's an object. - * If it's a string, pass through unchanged. It will be url-encoded - * later. + * Take query parameter properties and turn it into an array suitable for + * native http_build_query or GuzzleHttp\Psr7\Query::build. * - * @param string[]|string|\DateTime $object an object to be serialized to a string + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType eg. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option * - * @return string the serialized object + * @return array */ - public static function toQueryValue($object) - { - if (is_array($object)) { - return implode(',', $object); - } else { - return self::toString($object); + public static function toQueryValue( + $value, + string $paramName, + string $openApiType = 'string', + string $style = 'form', + bool $explode = true + ): array { + // return empty string + if (empty($value)) return ["{$paramName}" => '']; + + $query = []; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + + // since \GuzzleHttp\Psr7\Query::build fails with nested arrays + // need to flatten array first + $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { + if (!is_array($arr)) return $arr; + + foreach ($arr as $k => $v) { + $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + + if (is_array($v)) { + $flattenArray($v, $prop, $result); + } else { + if ($style !== 'deepObject' && !$explode) { + // push key itself + $result[] = $prop; + } + $result[$prop] = $v; + } + } + return $result; + }; + + $value = $flattenArray($value, $paramName); + + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { + return $value; } + + // handle style in serializeCollection + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + + return $query; } /** @@ -230,7 +269,7 @@ public static function toString($value) } elseif (is_bool($value)) { return $value ? 'true' : 'false'; } else { - return $value; + return (string) $value; } } @@ -412,4 +451,24 @@ public static function deserialize($data, $class, $httpHeaders = null) return $instance; } } + + /** + * Native `http_build_query` wrapper. + * @see https://www.php.net/manual/en/function.http-build-query + * + * @param array|object $data May be an array or object containing properties. + * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. + * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. + * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. + * + * @return string + */ + public static function buildQuery( + $data, + string $numeric_prefix = '', + ?string $arg_separator = null, + int $encoding_type = \PHP_QUERY_RFC3986 + ): string { + return \GuzzleHttp\Psr7\Query::build($data, $encoding_type); + } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php new file mode 100644 index 000000000000..b0d0a232b9d0 --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php @@ -0,0 +1,99 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "username" + */ + public function testPropertyUsername() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "single_ref_type" + */ + public function testPropertySingleRefType() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php new file mode 100644 index 000000000000..721ac183ec36 --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php @@ -0,0 +1,81 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php index ca0fc505d6d0..8e40101c840f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php @@ -17,11 +17,11 @@ public function testDateTimeSanitazion() $data = ObjectSerializer::sanitizeForSerialization($input); - $this->assertEquals($data->dateTime, '1973-04-30T17:05:00+02:00'); + $this->assertEquals('1973-04-30T17:05:00+02:00', $data->dateTime); ObjectSerializer::setDateTimeFormat(\DateTime::RFC3339_EXTENDED); $dataFraction = ObjectSerializer::sanitizeForSerialization($input); - $this->assertEquals($dataFraction->dateTime, '1973-04-30T17:05:00.000+02:00'); + $this->assertEquals('1973-04-30T17:05:00.000+02:00', $dataFraction->dateTime); ObjectSerializer::setDateTimeFormat(\DateTime::ATOM); } @@ -35,6 +35,6 @@ public function testDateSanitazion() $data = ObjectSerializer::sanitizeForSerialization($input); - $this->assertEquals($data->date, '1973-04-30'); + $this->assertEquals('1973-04-30', $data->date); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php index bb919ffaa668..2d41d9e726e8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php @@ -130,4 +130,248 @@ public function provideTimestamps(): array ], ]; } + + /** + * @covers ObjectSerializer::toQueryValue + * @dataProvider provideQueryParams + */ + public function testToQueryValue( + $data, + string $paramName, + string $openApiType, + string $style, + bool $explode, + $expected + ): void { + $value = ObjectSerializer::toQueryValue($data, $paramName, $openApiType, $style, $explode); + $query = ObjectSerializer::buildQuery($value); + $this->assertEquals($expected, $query); + } + + public function provideQueryParams(): array + { + $array = ['blue', 'black', 'brown']; + $object = ['R' => 100, 'G' => 200, 'B' => 150]; + + return [ + // style form + // color= + 'form empty, explode on' => [ + '', 'color', 'string', 'form', true, 'color=', + ], + // color= + 'form empty, explode off' => [ + '', 'color', 'string', 'form', false, 'color=', + ], + // color=blue + 'form string, explode on' => [ + 'blue', 'color', 'string', 'form', true, 'color=blue', + ], + // color=blue + 'form string, explode off' => [ + 'blue', 'color', 'string', 'form', false, 'color=blue', + ], + // color=blue&color=black&color=brown + 'form array, explode on' => [ + $array, 'color', 'array', 'form', true, 'color=blue&color=black&color=brown', + ], + // color=blue&color=black&color=brown + 'form nested array, explode on' => [ + ['foobar' => $array], 'color', 'array', 'form', true, 'color=blue&color=black&color=brown', + ], + // color=blue,black,brown + 'form array, explode off' => [ + $array, 'color', 'array', 'form', false, 'color=blue%2Cblack%2Cbrown', + ], + // color=blue,black,brown + 'form nested array, explode off' => [ + ['foobar' => $array], 'color', 'array', 'form', false, 'color=blue%2Cblack%2Cbrown', + ], + // R=100&G=200&B=150 + 'form object, explode on' => [ + $object, 'color', 'object', 'form', true, 'R=100&G=200&B=150', + ], + // color=R,100,G,200,B,150 + 'form object, explode off' => [ + $object, 'color', 'object', 'form', false, 'color=R%2C100%2CG%2C200%2CB%2C150', + ], + + // SPACE DELIMITED + // color=blue + 'spaceDelimited primitive, explode off' => [ + 'blue', 'color', 'string', 'spaceDelimited', false, 'color=blue', + ], + // color=blue + 'spaceDelimited primitive, explode on' => [ + 'blue', 'color', 'string', 'spaceDelimited', true, 'color=blue', + ], + // color=blue%20black%20brown + 'spaceDelimited array, explode off' => [ + $array, 'color', 'array', 'spaceDelimited', false, 'color=blue%20black%20brown', + ], + // color=blue&color=black&color=brown + 'spaceDelimited array, explode on' => [ + $array, 'color', 'array', 'spaceDelimited', true, 'color=blue&color=black&color=brown', + ], + // color=R%20100%20G%20200%20B%20150 + // swagger editor gives color=R,100,G,200,B,150 + 'spaceDelimited object, explode off' => [ + $object, 'color', 'object', 'spaceDelimited', false, 'color=R%20100%20G%20200%20B%20150', + ], + // R=100&G=200&B=150 + 'spaceDelimited object, explode on' => [ + $object, 'color', 'object', 'spaceDelimited', true, 'R=100&G=200&B=150', + ], + + // PIPE DELIMITED + // color=blue + 'pipeDelimited primitive, explode off' => [ + 'blue', 'color', 'string', 'pipeDelimited', false, 'color=blue', + ], + // color=blue + 'pipeDelimited primitive, explode on' => [ + 'blue', 'color', 'string', 'pipeDelimited', true, 'color=blue', + ], + // color=blue|black|brown + 'pipeDelimited array, explode off' => [ + $array, 'color', 'array', 'pipeDelimited', false, 'color=blue%7Cblack%7Cbrown', + ], + // color=blue&color=black&color=brown + 'pipeDelimited array, explode on' => [ + $array, 'color', 'array', 'pipeDelimited', true, 'color=blue&color=black&color=brown', + ], + // color=R|100|G|200|B|150 + // swagger editor gives color=R,100,G,200,B,150 + 'pipeDelimited object, explode off' => [ + $object, 'color', 'object', 'pipeDelimited', false, 'color=R%7C100%7CG%7C200%7CB%7C150', + ], + // R=100&G=200&B=150 + 'pipeDelimited object, explode on' => [ + $object, 'color', 'object', 'pipeDelimited', true, 'R=100&G=200&B=150', + ], + + // DEEP OBJECT + // color=blue + 'deepObject primitive, explode off' => [ + 'blue', 'color', 'string', 'deepObject', false, 'color=blue', + ], + 'deepObject primitive, explode on' => [ + 'blue', 'color', 'string', 'deepObject', true, 'color=blue', + ], + // color=blue,black,brown + 'deepObject array, explode off' => [ + $array, 'color', 'array', 'deepObject', false, 'color=blue%2Cblack%2Cbrown', + ], + // color=blue&color=black&color=brown + 'deepObject array, explode on' => [ + $array, 'color', 'array', 'deepObject', true, 'color=blue&color=black&color=brown', + ], + // color[R]=100&color[G]=200&color[B]=150 + 'deepObject object, explode off' => [ + $object, 'color', 'object', 'deepObject', false, 'color%5BR%5D=100&color%5BG%5D=200&color%5BB%5D=150', + ], + // color[R]=100&color[G]=200&color[B]=150 + 'deepObject object, explode on' => [ + $object, 'color', 'object', 'deepObject', true, 'color%5BR%5D=100&color%5BG%5D=200&color%5BB%5D=150', + ], + // filter[or][0][name]=John&filter[or][1][email]=john@doe.com + 'example from @nadar' => [ + [ + 'or' => + [ + ['name' => 'John'], + ['email' => 'john@doe.com'], + ], + ], + 'filter', + 'object', + 'deepObject', + true, + 'filter%5Bor%5D%5B0%5D%5Bname%5D=John&filter%5Bor%5D%5B1%5D%5Bemail%5D=john%40doe.com' + ], + ]; + } + + /** + * @covers ObjectSerializer::toQueryValue + * @dataProvider provideDeepObjects + */ + public function testDeepObjectStyleQueryParam( + $data, + $paramName, + $expected + ): void { + $value = ObjectSerializer::buildQuery(ObjectSerializer::toQueryValue($data, $paramName, 'object', 'deepObject', true)); + parse_str($value, $result); + $this->assertEquals($expected, $result); + } + + public function provideDeepObjects(): array + { + return [ + /** example @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-examples */ + 'example OpenAPISpec doc' => [ + ['R' => 100, 'G' => 200, 'B' => 150], + 'color', + [ + 'color' => [ + 'R' => 100, + 'G' => 200, + 'B' => 150, + ], + ], + ], + /** example @see https://swagger.io/docs/specification/serialization/ */ + 'example Swagger doc' => [ + ['role' => 'admin', 'firstName' => 'Alex'], + 'id', + [ + 'id' => [ + 'role' => 'admin', + 'firstName' => 'Alex', + ], + ], + ], + ]; + } + + /** + * @dataProvider provideToStringInput + */ + public function testToString($input, string $expected): void + { + $result = ObjectSerializer::toString($input); + + $this->assertSame($expected, $result); + } + + public function provideToStringInput(): array + { + return [ + 'int' => [ + 'input' => 1, + 'expected' => '1', + ], + 'int 0' => [ + 'input' => 0, + 'expected' => '0', + ], + 'false' => [ + 'input' => false, + 'expected' => 'false', + ], + 'true' => [ + 'input' => true, + 'expected' => 'true', + ], + 'some string' => [ + 'input' => 'some string', + 'expected' => 'some string', + ], + 'a date' => [ + 'input' => new \DateTime('14-04-2022'), + 'expected' => '2022-04-14T00:00:00+00:00', + ], + ]; + } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php index aed0fade8080..f5a00efc6b8b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php @@ -56,6 +56,27 @@ public function testInlineAdditionalProperties() $this->assertSame('{"foo":"bar"}', $request->getBody()->getContents()); } + /** + * @see https://github.com/OpenAPITools/openapi-generator/pull/11225 + * @dataProvider provideQueryParameters + */ + public function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $url, $context, $allow_empty, $language, $expected) + { + $request = $this->fakeApi->testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $url, $context, $allow_empty, $language); + $this->assertEquals($expected, urldecode($request->getUri()->getQuery())); + } + + public function provideQueryParameters() + { + $array = ['blue', 'black', 'brown']; + $object = ['R' => 100, 'G' => 200, 'B' => 150]; + return [ + [ + $array, $array, $array, $array, $array, 'blue', $object, 'pipe=blue|black|brown&ioutil=blue,black,brown&http=blue black brown&url=blue,black,brown&context=blue&context=black&context=brown&R=100&G=200&B=150&allowEmpty=blue', + ], + ]; + } + // missing example for collection path param in config // public function testPathParamCollection() // { diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php index d8c2cb5901b1..e7a8b97419a5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php @@ -60,13 +60,13 @@ public function testGetPetById() $petId = 10005; $pet = $this->api->getPetById($petId); - $this->assertSame($pet->getId(), $petId); - $this->assertSame($pet->getName(), 'PHP Unit Test'); - $this->assertSame($pet->getPhotoUrls()[0], 'http://test_php_unit_test.com'); - $this->assertSame($pet->getCategory()->getId(), $petId); - $this->assertSame($pet->getCategory()->getName(), 'test php category'); - $this->assertSame($pet->getTags()[0]->getId(), $petId); - $this->assertSame($pet->getTags()[0]->getName(), 'test php tag'); + $this->assertSame($petId, $pet->getId()); + $this->assertSame('PHP Unit Test', $pet->getName()); + $this->assertSame('http://test_php_unit_test.com', $pet->getPhotoUrls()[0]); + $this->assertSame($petId, $pet->getCategory()->getId()); + $this->assertSame('test php category', $pet->getCategory()->getName()); + $this->assertSame($petId, $pet->getTags()[0]->getId()); + $this->assertSame('test php tag', $pet->getTags()[0]->getName()); } /** @@ -105,14 +105,14 @@ public function testGetPetByIdWithHttpInfo() /** @var $pet Pet */ list($pet, $status_code, $response_headers) = $this->api->getPetByIdWithHttpInfo($petId); - $this->assertSame($pet->getId(), $petId); - $this->assertSame($pet->getName(), 'PHP Unit Test'); - $this->assertSame($pet->getCategory()->getId(), $petId); - $this->assertSame($pet->getCategory()->getName(), 'test php category'); - $this->assertSame($pet->getTags()[0]->getId(), $petId); - $this->assertSame($pet->getTags()[0]->getName(), 'test php tag'); - $this->assertSame($status_code, 200); - $this->assertSame($response_headers['Content-Type'], ['application/json']); + $this->assertSame($petId, $pet->getId()); + $this->assertSame('PHP Unit Test', $pet->getName()); + $this->assertSame($petId, $pet->getCategory()->getId()); + $this->assertSame('test php category', $pet->getCategory()->getName()); + $this->assertSame($petId, $pet->getTags()[0]->getId()); + $this->assertSame('test php tag', $pet->getTags()[0]->getName()); + $this->assertSame(200, $status_code); + $this->assertSame(['application/json'], $response_headers['Content-Type']); } public function testFindPetByStatus() @@ -120,9 +120,9 @@ public function testFindPetByStatus() $response = $this->api->findPetsByStatus('available'); $this->assertGreaterThan(0, count($response)); // at least one object returned - $this->assertSame(get_class($response[0]), Pet::class); // verify the object is Pet + $this->assertInstanceOf(Pet::class, $response[0]); // verify the object is Pet foreach ($response as $pet) { - $this->assertSame($pet->getStatus(), 'available'); + $this->assertSame('available', $pet->getStatus()); } $response = $this->api->findPetsByStatus('unknown_and_incorrect_status'); @@ -141,9 +141,9 @@ public function testUpdatePet() // verify updated Pet $result = $this->api->getPetById($petId); - $this->assertSame($result->getId(), $petId); - $this->assertSame($result->getStatus(), 'pending'); - $this->assertSame($result->getName(), 'updatePet'); + $this->assertSame($petId, $result->getId()); + $this->assertSame('pending', $result->getStatus()); + $this->assertSame('updatePet', $result->getName()); } // test updatePetWithFormWithHttpInfo and verify by the "name" of the response @@ -158,11 +158,11 @@ public function testUpdatePetWithFormWithHttpInfo() ); // return nothing (void) $this->assertNull($update_response); - $this->assertSame($status_code, 200); - $this->assertSame($http_headers['Content-Type'], ['application/json']); + $this->assertSame(200, $status_code); + $this->assertSame(['application/json'], $http_headers['Content-Type']); $response = $this->api->getPetById($petId); - $this->assertSame($response->getId(), $petId); - $this->assertSame($response->getName(), 'update pet with form with http info'); + $this->assertSame($petId, $response->getId()); + $this->assertSame('update pet with form with http info', $response->getName()); } // test updatePetWithForm and verify by the "name" and "status" of the response @@ -174,9 +174,9 @@ public function testUpdatePetWithForm() $this->assertNull($result); $response = $this->api->getPetById($pet_id); - $this->assertSame($response->getId(), $pet_id); - $this->assertSame($response->getName(), 'update pet with form'); - $this->assertSame($response->getStatus(), 'sold'); + $this->assertSame($pet_id, $response->getId()); + $this->assertSame('update pet with form', $response->getName()); + $this->assertSame('sold', $response->getStatus()); } // test addPet and verify by the "id" and "name" of the response @@ -194,8 +194,8 @@ public function testAddPet() // verify added Pet $response = $this->api->getPetById($new_pet_id); - $this->assertSame($response->getId(), $new_pet_id); - $this->assertSame($response->getName(), 'PHP Unit Test 2'); + $this->assertSame($new_pet_id, $response->getId()); + $this->assertSame('PHP Unit Test 2', $response->getName()); } /* diff --git a/samples/client/petstore/powershell/.openapi-generator/FILES b/samples/client/petstore/powershell/.openapi-generator/FILES index 5f8aa4fd57d6..a23fa36f7ee0 100644 --- a/samples/client/petstore/powershell/.openapi-generator/FILES +++ b/samples/client/petstore/powershell/.openapi-generator/FILES @@ -1,25 +1,163 @@ Build.ps1 README.md appveyor.yml +docs/200Response.md +docs/AdditionalPropertiesClass.md +docs/Animal.md docs/ApiResponse.md +docs/Apple.md +docs/AppleReq.md +docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfNumberOnly.md +docs/ArrayTest.md +docs/Banana.md +docs/BananaReq.md +docs/BasquePig.md +docs/Capitalization.md +docs/Cat.md +docs/CatAllOf.md docs/Category.md +docs/ClassModel.md +docs/Client.md +docs/ComplexQuadrilateral.md +docs/DanishPig.md +docs/DeprecatedObject.md +docs/Dog.md +docs/DogAllOf.md +docs/Drawing.md +docs/EnumArrays.md +docs/EnumTest.md +docs/EquilateralTriangle.md +docs/File.md +docs/FileSchemaTestClass.md +docs/Foo.md +docs/FormatTest.md +docs/Fruit.md +docs/FruitReq.md +docs/GmFruit.md +docs/GrandparentAnimal.md +docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md +docs/InlineResponseDefault.md +docs/IsoscelesTriangle.md +docs/List.md +docs/Mammal.md +docs/MapTest.md +docs/MixedPropertiesAndAdditionalPropertiesClass.md +docs/Name.md +docs/NullableClass.md +docs/NullableShape.md +docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md +docs/OuterComposite.md +docs/OuterEnum.md +docs/PSAnotherFakeApi.md +docs/PSDefaultApi.md +docs/PSFakeApi.md +docs/PSFakeClassnameTags123Api.md docs/PSPetApi.md docs/PSStoreApi.md docs/PSUserApi.md +docs/ParentPet.md docs/Pet.md +docs/PetWithRequiredTags.md +docs/Pig.md +docs/Quadrilateral.md +docs/QuadrilateralInterface.md +docs/ReadOnlyFirst.md +docs/Return.md +docs/ScaleneTriangle.md +docs/Shape.md +docs/ShapeInterface.md +docs/ShapeOrNull.md +docs/SimpleQuadrilateral.md +docs/SpecialModelName.md docs/Tag.md +docs/Triangle.md +docs/TriangleInterface.md docs/User.md +docs/Whale.md +docs/Zebra.md +src/PSPetstore/Api/PSAnotherFakeApi.ps1 +src/PSPetstore/Api/PSDefaultApi.ps1 +src/PSPetstore/Api/PSFakeApi.ps1 +src/PSPetstore/Api/PSFakeClassnameTags123Api.ps1 src/PSPetstore/Api/PSPetApi.ps1 src/PSPetstore/Api/PSStoreApi.ps1 src/PSPetstore/Api/PSUserApi.ps1 src/PSPetstore/Client/PSConfiguration.ps1 +src/PSPetstore/Model/AdditionalPropertiesClass.ps1 +src/PSPetstore/Model/Animal.ps1 src/PSPetstore/Model/ApiResponse.ps1 +src/PSPetstore/Model/Apple.ps1 +src/PSPetstore/Model/AppleReq.ps1 +src/PSPetstore/Model/ArrayOfArrayOfNumberOnly.ps1 +src/PSPetstore/Model/ArrayOfNumberOnly.ps1 +src/PSPetstore/Model/ArrayTest.ps1 +src/PSPetstore/Model/Banana.ps1 +src/PSPetstore/Model/BananaReq.ps1 +src/PSPetstore/Model/BasquePig.ps1 +src/PSPetstore/Model/Capitalization.ps1 +src/PSPetstore/Model/Cat.ps1 +src/PSPetstore/Model/CatAllOf.ps1 src/PSPetstore/Model/Category.ps1 +src/PSPetstore/Model/ClassModel.ps1 +src/PSPetstore/Model/Client.ps1 +src/PSPetstore/Model/ComplexQuadrilateral.ps1 +src/PSPetstore/Model/DanishPig.ps1 +src/PSPetstore/Model/DeprecatedObject.ps1 +src/PSPetstore/Model/Dog.ps1 +src/PSPetstore/Model/DogAllOf.ps1 +src/PSPetstore/Model/Drawing.ps1 +src/PSPetstore/Model/EnumArrays.ps1 +src/PSPetstore/Model/EnumTest.ps1 +src/PSPetstore/Model/EquilateralTriangle.ps1 +src/PSPetstore/Model/File.ps1 +src/PSPetstore/Model/FileSchemaTestClass.ps1 +src/PSPetstore/Model/Foo.ps1 +src/PSPetstore/Model/FormatTest.ps1 +src/PSPetstore/Model/Fruit.ps1 +src/PSPetstore/Model/FruitReq.ps1 +src/PSPetstore/Model/GmFruit.ps1 +src/PSPetstore/Model/GrandparentAnimal.ps1 +src/PSPetstore/Model/HasOnlyReadOnly.ps1 +src/PSPetstore/Model/HealthCheckResult.ps1 +src/PSPetstore/Model/InlineResponseDefault.ps1 +src/PSPetstore/Model/IsoscelesTriangle.ps1 +src/PSPetstore/Model/List.ps1 +src/PSPetstore/Model/Mammal.ps1 +src/PSPetstore/Model/MapTest.ps1 +src/PSPetstore/Model/MixedPropertiesAndAdditionalPropertiesClass.ps1 +src/PSPetstore/Model/Model200Response.ps1 +src/PSPetstore/Model/ModelReturn.ps1 +src/PSPetstore/Model/Name.ps1 +src/PSPetstore/Model/NullableClass.ps1 +src/PSPetstore/Model/NullableShape.ps1 +src/PSPetstore/Model/NumberOnly.ps1 +src/PSPetstore/Model/ObjectWithDeprecatedFields.ps1 src/PSPetstore/Model/Order.ps1 +src/PSPetstore/Model/OuterComposite.ps1 +src/PSPetstore/Model/OuterEnum.ps1 +src/PSPetstore/Model/ParentPet.ps1 src/PSPetstore/Model/Pet.ps1 +src/PSPetstore/Model/PetWithRequiredTags.ps1 +src/PSPetstore/Model/Pig.ps1 +src/PSPetstore/Model/Quadrilateral.ps1 +src/PSPetstore/Model/QuadrilateralInterface.ps1 +src/PSPetstore/Model/ReadOnlyFirst.ps1 +src/PSPetstore/Model/ScaleneTriangle.ps1 +src/PSPetstore/Model/Shape.ps1 +src/PSPetstore/Model/ShapeInterface.ps1 +src/PSPetstore/Model/ShapeOrNull.ps1 +src/PSPetstore/Model/SimpleQuadrilateral.ps1 +src/PSPetstore/Model/SpecialModelName.ps1 src/PSPetstore/Model/Tag.ps1 +src/PSPetstore/Model/Triangle.ps1 +src/PSPetstore/Model/TriangleInterface.ps1 src/PSPetstore/Model/User.ps1 +src/PSPetstore/Model/Whale.ps1 +src/PSPetstore/Model/Zebra.ps1 src/PSPetstore/PSPetstore.psm1 src/PSPetstore/Private/Get-CommonParameters.ps1 src/PSPetstore/Private/Out-DebugParameter.ps1 diff --git a/samples/client/petstore/powershell/Build.ps1 b/samples/client/petstore/powershell/Build.ps1 index dc4e005472d5..e15418c3aadf 100644 --- a/samples/client/petstore/powershell/Build.ps1 +++ b/samples/client/petstore/powershell/Build.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/samples/client/petstore/powershell/CIRunTest.ps1 b/samples/client/petstore/powershell/CIRunTest.ps1 new file mode 100644 index 000000000000..82aaf5ce46ca --- /dev/null +++ b/samples/client/petstore/powershell/CIRunTest.ps1 @@ -0,0 +1,14 @@ +# assuming the current directory is already set correctly +#cd samples\client\petstore\powershell\ +$ErrorActionPreference = "Stop" + +.\Build.ps1 + +Import-Module -Name '.\src\PSPetstore' + +$Result = Invoke-Pester -PassThru + +if ($Result.FailedCount -gt 0) { + $host.SetShouldExit($Result.FailedCount) + exit $Result.FailedCount +} diff --git a/samples/client/petstore/powershell/README.md b/samples/client/petstore/powershell/README.md index d394a82a0e91..f62e510dd220 100644 --- a/samples/client/petstore/powershell/README.md +++ b/samples/client/petstore/powershell/README.md @@ -1,6 +1,6 @@ # PSPetstore - the PowerShell module for the 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. +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This PowerShell module is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -55,6 +55,24 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*PSAnotherFakeApi* | [**Invoke-PS123TestSpecialTags**](docs/PSAnotherFakeApi.md#Invoke-PS123TestSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +*PSDefaultApi* | [**Invoke-PSFooGet**](docs/PSDefaultApi.md#Invoke-PSFooGet) | **GET** /foo | +*PSFakeApi* | [**Invoke-PSFakeHealthGet**](docs/PSFakeApi.md#Invoke-PSFakeHealthGet) | **GET** /fake/health | Health check endpoint +*PSFakeApi* | [**Invoke-PSFakeOuterBooleanSerialize**](docs/PSFakeApi.md#Invoke-PSFakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +*PSFakeApi* | [**Invoke-PSFakeOuterCompositeSerialize**](docs/PSFakeApi.md#Invoke-PSFakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +*PSFakeApi* | [**Invoke-PSFakeOuterNumberSerialize**](docs/PSFakeApi.md#Invoke-PSFakeOuterNumberSerialize) | **POST** /fake/outer/number | +*PSFakeApi* | [**Invoke-PSFakeOuterStringSerialize**](docs/PSFakeApi.md#Invoke-PSFakeOuterStringSerialize) | **POST** /fake/outer/string | +*PSFakeApi* | [**Get-PSArrayOfEnums**](docs/PSFakeApi.md#Get-PSArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums +*PSFakeApi* | [**Test-PSBodyWithFileSchema**](docs/PSFakeApi.md#Test-PSBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | +*PSFakeApi* | [**Test-PSBodyWithQueryParams**](docs/PSFakeApi.md#Test-PSBodyWithQueryParams) | **PUT** /fake/body-with-query-params | +*PSFakeApi* | [**Test-PSClientModel**](docs/PSFakeApi.md#Test-PSClientModel) | **PATCH** /fake | To test ""client"" model +*PSFakeApi* | [**Test-PSEndpointParameters**](docs/PSFakeApi.md#Test-PSEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*PSFakeApi* | [**Test-PSEnumParameters**](docs/PSFakeApi.md#Test-PSEnumParameters) | **GET** /fake | To test enum parameters +*PSFakeApi* | [**Test-PSGroupParameters**](docs/PSFakeApi.md#Test-PSGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*PSFakeApi* | [**Test-PSInlineAdditionalProperties**](docs/PSFakeApi.md#Test-PSInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*PSFakeApi* | [**Test-PSJsonFormData**](docs/PSFakeApi.md#Test-PSJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*PSFakeApi* | [**Test-PSQueryParameterCollectionFormat**](docs/PSFakeApi.md#Test-PSQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +*PSFakeClassnameTags123Api* | [**Test-PSClassname**](docs/PSFakeClassnameTags123Api.md#Test-PSClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PSPetApi* | [**Add-PSPet**](docs/PSPetApi.md#Add-PSPet) | **POST** /pet | Add a new pet to the store *PSPetApi* | [**Remove-Pet**](docs/PSPetApi.md#remove-pet) | **DELETE** /pet/{petId} | Deletes a pet *PSPetApi* | [**Find-PSPetsByStatus**](docs/PSPetApi.md#Find-PSPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status @@ -63,9 +81,10 @@ Class | Method | HTTP request | Description *PSPetApi* | [**Update-PSPet**](docs/PSPetApi.md#Update-PSPet) | **PUT** /pet | Update an existing pet *PSPetApi* | [**Update-PSPetWithForm**](docs/PSPetApi.md#Update-PSPetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *PSPetApi* | [**Invoke-PSUploadFile**](docs/PSPetApi.md#Invoke-PSUploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PSStoreApi* | [**Remove-PSOrder**](docs/PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*PSPetApi* | [**Invoke-PSUploadFileWithRequiredFile**](docs/PSPetApi.md#Invoke-PSUploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*PSStoreApi* | [**Remove-PSOrder**](docs/PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *PSStoreApi* | [**Get-PSInventory**](docs/PSStoreApi.md#Get-PSInventory) | **GET** /store/inventory | Returns pet inventories by status -*PSStoreApi* | [**Get-PSOrderById**](docs/PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*PSStoreApi* | [**Get-PSOrderById**](docs/PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *PSStoreApi* | [**Invoke-PSPlaceOrder**](docs/PSStoreApi.md#Invoke-PSPlaceOrder) | **POST** /store/order | Place an order for a pet *PSUserApi* | [**New-PSUser**](docs/PSUserApi.md#New-PSUser) | **POST** /user | Create user *PSUserApi* | [**New-PSUsersWithArrayInput**](docs/PSUserApi.md#New-PSUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array @@ -79,12 +98,77 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [PSPetstore/Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [PSPetstore/Model.Animal](docs/Animal.md) - [PSPetstore/Model.ApiResponse](docs/ApiResponse.md) + - [PSPetstore/Model.Apple](docs/Apple.md) + - [PSPetstore/Model.AppleReq](docs/AppleReq.md) + - [PSPetstore/Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [PSPetstore/Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [PSPetstore/Model.ArrayTest](docs/ArrayTest.md) + - [PSPetstore/Model.Banana](docs/Banana.md) + - [PSPetstore/Model.BananaReq](docs/BananaReq.md) + - [PSPetstore/Model.BasquePig](docs/BasquePig.md) + - [PSPetstore/Model.Capitalization](docs/Capitalization.md) + - [PSPetstore/Model.Cat](docs/Cat.md) + - [PSPetstore/Model.CatAllOf](docs/CatAllOf.md) - [PSPetstore/Model.Category](docs/Category.md) + - [PSPetstore/Model.ClassModel](docs/ClassModel.md) + - [PSPetstore/Model.Client](docs/Client.md) + - [PSPetstore/Model.ComplexQuadrilateral](docs/ComplexQuadrilateral.md) + - [PSPetstore/Model.DanishPig](docs/DanishPig.md) + - [PSPetstore/Model.DeprecatedObject](docs/DeprecatedObject.md) + - [PSPetstore/Model.Dog](docs/Dog.md) + - [PSPetstore/Model.DogAllOf](docs/DogAllOf.md) + - [PSPetstore/Model.Drawing](docs/Drawing.md) + - [PSPetstore/Model.EnumArrays](docs/EnumArrays.md) + - [PSPetstore/Model.EnumTest](docs/EnumTest.md) + - [PSPetstore/Model.EquilateralTriangle](docs/EquilateralTriangle.md) + - [PSPetstore/Model.File](docs/File.md) + - [PSPetstore/Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [PSPetstore/Model.Foo](docs/Foo.md) + - [PSPetstore/Model.FormatTest](docs/FormatTest.md) + - [PSPetstore/Model.Fruit](docs/Fruit.md) + - [PSPetstore/Model.FruitReq](docs/FruitReq.md) + - [PSPetstore/Model.GmFruit](docs/GmFruit.md) + - [PSPetstore/Model.GrandparentAnimal](docs/GrandparentAnimal.md) + - [PSPetstore/Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [PSPetstore/Model.HealthCheckResult](docs/HealthCheckResult.md) + - [PSPetstore/Model.InlineResponseDefault](docs/InlineResponseDefault.md) + - [PSPetstore/Model.IsoscelesTriangle](docs/IsoscelesTriangle.md) + - [PSPetstore/Model.List](docs/List.md) + - [PSPetstore/Model.Mammal](docs/Mammal.md) + - [PSPetstore/Model.MapTest](docs/MapTest.md) + - [PSPetstore/Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [PSPetstore/Model.Model200Response](docs/Model200Response.md) + - [PSPetstore/Model.ModelReturn](docs/ModelReturn.md) + - [PSPetstore/Model.Name](docs/Name.md) + - [PSPetstore/Model.NullableClass](docs/NullableClass.md) + - [PSPetstore/Model.NullableShape](docs/NullableShape.md) + - [PSPetstore/Model.NumberOnly](docs/NumberOnly.md) + - [PSPetstore/Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [PSPetstore/Model.Order](docs/Order.md) + - [PSPetstore/Model.OuterComposite](docs/OuterComposite.md) + - [PSPetstore/Model.OuterEnum](docs/OuterEnum.md) + - [PSPetstore/Model.ParentPet](docs/ParentPet.md) - [PSPetstore/Model.Pet](docs/Pet.md) + - [PSPetstore/Model.PetWithRequiredTags](docs/PetWithRequiredTags.md) + - [PSPetstore/Model.Pig](docs/Pig.md) + - [PSPetstore/Model.Quadrilateral](docs/Quadrilateral.md) + - [PSPetstore/Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) + - [PSPetstore/Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [PSPetstore/Model.ScaleneTriangle](docs/ScaleneTriangle.md) + - [PSPetstore/Model.Shape](docs/Shape.md) + - [PSPetstore/Model.ShapeInterface](docs/ShapeInterface.md) + - [PSPetstore/Model.ShapeOrNull](docs/ShapeOrNull.md) + - [PSPetstore/Model.SimpleQuadrilateral](docs/SimpleQuadrilateral.md) + - [PSPetstore/Model.SpecialModelName](docs/SpecialModelName.md) - [PSPetstore/Model.Tag](docs/Tag.md) + - [PSPetstore/Model.Triangle](docs/Triangle.md) + - [PSPetstore/Model.TriangleInterface](docs/TriangleInterface.md) - [PSPetstore/Model.User](docs/User.md) + - [PSPetstore/Model.Whale](docs/Whale.md) + - [PSPetstore/Model.Zebra](docs/Zebra.md) ## Documentation for Authorization @@ -98,12 +182,30 @@ Class | Method | HTTP request | Description - **Location**: HTTP header -### auth_cookie +### api_key_query - **Type**: API key -- **API key parameter name**: AUTH_KEY -- **Location**: +- **API key parameter name**: api_key_query +- **Location**: URL query string + + +### bearer_test + + +- **Type**: HTTP basic authentication + + +### http_basic_test + + +- **Type**: HTTP basic authentication + + +### http_signature_test + + +- **Type**: HTTP basic authentication ### petstore_auth diff --git a/samples/client/petstore/powershell/appveyor.yml b/samples/client/petstore/powershell/appveyor.yml index 86b98d394b5c..49a524319c08 100644 --- a/samples/client/petstore/powershell/appveyor.yml +++ b/samples/client/petstore/powershell/appveyor.yml @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/samples/client/petstore/powershell/docs/200Response.md b/samples/client/petstore/powershell/docs/200Response.md new file mode 100644 index 000000000000..b76a7e3f4c2a --- /dev/null +++ b/samples/client/petstore/powershell/docs/200Response.md @@ -0,0 +1,23 @@ +# Model200Response +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **Int32** | | [optional] +**Class** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Model200Response = Initialize-PSPetstoreModel200Response -Name null ` + -Class null +``` + +- Convert the resource to JSON +```powershell +$Model200Response | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/AdditionalPropertiesClass.md b/samples/client/petstore/powershell/docs/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..6019343625fa --- /dev/null +++ b/samples/client/petstore/powershell/docs/AdditionalPropertiesClass.md @@ -0,0 +1,35 @@ +# AdditionalPropertiesClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MapProperty** | **System.Collections.Hashtable** | | [optional] +**MapOfMapProperty** | [**System.Collections.Hashtable**](Map.md) | | [optional] +**Anytype1** | [**AnyType**](.md) | | [optional] +**MapWithUndeclaredPropertiesAnytype1** | [**SystemCollectionsHashtable**](.md) | | [optional] +**MapWithUndeclaredPropertiesAnytype2** | [**SystemCollectionsHashtable**](.md) | | [optional] +**MapWithUndeclaredPropertiesAnytype3** | [**System.Collections.Hashtable**](AnyType.md) | | [optional] +**EmptyMap** | [**SystemCollectionsHashtable**](.md) | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] +**MapWithUndeclaredPropertiesString** | **System.Collections.Hashtable** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$AdditionalPropertiesClass = Initialize-PSPetstoreAdditionalPropertiesClass -MapProperty null ` + -MapOfMapProperty null ` + -Anytype1 null ` + -MapWithUndeclaredPropertiesAnytype1 null ` + -MapWithUndeclaredPropertiesAnytype2 null ` + -MapWithUndeclaredPropertiesAnytype3 null ` + -EmptyMap null ` + -MapWithUndeclaredPropertiesString null +``` + +- Convert the resource to JSON +```powershell +$AdditionalPropertiesClass | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Animal.md b/samples/client/petstore/powershell/docs/Animal.md new file mode 100644 index 000000000000..58df67eab7df --- /dev/null +++ b/samples/client/petstore/powershell/docs/Animal.md @@ -0,0 +1,23 @@ +# Animal +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **String** | | +**Color** | **String** | | [optional] [default to "red"] + +## Examples + +- Prepare the resource +```powershell +$Animal = Initialize-PSPetstoreAnimal -ClassName null ` + -Color null +``` + +- Convert the resource to JSON +```powershell +$Animal | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Apple.md b/samples/client/petstore/powershell/docs/Apple.md new file mode 100644 index 000000000000..9300bd149eca --- /dev/null +++ b/samples/client/petstore/powershell/docs/Apple.md @@ -0,0 +1,23 @@ +# Apple +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cultivar** | **String** | | [optional] +**Origin** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Apple = Initialize-PSPetstoreApple -Cultivar null ` + -Origin null +``` + +- Convert the resource to JSON +```powershell +$Apple | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/AppleReq.md b/samples/client/petstore/powershell/docs/AppleReq.md new file mode 100644 index 000000000000..d6450add0c3d --- /dev/null +++ b/samples/client/petstore/powershell/docs/AppleReq.md @@ -0,0 +1,23 @@ +# AppleReq +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cultivar** | **String** | | +**Mealy** | **Boolean** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$AppleReq = Initialize-PSPetstoreAppleReq -Cultivar null ` + -Mealy null +``` + +- Convert the resource to JSON +```powershell +$AppleReq | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/powershell/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..c09ec94f47cc --- /dev/null +++ b/samples/client/petstore/powershell/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,21 @@ +# ArrayOfArrayOfNumberOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayArrayNumber** | [**Decimal[][]**](Array.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ArrayOfArrayOfNumberOnly = Initialize-PSPetstoreArrayOfArrayOfNumberOnly -ArrayArrayNumber null +``` + +- Convert the resource to JSON +```powershell +$ArrayOfArrayOfNumberOnly | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ArrayOfNumberOnly.md b/samples/client/petstore/powershell/docs/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..d9ecadf562d6 --- /dev/null +++ b/samples/client/petstore/powershell/docs/ArrayOfNumberOnly.md @@ -0,0 +1,21 @@ +# ArrayOfNumberOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayNumber** | **Decimal[]** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ArrayOfNumberOnly = Initialize-PSPetstoreArrayOfNumberOnly -ArrayNumber null +``` + +- Convert the resource to JSON +```powershell +$ArrayOfNumberOnly | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ArrayTest.md b/samples/client/petstore/powershell/docs/ArrayTest.md new file mode 100644 index 000000000000..d95b602b96c8 --- /dev/null +++ b/samples/client/petstore/powershell/docs/ArrayTest.md @@ -0,0 +1,25 @@ +# ArrayTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayOfString** | **String[]** | | [optional] +**ArrayArrayOfInteger** | [**Int64[][]**](Array.md) | | [optional] +**ArrayArrayOfModel** | [**ReadOnlyFirst[][]**](Array.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ArrayTest = Initialize-PSPetstoreArrayTest -ArrayOfString null ` + -ArrayArrayOfInteger null ` + -ArrayArrayOfModel null +``` + +- Convert the resource to JSON +```powershell +$ArrayTest | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Banana.md b/samples/client/petstore/powershell/docs/Banana.md new file mode 100644 index 000000000000..db1064bfb605 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Banana.md @@ -0,0 +1,21 @@ +# Banana +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LengthCm** | **Decimal** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Banana = Initialize-PSPetstoreBanana -LengthCm null +``` + +- Convert the resource to JSON +```powershell +$Banana | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/BananaReq.md b/samples/client/petstore/powershell/docs/BananaReq.md new file mode 100644 index 000000000000..88edcf57f200 --- /dev/null +++ b/samples/client/petstore/powershell/docs/BananaReq.md @@ -0,0 +1,23 @@ +# BananaReq +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LengthCm** | **Decimal** | | +**Sweet** | **Boolean** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$BananaReq = Initialize-PSPetstoreBananaReq -LengthCm null ` + -Sweet null +``` + +- Convert the resource to JSON +```powershell +$BananaReq | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/BasquePig.md b/samples/client/petstore/powershell/docs/BasquePig.md new file mode 100644 index 000000000000..e0bb8c95b80e --- /dev/null +++ b/samples/client/petstore/powershell/docs/BasquePig.md @@ -0,0 +1,21 @@ +# BasquePig +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$BasquePig = Initialize-PSPetstoreBasquePig -ClassName null +``` + +- Convert the resource to JSON +```powershell +$BasquePig | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Capitalization.md b/samples/client/petstore/powershell/docs/Capitalization.md new file mode 100644 index 000000000000..dbd1d1f92de3 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Capitalization.md @@ -0,0 +1,31 @@ +# Capitalization +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SmallCamel** | **String** | | [optional] +**CapitalCamel** | **String** | | [optional] +**SmallSnake** | **String** | | [optional] +**CapitalSnake** | **String** | | [optional] +**SCAETHFlowPoints** | **String** | | [optional] +**ATTNAME** | **String** | Name of the pet | [optional] + +## Examples + +- Prepare the resource +```powershell +$Capitalization = Initialize-PSPetstoreCapitalization -SmallCamel null ` + -CapitalCamel null ` + -SmallSnake null ` + -CapitalSnake null ` + -SCAETHFlowPoints null ` + -ATTNAME null +``` + +- Convert the resource to JSON +```powershell +$Capitalization | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Cat.md b/samples/client/petstore/powershell/docs/Cat.md new file mode 100644 index 000000000000..5acf8c5186a7 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Cat.md @@ -0,0 +1,25 @@ +# Cat +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **String** | | +**Color** | **String** | | [optional] [default to "red"] +**Declawed** | **Boolean** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Cat = Initialize-PSPetstoreCat -ClassName null ` + -Color null ` + -Declawed null +``` + +- Convert the resource to JSON +```powershell +$Cat | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/CatAllOf.md b/samples/client/petstore/powershell/docs/CatAllOf.md new file mode 100644 index 000000000000..451db0fa20b7 --- /dev/null +++ b/samples/client/petstore/powershell/docs/CatAllOf.md @@ -0,0 +1,21 @@ +# CatAllOf +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **Boolean** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$CatAllOf = Initialize-PSPetstoreCatAllOf -Declawed null +``` + +- Convert the resource to JSON +```powershell +$CatAllOf | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Category.md b/samples/client/petstore/powershell/docs/Category.md index 96644698838c..01bb6682755c 100644 --- a/samples/client/petstore/powershell/docs/Category.md +++ b/samples/client/petstore/powershell/docs/Category.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **Int64** | | [optional] -**Name** | **String** | | [optional] +**Name** | **String** | | [default to "default-name"] ## Examples diff --git a/samples/client/petstore/powershell/docs/ClassModel.md b/samples/client/petstore/powershell/docs/ClassModel.md new file mode 100644 index 000000000000..c5735d43e7d4 --- /dev/null +++ b/samples/client/petstore/powershell/docs/ClassModel.md @@ -0,0 +1,21 @@ +# ClassModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Class** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ClassModel = Initialize-PSPetstoreClassModel -Class null +``` + +- Convert the resource to JSON +```powershell +$ClassModel | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Client.md b/samples/client/petstore/powershell/docs/Client.md new file mode 100644 index 000000000000..a447197d49c8 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Client.md @@ -0,0 +1,21 @@ +# Client +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Client** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Client = Initialize-PSPetstoreClient -Client null +``` + +- Convert the resource to JSON +```powershell +$Client | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ComplexQuadrilateral.md b/samples/client/petstore/powershell/docs/ComplexQuadrilateral.md new file mode 100644 index 000000000000..c34b2f9941a6 --- /dev/null +++ b/samples/client/petstore/powershell/docs/ComplexQuadrilateral.md @@ -0,0 +1,23 @@ +# ComplexQuadrilateral +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$ComplexQuadrilateral = Initialize-PSPetstoreComplexQuadrilateral -ShapeType null ` + -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$ComplexQuadrilateral | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/DanishPig.md b/samples/client/petstore/powershell/docs/DanishPig.md new file mode 100644 index 000000000000..f1e5f0ebeafa --- /dev/null +++ b/samples/client/petstore/powershell/docs/DanishPig.md @@ -0,0 +1,21 @@ +# DanishPig +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$DanishPig = Initialize-PSPetstoreDanishPig -ClassName null +``` + +- Convert the resource to JSON +```powershell +$DanishPig | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/DeprecatedObject.md b/samples/client/petstore/powershell/docs/DeprecatedObject.md new file mode 100644 index 000000000000..b0cb2c030aa0 --- /dev/null +++ b/samples/client/petstore/powershell/docs/DeprecatedObject.md @@ -0,0 +1,21 @@ +# DeprecatedObject +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$DeprecatedObject = Initialize-PSPetstoreDeprecatedObject -Name null +``` + +- Convert the resource to JSON +```powershell +$DeprecatedObject | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Dog.md b/samples/client/petstore/powershell/docs/Dog.md new file mode 100644 index 000000000000..fb0a4f48f37b --- /dev/null +++ b/samples/client/petstore/powershell/docs/Dog.md @@ -0,0 +1,25 @@ +# Dog +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **String** | | +**Color** | **String** | | [optional] [default to "red"] +**Breed** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Dog = Initialize-PSPetstoreDog -ClassName null ` + -Color null ` + -Breed null +``` + +- Convert the resource to JSON +```powershell +$Dog | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/DogAllOf.md b/samples/client/petstore/powershell/docs/DogAllOf.md new file mode 100644 index 000000000000..73337ad7405a --- /dev/null +++ b/samples/client/petstore/powershell/docs/DogAllOf.md @@ -0,0 +1,21 @@ +# DogAllOf +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Breed** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$DogAllOf = Initialize-PSPetstoreDogAllOf -Breed null +``` + +- Convert the resource to JSON +```powershell +$DogAllOf | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Drawing.md b/samples/client/petstore/powershell/docs/Drawing.md new file mode 100644 index 000000000000..362fba5054de --- /dev/null +++ b/samples/client/petstore/powershell/docs/Drawing.md @@ -0,0 +1,27 @@ +# Drawing +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MainShape** | [**Shape**](Shape.md) | | [optional] +**ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] +**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] +**Shapes** | [**Shape[]**](Shape.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Drawing = Initialize-PSPetstoreDrawing -MainShape null ` + -ShapeOrNull null ` + -NullableShape null ` + -Shapes null +``` + +- Convert the resource to JSON +```powershell +$Drawing | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/EnumArrays.md b/samples/client/petstore/powershell/docs/EnumArrays.md new file mode 100644 index 000000000000..9ba5f540f9e5 --- /dev/null +++ b/samples/client/petstore/powershell/docs/EnumArrays.md @@ -0,0 +1,23 @@ +# EnumArrays +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustSymbol** | **String** | | [optional] +**ArrayEnum** | **String[]** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$EnumArrays = Initialize-PSPetstoreEnumArrays -JustSymbol null ` + -ArrayEnum null +``` + +- Convert the resource to JSON +```powershell +$EnumArrays | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/EnumClass.md b/samples/client/petstore/powershell/docs/EnumClass.md new file mode 100644 index 000000000000..a928ad7c3bf6 --- /dev/null +++ b/samples/client/petstore/powershell/docs/EnumClass.md @@ -0,0 +1,20 @@ +# EnumClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Examples + +- Prepare the resource +```powershell +$EnumClass = Initialize-PSPetstoreEnumClass +``` + +- Convert the resource to JSON +```powershell +$EnumClass | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/EnumTest.md b/samples/client/petstore/powershell/docs/EnumTest.md new file mode 100644 index 000000000000..25d92ed0225d --- /dev/null +++ b/samples/client/petstore/powershell/docs/EnumTest.md @@ -0,0 +1,31 @@ +# EnumTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumString** | **String** | | [optional] +**EnumStringRequired** | **String** | | +**EnumInteger** | **Int32** | | [optional] +**EnumIntegerOnly** | **Int32** | | [optional] +**EnumNumber** | **Double** | | [optional] +**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$EnumTest = Initialize-PSPetstoreEnumTest -EnumString null ` + -EnumStringRequired null ` + -EnumInteger null ` + -EnumIntegerOnly null ` + -EnumNumber null ` + -OuterEnum null +``` + +- Convert the resource to JSON +```powershell +$EnumTest | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/EquilateralTriangle.md b/samples/client/petstore/powershell/docs/EquilateralTriangle.md new file mode 100644 index 000000000000..aeb38986c1ba --- /dev/null +++ b/samples/client/petstore/powershell/docs/EquilateralTriangle.md @@ -0,0 +1,23 @@ +# EquilateralTriangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$EquilateralTriangle = Initialize-PSPetstoreEquilateralTriangle -ShapeType null ` + -TriangleType null +``` + +- Convert the resource to JSON +```powershell +$EquilateralTriangle | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/File.md b/samples/client/petstore/powershell/docs/File.md new file mode 100644 index 000000000000..09e1dd3ed8d1 --- /dev/null +++ b/samples/client/petstore/powershell/docs/File.md @@ -0,0 +1,21 @@ +# File +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SourceURI** | **String** | Test capitalization | [optional] + +## Examples + +- Prepare the resource +```powershell +$File = Initialize-PSPetstoreFile -SourceURI null +``` + +- Convert the resource to JSON +```powershell +$File | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/FileSchemaTestClass.md b/samples/client/petstore/powershell/docs/FileSchemaTestClass.md new file mode 100644 index 000000000000..c350eece6edc --- /dev/null +++ b/samples/client/petstore/powershell/docs/FileSchemaTestClass.md @@ -0,0 +1,23 @@ +# FileSchemaTestClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**File** | [**File**](File.md) | | [optional] +**Files** | [**File[]**](File.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$FileSchemaTestClass = Initialize-PSPetstoreFileSchemaTestClass -File null ` + -Files null +``` + +- Convert the resource to JSON +```powershell +$FileSchemaTestClass | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Foo.md b/samples/client/petstore/powershell/docs/Foo.md new file mode 100644 index 000000000000..ad152ea32714 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Foo.md @@ -0,0 +1,21 @@ +# Foo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | **String** | | [optional] [default to "bar"] + +## Examples + +- Prepare the resource +```powershell +$Foo = Initialize-PSPetstoreFoo -Bar null +``` + +- Convert the resource to JSON +```powershell +$Foo | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/FormatTest.md b/samples/client/petstore/powershell/docs/FormatTest.md new file mode 100644 index 000000000000..f413641a5eb0 --- /dev/null +++ b/samples/client/petstore/powershell/docs/FormatTest.md @@ -0,0 +1,51 @@ +# FormatTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **Int32** | | [optional] +**Int32** | **Int32** | | [optional] +**Int64** | **Int64** | | [optional] +**Number** | **Decimal** | | +**Float** | **Double** | | [optional] +**Double** | **Double** | | [optional] +**Decimal** | **Decimal** | | [optional] +**String** | **String** | | [optional] +**Byte** | [**SystemByte**](SystemByte.md) | | +**Binary** | **System.IO.FileInfo** | | [optional] +**Date** | **System.DateTime** | | +**DateTime** | **System.DateTime** | | [optional] +**Uuid** | **String** | | [optional] +**Password** | **String** | | +**PatternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**PatternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] + +## Examples + +- Prepare the resource +```powershell +$FormatTest = Initialize-PSPetstoreFormatTest -Integer null ` + -Int32 null ` + -Int64 null ` + -Number null ` + -Float null ` + -Double null ` + -Decimal null ` + -String null ` + -Byte null ` + -Binary null ` + -Date Sun Feb 02 00:00:00 UTC 2020 ` + -DateTime 2007-12-03T10:15:30+01:00 ` + -Uuid 72f98069-206d-4f12-9f12-3d1e525a8e84 ` + -Password null ` + -PatternWithDigits null ` + -PatternWithDigitsAndDelimiter null +``` + +- Convert the resource to JSON +```powershell +$FormatTest | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Fruit.md b/samples/client/petstore/powershell/docs/Fruit.md new file mode 100644 index 000000000000..2a6716b42f75 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Fruit.md @@ -0,0 +1,27 @@ +# Fruit +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Color** | **String** | | [optional] +**Cultivar** | **String** | | [optional] +**Origin** | **String** | | [optional] +**LengthCm** | **Decimal** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Fruit = Initialize-PSPetstoreFruit -Color null ` + -Cultivar null ` + -Origin null ` + -LengthCm null +``` + +- Convert the resource to JSON +```powershell +$Fruit | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/FruitReq.md b/samples/client/petstore/powershell/docs/FruitReq.md new file mode 100644 index 000000000000..d8fcd89ee5e1 --- /dev/null +++ b/samples/client/petstore/powershell/docs/FruitReq.md @@ -0,0 +1,27 @@ +# FruitReq +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cultivar** | **String** | | +**Mealy** | **Boolean** | | [optional] +**LengthCm** | **Decimal** | | +**Sweet** | **Boolean** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$FruitReq = Initialize-PSPetstoreFruitReq -Cultivar null ` + -Mealy null ` + -LengthCm null ` + -Sweet null +``` + +- Convert the resource to JSON +```powershell +$FruitReq | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/GmFruit.md b/samples/client/petstore/powershell/docs/GmFruit.md new file mode 100644 index 000000000000..db0e1e6476bb --- /dev/null +++ b/samples/client/petstore/powershell/docs/GmFruit.md @@ -0,0 +1,27 @@ +# GmFruit +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Color** | **String** | | [optional] +**Cultivar** | **String** | | [optional] +**Origin** | **String** | | [optional] +**LengthCm** | **Decimal** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$GmFruit = Initialize-PSPetstoreGmFruit -Color null ` + -Cultivar null ` + -Origin null ` + -LengthCm null +``` + +- Convert the resource to JSON +```powershell +$GmFruit | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/GrandparentAnimal.md b/samples/client/petstore/powershell/docs/GrandparentAnimal.md new file mode 100644 index 000000000000..c4d0d92efa14 --- /dev/null +++ b/samples/client/petstore/powershell/docs/GrandparentAnimal.md @@ -0,0 +1,21 @@ +# GrandparentAnimal +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PetType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$GrandparentAnimal = Initialize-PSPetstoreGrandparentAnimal -PetType null +``` + +- Convert the resource to JSON +```powershell +$GrandparentAnimal | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/HasOnlyReadOnly.md b/samples/client/petstore/powershell/docs/HasOnlyReadOnly.md new file mode 100644 index 000000000000..b227658de7e4 --- /dev/null +++ b/samples/client/petstore/powershell/docs/HasOnlyReadOnly.md @@ -0,0 +1,23 @@ +# HasOnlyReadOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | **String** | | [optional] [readonly] +**Foo** | **String** | | [optional] [readonly] + +## Examples + +- Prepare the resource +```powershell +$HasOnlyReadOnly = Initialize-PSPetstoreHasOnlyReadOnly -Bar null ` + -Foo null +``` + +- Convert the resource to JSON +```powershell +$HasOnlyReadOnly | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/HealthCheckResult.md b/samples/client/petstore/powershell/docs/HealthCheckResult.md new file mode 100644 index 000000000000..beb1d70722c5 --- /dev/null +++ b/samples/client/petstore/powershell/docs/HealthCheckResult.md @@ -0,0 +1,21 @@ +# HealthCheckResult +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NullableMessage** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$HealthCheckResult = Initialize-PSPetstoreHealthCheckResult -NullableMessage null +``` + +- Convert the resource to JSON +```powershell +$HealthCheckResult | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/InlineResponseDefault.md b/samples/client/petstore/powershell/docs/InlineResponseDefault.md new file mode 100644 index 000000000000..3169148a9324 --- /dev/null +++ b/samples/client/petstore/powershell/docs/InlineResponseDefault.md @@ -0,0 +1,21 @@ +# InlineResponseDefault +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**String** | [**Foo**](Foo.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$InlineResponseDefault = Initialize-PSPetstoreInlineResponseDefault -String null +``` + +- Convert the resource to JSON +```powershell +$InlineResponseDefault | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/IsoscelesTriangle.md b/samples/client/petstore/powershell/docs/IsoscelesTriangle.md new file mode 100644 index 000000000000..7f71d9c439aa --- /dev/null +++ b/samples/client/petstore/powershell/docs/IsoscelesTriangle.md @@ -0,0 +1,23 @@ +# IsoscelesTriangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$IsoscelesTriangle = Initialize-PSPetstoreIsoscelesTriangle -ShapeType null ` + -TriangleType null +``` + +- Convert the resource to JSON +```powershell +$IsoscelesTriangle | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/List.md b/samples/client/petstore/powershell/docs/List.md new file mode 100644 index 000000000000..625a406020a1 --- /dev/null +++ b/samples/client/petstore/powershell/docs/List.md @@ -0,0 +1,21 @@ +# List +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Var123List** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$List = Initialize-PSPetstoreList -Var123List null +``` + +- Convert the resource to JSON +```powershell +$List | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Mammal.md b/samples/client/petstore/powershell/docs/Mammal.md new file mode 100644 index 000000000000..a3ee83c488ae --- /dev/null +++ b/samples/client/petstore/powershell/docs/Mammal.md @@ -0,0 +1,27 @@ +# Mammal +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasBaleen** | **Boolean** | | [optional] +**HasTeeth** | **Boolean** | | [optional] +**ClassName** | **String** | | +**Type** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$Mammal = Initialize-PSPetstoreMammal -HasBaleen null ` + -HasTeeth null ` + -ClassName null ` + -Type null +``` + +- Convert the resource to JSON +```powershell +$Mammal | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/MapTest.md b/samples/client/petstore/powershell/docs/MapTest.md new file mode 100644 index 000000000000..8ac5b4e5321d --- /dev/null +++ b/samples/client/petstore/powershell/docs/MapTest.md @@ -0,0 +1,27 @@ +# MapTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MapMapOfString** | [**System.Collections.Hashtable**](Map.md) | | [optional] +**MapOfEnumString** | **System.Collections.Hashtable** | | [optional] +**DirectMap** | **System.Collections.Hashtable** | | [optional] +**IndirectMap** | **System.Collections.Hashtable** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$MapTest = Initialize-PSPetstoreMapTest -MapMapOfString null ` + -MapOfEnumString null ` + -DirectMap null ` + -IndirectMap null +``` + +- Convert the resource to JSON +```powershell +$MapTest | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/powershell/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..d6ae68845b8a --- /dev/null +++ b/samples/client/petstore/powershell/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,25 @@ +# MixedPropertiesAndAdditionalPropertiesClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **String** | | [optional] +**DateTime** | **System.DateTime** | | [optional] +**Map** | [**System.Collections.Hashtable**](Animal.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$MixedPropertiesAndAdditionalPropertiesClass = Initialize-PSPetstoreMixedPropertiesAndAdditionalPropertiesClass -Uuid null ` + -DateTime null ` + -Map null +``` + +- Convert the resource to JSON +```powershell +$MixedPropertiesAndAdditionalPropertiesClass | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Name.md b/samples/client/petstore/powershell/docs/Name.md new file mode 100644 index 000000000000..fdae841de883 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Name.md @@ -0,0 +1,27 @@ +# Name +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **Int32** | | +**SnakeCase** | **Int32** | | [optional] [readonly] +**Property** | **String** | | [optional] +**Var123Number** | **Int32** | | [optional] [readonly] + +## Examples + +- Prepare the resource +```powershell +$Name = Initialize-PSPetstoreName -Name null ` + -SnakeCase null ` + -Property null ` + -Var123Number null +``` + +- Convert the resource to JSON +```powershell +$Name | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/NullableClass.md b/samples/client/petstore/powershell/docs/NullableClass.md new file mode 100644 index 000000000000..e7c5230140e6 --- /dev/null +++ b/samples/client/petstore/powershell/docs/NullableClass.md @@ -0,0 +1,43 @@ +# NullableClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegerProp** | **Int32** | | [optional] +**NumberProp** | **Decimal** | | [optional] +**BooleanProp** | **Boolean** | | [optional] +**StringProp** | **String** | | [optional] +**DateProp** | **System.DateTime** | | [optional] +**DatetimeProp** | **System.DateTime** | | [optional] +**ArrayNullableProp** | [**SystemCollectionsHashtable[]**](SystemCollectionsHashtable.md) | | [optional] +**ArrayAndItemsNullableProp** | [**SystemCollectionsHashtable[]**](SystemCollectionsHashtable.md) | | [optional] +**ArrayItemsNullable** | [**SystemCollectionsHashtable[]**](SystemCollectionsHashtable.md) | | [optional] +**ObjectNullableProp** | [**System.Collections.Hashtable**](SystemCollectionsHashtable.md) | | [optional] +**ObjectAndItemsNullableProp** | [**System.Collections.Hashtable**](SystemCollectionsHashtable.md) | | [optional] +**ObjectItemsNullable** | [**System.Collections.Hashtable**](SystemCollectionsHashtable.md) | | [optional] + +## Examples + +- Prepare the resource +```powershell +$NullableClass = Initialize-PSPetstoreNullableClass -IntegerProp null ` + -NumberProp null ` + -BooleanProp null ` + -StringProp null ` + -DateProp null ` + -DatetimeProp null ` + -ArrayNullableProp null ` + -ArrayAndItemsNullableProp null ` + -ArrayItemsNullable null ` + -ObjectNullableProp null ` + -ObjectAndItemsNullableProp null ` + -ObjectItemsNullable null +``` + +- Convert the resource to JSON +```powershell +$NullableClass | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/NullableShape.md b/samples/client/petstore/powershell/docs/NullableShape.md new file mode 100644 index 000000000000..127110ad1c0d --- /dev/null +++ b/samples/client/petstore/powershell/docs/NullableShape.md @@ -0,0 +1,25 @@ +# NullableShape +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$NullableShape = Initialize-PSPetstoreNullableShape -ShapeType null ` + -TriangleType null ` + -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$NullableShape | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/NumberOnly.md b/samples/client/petstore/powershell/docs/NumberOnly.md new file mode 100644 index 000000000000..672595343afa --- /dev/null +++ b/samples/client/petstore/powershell/docs/NumberOnly.md @@ -0,0 +1,21 @@ +# NumberOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustNumber** | **Decimal** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$NumberOnly = Initialize-PSPetstoreNumberOnly -JustNumber null +``` + +- Convert the resource to JSON +```powershell +$NumberOnly | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/powershell/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 000000000000..e3911c6ecf8e --- /dev/null +++ b/samples/client/petstore/powershell/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,27 @@ +# ObjectWithDeprecatedFields +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **String** | | [optional] +**Id** | **Decimal** | | [optional] +**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**Bars** | **String[]** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ObjectWithDeprecatedFields = Initialize-PSPetstoreObjectWithDeprecatedFields -Uuid null ` + -Id null ` + -DeprecatedRef null ` + -Bars null +``` + +- Convert the resource to JSON +```powershell +$ObjectWithDeprecatedFields | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Order.md b/samples/client/petstore/powershell/docs/Order.md index d7903c621b2d..8da0af886043 100644 --- a/samples/client/petstore/powershell/docs/Order.md +++ b/samples/client/petstore/powershell/docs/Order.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes $Order = Initialize-PSPetstoreOrder -Id null ` -PetId null ` -Quantity null ` - -ShipDate null ` + -ShipDate 2020-02-02T20:20:20.000222Z ` -Status null ` -Complete null ``` diff --git a/samples/client/petstore/powershell/docs/OuterComposite.md b/samples/client/petstore/powershell/docs/OuterComposite.md new file mode 100644 index 000000000000..f9afa36a5242 --- /dev/null +++ b/samples/client/petstore/powershell/docs/OuterComposite.md @@ -0,0 +1,25 @@ +# OuterComposite +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MyNumber** | **Decimal** | | [optional] +**MyString** | **String** | | [optional] +**MyBoolean** | **Boolean** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$OuterComposite = Initialize-PSPetstoreOuterComposite -MyNumber null ` + -MyString null ` + -MyBoolean null +``` + +- Convert the resource to JSON +```powershell +$OuterComposite | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/OuterEnum.md b/samples/client/petstore/powershell/docs/OuterEnum.md new file mode 100644 index 000000000000..14f817afe9e9 --- /dev/null +++ b/samples/client/petstore/powershell/docs/OuterEnum.md @@ -0,0 +1,20 @@ +# OuterEnum +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Examples + +- Prepare the resource +```powershell +$OuterEnum = Initialize-PSPetstoreOuterEnum +``` + +- Convert the resource to JSON +```powershell +$OuterEnum | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/OuterEnumDefaultValue.md b/samples/client/petstore/powershell/docs/OuterEnumDefaultValue.md new file mode 100644 index 000000000000..9d4f8e7d0a5e --- /dev/null +++ b/samples/client/petstore/powershell/docs/OuterEnumDefaultValue.md @@ -0,0 +1,20 @@ +# OuterEnumDefaultValue +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Examples + +- Prepare the resource +```powershell +$OuterEnumDefaultValue = Initialize-PSPetstoreOuterEnumDefaultValue +``` + +- Convert the resource to JSON +```powershell +$OuterEnumDefaultValue | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/OuterEnumInteger.md b/samples/client/petstore/powershell/docs/OuterEnumInteger.md new file mode 100644 index 000000000000..85162ed4ddb5 --- /dev/null +++ b/samples/client/petstore/powershell/docs/OuterEnumInteger.md @@ -0,0 +1,20 @@ +# OuterEnumInteger +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Examples + +- Prepare the resource +```powershell +$OuterEnumInteger = Initialize-PSPetstoreOuterEnumInteger +``` + +- Convert the resource to JSON +```powershell +$OuterEnumInteger | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/powershell/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 000000000000..c3d595f870c2 --- /dev/null +++ b/samples/client/petstore/powershell/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,20 @@ +# OuterEnumIntegerDefaultValue +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Examples + +- Prepare the resource +```powershell +$OuterEnumIntegerDefaultValue = Initialize-PSPetstoreOuterEnumIntegerDefaultValue +``` + +- Convert the resource to JSON +```powershell +$OuterEnumIntegerDefaultValue | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/PSAnotherFakeApi.md b/samples/client/petstore/powershell/docs/PSAnotherFakeApi.md new file mode 100644 index 000000000000..ebdbaf3af0f4 --- /dev/null +++ b/samples/client/petstore/powershell/docs/PSAnotherFakeApi.md @@ -0,0 +1,52 @@ +# PSPetstore.PSPetstore/Api.PSAnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Invoke-PS123TestSpecialTags**](PSAnotherFakeApi.md#Invoke-PS123TestSpecialTags) | **PATCH** /another-fake/dummy | To test special tags + + + +# **Invoke-PS123TestSpecialTags** +> Client Invoke-PS123TestSpecialTags
    +>         [-Client]
    + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```powershell +$Client = Initialize-Client -Client "MyClient" # Client | client model + +# To test special tags +try { + $Result = Invoke-PS123TestSpecialTags -Client $Client +} catch { + Write-Host ("Exception occurred when calling Invoke-PS123TestSpecialTags: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) (PSCustomObject) + +### 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/client/petstore/powershell/docs/PSDefaultApi.md b/samples/client/petstore/powershell/docs/PSDefaultApi.md new file mode 100644 index 000000000000..9c10aff593b6 --- /dev/null +++ b/samples/client/petstore/powershell/docs/PSDefaultApi.md @@ -0,0 +1,44 @@ +# PSPetstore.PSPetstore/Api.PSDefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Invoke-PSFooGet**](PSDefaultApi.md#Invoke-PSFooGet) | **GET** /foo | + + + +# **Invoke-PSFooGet** +> InlineResponseDefault Invoke-PSFooGet
    + + + +### Example +```powershell + +try { + $Result = Invoke-PSFooGet +} catch { + Write-Host ("Exception occurred when calling Invoke-PSFooGet: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponseDefault**](InlineResponseDefault.md) (PSCustomObject) + +### 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/client/petstore/powershell/docs/PSFakeApi.md b/samples/client/petstore/powershell/docs/PSFakeApi.md new file mode 100644 index 000000000000..8f22dd6ca054 --- /dev/null +++ b/samples/client/petstore/powershell/docs/PSFakeApi.md @@ -0,0 +1,751 @@ +# PSPetstore.PSPetstore/Api.PSFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Invoke-PSFakeHealthGet**](PSFakeApi.md#Invoke-PSFakeHealthGet) | **GET** /fake/health | Health check endpoint +[**Invoke-PSFakeOuterBooleanSerialize**](PSFakeApi.md#Invoke-PSFakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +[**Invoke-PSFakeOuterCompositeSerialize**](PSFakeApi.md#Invoke-PSFakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +[**Invoke-PSFakeOuterNumberSerialize**](PSFakeApi.md#Invoke-PSFakeOuterNumberSerialize) | **POST** /fake/outer/number | +[**Invoke-PSFakeOuterStringSerialize**](PSFakeApi.md#Invoke-PSFakeOuterStringSerialize) | **POST** /fake/outer/string | +[**Get-PSArrayOfEnums**](PSFakeApi.md#Get-PSArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums +[**Test-PSBodyWithFileSchema**](PSFakeApi.md#Test-PSBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | +[**Test-PSBodyWithQueryParams**](PSFakeApi.md#Test-PSBodyWithQueryParams) | **PUT** /fake/body-with-query-params | +[**Test-PSClientModel**](PSFakeApi.md#Test-PSClientModel) | **PATCH** /fake | To test ""client"" model +[**Test-PSEndpointParameters**](PSFakeApi.md#Test-PSEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**Test-PSEnumParameters**](PSFakeApi.md#Test-PSEnumParameters) | **GET** /fake | To test enum parameters +[**Test-PSGroupParameters**](PSFakeApi.md#Test-PSGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**Test-PSInlineAdditionalProperties**](PSFakeApi.md#Test-PSInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**Test-PSJsonFormData**](PSFakeApi.md#Test-PSJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +[**Test-PSQueryParameterCollectionFormat**](PSFakeApi.md#Test-PSQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | + + + +# **Invoke-PSFakeHealthGet** +> HealthCheckResult Invoke-PSFakeHealthGet
    + +Health check endpoint + +### Example +```powershell + +# Health check endpoint +try { + $Result = Invoke-PSFakeHealthGet +} catch { + Write-Host ("Exception occurred when calling Invoke-PSFakeHealthGet: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) (PSCustomObject) + +### 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) + + +# **Invoke-PSFakeOuterBooleanSerialize** +> Boolean Invoke-PSFakeOuterBooleanSerialize
    +>         [-Body]
    + + + +Test serialization of outer boolean types + +### Example +```powershell +$Body = $true # Boolean | Input boolean as post body (optional) + +try { + $Result = Invoke-PSFakeOuterBooleanSerialize -Body $Body +} catch { + Write-Host ("Exception occurred when calling Invoke-PSFakeOuterBooleanSerialize: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Body** | **Boolean**| Input boolean as post body | [optional] + +### Return type + +**Boolean** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + + +# **Invoke-PSFakeOuterCompositeSerialize** +> OuterComposite Invoke-PSFakeOuterCompositeSerialize
    +>         [-OuterComposite]
    + + + +Test serialization of object with outer number type + +### Example +```powershell +$OuterComposite = Initialize-OuterComposite -MyNumber 0 -MyString "MyMyString" -MyBoolean $false # OuterComposite | Input composite as post body (optional) + +try { + $Result = Invoke-PSFakeOuterCompositeSerialize -OuterComposite $OuterComposite +} catch { + Write-Host ("Exception occurred when calling Invoke-PSFakeOuterCompositeSerialize: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **OuterComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) (PSCustomObject) + +### 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) + + +# **Invoke-PSFakeOuterNumberSerialize** +> Decimal Invoke-PSFakeOuterNumberSerialize
    +>         [-Body]
    + + + +Test serialization of outer number types + +### Example +```powershell +$Body = 8.14 # Decimal | Input number as post body (optional) + +try { + $Result = Invoke-PSFakeOuterNumberSerialize -Body $Body +} catch { + Write-Host ("Exception occurred when calling Invoke-PSFakeOuterNumberSerialize: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Body** | **Decimal**| Input number as post body | [optional] + +### Return type + +**Decimal** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Invoke-PSFakeOuterStringSerialize** +> String Invoke-PSFakeOuterStringSerialize
    +>         [-Body]
    + + + +Test serialization of outer string types + +### Example +```powershell +$Body = "MyBody" # String | Input string as post body (optional) + +try { + $Result = Invoke-PSFakeOuterStringSerialize -Body $Body +} catch { + Write-Host ("Exception occurred when calling Invoke-PSFakeOuterStringSerialize: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Body** | **String**| Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + + +# **Get-PSArrayOfEnums** +> OuterEnum[] Get-PSArrayOfEnums
    + +Array of Enums + +### Example +```powershell + +# Array of Enums +try { + $Result = Get-PSArrayOfEnums +} catch { + Write-Host ("Exception occurred when calling Get-PSArrayOfEnums: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OuterEnum[]**](OuterEnum.md) (PSCustomObject) + +### 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) + + +# **Test-PSBodyWithFileSchema** +> void Test-PSBodyWithFileSchema
    +>         [-FileSchemaTestClass]
    + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```powershell +$File = Initialize-File -SourceURI "MySourceURI" +$FileSchemaTestClass = Initialize-FileSchemaTestClass -File $File -Files $File # FileSchemaTestClass | + +try { + $Result = Test-PSBodyWithFileSchema -FileSchemaTestClass $FileSchemaTestClass +} catch { + Write-Host ("Exception occurred when calling Test-PSBodyWithFileSchema: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Test-PSBodyWithQueryParams** +> void Test-PSBodyWithQueryParams
    +>         [-Query]
    +>         [-User]
    + + + +### Example +```powershell +$Query = "MyQuery" # String | +$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 -ObjectWithNoDeclaredProps -ObjectWithNoDeclaredPropsNullable -AnyTypeProp -AnyTypePropNullable # User | + +try { + $Result = Test-PSBodyWithQueryParams -Query $Query -User $User +} catch { + Write-Host ("Exception occurred when calling Test-PSBodyWithQueryParams: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Query** | **String**| | + **User** | [**User**](User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Test-PSClientModel** +> Client Test-PSClientModel
    +>         [-Client]
    + +To test ""client"" model + +To test ""client"" model + +### Example +```powershell +$Client = Initialize-Client -Client "MyClient" # Client | client model + +# To test ""client"" model +try { + $Result = Test-PSClientModel -Client $Client +} catch { + Write-Host ("Exception occurred when calling Test-PSClientModel: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) (PSCustomObject) + +### 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) + + +# **Test-PSEndpointParameters** +> void Test-PSEndpointParameters
    +>         [-Number]
    +>         [-Double]
    +>         [-PatternWithoutDelimiter]
    +>         [-Byte]
    +>         [-Integer]
    +>         [-Int32]
    +>         [-Int64]
    +>         [-Float]
    +>         [-String]
    +>         [-Binary]
    +>         [-Date]
    +>         [-DateTime]
    +>         [-Password]
    +>         [-Callback]
    + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration +# Configure HTTP basic authorization: http_basic_test +$Configuration.Username = "YOUR_USERNAME" +$Configuration.Password = "YOUR_PASSWORD" + +$Number = 8.14 # Decimal | None +$Double = 1.2 # Double | None +$PatternWithoutDelimiter = "MyPatternWithoutDelimiter" # String | None +$Byte = # SystemByte | None +$Integer = 56 # Int32 | None (optional) +$Int32 = 56 # Int32 | None (optional) +$Int64 = 789 # Int64 | None (optional) +$Float = 3.4 # Double | None (optional) +$String = "MyString" # String | None (optional) +$Binary = # System.IO.FileInfo | None (optional) +$Date = (Get-Date) # System.DateTime | None (optional) +$DateTime = (Get-Date) # System.DateTime | None (optional) +$Password = "MyPassword" # String | None (optional) +$Callback = "MyCallback" # String | None (optional) + +# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +try { + $Result = Test-PSEndpointParameters -Number $Number -Double $Double -PatternWithoutDelimiter $PatternWithoutDelimiter -Byte $Byte -Integer $Integer -Int32 $Int32 -Int64 $Int64 -Float $Float -String $String -Binary $Binary -Date $Date -DateTime $DateTime -Password $Password -Callback $Callback +} catch { + Write-Host ("Exception occurred when calling Test-PSEndpointParameters: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Number** | **Decimal**| None | + **Double** | **Double**| None | + **PatternWithoutDelimiter** | **String**| None | + **Byte** | **SystemByte**| None | + **Integer** | **Int32**| None | [optional] + **Int32** | **Int32**| None | [optional] + **Int64** | **Int64**| None | [optional] + **Float** | **Double**| None | [optional] + **String** | **String**| None | [optional] + **Binary** | **System.IO.FileInfo****System.IO.FileInfo**| None | [optional] + **Date** | **System.DateTime**| None | [optional] + **DateTime** | **System.DateTime**| None | [optional] + **Password** | **String**| None | [optional] + **Callback** | **String**| None | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Test-PSEnumParameters** +> void Test-PSEnumParameters
    +>         [-EnumHeaderStringArray]
    +>         [-EnumHeaderString]
    +>         [-EnumQueryStringArray]
    +>         [-EnumQueryString]
    +>         [-EnumQueryInteger]
    +>         [-EnumQueryDouble]
    +>         [-EnumFormStringArray]
    +>         [-EnumFormString]
    + +To test enum parameters + +To test enum parameters + +### Example +```powershell +$EnumHeaderStringArray = ">" # String[] | Header parameter enum test (string array) (optional) +$EnumHeaderString = "_abc" # String | Header parameter enum test (string) (optional) (default to "-efg") +$EnumQueryStringArray = ">" # String[] | Query parameter enum test (string array) (optional) +$EnumQueryString = "_abc" # String | Query parameter enum test (string) (optional) (default to "-efg") +$EnumQueryInteger = "1" # Int32 | Query parameter enum test (double) (optional) +$EnumQueryDouble = "1.1" # Double | Query parameter enum test (double) (optional) +$EnumFormStringArray = ">" # String[] | Form parameter enum test (string array) (optional) (default to "$") +$EnumFormString = "_abc" # String | Form parameter enum test (string) (optional) (default to "-efg") + +# To test enum parameters +try { + $Result = Test-PSEnumParameters -EnumHeaderStringArray $EnumHeaderStringArray -EnumHeaderString $EnumHeaderString -EnumQueryStringArray $EnumQueryStringArray -EnumQueryString $EnumQueryString -EnumQueryInteger $EnumQueryInteger -EnumQueryDouble $EnumQueryDouble -EnumFormStringArray $EnumFormStringArray -EnumFormString $EnumFormString +} catch { + Write-Host ("Exception occurred when calling Test-PSEnumParameters: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **EnumHeaderStringArray** | [**String[]**](String.md)| Header parameter enum test (string array) | [optional] + **EnumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to "-efg"] + **EnumQueryStringArray** | [**String[]**](String.md)| Query parameter enum test (string array) | [optional] + **EnumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to "-efg"] + **EnumQueryInteger** | **Int32**| Query parameter enum test (double) | [optional] + **EnumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] + **EnumFormStringArray** | [**String[]**](String.md)| Form parameter enum test (string array) | [optional] [default to "$"] + **EnumFormString** | **String**| Form parameter enum test (string) | [optional] [default to "-efg"] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Test-PSGroupParameters** +> void Test-PSGroupParameters
    +>         [-RequiredStringGroup]
    +>         [-RequiredBooleanGroup]
    +>         [-RequiredInt64Group]
    +>         [-StringGroup]
    +>         [-BooleanGroup]
    +>         [-Int64Group]
    + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration +# Configure HTTP basic authorization: bearer_test +$Configuration.Username = "YOUR_USERNAME" +$Configuration.Password = "YOUR_PASSWORD" + +$RequiredStringGroup = 56 # Int32 | Required String in group parameters +$RequiredBooleanGroup = $true # Boolean | Required Boolean in group parameters +$RequiredInt64Group = 789 # Int64 | Required Integer in group parameters +$StringGroup = 56 # Int32 | String in group parameters (optional) +$BooleanGroup = $true # Boolean | Boolean in group parameters (optional) +$Int64Group = 789 # Int64 | Integer in group parameters (optional) + +# Fake endpoint to test group parameters (optional) +try { + $Result = Test-PSGroupParameters -RequiredStringGroup $RequiredStringGroup -RequiredBooleanGroup $RequiredBooleanGroup -RequiredInt64Group $RequiredInt64Group -StringGroup $StringGroup -BooleanGroup $BooleanGroup -Int64Group $Int64Group +} catch { + Write-Host ("Exception occurred when calling Test-PSGroupParameters: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **RequiredStringGroup** | **Int32**| Required String in group parameters | + **RequiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | + **RequiredInt64Group** | **Int64**| Required Integer in group parameters | + **StringGroup** | **Int32**| String in group parameters | [optional] + **BooleanGroup** | **Boolean**| Boolean in group parameters | [optional] + **Int64Group** | **Int64**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Test-PSInlineAdditionalProperties** +> void Test-PSInlineAdditionalProperties
    +>         [-RequestBody]
    + +test inline additionalProperties + + + +### Example +```powershell +$RequestBody = @{ key_example = "MyInner" } # System.Collections.Hashtable | request body + +# test inline additionalProperties +try { + $Result = Test-PSInlineAdditionalProperties -RequestBody $RequestBody +} catch { + Write-Host ("Exception occurred when calling Test-PSInlineAdditionalProperties: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **RequestBody** | [**System.Collections.Hashtable**](String.md)| request body | + +### Return type + +void (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) + + +# **Test-PSJsonFormData** +> void Test-PSJsonFormData
    +>         [-Param]
    +>         [-Param2]
    + +test json serialization of form data + + + +### Example +```powershell +$Param = "MyParam" # String | field1 +$Param2 = "MyParam2" # String | field2 + +# test json serialization of form data +try { + $Result = Test-PSJsonFormData -Param $Param -Param2 $Param2 +} catch { + Write-Host ("Exception occurred when calling Test-PSJsonFormData: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Param** | **String**| field1 | + **Param2** | **String**| field2 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Test-PSQueryParameterCollectionFormat** +> void Test-PSQueryParameterCollectionFormat
    +>         [-Pipe]
    +>         [-Ioutil]
    +>         [-Http]
    +>         [-Url]
    +>         [-Context]
    + + + +To test the collection format in query parameters + +### Example +```powershell +$Pipe = "MyPipe" # String[] | +$Ioutil = "MyIoutil" # String[] | +$Http = "MyHttp" # String[] | +$Url = "MyUrl" # String[] | +$Context = "MyContext" # String[] | + +try { + $Result = Test-PSQueryParameterCollectionFormat -Pipe $Pipe -Ioutil $Ioutil -Http $Http -Url $Url -Context $Context +} catch { + Write-Host ("Exception occurred when calling Test-PSQueryParameterCollectionFormat: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Pipe** | [**String[]**](String.md)| | + **Ioutil** | [**String[]**](String.md)| | + **Http** | [**String[]**](String.md)| | + **Url** | [**String[]**](String.md)| | + **Context** | [**String[]**](String.md)| | + +### 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/powershell/docs/PSFakeClassnameTags123Api.md b/samples/client/petstore/powershell/docs/PSFakeClassnameTags123Api.md new file mode 100644 index 000000000000..5b775f25298f --- /dev/null +++ b/samples/client/petstore/powershell/docs/PSFakeClassnameTags123Api.md @@ -0,0 +1,59 @@ +# PSPetstore.PSPetstore/Api.PSFakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Test-PSClassname**](PSFakeClassnameTags123Api.md#Test-PSClassname) | **PATCH** /fake_classname_test | To test class name in snake case + + + +# **Test-PSClassname** +> Client Test-PSClassname
    +>         [-Client]
    + +To test class name in snake case + +To test class name in snake case + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration +# Configure API key authorization: api_key_query +$Configuration.ApiKey.api_key_query = "YOUR_API_KEY" +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +#$Configuration.ApiKeyPrefix.api_key_query = "Bearer" + +$Client = Initialize-Client -Client "MyClient" # Client | client model + +# To test class name in snake case +try { + $Result = Test-PSClassname -Client $Client +} catch { + Write-Host ("Exception occurred when calling Test-PSClassname: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) (PSCustomObject) + +### 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/client/petstore/powershell/docs/PSPetApi.md b/samples/client/petstore/powershell/docs/PSPetApi.md index c24d5de326c5..aa5a2db7167d 100644 --- a/samples/client/petstore/powershell/docs/PSPetApi.md +++ b/samples/client/petstore/powershell/docs/PSPetApi.md @@ -12,11 +12,12 @@ Method | HTTP request | Description [**Update-PSPet**](PSPetApi.md#Update-PSPet) | **PUT** /pet | Update an existing pet [**Update-PSPetWithForm**](PSPetApi.md#Update-PSPetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**Invoke-PSUploadFile**](PSPetApi.md#Invoke-PSUploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**Invoke-PSUploadFileWithRequiredFile**](PSPetApi.md#Invoke-PSUploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) # **Add-PSPet** -> Pet Add-PSPet
    +> void Add-PSPet
    >         [-Pet]
    Add a new pet to the store @@ -27,6 +28,18 @@ Add a new pet to the store ```powershell # general setting of the PowerShell module, e.g. base URL, authentication, etc $Configuration = Get-Configuration +# Configure HTTP basic authorization: http_signature_test +$Configuration.Username = "YOUR_USERNAME" +$Configuration.Password = "YOUR_PASSWORD" +# Configure HttpSignature for authorization :http_signature_test +$httpSigningParams = @{ + KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8" + KeyFilePath = "C:\SecretKey.txt" + HttpSigningHeader = @("(request-target)","Host","Date","Digest") + HashAlgorithm = "sha256" +} +Set-ConfigurationHttpSigning $httpSigningParams + # Configure OAuth2 access token for authorization: petstore_auth $Configuration.AccessToken = "YOUR_ACCESS_TOKEN" @@ -51,16 +64,16 @@ Name | Type | Description | Notes ### Return type -[**Pet**](Pet.md) (PSCustomObject) +void (empty response body) ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, 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) @@ -128,6 +141,18 @@ Multiple status values can be provided with comma separated strings ```powershell # general setting of the PowerShell module, e.g. base URL, authentication, etc $Configuration = Get-Configuration +# Configure HTTP basic authorization: http_signature_test +$Configuration.Username = "YOUR_USERNAME" +$Configuration.Password = "YOUR_PASSWORD" +# Configure HttpSignature for authorization :http_signature_test +$httpSigningParams = @{ + KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8" + KeyFilePath = "C:\SecretKey.txt" + HttpSigningHeader = @("(request-target)","Host","Date","Digest") + HashAlgorithm = "sha256" +} +Set-ConfigurationHttpSigning $httpSigningParams + # Configure OAuth2 access token for authorization: petstore_auth $Configuration.AccessToken = "YOUR_ACCESS_TOKEN" @@ -154,7 +179,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -176,6 +201,18 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```powershell # general setting of the PowerShell module, e.g. base URL, authentication, etc $Configuration = Get-Configuration +# Configure HTTP basic authorization: http_signature_test +$Configuration.Username = "YOUR_USERNAME" +$Configuration.Password = "YOUR_PASSWORD" +# Configure HttpSignature for authorization :http_signature_test +$httpSigningParams = @{ + KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8" + KeyFilePath = "C:\SecretKey.txt" + HttpSigningHeader = @("(request-target)","Host","Date","Digest") + HashAlgorithm = "sha256" +} +Set-ConfigurationHttpSigning $httpSigningParams + # Configure OAuth2 access token for authorization: petstore_auth $Configuration.AccessToken = "YOUR_ACCESS_TOKEN" @@ -202,7 +239,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -263,7 +300,7 @@ Name | Type | Description | Notes # **Update-PSPet** -> Pet Update-PSPet
    +> void Update-PSPet
    >         [-Pet]
    Update an existing pet @@ -274,6 +311,18 @@ Update an existing pet ```powershell # general setting of the PowerShell module, e.g. base URL, authentication, etc $Configuration = Get-Configuration +# Configure HTTP basic authorization: http_signature_test +$Configuration.Username = "YOUR_USERNAME" +$Configuration.Password = "YOUR_PASSWORD" +# Configure HttpSignature for authorization :http_signature_test +$httpSigningParams = @{ + KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8" + KeyFilePath = "C:\SecretKey.txt" + HttpSigningHeader = @("(request-target)","Host","Date","Digest") + HashAlgorithm = "sha256" +} +Set-ConfigurationHttpSigning $httpSigningParams + # Configure OAuth2 access token for authorization: petstore_auth $Configuration.AccessToken = "YOUR_ACCESS_TOKEN" @@ -298,16 +347,16 @@ Name | Type | Description | Notes ### Return type -[**Pet**](Pet.md) (PSCustomObject) +void (empty response body) ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, 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) @@ -419,3 +468,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **Invoke-PSUploadFileWithRequiredFile** +> ApiResponse Invoke-PSUploadFileWithRequiredFile
    +>         [-PetId]
    +>         [-RequiredFile]
    +>         [-AdditionalMetadata]
    + +uploads an image (required) + + + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration +# Configure OAuth2 access token for authorization: petstore_auth +$Configuration.AccessToken = "YOUR_ACCESS_TOKEN" + +$PetId = 789 # Int64 | ID of pet to update +$RequiredFile = # System.IO.FileInfo | file to upload +$AdditionalMetadata = "MyAdditionalMetadata" # String | Additional data to pass to server (optional) + +# uploads an image (required) +try { + $Result = Invoke-PSUploadFileWithRequiredFile -PetId $PetId -RequiredFile $RequiredFile -AdditionalMetadata $AdditionalMetadata +} catch { + Write-Host ("Exception occurred when calling Invoke-PSUploadFileWithRequiredFile: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PetId** | **Int64**| ID of pet to update | + **RequiredFile** | **System.IO.FileInfo****System.IO.FileInfo**| file to upload | + **AdditionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) (PSCustomObject) + +### 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/powershell/docs/PSStoreApi.md b/samples/client/petstore/powershell/docs/PSStoreApi.md index 2bcc27fd7491..6f7dac409bdd 100644 --- a/samples/client/petstore/powershell/docs/PSStoreApi.md +++ b/samples/client/petstore/powershell/docs/PSStoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Remove-PSOrder**](PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**Remove-PSOrder**](PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**Get-PSInventory**](PSStoreApi.md#Get-PSInventory) | **GET** /store/inventory | Returns pet inventories by status -[**Get-PSOrderById**](PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**Get-PSOrderById**](PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**Invoke-PSPlaceOrder**](PSStoreApi.md#Invoke-PSPlaceOrder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/powershell/docs/PSUserApi.md b/samples/client/petstore/powershell/docs/PSUserApi.md index ba7c2b092869..567ad5098511 100644 --- a/samples/client/petstore/powershell/docs/PSUserApi.md +++ b/samples/client/petstore/powershell/docs/PSUserApi.md @@ -25,14 +25,7 @@ This can only be done by the logged in user. ### Example ```powershell -# general setting of the PowerShell module, e.g. base URL, authentication, etc -$Configuration = Get-Configuration -# Configure API key authorization: auth_cookie -$Configuration.ApiKey.AUTH_KEY = "YOUR_API_KEY" -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -#$Configuration.ApiKeyPrefix.AUTH_KEY = "Bearer" - -$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 # User | Created user object +$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 -ObjectWithNoDeclaredProps -ObjectWithNoDeclaredPropsNullable -AnyTypeProp -AnyTypePropNullable # User | Created user object # Create user try { @@ -55,7 +48,7 @@ void (empty response body) ### Authorization -[auth_cookie](../README.md#auth_cookie) +No authorization required ### HTTP request headers @@ -75,14 +68,7 @@ Creates list of users with given input array ### Example ```powershell -# general setting of the PowerShell module, e.g. base URL, authentication, etc -$Configuration = Get-Configuration -# Configure API key authorization: auth_cookie -$Configuration.ApiKey.AUTH_KEY = "YOUR_API_KEY" -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -#$Configuration.ApiKeyPrefix.AUTH_KEY = "Bearer" - -$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 # User[] | List of user object +$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 -ObjectWithNoDeclaredProps -ObjectWithNoDeclaredPropsNullable -AnyTypeProp -AnyTypePropNullable # User[] | List of user object # Creates list of users with given input array try { @@ -105,7 +91,7 @@ void (empty response body) ### Authorization -[auth_cookie](../README.md#auth_cookie) +No authorization required ### HTTP request headers @@ -125,14 +111,7 @@ Creates list of users with given input array ### Example ```powershell -# general setting of the PowerShell module, e.g. base URL, authentication, etc -$Configuration = Get-Configuration -# Configure API key authorization: auth_cookie -$Configuration.ApiKey.AUTH_KEY = "YOUR_API_KEY" -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -#$Configuration.ApiKeyPrefix.AUTH_KEY = "Bearer" - -$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 # User[] | List of user object +$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 -ObjectWithNoDeclaredProps -ObjectWithNoDeclaredPropsNullable -AnyTypeProp -AnyTypePropNullable # User[] | List of user object # Creates list of users with given input array try { @@ -155,7 +134,7 @@ void (empty response body) ### Authorization -[auth_cookie](../README.md#auth_cookie) +No authorization required ### HTTP request headers @@ -175,13 +154,6 @@ This can only be done by the logged in user. ### Example ```powershell -# general setting of the PowerShell module, e.g. base URL, authentication, etc -$Configuration = Get-Configuration -# Configure API key authorization: auth_cookie -$Configuration.ApiKey.AUTH_KEY = "YOUR_API_KEY" -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -#$Configuration.ApiKeyPrefix.AUTH_KEY = "Bearer" - $Username = "MyUsername" # String | The name that needs to be deleted # Delete user @@ -205,7 +177,7 @@ void (empty response body) ### Authorization -[auth_cookie](../README.md#auth_cookie) +No authorization required ### HTTP request headers @@ -313,13 +285,6 @@ Logs out current logged in user session ### Example ```powershell -# general setting of the PowerShell module, e.g. base URL, authentication, etc -$Configuration = Get-Configuration -# Configure API key authorization: auth_cookie -$Configuration.ApiKey.AUTH_KEY = "YOUR_API_KEY" -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -#$Configuration.ApiKeyPrefix.AUTH_KEY = "Bearer" - # Logs out current logged in user session try { @@ -339,7 +304,7 @@ void (empty response body) ### Authorization -[auth_cookie](../README.md#auth_cookie) +No authorization required ### HTTP request headers @@ -360,15 +325,8 @@ This can only be done by the logged in user. ### Example ```powershell -# general setting of the PowerShell module, e.g. base URL, authentication, etc -$Configuration = Get-Configuration -# Configure API key authorization: auth_cookie -$Configuration.ApiKey.AUTH_KEY = "YOUR_API_KEY" -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -#$Configuration.ApiKeyPrefix.AUTH_KEY = "Bearer" - $Username = "MyUsername" # String | name that need to be deleted -$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 # User | Updated user object +$User = Initialize-User -Id 0 -Username "MyUsername" -FirstName "MyFirstName" -LastName "MyLastName" -Email "MyEmail" -Password "MyPassword" -Phone "MyPhone" -UserStatus 0 -ObjectWithNoDeclaredProps -ObjectWithNoDeclaredPropsNullable -AnyTypeProp -AnyTypePropNullable # User | Updated user object # Updated user try { @@ -392,7 +350,7 @@ void (empty response body) ### Authorization -[auth_cookie](../README.md#auth_cookie) +No authorization required ### HTTP request headers diff --git a/samples/client/petstore/powershell/docs/ParentPet.md b/samples/client/petstore/powershell/docs/ParentPet.md new file mode 100644 index 000000000000..f058cc20b7fb --- /dev/null +++ b/samples/client/petstore/powershell/docs/ParentPet.md @@ -0,0 +1,21 @@ +# ParentPet +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PetType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$ParentPet = Initialize-PSPetstoreParentPet -PetType null +``` + +- Convert the resource to JSON +```powershell +$ParentPet | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/PetWithRequiredTags.md b/samples/client/petstore/powershell/docs/PetWithRequiredTags.md new file mode 100644 index 000000000000..b85716daa4c5 --- /dev/null +++ b/samples/client/petstore/powershell/docs/PetWithRequiredTags.md @@ -0,0 +1,31 @@ +# PetWithRequiredTags +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Int64** | | [optional] +**Category** | [**Category**](Category.md) | | [optional] +**Name** | **String** | | +**PhotoUrls** | **String[]** | | +**Tags** | [**Tag[]**](Tag.md) | | +**Status** | **String** | pet status in the store | [optional] + +## Examples + +- Prepare the resource +```powershell +$PetWithRequiredTags = Initialize-PSPetstorePetWithRequiredTags -Id null ` + -Category null ` + -Name doggie ` + -PhotoUrls null ` + -Tags null ` + -Status null +``` + +- Convert the resource to JSON +```powershell +$PetWithRequiredTags | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Pig.md b/samples/client/petstore/powershell/docs/Pig.md new file mode 100644 index 000000000000..705259e7501a --- /dev/null +++ b/samples/client/petstore/powershell/docs/Pig.md @@ -0,0 +1,21 @@ +# Pig +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$Pig = Initialize-PSPetstorePig -ClassName null +``` + +- Convert the resource to JSON +```powershell +$Pig | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Quadrilateral.md b/samples/client/petstore/powershell/docs/Quadrilateral.md new file mode 100644 index 000000000000..7df7e807dc3d --- /dev/null +++ b/samples/client/petstore/powershell/docs/Quadrilateral.md @@ -0,0 +1,23 @@ +# Quadrilateral +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$Quadrilateral = Initialize-PSPetstoreQuadrilateral -ShapeType null ` + -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$Quadrilateral | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/QuadrilateralInterface.md b/samples/client/petstore/powershell/docs/QuadrilateralInterface.md new file mode 100644 index 000000000000..c5cd0a220854 --- /dev/null +++ b/samples/client/petstore/powershell/docs/QuadrilateralInterface.md @@ -0,0 +1,21 @@ +# QuadrilateralInterface +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$QuadrilateralInterface = Initialize-PSPetstoreQuadrilateralInterface -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$QuadrilateralInterface | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ReadOnlyFirst.md b/samples/client/petstore/powershell/docs/ReadOnlyFirst.md new file mode 100644 index 000000000000..d31235396d3f --- /dev/null +++ b/samples/client/petstore/powershell/docs/ReadOnlyFirst.md @@ -0,0 +1,23 @@ +# ReadOnlyFirst +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | **String** | | [optional] [readonly] +**Baz** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ReadOnlyFirst = Initialize-PSPetstoreReadOnlyFirst -Bar null ` + -Baz null +``` + +- Convert the resource to JSON +```powershell +$ReadOnlyFirst | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Return.md b/samples/client/petstore/powershell/docs/Return.md new file mode 100644 index 000000000000..461d10547c8b --- /dev/null +++ b/samples/client/petstore/powershell/docs/Return.md @@ -0,0 +1,21 @@ +# ModelReturn +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VarReturn** | **Int32** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$ModelReturn = Initialize-PSPetstoreModelReturn -VarReturn null +``` + +- Convert the resource to JSON +```powershell +$ModelReturn | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ScaleneTriangle.md b/samples/client/petstore/powershell/docs/ScaleneTriangle.md new file mode 100644 index 000000000000..df0a826f4682 --- /dev/null +++ b/samples/client/petstore/powershell/docs/ScaleneTriangle.md @@ -0,0 +1,23 @@ +# ScaleneTriangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$ScaleneTriangle = Initialize-PSPetstoreScaleneTriangle -ShapeType null ` + -TriangleType null +``` + +- Convert the resource to JSON +```powershell +$ScaleneTriangle | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Shape.md b/samples/client/petstore/powershell/docs/Shape.md new file mode 100644 index 000000000000..42b008286a5d --- /dev/null +++ b/samples/client/petstore/powershell/docs/Shape.md @@ -0,0 +1,25 @@ +# Shape +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$Shape = Initialize-PSPetstoreShape -ShapeType null ` + -TriangleType null ` + -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$Shape | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ShapeInterface.md b/samples/client/petstore/powershell/docs/ShapeInterface.md new file mode 100644 index 000000000000..cba56744b3db --- /dev/null +++ b/samples/client/petstore/powershell/docs/ShapeInterface.md @@ -0,0 +1,21 @@ +# ShapeInterface +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$ShapeInterface = Initialize-PSPetstoreShapeInterface -ShapeType null +``` + +- Convert the resource to JSON +```powershell +$ShapeInterface | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/ShapeOrNull.md b/samples/client/petstore/powershell/docs/ShapeOrNull.md new file mode 100644 index 000000000000..e237db3c1155 --- /dev/null +++ b/samples/client/petstore/powershell/docs/ShapeOrNull.md @@ -0,0 +1,25 @@ +# ShapeOrNull +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$ShapeOrNull = Initialize-PSPetstoreShapeOrNull -ShapeType null ` + -TriangleType null ` + -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$ShapeOrNull | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/SimpleQuadrilateral.md b/samples/client/petstore/powershell/docs/SimpleQuadrilateral.md new file mode 100644 index 000000000000..df5bdea7f0cd --- /dev/null +++ b/samples/client/petstore/powershell/docs/SimpleQuadrilateral.md @@ -0,0 +1,23 @@ +# SimpleQuadrilateral +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**QuadrilateralType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$SimpleQuadrilateral = Initialize-PSPetstoreSimpleQuadrilateral -ShapeType null ` + -QuadrilateralType null +``` + +- Convert the resource to JSON +```powershell +$SimpleQuadrilateral | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/SpecialModelName.md b/samples/client/petstore/powershell/docs/SpecialModelName.md new file mode 100644 index 000000000000..02562eeabbbc --- /dev/null +++ b/samples/client/petstore/powershell/docs/SpecialModelName.md @@ -0,0 +1,23 @@ +# SpecialModelName +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SpecialPropertyName** | **Int64** | | [optional] +**SpecialModelName** | **String** | | [optional] + +## Examples + +- Prepare the resource +```powershell +$SpecialModelName = Initialize-PSPetstoreSpecialModelName -SpecialPropertyName null ` + -SpecialModelName null +``` + +- Convert the resource to JSON +```powershell +$SpecialModelName | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Triangle.md b/samples/client/petstore/powershell/docs/Triangle.md new file mode 100644 index 000000000000..cfdebe89c17f --- /dev/null +++ b/samples/client/petstore/powershell/docs/Triangle.md @@ -0,0 +1,23 @@ +# Triangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **String** | | +**TriangleType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$Triangle = Initialize-PSPetstoreTriangle -ShapeType null ` + -TriangleType null +``` + +- Convert the resource to JSON +```powershell +$Triangle | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/TriangleInterface.md b/samples/client/petstore/powershell/docs/TriangleInterface.md new file mode 100644 index 000000000000..d984318cf6db --- /dev/null +++ b/samples/client/petstore/powershell/docs/TriangleInterface.md @@ -0,0 +1,21 @@ +# TriangleInterface +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TriangleType** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$TriangleInterface = Initialize-PSPetstoreTriangleInterface -TriangleType null +``` + +- Convert the resource to JSON +```powershell +$TriangleInterface | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/User.md b/samples/client/petstore/powershell/docs/User.md index 42b31bc9f007..8c6319df5d21 100644 --- a/samples/client/petstore/powershell/docs/User.md +++ b/samples/client/petstore/powershell/docs/User.md @@ -11,6 +11,10 @@ Name | Type | Description | Notes **Password** | **String** | | [optional] **Phone** | **String** | | [optional] **UserStatus** | **Int32** | User Status | [optional] +**ObjectWithNoDeclaredProps** | [**SystemCollectionsHashtable**](.md) | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] +**ObjectWithNoDeclaredPropsNullable** | [**SystemCollectionsHashtable**](.md) | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**AnyTypeProp** | [**AnyType**](.md) | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] +**AnyTypePropNullable** | [**AnyType**](.md) | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] ## Examples @@ -23,7 +27,11 @@ $User = Initialize-PSPetstoreUser -Id null ` -Email null ` -Password null ` -Phone null ` - -UserStatus null + -UserStatus null ` + -ObjectWithNoDeclaredProps null ` + -ObjectWithNoDeclaredPropsNullable null ` + -AnyTypeProp null ` + -AnyTypePropNullable null ``` - Convert the resource to JSON diff --git a/samples/client/petstore/powershell/docs/Whale.md b/samples/client/petstore/powershell/docs/Whale.md new file mode 100644 index 000000000000..e671dcc10c17 --- /dev/null +++ b/samples/client/petstore/powershell/docs/Whale.md @@ -0,0 +1,25 @@ +# Whale +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasBaleen** | **Boolean** | | [optional] +**HasTeeth** | **Boolean** | | [optional] +**ClassName** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$Whale = Initialize-PSPetstoreWhale -HasBaleen null ` + -HasTeeth null ` + -ClassName null +``` + +- Convert the resource to JSON +```powershell +$Whale | ConvertTo-JSON +``` + +[[Back to Model list]](../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/docs/Zebra.md b/samples/client/petstore/powershell/docs/Zebra.md new file mode 100644 index 000000000000..3c52ed299f4c --- /dev/null +++ b/samples/client/petstore/powershell/docs/Zebra.md @@ -0,0 +1,23 @@ +# Zebra +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **String** | | [optional] +**ClassName** | **String** | | + +## Examples + +- Prepare the resource +```powershell +$Zebra = Initialize-PSPetstoreZebra -Type null ` + -ClassName null +``` + +- Convert the resource to JSON +```powershell +$Zebra | ConvertTo-JSON +``` + +[[Back to Model list]](../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/src/PSPetstore/Api/PSAnotherFakeApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSAnotherFakeApi.ps1 new file mode 100644 index 000000000000..bea25f35712c --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSAnotherFakeApi.ps1 @@ -0,0 +1,85 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +To test special tags + +.DESCRIPTION + +No description available. + +.PARAMETER Client +client model + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +Client +#> +function Invoke-PS123TestSpecialTags { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [PSCustomObject] + ${Client}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PS123TestSpecialTags' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/another-fake/dummy' + + if (!$Client) { + throw "Error! The required parameter `Client` missing when calling 123TestSpecialTags." + } + + $LocalVarBodyParameter = $Client | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'PATCH' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "Client" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSDefaultApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSDefaultApi.ps1 new file mode 100644 index 000000000000..9153f38bcc30 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSDefaultApi.ps1 @@ -0,0 +1,70 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +InlineResponseDefault +#> +function Invoke-PSFooGet { + [CmdletBinding()] + Param ( + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSFooGet' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + $LocalVarUri = '/foo' + + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "InlineResponseDefault" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 new file mode 100644 index 000000000000..7d2c4596574b --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 @@ -0,0 +1,1436 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +Health check endpoint + +.DESCRIPTION + +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +HealthCheckResult +#> +function Invoke-PSFakeHealthGet { + [CmdletBinding()] + Param ( + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSFakeHealthGet' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + $LocalVarUri = '/fake/health' + + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "HealthCheckResult" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Body +Input boolean as post body + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +Boolean +#> +function Invoke-PSFakeOuterBooleanSerialize { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Boolean]] + ${Body}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSFakeOuterBooleanSerialize' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('*/*') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/outer/boolean' + + $LocalVarBodyParameter = $Body | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "Boolean" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER OuterComposite +Input composite as post body + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +OuterComposite +#> +function Invoke-PSFakeOuterCompositeSerialize { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [PSCustomObject] + ${OuterComposite}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSFakeOuterCompositeSerialize' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('*/*') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/outer/composite' + + $LocalVarBodyParameter = $OuterComposite | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "OuterComposite" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Body +Input number as post body + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +Decimal +#> +function Invoke-PSFakeOuterNumberSerialize { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Decimal]] + ${Body}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSFakeOuterNumberSerialize' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('*/*') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/outer/number' + + $LocalVarBodyParameter = $Body | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "Decimal" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Body +Input string as post body + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +String +#> +function Invoke-PSFakeOuterStringSerialize { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Body}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSFakeOuterStringSerialize' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('*/*') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/outer/string' + + $LocalVarBodyParameter = $Body | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "String" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +Array of Enums + +.DESCRIPTION + +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +OuterEnum[] +#> +function Get-PSArrayOfEnums { + [CmdletBinding()] + Param ( + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Get-PSArrayOfEnums' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + $LocalVarUri = '/fake/array-of-enums' + + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "OuterEnum[]" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER FileSchemaTestClass +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSBodyWithFileSchema { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [PSCustomObject] + ${FileSchemaTestClass}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSBodyWithFileSchema' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/body-with-file-schema' + + if (!$FileSchemaTestClass) { + throw "Error! The required parameter `FileSchemaTestClass` missing when calling testBodyWithFileSchema." + } + + $LocalVarBodyParameter = $FileSchemaTestClass | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'PUT' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Query +No description available. + +.PARAMETER User +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSBodyWithQueryParams { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Query}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [PSCustomObject] + ${User}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSBodyWithQueryParams' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/body-with-query-params' + + if (!$Query) { + throw "Error! The required parameter `Query` missing when calling testBodyWithQueryParams." + } + $LocalVarQueryParameters['query'] = $Query + + if (!$User) { + throw "Error! The required parameter `User` missing when calling testBodyWithQueryParams." + } + + $LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'PUT' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +To test ""client"" model + +.DESCRIPTION + +No description available. + +.PARAMETER Client +client model + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +Client +#> +function Test-PSClientModel { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [PSCustomObject] + ${Client}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSClientModel' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake' + + if (!$Client) { + throw "Error! The required parameter `Client` missing when calling testClientModel." + } + + $LocalVarBodyParameter = $Client | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'PATCH' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "Client" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +.DESCRIPTION + +No description available. + +.PARAMETER Number +None + +.PARAMETER Double +None + +.PARAMETER PatternWithoutDelimiter +None + +.PARAMETER Byte +None + +.PARAMETER Integer +None + +.PARAMETER Int32 +None + +.PARAMETER Int64 +None + +.PARAMETER Float +None + +.PARAMETER String +None + +.PARAMETER Binary +None + +.PARAMETER Date +None + +.PARAMETER DateTime +None + +.PARAMETER Password +None + +.PARAMETER Callback +None + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSEndpointParameters { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [Decimal] + ${Number}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [Double] + ${Double}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${PatternWithoutDelimiter}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [SystemByte] + ${Byte}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Int32]] + ${Integer}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Int32]] + ${Int32}, + [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Int64]] + ${Int64}, + [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Double]] + ${Float}, + [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${String}, + [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.IO.FileInfo] + ${Binary}, + [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[System.DateTime]] + ${Date}, + [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[System.DateTime]] + ${DateTime}, + [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Password}, + [Parameter(Position = 13, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Callback}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSEndpointParameters' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/x-www-form-urlencoded') + + $LocalVarUri = '/fake' + + if ($Integer) { + $LocalVarFormParameters['integer'] = $Integer + } + + if ($Int32) { + $LocalVarFormParameters['int32'] = $Int32 + } + + if ($Int64) { + $LocalVarFormParameters['int64'] = $Int64 + } + + if (!$Number) { + throw "Error! The required parameter `Number` missing when calling testEndpointParameters." + } + $LocalVarFormParameters['number'] = $Number + + if ($Float) { + $LocalVarFormParameters['float'] = $Float + } + + if (!$Double) { + throw "Error! The required parameter `Double` missing when calling testEndpointParameters." + } + $LocalVarFormParameters['double'] = $Double + + if ($String) { + $LocalVarFormParameters['string'] = $String + } + + if (!$PatternWithoutDelimiter) { + throw "Error! The required parameter `PatternWithoutDelimiter` missing when calling testEndpointParameters." + } + $LocalVarFormParameters['pattern_without_delimiter'] = $PatternWithoutDelimiter + + if (!$Byte) { + throw "Error! The required parameter `Byte` missing when calling testEndpointParameters." + } + $LocalVarFormParameters['byte'] = $Byte + + if ($Binary) { + $LocalVarFormParameters['binary'] = $Binary + } + + if ($Date) { + $LocalVarFormParameters['date'] = $Date + } + + if ($DateTime) { + $LocalVarFormParameters['dateTime'] = $DateTime + } + + if ($Password) { + $LocalVarFormParameters['password'] = $Password + } + + if ($Callback) { + $LocalVarFormParameters['callback'] = $Callback + } + + if ($Configuration["Username"] -and $Configuration["Password"]) { + $LocalVarBytes = [System.Text.Encoding]::UTF8.GetBytes($Configuration["Username"] + ":" + $Configuration["Password"]) + $LocalVarBase64Text =[Convert]::ToBase64String($LocalVarBytes) + $LocalVarHeaderParameters['Authorization'] = "Basic " + $LocalVarBase64Text + Write-Verbose ("Using HTTP basic authentication in {0}" -f $MyInvocation.MyCommand) + } + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +To test enum parameters + +.DESCRIPTION + +No description available. + +.PARAMETER EnumHeaderStringArray +Header parameter enum test (string array) + +.PARAMETER EnumHeaderString +Header parameter enum test (string) + +.PARAMETER EnumQueryStringArray +Query parameter enum test (string array) + +.PARAMETER EnumQueryString +Query parameter enum test (string) + +.PARAMETER EnumQueryInteger +Query parameter enum test (double) + +.PARAMETER EnumQueryDouble +Query parameter enum test (double) + +.PARAMETER EnumFormStringArray +Form parameter enum test (string array) + +.PARAMETER EnumFormString +Form parameter enum test (string) + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSEnumParameters { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet(">", "$")] + [String[]] + ${EnumHeaderStringArray}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet("_abc", "-efg", "(xyz)")] + [String] + ${EnumHeaderString}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet(">", "$")] + [String[]] + ${EnumQueryStringArray}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet("_abc", "-efg", "(xyz)")] + [String] + ${EnumQueryString}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet("1", "-2")] + [System.Nullable[Int32]] + ${EnumQueryInteger}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet("1.1", "-1.2")] + [System.Nullable[Double]] + ${EnumQueryDouble}, + [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet(">", "$")] + [String[]] + ${EnumFormStringArray}, + [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [ValidateSet("_abc", "-efg", "(xyz)")] + [String] + ${EnumFormString}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSEnumParameters' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/x-www-form-urlencoded') + + $LocalVarUri = '/fake' + + if ($EnumHeaderStringArray) { + $LocalVarHeaderParameters['enum_header_string_array'] = $EnumHeaderStringArray + } + + if ($EnumHeaderString) { + $LocalVarHeaderParameters['enum_header_string'] = $EnumHeaderString + } + + if ($EnumQueryStringArray) { + $LocalVarQueryParameters['enum_query_string_array'] = $EnumQueryStringArray + } + + if ($EnumQueryString) { + $LocalVarQueryParameters['enum_query_string'] = $EnumQueryString + } + + if ($EnumQueryInteger) { + $LocalVarQueryParameters['enum_query_integer'] = $EnumQueryInteger + } + + if ($EnumQueryDouble) { + $LocalVarQueryParameters['enum_query_double'] = $EnumQueryDouble + } + + if ($EnumFormStringArray) { + $LocalVarFormParameters['enum_form_string_array'] = $EnumFormStringArray + } + + if ($EnumFormString) { + $LocalVarFormParameters['enum_form_string'] = $EnumFormString + } + + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +Fake endpoint to test group parameters (optional) + +.DESCRIPTION + +No description available. + +.PARAMETER RequiredStringGroup +Required String in group parameters + +.PARAMETER RequiredBooleanGroup +Required Boolean in group parameters + +.PARAMETER RequiredInt64Group +Required Integer in group parameters + +.PARAMETER StringGroup +String in group parameters + +.PARAMETER BooleanGroup +Boolean in group parameters + +.PARAMETER Int64Group +Integer in group parameters + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSGroupParameters { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [Int32] + ${RequiredStringGroup}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [Boolean] + ${RequiredBooleanGroup}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [Int64] + ${RequiredInt64Group}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Int32]] + ${StringGroup}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Boolean]] + ${BooleanGroup}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Nullable[Int64]] + ${Int64Group}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSGroupParameters' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + $LocalVarUri = '/fake' + + if (!$RequiredBooleanGroup) { + throw "Error! The required parameter `RequiredBooleanGroup` missing when calling testGroupParameters." + } + $LocalVarHeaderParameters['required_boolean_group'] = $RequiredBooleanGroup + + if ($BooleanGroup) { + $LocalVarHeaderParameters['boolean_group'] = $BooleanGroup + } + + if (!$RequiredStringGroup) { + throw "Error! The required parameter `RequiredStringGroup` missing when calling testGroupParameters." + } + $LocalVarQueryParameters['required_string_group'] = $RequiredStringGroup + + if (!$RequiredInt64Group) { + throw "Error! The required parameter `RequiredInt64Group` missing when calling testGroupParameters." + } + $LocalVarQueryParameters['required_int64_group'] = $RequiredInt64Group + + if ($StringGroup) { + $LocalVarQueryParameters['string_group'] = $StringGroup + } + + if ($Int64Group) { + $LocalVarQueryParameters['int64_group'] = $Int64Group + } + + if ($Configuration["AccessToken"]) { + $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] + Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) + } + + $LocalVarResult = Invoke-PSApiClient -Method 'DELETE' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +test inline additionalProperties + +.DESCRIPTION + +No description available. + +.PARAMETER RequestBody +request body + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSInlineAdditionalProperties { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.Collections.Hashtable] + ${RequestBody}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSInlineAdditionalProperties' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake/inline-additionalProperties' + + if (!$RequestBody) { + throw "Error! The required parameter `RequestBody` missing when calling testInlineAdditionalProperties." + } + + $LocalVarBodyParameter = $RequestBody | ConvertTo-Json -Depth 100 + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +test json serialization of form data + +.DESCRIPTION + +No description available. + +.PARAMETER Param +field1 + +.PARAMETER Param2 +field2 + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSJsonFormData { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Param}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Param2}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSJsonFormData' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/x-www-form-urlencoded') + + $LocalVarUri = '/fake/jsonFormData' + + if (!$Param) { + throw "Error! The required parameter `Param` missing when calling testJsonFormData." + } + $LocalVarFormParameters['param'] = $Param + + if (!$Param2) { + throw "Error! The required parameter `Param2` missing when calling testJsonFormData." + } + $LocalVarFormParameters['param2'] = $Param2 + + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Pipe +No description available. + +.PARAMETER Ioutil +No description available. + +.PARAMETER Http +No description available. + +.PARAMETER Url +No description available. + +.PARAMETER Context +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +None +#> +function Test-PSQueryParameterCollectionFormat { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String[]] + ${Pipe}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String[]] + ${Ioutil}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String[]] + ${Http}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String[]] + ${Url}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String[]] + ${Context}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSQueryParameterCollectionFormat' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + $LocalVarUri = '/fake/test-query-parameters' + + if (!$Pipe) { + throw "Error! The required parameter `Pipe` missing when calling testQueryParameterCollectionFormat." + } + $LocalVarQueryParameters['pipe'] = $Pipe + + if (!$Ioutil) { + throw "Error! The required parameter `Ioutil` missing when calling testQueryParameterCollectionFormat." + } + $LocalVarQueryParameters['ioutil'] = $Ioutil + + if (!$Http) { + throw "Error! The required parameter `Http` missing when calling testQueryParameterCollectionFormat." + } + $LocalVarQueryParameters['http'] = $Http + + if (!$Url) { + throw "Error! The required parameter `Url` missing when calling testQueryParameterCollectionFormat." + } + $LocalVarQueryParameters['url'] = $Url + + if (!$Context) { + throw "Error! The required parameter `Context` missing when calling testQueryParameterCollectionFormat." + } + $LocalVarQueryParameters['context'] = $Context + + $LocalVarResult = Invoke-PSApiClient -Method 'PUT' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeClassnameTags123Api.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeClassnameTags123Api.ps1 new file mode 100644 index 000000000000..35f1186fcce4 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeClassnameTags123Api.ps1 @@ -0,0 +1,90 @@ +# +# OpenAPI Petstore +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +To test class name in snake case + +.DESCRIPTION + +No description available. + +.PARAMETER Client +client model + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +Client +#> +function Test-PSClassname { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [PSCustomObject] + ${Client}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-PSClassname' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('application/json') + + $LocalVarUri = '/fake_classname_test' + + if (!$Client) { + throw "Error! The required parameter `Client` missing when calling testClassname." + } + + $LocalVarBodyParameter = $Client | ConvertTo-Json -Depth 100 + + if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["api_key_query"]) { + $LocalVarQueryParameters['api_key_query'] = $Configuration["ApiKey"]["api_key_query"] + Write-Verbose ("Using API key `api_key_query` in the URL query for authentication in {0}" -f $MyInvocation.MyCommand) + } + + $LocalVarResult = Invoke-PSApiClient -Method 'PATCH' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "Client" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSPetApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSPetApi.ps1 index b6c13d19fb19..3542112c914d 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Api/PSPetApi.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSPetApi.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -17,17 +17,13 @@ No description available. .PARAMETER Pet Pet object that needs to be added to the store -.PARAMETER ReturnType - -Select the return type (optional): application/xml, application/json - .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS -Pet +None #> function Add-PSPet { [CmdletBinding()] @@ -35,9 +31,6 @@ function Add-PSPet { [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Pet}, - [String] - [ValidateSet("application/xml", "application/json")] - $ReturnType, [Switch] $WithHttpInfo ) @@ -56,14 +49,6 @@ function Add-PSPet { $LocalVarBodyParameter = $null $Configuration = Get-PSConfiguration - # HTTP header 'Accept' (if needed) - $LocalVarAccepts = @('application/xml', 'application/json') - - if ($ReturnType) { - # use the return type (MIME) provided by the user - $LocalVarAccepts = @($ReturnType) - } - # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json', 'application/xml') @@ -76,6 +61,7 @@ function Add-PSPet { $LocalVarBodyParameter = $Pet | ConvertTo-Json -Depth 100 + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -85,7 +71,7 @@ function Add-PSPet { -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` - -ReturnType "Pet" ` + -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { @@ -245,6 +231,7 @@ function Find-PSPetsByStatus { $LocalVarQueryParameters['status'] = $Status + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -332,6 +319,7 @@ function Find-PSPetsByTags { $LocalVarQueryParameters['tags'] = $Tags + $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -454,17 +442,13 @@ No description available. .PARAMETER Pet Pet object that needs to be added to the store -.PARAMETER ReturnType - -Select the return type (optional): application/xml, application/json - .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS -Pet +None #> function Update-PSPet { [CmdletBinding()] @@ -472,9 +456,6 @@ function Update-PSPet { [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Pet}, - [String] - [ValidateSet("application/xml", "application/json")] - $ReturnType, [Switch] $WithHttpInfo ) @@ -493,14 +474,6 @@ function Update-PSPet { $LocalVarBodyParameter = $null $Configuration = Get-PSConfiguration - # HTTP header 'Accept' (if needed) - $LocalVarAccepts = @('application/xml', 'application/json') - - if ($ReturnType) { - # use the return type (MIME) provided by the user - $LocalVarAccepts = @($ReturnType) - } - # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json', 'application/xml') @@ -513,6 +486,7 @@ function Update-PSPet { $LocalVarBodyParameter = $Pet | ConvertTo-Json -Depth 100 + $LocalVarResult = Invoke-PSApiClient -Method 'PUT' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -522,7 +496,7 @@ function Update-PSPet { -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` - -ReturnType "Pet" ` + -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { @@ -724,3 +698,101 @@ function Invoke-PSUploadFile { } } +<# +.SYNOPSIS + +uploads an image (required) + +.DESCRIPTION + +No description available. + +.PARAMETER PetId +ID of pet to update + +.PARAMETER RequiredFile +file to upload + +.PARAMETER AdditionalMetadata +Additional data to pass to server + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +ApiResponse +#> +function Invoke-PSUploadFileWithRequiredFile { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [Int64] + ${PetId}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.IO.FileInfo] + ${RequiredFile}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${AdditionalMetadata}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Invoke-PSUploadFileWithRequiredFile' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-PSConfiguration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('application/json') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('multipart/form-data') + + $LocalVarUri = '/fake/{petId}/uploadImageWithRequiredFile' + if (!$PetId) { + throw "Error! The required parameter `PetId` missing when calling uploadFileWithRequiredFile." + } + $LocalVarUri = $LocalVarUri.replace('{petId}', [System.Web.HTTPUtility]::UrlEncode($PetId)) + + if ($AdditionalMetadata) { + $LocalVarFormParameters['additionalMetadata'] = $AdditionalMetadata + } + + if (!$RequiredFile) { + throw "Error! The required parameter `RequiredFile` missing when calling uploadFileWithRequiredFile." + } + $LocalVarFormParameters['requiredFile'] = $RequiredFile + + + $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "ApiResponse" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSStoreApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSStoreApi.ps1 index da64d177edd3..a0f88138a48d 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Api/PSStoreApi.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSStoreApi.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -49,11 +49,11 @@ function Remove-PSOrder { $LocalVarBodyParameter = $null $Configuration = Get-PSConfiguration - $LocalVarUri = '/store/order/{orderId}' + $LocalVarUri = '/store/order/{order_id}' if (!$OrderId) { throw "Error! The required parameter `OrderId` missing when calling deleteOrder." } - $LocalVarUri = $LocalVarUri.replace('{orderId}', [System.Web.HTTPUtility]::UrlEncode($OrderId)) + $LocalVarUri = $LocalVarUri.replace('{order_id}', [System.Web.HTTPUtility]::UrlEncode($OrderId)) $LocalVarResult = Invoke-PSApiClient -Method 'DELETE' ` -Uri $LocalVarUri ` @@ -202,11 +202,11 @@ function Get-PSOrderById { $LocalVarAccepts = @($ReturnType) } - $LocalVarUri = '/store/order/{orderId}' + $LocalVarUri = '/store/order/{order_id}' if (!$OrderId) { throw "Error! The required parameter `OrderId` missing when calling getOrderById." } - $LocalVarUri = $LocalVarUri.replace('{orderId}', [System.Web.HTTPUtility]::UrlEncode($OrderId)) + $LocalVarUri = $LocalVarUri.replace('{order_id}', [System.Web.HTTPUtility]::UrlEncode($OrderId)) $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` -Uri $LocalVarUri ` diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSUserApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSUserApi.ps1 index b1bf3241a100..6d3be8f1037e 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Api/PSUserApi.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSUserApi.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -60,11 +60,6 @@ function New-PSUser { $LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100 - if ($Configuration["Cookie"]) { - $LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"] - Write-Verbose ("Using API key `auth_cookie` in the cookie for authentication in {0}" -f $MyInvocation.MyCommand) - } - $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -140,11 +135,6 @@ function New-PSUsersWithArrayInput { $LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100 - if ($Configuration["Cookie"]) { - $LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"] - Write-Verbose ("Using API key `auth_cookie` in the cookie for authentication in {0}" -f $MyInvocation.MyCommand) - } - $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -220,11 +210,6 @@ function New-PSUsersWithListInput { $LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100 - if ($Configuration["Cookie"]) { - $LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"] - Write-Verbose ("Using API key `auth_cookie` in the cookie for authentication in {0}" -f $MyInvocation.MyCommand) - } - $LocalVarResult = Invoke-PSApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -295,11 +280,6 @@ function Remove-PSUser { } $LocalVarUri = $LocalVarUri.replace('{username}', [System.Web.HTTPUtility]::UrlEncode($Username)) - if ($Configuration["Cookie"]) { - $LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"] - Write-Verbose ("Using API key `auth_cookie` in the cookie for authentication in {0}" -f $MyInvocation.MyCommand) - } - $LocalVarResult = Invoke-PSApiClient -Method 'DELETE' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -542,11 +522,6 @@ function Invoke-PSLogoutUser { $Configuration = Get-PSConfiguration $LocalVarUri = '/user/logout' - if ($Configuration["Cookie"]) { - $LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"] - Write-Verbose ("Using API key `auth_cookie` in the cookie for authentication in {0}" -f $MyInvocation.MyCommand) - } - $LocalVarResult = Invoke-PSApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` @@ -632,11 +607,6 @@ function Update-PSUser { $LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100 - if ($Configuration["Cookie"]) { - $LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"] - Write-Verbose ("Using API key `auth_cookie` in the cookie for authentication in {0}" -f $MyInvocation.MyCommand) - } - $LocalVarResult = Invoke-PSApiClient -Method 'PUT' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` diff --git a/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1 index d24a405660da..d655e6f997b2 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -347,6 +347,10 @@ function Get-PSHostSetting { ) } } + }, + @{ + "Url" = "https://127.0.0.1/no_variable"; + "Description" = "The local server without variables"; } ) diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/AdditionalPropertiesClass.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/AdditionalPropertiesClass.ps1 new file mode 100644 index 000000000000..517281366f80 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/AdditionalPropertiesClass.ps1 @@ -0,0 +1,188 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER MapProperty +No description available. +.PARAMETER MapOfMapProperty +No description available. +.PARAMETER Anytype1 +No description available. +.PARAMETER MapWithUndeclaredPropertiesAnytype1 +No description available. +.PARAMETER MapWithUndeclaredPropertiesAnytype2 +No description available. +.PARAMETER MapWithUndeclaredPropertiesAnytype3 +No description available. +.PARAMETER EmptyMap +an object with no declared properties and no undeclared properties, hence it's an empty map. +.PARAMETER MapWithUndeclaredPropertiesString +No description available. +.OUTPUTS + +AdditionalPropertiesClass +#> + +function Initialize-PSAdditionalPropertiesClass { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${MapProperty}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${MapOfMapProperty}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${Anytype1}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${MapWithUndeclaredPropertiesAnytype1}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${MapWithUndeclaredPropertiesAnytype2}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${MapWithUndeclaredPropertiesAnytype3}, + [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${EmptyMap}, + [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${MapWithUndeclaredPropertiesString} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSAdditionalPropertiesClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "map_property" = ${MapProperty} + "map_of_map_property" = ${MapOfMapProperty} + "anytype_1" = ${Anytype1} + "map_with_undeclared_properties_anytype_1" = ${MapWithUndeclaredPropertiesAnytype1} + "map_with_undeclared_properties_anytype_2" = ${MapWithUndeclaredPropertiesAnytype2} + "map_with_undeclared_properties_anytype_3" = ${MapWithUndeclaredPropertiesAnytype3} + "empty_map" = ${EmptyMap} + "map_with_undeclared_properties_string" = ${MapWithUndeclaredPropertiesString} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to AdditionalPropertiesClass + +.DESCRIPTION + +Convert from JSON to AdditionalPropertiesClass + +.PARAMETER Json + +Json object + +.OUTPUTS + +AdditionalPropertiesClass +#> +function ConvertFrom-PSJsonToAdditionalPropertiesClass { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSAdditionalPropertiesClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSAdditionalPropertiesClass + $AllProperties = ("map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_property"))) { #optional property not found + $MapProperty = $null + } else { + $MapProperty = $JsonParameters.PSobject.Properties["map_property"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_of_map_property"))) { #optional property not found + $MapOfMapProperty = $null + } else { + $MapOfMapProperty = $JsonParameters.PSobject.Properties["map_of_map_property"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "anytype_1"))) { #optional property not found + $Anytype1 = $null + } else { + $Anytype1 = $JsonParameters.PSobject.Properties["anytype_1"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_with_undeclared_properties_anytype_1"))) { #optional property not found + $MapWithUndeclaredPropertiesAnytype1 = $null + } else { + $MapWithUndeclaredPropertiesAnytype1 = $JsonParameters.PSobject.Properties["map_with_undeclared_properties_anytype_1"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_with_undeclared_properties_anytype_2"))) { #optional property not found + $MapWithUndeclaredPropertiesAnytype2 = $null + } else { + $MapWithUndeclaredPropertiesAnytype2 = $JsonParameters.PSobject.Properties["map_with_undeclared_properties_anytype_2"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_with_undeclared_properties_anytype_3"))) { #optional property not found + $MapWithUndeclaredPropertiesAnytype3 = $null + } else { + $MapWithUndeclaredPropertiesAnytype3 = $JsonParameters.PSobject.Properties["map_with_undeclared_properties_anytype_3"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "empty_map"))) { #optional property not found + $EmptyMap = $null + } else { + $EmptyMap = $JsonParameters.PSobject.Properties["empty_map"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_with_undeclared_properties_string"))) { #optional property not found + $MapWithUndeclaredPropertiesString = $null + } else { + $MapWithUndeclaredPropertiesString = $JsonParameters.PSobject.Properties["map_with_undeclared_properties_string"].value + } + + $PSO = [PSCustomObject]@{ + "map_property" = ${MapProperty} + "map_of_map_property" = ${MapOfMapProperty} + "anytype_1" = ${Anytype1} + "map_with_undeclared_properties_anytype_1" = ${MapWithUndeclaredPropertiesAnytype1} + "map_with_undeclared_properties_anytype_2" = ${MapWithUndeclaredPropertiesAnytype2} + "map_with_undeclared_properties_anytype_3" = ${MapWithUndeclaredPropertiesAnytype3} + "empty_map" = ${EmptyMap} + "map_with_undeclared_properties_string" = ${MapWithUndeclaredPropertiesString} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Animal.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Animal.ps1 new file mode 100644 index 000000000000..1da516f041bf --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Animal.ps1 @@ -0,0 +1,118 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ClassName +No description available. +.PARAMETER Color +No description available. +.OUTPUTS + +Animal +#> + +function Initialize-PSAnimal { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${Color} = "red" + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSAnimal' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + "color" = ${Color} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Animal + +.DESCRIPTION + +Convert from JSON to Animal + +.PARAMETER Json + +Json object + +.OUTPUTS + +Animal +#> +function ConvertFrom-PSJsonToAnimal { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSAnimal' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSAnimal + $AllProperties = ("className", "color") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "color"))) { #optional property not found + $Color = $null + } else { + $Color = $JsonParameters.PSobject.Properties["color"].value + } + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + "color" = ${Color} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ApiResponse.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ApiResponse.ps1 index 44be11154a37..4569b4ce4501 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/ApiResponse.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ApiResponse.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -12,7 +12,7 @@ No summary available. .DESCRIPTION -Describes the result of uploading an image resource +No description available. .PARAMETER Code No description available. diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Apple.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Apple.ps1 new file mode 100644 index 000000000000..049bfec4495d --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Apple.ps1 @@ -0,0 +1,112 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Cultivar +No description available. +.PARAMETER Origin +No description available. +.OUTPUTS + +Apple +#> + +function Initialize-PSApple { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [ValidatePattern("^[a-zA-Z\s]*$")] + [String] + ${Cultivar}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [ValidatePattern("/^[A-Z\s]*$/i")] + [String] + ${Origin} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSApple' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "cultivar" = ${Cultivar} + "origin" = ${Origin} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Apple + +.DESCRIPTION + +Convert from JSON to Apple + +.PARAMETER Json + +Json object + +.OUTPUTS + +Apple +#> +function ConvertFrom-PSJsonToApple { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSApple' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSApple + $AllProperties = ("cultivar", "origin") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "cultivar"))) { #optional property not found + $Cultivar = $null + } else { + $Cultivar = $JsonParameters.PSobject.Properties["cultivar"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "origin"))) { #optional property not found + $Origin = $null + } else { + $Origin = $JsonParameters.PSobject.Properties["origin"].value + } + + $PSO = [PSCustomObject]@{ + "cultivar" = ${Cultivar} + "origin" = ${Origin} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/AppleReq.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/AppleReq.ps1 new file mode 100644 index 000000000000..10604433c184 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/AppleReq.ps1 @@ -0,0 +1,118 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Cultivar +No description available. +.PARAMETER Mealy +No description available. +.OUTPUTS + +AppleReq +#> + +function Initialize-PSAppleReq { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Cultivar}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${Mealy} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSAppleReq' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $Cultivar) { + throw "invalid value for 'Cultivar', 'Cultivar' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "cultivar" = ${Cultivar} + "mealy" = ${Mealy} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to AppleReq + +.DESCRIPTION + +Convert from JSON to AppleReq + +.PARAMETER Json + +Json object + +.OUTPUTS + +AppleReq +#> +function ConvertFrom-PSJsonToAppleReq { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSAppleReq' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSAppleReq + $AllProperties = ("cultivar", "mealy") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'cultivar' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "cultivar"))) { + throw "Error! JSON cannot be serialized due to the required property 'cultivar' missing." + } else { + $Cultivar = $JsonParameters.PSobject.Properties["cultivar"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "mealy"))) { #optional property not found + $Mealy = $null + } else { + $Mealy = $JsonParameters.PSobject.Properties["mealy"].value + } + + $PSO = [PSCustomObject]@{ + "cultivar" = ${Cultivar} + "mealy" = ${Mealy} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayOfArrayOfNumberOnly.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayOfArrayOfNumberOnly.ps1 new file mode 100644 index 000000000000..15762b5aef59 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayOfArrayOfNumberOnly.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ArrayArrayNumber +No description available. +.OUTPUTS + +ArrayOfArrayOfNumberOnly +#> + +function Initialize-PSArrayOfArrayOfNumberOnly { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [Decimal[][]] + ${ArrayArrayNumber} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSArrayOfArrayOfNumberOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "ArrayArrayNumber" = ${ArrayArrayNumber} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ArrayOfArrayOfNumberOnly + +.DESCRIPTION + +Convert from JSON to ArrayOfArrayOfNumberOnly + +.PARAMETER Json + +Json object + +.OUTPUTS + +ArrayOfArrayOfNumberOnly +#> +function ConvertFrom-PSJsonToArrayOfArrayOfNumberOnly { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSArrayOfArrayOfNumberOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSArrayOfArrayOfNumberOnly + $AllProperties = ("ArrayArrayNumber") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "ArrayArrayNumber"))) { #optional property not found + $ArrayArrayNumber = $null + } else { + $ArrayArrayNumber = $JsonParameters.PSobject.Properties["ArrayArrayNumber"].value + } + + $PSO = [PSCustomObject]@{ + "ArrayArrayNumber" = ${ArrayArrayNumber} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayOfNumberOnly.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayOfNumberOnly.ps1 new file mode 100644 index 000000000000..d952e5e914a7 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayOfNumberOnly.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ArrayNumber +No description available. +.OUTPUTS + +ArrayOfNumberOnly +#> + +function Initialize-PSArrayOfNumberOnly { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [Decimal[]] + ${ArrayNumber} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSArrayOfNumberOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "ArrayNumber" = ${ArrayNumber} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ArrayOfNumberOnly + +.DESCRIPTION + +Convert from JSON to ArrayOfNumberOnly + +.PARAMETER Json + +Json object + +.OUTPUTS + +ArrayOfNumberOnly +#> +function ConvertFrom-PSJsonToArrayOfNumberOnly { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSArrayOfNumberOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSArrayOfNumberOnly + $AllProperties = ("ArrayNumber") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "ArrayNumber"))) { #optional property not found + $ArrayNumber = $null + } else { + $ArrayNumber = $JsonParameters.PSobject.Properties["ArrayNumber"].value + } + + $PSO = [PSCustomObject]@{ + "ArrayNumber" = ${ArrayNumber} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayTest.ps1 new file mode 100644 index 000000000000..bd20031b93a2 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ArrayTest.ps1 @@ -0,0 +1,123 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ArrayOfString +No description available. +.PARAMETER ArrayArrayOfInteger +No description available. +.PARAMETER ArrayArrayOfModel +No description available. +.OUTPUTS + +ArrayTest +#> + +function Initialize-PSArrayTest { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String[]] + ${ArrayOfString}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [Int64[][]] + ${ArrayArrayOfInteger}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[][]] + ${ArrayArrayOfModel} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSArrayTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "array_of_string" = ${ArrayOfString} + "array_array_of_integer" = ${ArrayArrayOfInteger} + "array_array_of_model" = ${ArrayArrayOfModel} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ArrayTest + +.DESCRIPTION + +Convert from JSON to ArrayTest + +.PARAMETER Json + +Json object + +.OUTPUTS + +ArrayTest +#> +function ConvertFrom-PSJsonToArrayTest { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSArrayTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSArrayTest + $AllProperties = ("array_of_string", "array_array_of_integer", "array_array_of_model") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_of_string"))) { #optional property not found + $ArrayOfString = $null + } else { + $ArrayOfString = $JsonParameters.PSobject.Properties["array_of_string"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_array_of_integer"))) { #optional property not found + $ArrayArrayOfInteger = $null + } else { + $ArrayArrayOfInteger = $JsonParameters.PSobject.Properties["array_array_of_integer"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_array_of_model"))) { #optional property not found + $ArrayArrayOfModel = $null + } else { + $ArrayArrayOfModel = $JsonParameters.PSobject.Properties["array_array_of_model"].value + } + + $PSO = [PSCustomObject]@{ + "array_of_string" = ${ArrayOfString} + "array_array_of_integer" = ${ArrayArrayOfInteger} + "array_array_of_model" = ${ArrayArrayOfModel} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Banana.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Banana.ps1 new file mode 100644 index 000000000000..55e9a55978fa --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Banana.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER LengthCm +No description available. +.OUTPUTS + +Banana +#> + +function Initialize-PSBanana { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Decimal]] + ${LengthCm} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSBanana' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "lengthCm" = ${LengthCm} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Banana + +.DESCRIPTION + +Convert from JSON to Banana + +.PARAMETER Json + +Json object + +.OUTPUTS + +Banana +#> +function ConvertFrom-PSJsonToBanana { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSBanana' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSBanana + $AllProperties = ("lengthCm") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "lengthCm"))) { #optional property not found + $LengthCm = $null + } else { + $LengthCm = $JsonParameters.PSobject.Properties["lengthCm"].value + } + + $PSO = [PSCustomObject]@{ + "lengthCm" = ${LengthCm} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/BananaReq.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/BananaReq.ps1 new file mode 100644 index 000000000000..21dee7f98766 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/BananaReq.ps1 @@ -0,0 +1,118 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER LengthCm +No description available. +.PARAMETER Sweet +No description available. +.OUTPUTS + +BananaReq +#> + +function Initialize-PSBananaReq { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [Decimal] + ${LengthCm}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${Sweet} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSBananaReq' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $LengthCm) { + throw "invalid value for 'LengthCm', 'LengthCm' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "lengthCm" = ${LengthCm} + "sweet" = ${Sweet} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to BananaReq + +.DESCRIPTION + +Convert from JSON to BananaReq + +.PARAMETER Json + +Json object + +.OUTPUTS + +BananaReq +#> +function ConvertFrom-PSJsonToBananaReq { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSBananaReq' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSBananaReq + $AllProperties = ("lengthCm", "sweet") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'lengthCm' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "lengthCm"))) { + throw "Error! JSON cannot be serialized due to the required property 'lengthCm' missing." + } else { + $LengthCm = $JsonParameters.PSobject.Properties["lengthCm"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "sweet"))) { #optional property not found + $Sweet = $null + } else { + $Sweet = $JsonParameters.PSobject.Properties["sweet"].value + } + + $PSO = [PSCustomObject]@{ + "lengthCm" = ${LengthCm} + "sweet" = ${Sweet} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/BasquePig.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/BasquePig.ps1 new file mode 100644 index 000000000000..d6bfff878420 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/BasquePig.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ClassName +No description available. +.OUTPUTS + +BasquePig +#> + +function Initialize-PSBasquePig { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSBasquePig' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to BasquePig + +.DESCRIPTION + +Convert from JSON to BasquePig + +.PARAMETER Json + +Json object + +.OUTPUTS + +BasquePig +#> +function ConvertFrom-PSJsonToBasquePig { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSBasquePig' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSBasquePig + $AllProperties = ("className") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Capitalization.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Capitalization.ps1 new file mode 100644 index 000000000000..d71810788fd3 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Capitalization.ps1 @@ -0,0 +1,162 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER SmallCamel +No description available. +.PARAMETER CapitalCamel +No description available. +.PARAMETER SmallSnake +No description available. +.PARAMETER CapitalSnake +No description available. +.PARAMETER SCAETHFlowPoints +No description available. +.PARAMETER ATTNAME +Name of the pet +.OUTPUTS + +Capitalization +#> + +function Initialize-PSCapitalization { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${SmallCamel}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${CapitalCamel}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [String] + ${SmallSnake}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [String] + ${CapitalSnake}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] + [String] + ${SCAETHFlowPoints}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [String] + ${ATTNAME} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSCapitalization' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "smallCamel" = ${SmallCamel} + "CapitalCamel" = ${CapitalCamel} + "small_Snake" = ${SmallSnake} + "Capital_Snake" = ${CapitalSnake} + "SCA_ETH_Flow_Points" = ${SCAETHFlowPoints} + "ATT_NAME" = ${ATTNAME} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Capitalization + +.DESCRIPTION + +Convert from JSON to Capitalization + +.PARAMETER Json + +Json object + +.OUTPUTS + +Capitalization +#> +function ConvertFrom-PSJsonToCapitalization { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSCapitalization' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSCapitalization + $AllProperties = ("smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "smallCamel"))) { #optional property not found + $SmallCamel = $null + } else { + $SmallCamel = $JsonParameters.PSobject.Properties["smallCamel"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "CapitalCamel"))) { #optional property not found + $CapitalCamel = $null + } else { + $CapitalCamel = $JsonParameters.PSobject.Properties["CapitalCamel"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "small_Snake"))) { #optional property not found + $SmallSnake = $null + } else { + $SmallSnake = $JsonParameters.PSobject.Properties["small_Snake"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "Capital_Snake"))) { #optional property not found + $CapitalSnake = $null + } else { + $CapitalSnake = $JsonParameters.PSobject.Properties["Capital_Snake"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "SCA_ETH_Flow_Points"))) { #optional property not found + $SCAETHFlowPoints = $null + } else { + $SCAETHFlowPoints = $JsonParameters.PSobject.Properties["SCA_ETH_Flow_Points"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "ATT_NAME"))) { #optional property not found + $ATTNAME = $null + } else { + $ATTNAME = $JsonParameters.PSobject.Properties["ATT_NAME"].value + } + + $PSO = [PSCustomObject]@{ + "smallCamel" = ${SmallCamel} + "CapitalCamel" = ${CapitalCamel} + "small_Snake" = ${SmallSnake} + "Capital_Snake" = ${CapitalSnake} + "SCA_ETH_Flow_Points" = ${SCAETHFlowPoints} + "ATT_NAME" = ${ATTNAME} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Cat.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Cat.ps1 new file mode 100644 index 000000000000..a9c94e32336a --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Cat.ps1 @@ -0,0 +1,131 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ClassName +No description available. +.PARAMETER Color +No description available. +.PARAMETER Declawed +No description available. +.OUTPUTS + +Cat +#> + +function Initialize-PSCat { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${Color} = "red", + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${Declawed} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSCat' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + "color" = ${Color} + "declawed" = ${Declawed} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Cat + +.DESCRIPTION + +Convert from JSON to Cat + +.PARAMETER Json + +Json object + +.OUTPUTS + +Cat +#> +function ConvertFrom-PSJsonToCat { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSCat' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSCat + $AllProperties = ("className", "color", "declawed") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "color"))) { #optional property not found + $Color = $null + } else { + $Color = $JsonParameters.PSobject.Properties["color"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "declawed"))) { #optional property not found + $Declawed = $null + } else { + $Declawed = $JsonParameters.PSobject.Properties["declawed"].value + } + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + "color" = ${Color} + "declawed" = ${Declawed} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/CatAllOf.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/CatAllOf.ps1 new file mode 100644 index 000000000000..1e57f437b5f0 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/CatAllOf.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Declawed +No description available. +.OUTPUTS + +CatAllOf +#> + +function Initialize-PSCatAllOf { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${Declawed} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSCatAllOf' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "declawed" = ${Declawed} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to CatAllOf + +.DESCRIPTION + +Convert from JSON to CatAllOf + +.PARAMETER Json + +Json object + +.OUTPUTS + +CatAllOf +#> +function ConvertFrom-PSJsonToCatAllOf { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSCatAllOf' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSCatAllOf + $AllProperties = ("declawed") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "declawed"))) { #optional property not found + $Declawed = $null + } else { + $Declawed = $JsonParameters.PSobject.Properties["declawed"].value + } + + $PSO = [PSCustomObject]@{ + "declawed" = ${Declawed} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Category.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Category.ps1 index 3c3bcf860f9c..2386dd8543c4 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/Category.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Category.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -12,7 +12,7 @@ No summary available. .DESCRIPTION -A category for a pet +No description available. .PARAMETER Id No description available. @@ -30,15 +30,18 @@ function Initialize-PSCategory { [System.Nullable[Int64]] ${Id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] - [ValidatePattern("^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$")] [String] - ${Name} + ${Name} = "default-name" ) Process { 'Creating PSCustomObject: PSPetstore => PSCategory' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug + if ($null -eq $Name) { + throw "invalid value for 'Name', 'Name' cannot be null." + } + $PSO = [PSCustomObject]@{ "id" = ${Id} @@ -87,18 +90,22 @@ function ConvertFrom-PSJsonToCategory { } } - if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found - $Id = $null - } else { - $Id = $JsonParameters.PSobject.Properties["id"].value + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'name' missing." } - if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found - $Name = $null + if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { + throw "Error! JSON cannot be serialized due to the required property 'name' missing." } else { $Name = $JsonParameters.PSobject.Properties["name"].value } + if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found + $Id = $null + } else { + $Id = $JsonParameters.PSobject.Properties["id"].value + } + $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ClassModel.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ClassModel.ps1 new file mode 100644 index 000000000000..eea87f4ac57b --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ClassModel.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +Model for testing model with ""_class"" property + +.PARAMETER Class +No description available. +.OUTPUTS + +ClassModel +#> + +function Initialize-PSClassModel { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Class} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSClassModel' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "_class" = ${Class} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ClassModel + +.DESCRIPTION + +Convert from JSON to ClassModel + +.PARAMETER Json + +Json object + +.OUTPUTS + +ClassModel +#> +function ConvertFrom-PSJsonToClassModel { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSClassModel' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSClassModel + $AllProperties = ("_class") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "_class"))) { #optional property not found + $Class = $null + } else { + $Class = $JsonParameters.PSobject.Properties["_class"].value + } + + $PSO = [PSCustomObject]@{ + "_class" = ${Class} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Client.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Client.ps1 new file mode 100644 index 000000000000..13059074de64 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Client.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Client +No description available. +.OUTPUTS + +Client +#> + +function Initialize-PSClient { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Client} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSClient' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "client" = ${Client} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Client + +.DESCRIPTION + +Convert from JSON to Client + +.PARAMETER Json + +Json object + +.OUTPUTS + +Client +#> +function ConvertFrom-PSJsonToClient { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSClient' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSClient + $AllProperties = ("client") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "client"))) { #optional property not found + $Client = $null + } else { + $Client = $JsonParameters.PSobject.Properties["client"].value + } + + $PSO = [PSCustomObject]@{ + "client" = ${Client} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ComplexQuadrilateral.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ComplexQuadrilateral.ps1 new file mode 100644 index 000000000000..bfa0839116f0 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ComplexQuadrilateral.ps1 @@ -0,0 +1,122 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ShapeType +No description available. +.PARAMETER QuadrilateralType +No description available. +.OUTPUTS + +ComplexQuadrilateral +#> + +function Initialize-PSComplexQuadrilateral { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ShapeType}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${QuadrilateralType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSComplexQuadrilateral' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ShapeType) { + throw "invalid value for 'ShapeType', 'ShapeType' cannot be null." + } + + if ($null -eq $QuadrilateralType) { + throw "invalid value for 'QuadrilateralType', 'QuadrilateralType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "quadrilateralType" = ${QuadrilateralType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ComplexQuadrilateral + +.DESCRIPTION + +Convert from JSON to ComplexQuadrilateral + +.PARAMETER Json + +Json object + +.OUTPUTS + +ComplexQuadrilateral +#> +function ConvertFrom-PSJsonToComplexQuadrilateral { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSComplexQuadrilateral' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSComplexQuadrilateral + $AllProperties = ("shapeType", "quadrilateralType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'shapeType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeType"))) { + throw "Error! JSON cannot be serialized due to the required property 'shapeType' missing." + } else { + $ShapeType = $JsonParameters.PSobject.Properties["shapeType"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "quadrilateralType"))) { + throw "Error! JSON cannot be serialized due to the required property 'quadrilateralType' missing." + } else { + $QuadrilateralType = $JsonParameters.PSobject.Properties["quadrilateralType"].value + } + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "quadrilateralType" = ${QuadrilateralType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/DanishPig.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/DanishPig.ps1 new file mode 100644 index 000000000000..f30268da519c --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/DanishPig.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ClassName +No description available. +.OUTPUTS + +DanishPig +#> + +function Initialize-PSDanishPig { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSDanishPig' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to DanishPig + +.DESCRIPTION + +Convert from JSON to DanishPig + +.PARAMETER Json + +Json object + +.OUTPUTS + +DanishPig +#> +function ConvertFrom-PSJsonToDanishPig { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSDanishPig' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSDanishPig + $AllProperties = ("className") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/DeprecatedObject.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/DeprecatedObject.ps1 new file mode 100644 index 000000000000..f2a88c0416a5 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/DeprecatedObject.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Name +No description available. +.OUTPUTS + +DeprecatedObject +#> + +function Initialize-PSDeprecatedObject { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Name} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSDeprecatedObject' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to DeprecatedObject + +.DESCRIPTION + +Convert from JSON to DeprecatedObject + +.PARAMETER Json + +Json object + +.OUTPUTS + +DeprecatedObject +#> +function ConvertFrom-PSJsonToDeprecatedObject { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSDeprecatedObject' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSDeprecatedObject + $AllProperties = ("name") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found + $Name = $null + } else { + $Name = $JsonParameters.PSobject.Properties["name"].value + } + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Dog.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Dog.ps1 new file mode 100644 index 000000000000..3e33a6c23e65 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Dog.ps1 @@ -0,0 +1,131 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ClassName +No description available. +.PARAMETER Color +No description available. +.PARAMETER Breed +No description available. +.OUTPUTS + +Dog +#> + +function Initialize-PSDog { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${Color} = "red", + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [String] + ${Breed} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSDog' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + "color" = ${Color} + "breed" = ${Breed} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Dog + +.DESCRIPTION + +Convert from JSON to Dog + +.PARAMETER Json + +Json object + +.OUTPUTS + +Dog +#> +function ConvertFrom-PSJsonToDog { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSDog' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSDog + $AllProperties = ("className", "color", "breed") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "color"))) { #optional property not found + $Color = $null + } else { + $Color = $JsonParameters.PSobject.Properties["color"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "breed"))) { #optional property not found + $Breed = $null + } else { + $Breed = $JsonParameters.PSobject.Properties["breed"].value + } + + $PSO = [PSCustomObject]@{ + "className" = ${ClassName} + "color" = ${Color} + "breed" = ${Breed} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/DogAllOf.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/DogAllOf.ps1 new file mode 100644 index 000000000000..7737af53e414 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/DogAllOf.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Breed +No description available. +.OUTPUTS + +DogAllOf +#> + +function Initialize-PSDogAllOf { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Breed} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSDogAllOf' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "breed" = ${Breed} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to DogAllOf + +.DESCRIPTION + +Convert from JSON to DogAllOf + +.PARAMETER Json + +Json object + +.OUTPUTS + +DogAllOf +#> +function ConvertFrom-PSJsonToDogAllOf { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSDogAllOf' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSDogAllOf + $AllProperties = ("breed") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "breed"))) { #optional property not found + $Breed = $null + } else { + $Breed = $JsonParameters.PSobject.Properties["breed"].value + } + + $PSO = [PSCustomObject]@{ + "breed" = ${Breed} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Drawing.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Drawing.ps1 new file mode 100644 index 000000000000..3db24f69486d --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Drawing.ps1 @@ -0,0 +1,136 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER MainShape +No description available. +.PARAMETER ShapeOrNull +No description available. +.PARAMETER NullableShape +No description available. +.PARAMETER Shapes +No description available. +.OUTPUTS + +Drawing +#> + +function Initialize-PSDrawing { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${MainShape}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${ShapeOrNull}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${NullableShape}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[]] + ${Shapes} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSDrawing' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "mainShape" = ${MainShape} + "shapeOrNull" = ${ShapeOrNull} + "nullableShape" = ${NullableShape} + "shapes" = ${Shapes} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Drawing + +.DESCRIPTION + +Convert from JSON to Drawing + +.PARAMETER Json + +Json object + +.OUTPUTS + +Drawing +#> +function ConvertFrom-PSJsonToDrawing { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSDrawing' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSDrawing + $AllProperties = ("mainShape", "shapeOrNull", "nullableShape", "shapes") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "mainShape"))) { #optional property not found + $MainShape = $null + } else { + $MainShape = $JsonParameters.PSobject.Properties["mainShape"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeOrNull"))) { #optional property not found + $ShapeOrNull = $null + } else { + $ShapeOrNull = $JsonParameters.PSobject.Properties["shapeOrNull"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "nullableShape"))) { #optional property not found + $NullableShape = $null + } else { + $NullableShape = $JsonParameters.PSobject.Properties["nullableShape"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapes"))) { #optional property not found + $Shapes = $null + } else { + $Shapes = $JsonParameters.PSobject.Properties["shapes"].value + } + + $PSO = [PSCustomObject]@{ + "mainShape" = ${MainShape} + "shapeOrNull" = ${ShapeOrNull} + "nullableShape" = ${NullableShape} + "shapes" = ${Shapes} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumArrays.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumArrays.ps1 new file mode 100644 index 000000000000..0dc089ae6b4b --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumArrays.ps1 @@ -0,0 +1,112 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER JustSymbol +No description available. +.PARAMETER ArrayEnum +No description available. +.OUTPUTS + +EnumArrays +#> + +function Initialize-PSEnumArrays { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [ValidateSet(">=", "$")] + [String] + ${JustSymbol}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("fish", "crab")] + [String[]] + ${ArrayEnum} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSEnumArrays' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "just_symbol" = ${JustSymbol} + "array_enum" = ${ArrayEnum} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to EnumArrays + +.DESCRIPTION + +Convert from JSON to EnumArrays + +.PARAMETER Json + +Json object + +.OUTPUTS + +EnumArrays +#> +function ConvertFrom-PSJsonToEnumArrays { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSEnumArrays' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSEnumArrays + $AllProperties = ("just_symbol", "array_enum") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "just_symbol"))) { #optional property not found + $JustSymbol = $null + } else { + $JustSymbol = $JsonParameters.PSobject.Properties["just_symbol"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_enum"))) { #optional property not found + $ArrayEnum = $null + } else { + $ArrayEnum = $JsonParameters.PSobject.Properties["array_enum"].value + } + + $PSO = [PSCustomObject]@{ + "just_symbol" = ${JustSymbol} + "array_enum" = ${ArrayEnum} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 new file mode 100644 index 000000000000..8b9608f1925e --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 @@ -0,0 +1,175 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER EnumString +No description available. +.PARAMETER EnumStringRequired +No description available. +.PARAMETER EnumInteger +No description available. +.PARAMETER EnumIntegerOnly +No description available. +.PARAMETER EnumNumber +No description available. +.PARAMETER OuterEnum +No description available. +.OUTPUTS + +EnumTest +#> + +function Initialize-PSEnumTest { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("UPPER", "lower", "")] + [String] + ${EnumString}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("UPPER", "lower", "")] + [String] + ${EnumStringRequired}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("1", "-1")] + [System.Nullable[Int32]] + ${EnumInteger}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("2", "-2")] + [System.Nullable[Int32]] + ${EnumIntegerOnly}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("1.1", "-1.2")] + [System.Nullable[Double]] + ${EnumNumber}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${OuterEnum} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSEnumTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $EnumStringRequired) { + throw "invalid value for 'EnumStringRequired', 'EnumStringRequired' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "enum_string" = ${EnumString} + "enum_string_required" = ${EnumStringRequired} + "enum_integer" = ${EnumInteger} + "enum_integer_only" = ${EnumIntegerOnly} + "enum_number" = ${EnumNumber} + "outerEnum" = ${OuterEnum} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to EnumTest + +.DESCRIPTION + +Convert from JSON to EnumTest + +.PARAMETER Json + +Json object + +.OUTPUTS + +EnumTest +#> +function ConvertFrom-PSJsonToEnumTest { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSEnumTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSEnumTest + $AllProperties = ("enum_string", "enum_string_required", "enum_integer", "enum_integer_only", "enum_number", "outerEnum") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'enum_string_required' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "enum_string_required"))) { + throw "Error! JSON cannot be serialized due to the required property 'enum_string_required' missing." + } else { + $EnumStringRequired = $JsonParameters.PSobject.Properties["enum_string_required"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "enum_string"))) { #optional property not found + $EnumString = $null + } else { + $EnumString = $JsonParameters.PSobject.Properties["enum_string"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "enum_integer"))) { #optional property not found + $EnumInteger = $null + } else { + $EnumInteger = $JsonParameters.PSobject.Properties["enum_integer"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "enum_integer_only"))) { #optional property not found + $EnumIntegerOnly = $null + } else { + $EnumIntegerOnly = $JsonParameters.PSobject.Properties["enum_integer_only"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "enum_number"))) { #optional property not found + $EnumNumber = $null + } else { + $EnumNumber = $JsonParameters.PSobject.Properties["enum_number"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "outerEnum"))) { #optional property not found + $OuterEnum = $null + } else { + $OuterEnum = $JsonParameters.PSobject.Properties["outerEnum"].value + } + + $PSO = [PSCustomObject]@{ + "enum_string" = ${EnumString} + "enum_string_required" = ${EnumStringRequired} + "enum_integer" = ${EnumInteger} + "enum_integer_only" = ${EnumIntegerOnly} + "enum_number" = ${EnumNumber} + "outerEnum" = ${OuterEnum} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/EquilateralTriangle.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/EquilateralTriangle.ps1 new file mode 100644 index 000000000000..68d1536147f1 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/EquilateralTriangle.ps1 @@ -0,0 +1,122 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ShapeType +No description available. +.PARAMETER TriangleType +No description available. +.OUTPUTS + +EquilateralTriangle +#> + +function Initialize-PSEquilateralTriangle { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ShapeType}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${TriangleType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSEquilateralTriangle' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ShapeType) { + throw "invalid value for 'ShapeType', 'ShapeType' cannot be null." + } + + if ($null -eq $TriangleType) { + throw "invalid value for 'TriangleType', 'TriangleType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "triangleType" = ${TriangleType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to EquilateralTriangle + +.DESCRIPTION + +Convert from JSON to EquilateralTriangle + +.PARAMETER Json + +Json object + +.OUTPUTS + +EquilateralTriangle +#> +function ConvertFrom-PSJsonToEquilateralTriangle { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSEquilateralTriangle' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSEquilateralTriangle + $AllProperties = ("shapeType", "triangleType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'shapeType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeType"))) { + throw "Error! JSON cannot be serialized due to the required property 'shapeType' missing." + } else { + $ShapeType = $JsonParameters.PSobject.Properties["shapeType"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "triangleType"))) { + throw "Error! JSON cannot be serialized due to the required property 'triangleType' missing." + } else { + $TriangleType = $JsonParameters.PSobject.Properties["triangleType"].value + } + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "triangleType" = ${TriangleType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/File.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/File.ps1 new file mode 100644 index 000000000000..b9531e65f9cb --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/File.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +Must be named `File` for test. + +.PARAMETER SourceURI +Test capitalization +.OUTPUTS + +File +#> + +function Initialize-PSFile { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${SourceURI} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSFile' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "sourceURI" = ${SourceURI} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to File + +.DESCRIPTION + +Convert from JSON to File + +.PARAMETER Json + +Json object + +.OUTPUTS + +File +#> +function ConvertFrom-PSJsonToFile { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSFile' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSFile + $AllProperties = ("sourceURI") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceURI"))) { #optional property not found + $SourceURI = $null + } else { + $SourceURI = $JsonParameters.PSobject.Properties["sourceURI"].value + } + + $PSO = [PSCustomObject]@{ + "sourceURI" = ${SourceURI} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/FileSchemaTestClass.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/FileSchemaTestClass.ps1 new file mode 100644 index 000000000000..19641687121a --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/FileSchemaTestClass.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER File +No description available. +.PARAMETER Files +No description available. +.OUTPUTS + +FileSchemaTestClass +#> + +function Initialize-PSFileSchemaTestClass { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${File}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[]] + ${Files} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSFileSchemaTestClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "file" = ${File} + "files" = ${Files} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to FileSchemaTestClass + +.DESCRIPTION + +Convert from JSON to FileSchemaTestClass + +.PARAMETER Json + +Json object + +.OUTPUTS + +FileSchemaTestClass +#> +function ConvertFrom-PSJsonToFileSchemaTestClass { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSFileSchemaTestClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSFileSchemaTestClass + $AllProperties = ("file", "files") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "file"))) { #optional property not found + $File = $null + } else { + $File = $JsonParameters.PSobject.Properties["file"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "files"))) { #optional property not found + $Files = $null + } else { + $Files = $JsonParameters.PSobject.Properties["files"].value + } + + $PSO = [PSCustomObject]@{ + "file" = ${File} + "files" = ${Files} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Foo.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Foo.ps1 new file mode 100644 index 000000000000..4e1adcf5e2a7 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Foo.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Bar +No description available. +.OUTPUTS + +Foo +#> + +function Initialize-PSFoo { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Bar} = "bar" + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSFoo' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "bar" = ${Bar} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Foo + +.DESCRIPTION + +Convert from JSON to Foo + +.PARAMETER Json + +Json object + +.OUTPUTS + +Foo +#> +function ConvertFrom-PSJsonToFoo { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSFoo' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSFoo + $AllProperties = ("bar") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "bar"))) { #optional property not found + $Bar = $null + } else { + $Bar = $JsonParameters.PSobject.Properties["bar"].value + } + + $PSO = [PSCustomObject]@{ + "bar" = ${Bar} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/FormatTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/FormatTest.ps1 new file mode 100644 index 000000000000..b0202bf07737 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/FormatTest.ps1 @@ -0,0 +1,363 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Integer +No description available. +.PARAMETER Int32 +No description available. +.PARAMETER Int64 +No description available. +.PARAMETER Number +No description available. +.PARAMETER Float +No description available. +.PARAMETER Double +No description available. +.PARAMETER Decimal +No description available. +.PARAMETER String +No description available. +.PARAMETER Byte +No description available. +.PARAMETER Binary +No description available. +.PARAMETER Date +No description available. +.PARAMETER DateTime +No description available. +.PARAMETER Uuid +No description available. +.PARAMETER Password +No description available. +.PARAMETER PatternWithDigits +A string that is a 10 digit number. Can have leading zeros. +.PARAMETER PatternWithDigitsAndDelimiter +A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. +.OUTPUTS + +FormatTest +#> + +function Initialize-PSFormatTest { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${Integer}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${Int32}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int64]] + ${Int64}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [Decimal] + ${Number}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Double]] + ${Float}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Double]] + ${Double}, + [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Decimal]] + ${Decimal}, + [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)] + [ValidatePattern("/[a-z]/i")] + [String] + ${String}, + [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${Byte}, + [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)] + [System.IO.FileInfo] + ${Binary}, + [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)] + [System.DateTime] + ${Date}, + [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[System.DateTime]] + ${DateTime}, + [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true)] + [String] + ${Uuid}, + [Parameter(Position = 13, ValueFromPipelineByPropertyName = $true)] + [String] + ${Password}, + [Parameter(Position = 14, ValueFromPipelineByPropertyName = $true)] + [ValidatePattern("^\d{10}$")] + [String] + ${PatternWithDigits}, + [Parameter(Position = 15, ValueFromPipelineByPropertyName = $true)] + [ValidatePattern("/^image_\d{1,3}$/i")] + [String] + ${PatternWithDigitsAndDelimiter} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSFormatTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($Integer -and $Integer -gt 100) { + throw "invalid value for 'Integer', must be smaller than or equal to 100." + } + + if ($Integer -and $Integer -lt 10) { + throw "invalid value for 'Integer', must be greater than or equal to 10." + } + + if ($Int32 -and $Int32 -gt 200) { + throw "invalid value for 'Int32', must be smaller than or equal to 200." + } + + if ($Int32 -and $Int32 -lt 20) { + throw "invalid value for 'Int32', must be greater than or equal to 20." + } + + if ($null -eq $Number) { + throw "invalid value for 'Number', 'Number' cannot be null." + } + + if ($Number -gt 543.2) { + throw "invalid value for 'Number', must be smaller than or equal to 543.2." + } + + if ($Number -lt 32.1) { + throw "invalid value for 'Number', must be greater than or equal to 32.1." + } + + if ($Float -and $Float -gt 987.6) { + throw "invalid value for 'Float', must be smaller than or equal to 987.6." + } + + if ($Float -and $Float -lt 54.3) { + throw "invalid value for 'Float', must be greater than or equal to 54.3." + } + + if ($Double -and $Double -gt 123.4) { + throw "invalid value for 'Double', must be smaller than or equal to 123.4." + } + + if ($Double -and $Double -lt 67.8) { + throw "invalid value for 'Double', must be greater than or equal to 67.8." + } + + if ($null -eq $Byte) { + throw "invalid value for 'Byte', 'Byte' cannot be null." + } + + if ($null -eq $Date) { + throw "invalid value for 'Date', 'Date' cannot be null." + } + + if ($null -eq $Password) { + throw "invalid value for 'Password', 'Password' cannot be null." + } + + if ($Password.length -gt 64) { + throw "invalid value for 'Password', the character length must be smaller than or equal to 64." + } + + if ($Password.length -lt 10) { + throw "invalid value for 'Password', the character length must be great than or equal to 10." + } + + + $PSO = [PSCustomObject]@{ + "integer" = ${Integer} + "int32" = ${Int32} + "int64" = ${Int64} + "number" = ${Number} + "float" = ${Float} + "double" = ${Double} + "decimal" = ${Decimal} + "string" = ${String} + "byte" = ${Byte} + "binary" = ${Binary} + "date" = ${Date} + "dateTime" = ${DateTime} + "uuid" = ${Uuid} + "password" = ${Password} + "pattern_with_digits" = ${PatternWithDigits} + "pattern_with_digits_and_delimiter" = ${PatternWithDigitsAndDelimiter} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to FormatTest + +.DESCRIPTION + +Convert from JSON to FormatTest + +.PARAMETER Json + +Json object + +.OUTPUTS + +FormatTest +#> +function ConvertFrom-PSJsonToFormatTest { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSFormatTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSFormatTest + $AllProperties = ("integer", "int32", "int64", "number", "float", "double", "decimal", "string", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'number' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "number"))) { + throw "Error! JSON cannot be serialized due to the required property 'number' missing." + } else { + $Number = $JsonParameters.PSobject.Properties["number"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "byte"))) { + throw "Error! JSON cannot be serialized due to the required property 'byte' missing." + } else { + $Byte = $JsonParameters.PSobject.Properties["byte"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "date"))) { + throw "Error! JSON cannot be serialized due to the required property 'date' missing." + } else { + $Date = $JsonParameters.PSobject.Properties["date"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "password"))) { + throw "Error! JSON cannot be serialized due to the required property 'password' missing." + } else { + $Password = $JsonParameters.PSobject.Properties["password"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "integer"))) { #optional property not found + $Integer = $null + } else { + $Integer = $JsonParameters.PSobject.Properties["integer"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "int32"))) { #optional property not found + $Int32 = $null + } else { + $Int32 = $JsonParameters.PSobject.Properties["int32"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "int64"))) { #optional property not found + $Int64 = $null + } else { + $Int64 = $JsonParameters.PSobject.Properties["int64"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "float"))) { #optional property not found + $Float = $null + } else { + $Float = $JsonParameters.PSobject.Properties["float"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "double"))) { #optional property not found + $Double = $null + } else { + $Double = $JsonParameters.PSobject.Properties["double"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "decimal"))) { #optional property not found + $Decimal = $null + } else { + $Decimal = $JsonParameters.PSobject.Properties["decimal"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "string"))) { #optional property not found + $String = $null + } else { + $String = $JsonParameters.PSobject.Properties["string"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "binary"))) { #optional property not found + $Binary = $null + } else { + $Binary = $JsonParameters.PSobject.Properties["binary"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "dateTime"))) { #optional property not found + $DateTime = $null + } else { + $DateTime = $JsonParameters.PSobject.Properties["dateTime"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "uuid"))) { #optional property not found + $Uuid = $null + } else { + $Uuid = $JsonParameters.PSobject.Properties["uuid"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "pattern_with_digits"))) { #optional property not found + $PatternWithDigits = $null + } else { + $PatternWithDigits = $JsonParameters.PSobject.Properties["pattern_with_digits"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "pattern_with_digits_and_delimiter"))) { #optional property not found + $PatternWithDigitsAndDelimiter = $null + } else { + $PatternWithDigitsAndDelimiter = $JsonParameters.PSobject.Properties["pattern_with_digits_and_delimiter"].value + } + + $PSO = [PSCustomObject]@{ + "integer" = ${Integer} + "int32" = ${Int32} + "int64" = ${Int64} + "number" = ${Number} + "float" = ${Float} + "double" = ${Double} + "decimal" = ${Decimal} + "string" = ${String} + "byte" = ${Byte} + "binary" = ${Binary} + "date" = ${Date} + "dateTime" = ${DateTime} + "uuid" = ${Uuid} + "password" = ${Password} + "pattern_with_digits" = ${PatternWithDigits} + "pattern_with_digits_and_delimiter" = ${PatternWithDigitsAndDelimiter} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Fruit.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Fruit.ps1 new file mode 100644 index 000000000000..0f25aed96cc8 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Fruit.ps1 @@ -0,0 +1,82 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +Fruit +#> +function ConvertFrom-PSJsonToFruit { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # try to match Apple defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToApple $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Apple" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Apple' defined in oneOf (PSFruit). Proceeding to the next one if any." + } + + # try to match Banana defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToBanana $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Banana" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Banana' defined in oneOf (PSFruit). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([Apple, Banana]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("Apple", "Banana") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([Apple, Banana]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/FruitReq.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/FruitReq.ps1 new file mode 100644 index 000000000000..40eaaaf088c4 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/FruitReq.ps1 @@ -0,0 +1,91 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +FruitReq +#> +function ConvertFrom-PSJsonToFruitReq { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # nullable check + if ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { + return [PSCustomObject]@{ + "ActualType" = $null + "ActualInstance" = $null + "OneOfSchemas" = @("AppleReq", "BananaReq") + } + } + + # try to match AppleReq defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToAppleReq $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "AppleReq" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'AppleReq' defined in oneOf (PSFruitReq). Proceeding to the next one if any." + } + + # try to match BananaReq defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToBananaReq $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "BananaReq" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'BananaReq' defined in oneOf (PSFruitReq). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([AppleReq, BananaReq]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("AppleReq", "BananaReq") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([AppleReq, BananaReq]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/GmFruit.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/GmFruit.ps1 new file mode 100644 index 000000000000..ee88e644a359 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/GmFruit.ps1 @@ -0,0 +1,84 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +GmFruit +#> +function ConvertFrom-PSJsonToGmFruit { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + if ($match -ne 0) { # no match yet + # try to match Apple defined in the anyOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToApple $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Apple" + $match++ + break + } + } + } catch { + # fail to match the schema defined in anyOf, proceed to the next one + Write-Debug "Failed to match 'Apple' defined in anyOf (PSGmFruit). Proceeding to the next one if any." + } + } + + if ($match -ne 0) { # no match yet + # try to match Banana defined in the anyOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToBanana $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Banana" + $match++ + break + } + } + } catch { + # fail to match the schema defined in anyOf, proceed to the next one + Write-Debug "Failed to match 'Banana' defined in anyOf (PSGmFruit). Proceeding to the next one if any." + } + } + + if ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "anyOfSchemas" = @("Apple", "Banana") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in anyOf schemas ([Apple, Banana]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/GrandparentAnimal.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/GrandparentAnimal.ps1 new file mode 100644 index 000000000000..2a73a6651f84 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/GrandparentAnimal.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER PetType +No description available. +.OUTPUTS + +GrandparentAnimal +#> + +function Initialize-PSGrandparentAnimal { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${PetType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSGrandparentAnimal' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $PetType) { + throw "invalid value for 'PetType', 'PetType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "pet_type" = ${PetType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to GrandparentAnimal + +.DESCRIPTION + +Convert from JSON to GrandparentAnimal + +.PARAMETER Json + +Json object + +.OUTPUTS + +GrandparentAnimal +#> +function ConvertFrom-PSJsonToGrandparentAnimal { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSGrandparentAnimal' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSGrandparentAnimal + $AllProperties = ("pet_type") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'pet_type' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "pet_type"))) { + throw "Error! JSON cannot be serialized due to the required property 'pet_type' missing." + } else { + $PetType = $JsonParameters.PSobject.Properties["pet_type"].value + } + + $PSO = [PSCustomObject]@{ + "pet_type" = ${PetType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/HasOnlyReadOnly.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/HasOnlyReadOnly.ps1 new file mode 100644 index 000000000000..5a92c3469177 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/HasOnlyReadOnly.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Bar +No description available. +.PARAMETER Foo +No description available. +.OUTPUTS + +HasOnlyReadOnly +#> + +function Initialize-PSHasOnlyReadOnly { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Bar}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${Foo} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSHasOnlyReadOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "bar" = ${Bar} + "foo" = ${Foo} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to HasOnlyReadOnly + +.DESCRIPTION + +Convert from JSON to HasOnlyReadOnly + +.PARAMETER Json + +Json object + +.OUTPUTS + +HasOnlyReadOnly +#> +function ConvertFrom-PSJsonToHasOnlyReadOnly { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSHasOnlyReadOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSHasOnlyReadOnly + $AllProperties = ("bar", "foo") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "bar"))) { #optional property not found + $Bar = $null + } else { + $Bar = $JsonParameters.PSobject.Properties["bar"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "foo"))) { #optional property not found + $Foo = $null + } else { + $Foo = $JsonParameters.PSobject.Properties["foo"].value + } + + $PSO = [PSCustomObject]@{ + "bar" = ${Bar} + "foo" = ${Foo} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/HealthCheckResult.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/HealthCheckResult.ps1 new file mode 100644 index 000000000000..fc87580b895c --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/HealthCheckResult.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +.PARAMETER NullableMessage +No description available. +.OUTPUTS + +HealthCheckResult +#> + +function Initialize-PSHealthCheckResult { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${NullableMessage} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSHealthCheckResult' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "NullableMessage" = ${NullableMessage} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to HealthCheckResult + +.DESCRIPTION + +Convert from JSON to HealthCheckResult + +.PARAMETER Json + +Json object + +.OUTPUTS + +HealthCheckResult +#> +function ConvertFrom-PSJsonToHealthCheckResult { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSHealthCheckResult' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSHealthCheckResult + $AllProperties = ("NullableMessage") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "NullableMessage"))) { #optional property not found + $NullableMessage = $null + } else { + $NullableMessage = $JsonParameters.PSobject.Properties["NullableMessage"].value + } + + $PSO = [PSCustomObject]@{ + "NullableMessage" = ${NullableMessage} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/InlineResponseDefault.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/InlineResponseDefault.ps1 new file mode 100644 index 000000000000..382bb408adda --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/InlineResponseDefault.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER String +No description available. +.OUTPUTS + +InlineResponseDefault +#> + +function Initialize-PSInlineResponseDefault { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${String} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSInlineResponseDefault' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "string" = ${String} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to InlineResponseDefault + +.DESCRIPTION + +Convert from JSON to InlineResponseDefault + +.PARAMETER Json + +Json object + +.OUTPUTS + +InlineResponseDefault +#> +function ConvertFrom-PSJsonToInlineResponseDefault { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSInlineResponseDefault' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSInlineResponseDefault + $AllProperties = ("string") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "string"))) { #optional property not found + $String = $null + } else { + $String = $JsonParameters.PSobject.Properties["string"].value + } + + $PSO = [PSCustomObject]@{ + "string" = ${String} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/IsoscelesTriangle.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/IsoscelesTriangle.ps1 new file mode 100644 index 000000000000..14aeb22beb81 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/IsoscelesTriangle.ps1 @@ -0,0 +1,122 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ShapeType +No description available. +.PARAMETER TriangleType +No description available. +.OUTPUTS + +IsoscelesTriangle +#> + +function Initialize-PSIsoscelesTriangle { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ShapeType}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${TriangleType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSIsoscelesTriangle' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ShapeType) { + throw "invalid value for 'ShapeType', 'ShapeType' cannot be null." + } + + if ($null -eq $TriangleType) { + throw "invalid value for 'TriangleType', 'TriangleType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "triangleType" = ${TriangleType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to IsoscelesTriangle + +.DESCRIPTION + +Convert from JSON to IsoscelesTriangle + +.PARAMETER Json + +Json object + +.OUTPUTS + +IsoscelesTriangle +#> +function ConvertFrom-PSJsonToIsoscelesTriangle { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSIsoscelesTriangle' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSIsoscelesTriangle + $AllProperties = ("shapeType", "triangleType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'shapeType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeType"))) { + throw "Error! JSON cannot be serialized due to the required property 'shapeType' missing." + } else { + $ShapeType = $JsonParameters.PSobject.Properties["shapeType"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "triangleType"))) { + throw "Error! JSON cannot be serialized due to the required property 'triangleType' missing." + } else { + $TriangleType = $JsonParameters.PSobject.Properties["triangleType"].value + } + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "triangleType" = ${TriangleType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/List.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/List.ps1 new file mode 100644 index 000000000000..5691aa037eaa --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/List.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Var123List +No description available. +.OUTPUTS + +List +#> + +function Initialize-PSList { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Var123List} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSList' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "123-list" = ${Var123List} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to List + +.DESCRIPTION + +Convert from JSON to List + +.PARAMETER Json + +Json object + +.OUTPUTS + +List +#> +function ConvertFrom-PSJsonToList { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSList' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSList + $AllProperties = ("123-list") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "123-list"))) { #optional property not found + $Var123List = $null + } else { + $Var123List = $JsonParameters.PSobject.Properties["123-list"].value + } + + $PSO = [PSCustomObject]@{ + "123-list" = ${Var123List} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Mammal.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Mammal.ps1 new file mode 100644 index 000000000000..21d8e373f588 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Mammal.ps1 @@ -0,0 +1,98 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +Mammal +#> +function ConvertFrom-PSJsonToMammal { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # try to match Pig defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToPig $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Pig" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Pig' defined in oneOf (PSMammal). Proceeding to the next one if any." + } + + # try to match Whale defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToWhale $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Whale" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Whale' defined in oneOf (PSMammal). Proceeding to the next one if any." + } + + # try to match Zebra defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToZebra $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Zebra" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Zebra' defined in oneOf (PSMammal). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([Pig, Whale, Zebra]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("Pig", "Whale", "Zebra") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([Pig, Whale, Zebra]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/MapTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/MapTest.ps1 new file mode 100644 index 000000000000..1bbd680d68cc --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/MapTest.ps1 @@ -0,0 +1,137 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER MapMapOfString +No description available. +.PARAMETER MapOfEnumString +No description available. +.PARAMETER DirectMap +No description available. +.PARAMETER IndirectMap +No description available. +.OUTPUTS + +MapTest +#> + +function Initialize-PSMapTest { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${MapMapOfString}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("UPPER", "lower")] + [System.Collections.Hashtable] + ${MapOfEnumString}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${DirectMap}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${IndirectMap} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSMapTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "map_map_of_string" = ${MapMapOfString} + "map_of_enum_string" = ${MapOfEnumString} + "direct_map" = ${DirectMap} + "indirect_map" = ${IndirectMap} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to MapTest + +.DESCRIPTION + +Convert from JSON to MapTest + +.PARAMETER Json + +Json object + +.OUTPUTS + +MapTest +#> +function ConvertFrom-PSJsonToMapTest { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSMapTest' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSMapTest + $AllProperties = ("map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_map_of_string"))) { #optional property not found + $MapMapOfString = $null + } else { + $MapMapOfString = $JsonParameters.PSobject.Properties["map_map_of_string"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map_of_enum_string"))) { #optional property not found + $MapOfEnumString = $null + } else { + $MapOfEnumString = $JsonParameters.PSobject.Properties["map_of_enum_string"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "direct_map"))) { #optional property not found + $DirectMap = $null + } else { + $DirectMap = $JsonParameters.PSobject.Properties["direct_map"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "indirect_map"))) { #optional property not found + $IndirectMap = $null + } else { + $IndirectMap = $JsonParameters.PSobject.Properties["indirect_map"].value + } + + $PSO = [PSCustomObject]@{ + "map_map_of_string" = ${MapMapOfString} + "map_of_enum_string" = ${MapOfEnumString} + "direct_map" = ${DirectMap} + "indirect_map" = ${IndirectMap} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/MixedPropertiesAndAdditionalPropertiesClass.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/MixedPropertiesAndAdditionalPropertiesClass.ps1 new file mode 100644 index 000000000000..d8bd97ded588 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/MixedPropertiesAndAdditionalPropertiesClass.ps1 @@ -0,0 +1,123 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Uuid +No description available. +.PARAMETER DateTime +No description available. +.PARAMETER Map +No description available. +.OUTPUTS + +MixedPropertiesAndAdditionalPropertiesClass +#> + +function Initialize-PSMixedPropertiesAndAdditionalPropertiesClass { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Uuid}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[System.DateTime]] + ${DateTime}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${Map} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSMixedPropertiesAndAdditionalPropertiesClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "uuid" = ${Uuid} + "dateTime" = ${DateTime} + "map" = ${Map} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to MixedPropertiesAndAdditionalPropertiesClass + +.DESCRIPTION + +Convert from JSON to MixedPropertiesAndAdditionalPropertiesClass + +.PARAMETER Json + +Json object + +.OUTPUTS + +MixedPropertiesAndAdditionalPropertiesClass +#> +function ConvertFrom-PSJsonToMixedPropertiesAndAdditionalPropertiesClass { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSMixedPropertiesAndAdditionalPropertiesClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSMixedPropertiesAndAdditionalPropertiesClass + $AllProperties = ("uuid", "dateTime", "map") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "uuid"))) { #optional property not found + $Uuid = $null + } else { + $Uuid = $JsonParameters.PSobject.Properties["uuid"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "dateTime"))) { #optional property not found + $DateTime = $null + } else { + $DateTime = $JsonParameters.PSobject.Properties["dateTime"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "map"))) { #optional property not found + $Map = $null + } else { + $Map = $JsonParameters.PSobject.Properties["map"].value + } + + $PSO = [PSCustomObject]@{ + "uuid" = ${Uuid} + "dateTime" = ${DateTime} + "map" = ${Map} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Model200Response.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Model200Response.ps1 new file mode 100644 index 000000000000..27a61d0fb48a --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Model200Response.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +Model for testing model name starting with number + +.PARAMETER Name +No description available. +.PARAMETER Class +No description available. +.OUTPUTS + +Model200Response +#> + +function Initialize-PSModel200Response { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${Name}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${Class} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSModel200Response' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + "class" = ${Class} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Model200Response + +.DESCRIPTION + +Convert from JSON to Model200Response + +.PARAMETER Json + +Json object + +.OUTPUTS + +Model200Response +#> +function ConvertFrom-PSJsonToModel200Response { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSModel200Response' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSModel200Response + $AllProperties = ("name", "class") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found + $Name = $null + } else { + $Name = $JsonParameters.PSobject.Properties["name"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "class"))) { #optional property not found + $Class = $null + } else { + $Class = $JsonParameters.PSobject.Properties["class"].value + } + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + "class" = ${Class} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ModelReturn.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ModelReturn.ps1 new file mode 100644 index 000000000000..1a45745f0f26 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ModelReturn.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +Model for testing reserved words + +.PARAMETER VarReturn +No description available. +.OUTPUTS + +ModelReturn +#> + +function Initialize-PSModelReturn { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${VarReturn} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSModelReturn' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "return" = ${VarReturn} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ModelReturn + +.DESCRIPTION + +Convert from JSON to ModelReturn + +.PARAMETER Json + +Json object + +.OUTPUTS + +ModelReturn +#> +function ConvertFrom-PSJsonToModelReturn { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSModelReturn' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSModelReturn + $AllProperties = ("return") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "return"))) { #optional property not found + $VarReturn = $null + } else { + $VarReturn = $JsonParameters.PSobject.Properties["return"].value + } + + $PSO = [PSCustomObject]@{ + "return" = ${VarReturn} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Name.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Name.ps1 new file mode 100644 index 000000000000..44a74e598846 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Name.ps1 @@ -0,0 +1,144 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +Model for testing model name same as property name + +.PARAMETER Name +No description available. +.PARAMETER SnakeCase +No description available. +.PARAMETER Property +No description available. +.PARAMETER Var123Number +No description available. +.OUTPUTS + +Name +#> + +function Initialize-PSName { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [Int32] + ${Name}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${SnakeCase}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [String] + ${Property}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${Var123Number} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSName' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $Name) { + throw "invalid value for 'Name', 'Name' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + "snake_case" = ${SnakeCase} + "property" = ${Property} + "123Number" = ${Var123Number} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Name + +.DESCRIPTION + +Convert from JSON to Name + +.PARAMETER Json + +Json object + +.OUTPUTS + +Name +#> +function ConvertFrom-PSJsonToName { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSName' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSName + $AllProperties = ("name", "snake_case", "property", "123Number") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'name' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { + throw "Error! JSON cannot be serialized due to the required property 'name' missing." + } else { + $Name = $JsonParameters.PSobject.Properties["name"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "snake_case"))) { #optional property not found + $SnakeCase = $null + } else { + $SnakeCase = $JsonParameters.PSobject.Properties["snake_case"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "property"))) { #optional property not found + $Property = $null + } else { + $Property = $JsonParameters.PSobject.Properties["property"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "123Number"))) { #optional property not found + $Var123Number = $null + } else { + $Var123Number = $JsonParameters.PSobject.Properties["123Number"].value + } + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + "snake_case" = ${SnakeCase} + "property" = ${Property} + "123Number" = ${Var123Number} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/NullableClass.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/NullableClass.ps1 new file mode 100644 index 000000000000..21755910978e --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/NullableClass.ps1 @@ -0,0 +1,240 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER IntegerProp +No description available. +.PARAMETER NumberProp +No description available. +.PARAMETER BooleanProp +No description available. +.PARAMETER StringProp +No description available. +.PARAMETER DateProp +No description available. +.PARAMETER DatetimeProp +No description available. +.PARAMETER ArrayNullableProp +No description available. +.PARAMETER ArrayAndItemsNullableProp +No description available. +.PARAMETER ArrayItemsNullable +No description available. +.PARAMETER ObjectNullableProp +No description available. +.PARAMETER ObjectAndItemsNullableProp +No description available. +.PARAMETER ObjectItemsNullable +No description available. +.OUTPUTS + +NullableClass +#> + +function Initialize-PSNullableClass { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int32]] + ${IntegerProp}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Decimal]] + ${NumberProp}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${BooleanProp}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [String] + ${StringProp}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[System.DateTime]] + ${DateProp}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[System.DateTime]] + ${DatetimeProp}, + [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[]] + ${ArrayNullableProp}, + [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[]] + ${ArrayAndItemsNullableProp}, + [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[]] + ${ArrayItemsNullable}, + [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${ObjectNullableProp}, + [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${ObjectAndItemsNullableProp}, + [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Hashtable] + ${ObjectItemsNullable} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSNullableClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "integer_prop" = ${IntegerProp} + "number_prop" = ${NumberProp} + "boolean_prop" = ${BooleanProp} + "string_prop" = ${StringProp} + "date_prop" = ${DateProp} + "datetime_prop" = ${DatetimeProp} + "array_nullable_prop" = ${ArrayNullableProp} + "array_and_items_nullable_prop" = ${ArrayAndItemsNullableProp} + "array_items_nullable" = ${ArrayItemsNullable} + "object_nullable_prop" = ${ObjectNullableProp} + "object_and_items_nullable_prop" = ${ObjectAndItemsNullableProp} + "object_items_nullable" = ${ObjectItemsNullable} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to NullableClass + +.DESCRIPTION + +Convert from JSON to NullableClass + +.PARAMETER Json + +Json object + +.OUTPUTS + +NullableClass +#> +function ConvertFrom-PSJsonToNullableClass { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSNullableClass' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSNullableClass + $AllProperties = ("integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "integer_prop"))) { #optional property not found + $IntegerProp = $null + } else { + $IntegerProp = $JsonParameters.PSobject.Properties["integer_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "number_prop"))) { #optional property not found + $NumberProp = $null + } else { + $NumberProp = $JsonParameters.PSobject.Properties["number_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "boolean_prop"))) { #optional property not found + $BooleanProp = $null + } else { + $BooleanProp = $JsonParameters.PSobject.Properties["boolean_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "string_prop"))) { #optional property not found + $StringProp = $null + } else { + $StringProp = $JsonParameters.PSobject.Properties["string_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "date_prop"))) { #optional property not found + $DateProp = $null + } else { + $DateProp = $JsonParameters.PSobject.Properties["date_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "datetime_prop"))) { #optional property not found + $DatetimeProp = $null + } else { + $DatetimeProp = $JsonParameters.PSobject.Properties["datetime_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_nullable_prop"))) { #optional property not found + $ArrayNullableProp = $null + } else { + $ArrayNullableProp = $JsonParameters.PSobject.Properties["array_nullable_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_and_items_nullable_prop"))) { #optional property not found + $ArrayAndItemsNullableProp = $null + } else { + $ArrayAndItemsNullableProp = $JsonParameters.PSobject.Properties["array_and_items_nullable_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "array_items_nullable"))) { #optional property not found + $ArrayItemsNullable = $null + } else { + $ArrayItemsNullable = $JsonParameters.PSobject.Properties["array_items_nullable"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "object_nullable_prop"))) { #optional property not found + $ObjectNullableProp = $null + } else { + $ObjectNullableProp = $JsonParameters.PSobject.Properties["object_nullable_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "object_and_items_nullable_prop"))) { #optional property not found + $ObjectAndItemsNullableProp = $null + } else { + $ObjectAndItemsNullableProp = $JsonParameters.PSobject.Properties["object_and_items_nullable_prop"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "object_items_nullable"))) { #optional property not found + $ObjectItemsNullable = $null + } else { + $ObjectItemsNullable = $JsonParameters.PSobject.Properties["object_items_nullable"].value + } + + $PSO = [PSCustomObject]@{ + "integer_prop" = ${IntegerProp} + "number_prop" = ${NumberProp} + "boolean_prop" = ${BooleanProp} + "string_prop" = ${StringProp} + "date_prop" = ${DateProp} + "datetime_prop" = ${DatetimeProp} + "array_nullable_prop" = ${ArrayNullableProp} + "array_and_items_nullable_prop" = ${ArrayAndItemsNullableProp} + "array_items_nullable" = ${ArrayItemsNullable} + "object_nullable_prop" = ${ObjectNullableProp} + "object_and_items_nullable_prop" = ${ObjectAndItemsNullableProp} + "object_items_nullable" = ${ObjectItemsNullable} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/NullableShape.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/NullableShape.ps1 new file mode 100644 index 000000000000..c7a12cb8cf95 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/NullableShape.ps1 @@ -0,0 +1,91 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +NullableShape +#> +function ConvertFrom-PSJsonToNullableShape { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # nullable check + if ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { + return [PSCustomObject]@{ + "ActualType" = $null + "ActualInstance" = $null + "OneOfSchemas" = @("Quadrilateral", "Triangle") + } + } + + # try to match Quadrilateral defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToQuadrilateral $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Quadrilateral" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Quadrilateral' defined in oneOf (PSNullableShape). Proceeding to the next one if any." + } + + # try to match Triangle defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToTriangle $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Triangle" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Triangle' defined in oneOf (PSNullableShape). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([Quadrilateral, Triangle]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("Quadrilateral", "Triangle") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([Quadrilateral, Triangle]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/NumberOnly.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/NumberOnly.ps1 new file mode 100644 index 000000000000..d90506edf63c --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/NumberOnly.ps1 @@ -0,0 +1,97 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER JustNumber +No description available. +.OUTPUTS + +NumberOnly +#> + +function Initialize-PSNumberOnly { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Decimal]] + ${JustNumber} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSNumberOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "JustNumber" = ${JustNumber} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to NumberOnly + +.DESCRIPTION + +Convert from JSON to NumberOnly + +.PARAMETER Json + +Json object + +.OUTPUTS + +NumberOnly +#> +function ConvertFrom-PSJsonToNumberOnly { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSNumberOnly' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSNumberOnly + $AllProperties = ("JustNumber") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "JustNumber"))) { #optional property not found + $JustNumber = $null + } else { + $JustNumber = $JsonParameters.PSobject.Properties["JustNumber"].value + } + + $PSO = [PSCustomObject]@{ + "JustNumber" = ${JustNumber} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ObjectWithDeprecatedFields.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ObjectWithDeprecatedFields.ps1 new file mode 100644 index 000000000000..22d222edeb0e --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ObjectWithDeprecatedFields.ps1 @@ -0,0 +1,136 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Uuid +No description available. +.PARAMETER Id +No description available. +.PARAMETER DeprecatedRef +No description available. +.PARAMETER Bars +No description available. +.OUTPUTS + +ObjectWithDeprecatedFields +#> + +function Initialize-PSObjectWithDeprecatedFields { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Uuid}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Decimal]] + ${Id}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${DeprecatedRef}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [String[]] + ${Bars} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSObjectWithDeprecatedFields' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "uuid" = ${Uuid} + "id" = ${Id} + "deprecatedRef" = ${DeprecatedRef} + "bars" = ${Bars} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ObjectWithDeprecatedFields + +.DESCRIPTION + +Convert from JSON to ObjectWithDeprecatedFields + +.PARAMETER Json + +Json object + +.OUTPUTS + +ObjectWithDeprecatedFields +#> +function ConvertFrom-PSJsonToObjectWithDeprecatedFields { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSObjectWithDeprecatedFields' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSObjectWithDeprecatedFields + $AllProperties = ("uuid", "id", "deprecatedRef", "bars") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "uuid"))) { #optional property not found + $Uuid = $null + } else { + $Uuid = $JsonParameters.PSobject.Properties["uuid"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found + $Id = $null + } else { + $Id = $JsonParameters.PSobject.Properties["id"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "deprecatedRef"))) { #optional property not found + $DeprecatedRef = $null + } else { + $DeprecatedRef = $JsonParameters.PSobject.Properties["deprecatedRef"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "bars"))) { #optional property not found + $Bars = $null + } else { + $Bars = $JsonParameters.PSobject.Properties["bars"].value + } + + $PSO = [PSCustomObject]@{ + "uuid" = ${Uuid} + "id" = ${Id} + "deprecatedRef" = ${DeprecatedRef} + "bars" = ${Bars} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Order.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Order.ps1 index 1b931e6b197f..991563dad427 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/Order.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Order.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -12,7 +12,7 @@ No summary available. .DESCRIPTION -An order for a pets from the pet store +No description available. .PARAMETER Id No description available. diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/OuterComposite.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/OuterComposite.ps1 new file mode 100644 index 000000000000..7b695edfa5b3 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/OuterComposite.ps1 @@ -0,0 +1,123 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER MyNumber +No description available. +.PARAMETER MyString +No description available. +.PARAMETER MyBoolean +No description available. +.OUTPUTS + +OuterComposite +#> + +function Initialize-PSOuterComposite { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Decimal]] + ${MyNumber}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${MyString}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${MyBoolean} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSOuterComposite' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "my_number" = ${MyNumber} + "my_string" = ${MyString} + "my_boolean" = ${MyBoolean} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to OuterComposite + +.DESCRIPTION + +Convert from JSON to OuterComposite + +.PARAMETER Json + +Json object + +.OUTPUTS + +OuterComposite +#> +function ConvertFrom-PSJsonToOuterComposite { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSOuterComposite' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSOuterComposite + $AllProperties = ("my_number", "my_string", "my_boolean") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "my_number"))) { #optional property not found + $MyNumber = $null + } else { + $MyNumber = $JsonParameters.PSobject.Properties["my_number"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "my_string"))) { #optional property not found + $MyString = $null + } else { + $MyString = $JsonParameters.PSobject.Properties["my_string"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "my_boolean"))) { #optional property not found + $MyBoolean = $null + } else { + $MyBoolean = $JsonParameters.PSobject.Properties["my_boolean"].value + } + + $PSO = [PSCustomObject]@{ + "my_number" = ${MyNumber} + "my_string" = ${MyString} + "my_boolean" = ${MyBoolean} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/OuterEnum.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/OuterEnum.ps1 new file mode 100644 index 000000000000..0f7cd366d1aa --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/OuterEnum.ps1 @@ -0,0 +1,26 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +Enum OuterEnum. + +.DESCRIPTION + +No description available. +#> + +enum OuterEnum { + # enum value: "placed" + placed + # enum value: "approved" + approved + # enum value: "delivered" + delivered +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ParentPet.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ParentPet.ps1 new file mode 100644 index 000000000000..4b985cbec0ca --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ParentPet.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER PetType +No description available. +.OUTPUTS + +ParentPet +#> + +function Initialize-PSParentPet { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${PetType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSParentPet' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $PetType) { + throw "invalid value for 'PetType', 'PetType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "pet_type" = ${PetType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ParentPet + +.DESCRIPTION + +Convert from JSON to ParentPet + +.PARAMETER Json + +Json object + +.OUTPUTS + +ParentPet +#> +function ConvertFrom-PSJsonToParentPet { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSParentPet' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSParentPet + $AllProperties = ("pet_type") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'pet_type' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "pet_type"))) { + throw "Error! JSON cannot be serialized due to the required property 'pet_type' missing." + } else { + $PetType = $JsonParameters.PSobject.Properties["pet_type"].value + } + + $PSO = [PSCustomObject]@{ + "pet_type" = ${PetType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Pet.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Pet.ps1 index 5207e6986f6e..18e5e39c684f 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/Pet.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Pet.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -12,7 +12,7 @@ No summary available. .DESCRIPTION -A pet for sale in the pet store +No description available. .PARAMETER Id No description available. diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/PetWithRequiredTags.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/PetWithRequiredTags.ps1 new file mode 100644 index 000000000000..af9595746385 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/PetWithRequiredTags.ps1 @@ -0,0 +1,179 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Id +No description available. +.PARAMETER Category +No description available. +.PARAMETER Name +No description available. +.PARAMETER PhotoUrls +No description available. +.PARAMETER Tags +No description available. +.PARAMETER Status +pet status in the store +.OUTPUTS + +PetWithRequiredTags +#> + +function Initialize-PSPetWithRequiredTags { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int64]] + ${Id}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${Category}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [String] + ${Name}, + [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] + [String[]] + ${PhotoUrls}, + [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject[]] + ${Tags}, + [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("available", "pending", "sold")] + [String] + ${Status} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSPetWithRequiredTags' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $Name) { + throw "invalid value for 'Name', 'Name' cannot be null." + } + + if ($null -eq $PhotoUrls) { + throw "invalid value for 'PhotoUrls', 'PhotoUrls' cannot be null." + } + + if ($null -eq $Tags) { + throw "invalid value for 'Tags', 'Tags' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "id" = ${Id} + "category" = ${Category} + "name" = ${Name} + "photoUrls" = ${PhotoUrls} + "tags" = ${Tags} + "status" = ${Status} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to PetWithRequiredTags + +.DESCRIPTION + +Convert from JSON to PetWithRequiredTags + +.PARAMETER Json + +Json object + +.OUTPUTS + +PetWithRequiredTags +#> +function ConvertFrom-PSJsonToPetWithRequiredTags { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSPetWithRequiredTags' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSPetWithRequiredTags + $AllProperties = ("id", "category", "name", "photoUrls", "tags", "status") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'name' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { + throw "Error! JSON cannot be serialized due to the required property 'name' missing." + } else { + $Name = $JsonParameters.PSobject.Properties["name"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "photoUrls"))) { + throw "Error! JSON cannot be serialized due to the required property 'photoUrls' missing." + } else { + $PhotoUrls = $JsonParameters.PSobject.Properties["photoUrls"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "tags"))) { + throw "Error! JSON cannot be serialized due to the required property 'tags' missing." + } else { + $Tags = $JsonParameters.PSobject.Properties["tags"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found + $Id = $null + } else { + $Id = $JsonParameters.PSobject.Properties["id"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "category"))) { #optional property not found + $Category = $null + } else { + $Category = $JsonParameters.PSobject.Properties["category"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found + $Status = $null + } else { + $Status = $JsonParameters.PSobject.Properties["status"].value + } + + $PSO = [PSCustomObject]@{ + "id" = ${Id} + "category" = ${Category} + "name" = ${Name} + "photoUrls" = ${PhotoUrls} + "tags" = ${Tags} + "status" = ${Status} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Pig.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Pig.ps1 new file mode 100644 index 000000000000..7d65ffdeb926 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Pig.ps1 @@ -0,0 +1,82 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +Pig +#> +function ConvertFrom-PSJsonToPig { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # try to match BasquePig defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToBasquePig $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "BasquePig" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'BasquePig' defined in oneOf (PSPig). Proceeding to the next one if any." + } + + # try to match DanishPig defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToDanishPig $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "DanishPig" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'DanishPig' defined in oneOf (PSPig). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([BasquePig, DanishPig]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("BasquePig", "DanishPig") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([BasquePig, DanishPig]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Quadrilateral.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Quadrilateral.ps1 new file mode 100644 index 000000000000..86c8f1742553 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Quadrilateral.ps1 @@ -0,0 +1,82 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +Quadrilateral +#> +function ConvertFrom-PSJsonToQuadrilateral { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # try to match ComplexQuadrilateral defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToComplexQuadrilateral $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "ComplexQuadrilateral" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'ComplexQuadrilateral' defined in oneOf (PSQuadrilateral). Proceeding to the next one if any." + } + + # try to match SimpleQuadrilateral defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToSimpleQuadrilateral $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "SimpleQuadrilateral" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'SimpleQuadrilateral' defined in oneOf (PSQuadrilateral). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([ComplexQuadrilateral, SimpleQuadrilateral]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("ComplexQuadrilateral", "SimpleQuadrilateral") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([ComplexQuadrilateral, SimpleQuadrilateral]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/QuadrilateralInterface.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/QuadrilateralInterface.ps1 new file mode 100644 index 000000000000..31903af8c6a2 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/QuadrilateralInterface.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER QuadrilateralType +No description available. +.OUTPUTS + +QuadrilateralInterface +#> + +function Initialize-PSQuadrilateralInterface { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${QuadrilateralType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSQuadrilateralInterface' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $QuadrilateralType) { + throw "invalid value for 'QuadrilateralType', 'QuadrilateralType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "quadrilateralType" = ${QuadrilateralType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to QuadrilateralInterface + +.DESCRIPTION + +Convert from JSON to QuadrilateralInterface + +.PARAMETER Json + +Json object + +.OUTPUTS + +QuadrilateralInterface +#> +function ConvertFrom-PSJsonToQuadrilateralInterface { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSQuadrilateralInterface' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSQuadrilateralInterface + $AllProperties = ("quadrilateralType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'quadrilateralType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "quadrilateralType"))) { + throw "Error! JSON cannot be serialized due to the required property 'quadrilateralType' missing." + } else { + $QuadrilateralType = $JsonParameters.PSobject.Properties["quadrilateralType"].value + } + + $PSO = [PSCustomObject]@{ + "quadrilateralType" = ${QuadrilateralType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ReadOnlyFirst.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ReadOnlyFirst.ps1 new file mode 100644 index 000000000000..b400e18374f6 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ReadOnlyFirst.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Bar +No description available. +.PARAMETER Baz +No description available. +.OUTPUTS + +ReadOnlyFirst +#> + +function Initialize-PSReadOnlyFirst { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Bar}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${Baz} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSReadOnlyFirst' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "bar" = ${Bar} + "baz" = ${Baz} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ReadOnlyFirst + +.DESCRIPTION + +Convert from JSON to ReadOnlyFirst + +.PARAMETER Json + +Json object + +.OUTPUTS + +ReadOnlyFirst +#> +function ConvertFrom-PSJsonToReadOnlyFirst { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSReadOnlyFirst' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSReadOnlyFirst + $AllProperties = ("bar", "baz") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "bar"))) { #optional property not found + $Bar = $null + } else { + $Bar = $JsonParameters.PSobject.Properties["bar"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "baz"))) { #optional property not found + $Baz = $null + } else { + $Baz = $JsonParameters.PSobject.Properties["baz"].value + } + + $PSO = [PSCustomObject]@{ + "bar" = ${Bar} + "baz" = ${Baz} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ScaleneTriangle.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ScaleneTriangle.ps1 new file mode 100644 index 000000000000..1bc425954b89 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ScaleneTriangle.ps1 @@ -0,0 +1,122 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ShapeType +No description available. +.PARAMETER TriangleType +No description available. +.OUTPUTS + +ScaleneTriangle +#> + +function Initialize-PSScaleneTriangle { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ShapeType}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${TriangleType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSScaleneTriangle' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ShapeType) { + throw "invalid value for 'ShapeType', 'ShapeType' cannot be null." + } + + if ($null -eq $TriangleType) { + throw "invalid value for 'TriangleType', 'TriangleType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "triangleType" = ${TriangleType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ScaleneTriangle + +.DESCRIPTION + +Convert from JSON to ScaleneTriangle + +.PARAMETER Json + +Json object + +.OUTPUTS + +ScaleneTriangle +#> +function ConvertFrom-PSJsonToScaleneTriangle { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSScaleneTriangle' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSScaleneTriangle + $AllProperties = ("shapeType", "triangleType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'shapeType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeType"))) { + throw "Error! JSON cannot be serialized due to the required property 'shapeType' missing." + } else { + $ShapeType = $JsonParameters.PSobject.Properties["shapeType"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "triangleType"))) { + throw "Error! JSON cannot be serialized due to the required property 'triangleType' missing." + } else { + $TriangleType = $JsonParameters.PSobject.Properties["triangleType"].value + } + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "triangleType" = ${TriangleType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Shape.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Shape.ps1 new file mode 100644 index 000000000000..babd880c4857 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Shape.ps1 @@ -0,0 +1,82 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +Shape +#> +function ConvertFrom-PSJsonToShape { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # try to match Quadrilateral defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToQuadrilateral $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Quadrilateral" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Quadrilateral' defined in oneOf (PSShape). Proceeding to the next one if any." + } + + # try to match Triangle defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToTriangle $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Triangle" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Triangle' defined in oneOf (PSShape). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([Quadrilateral, Triangle]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("Quadrilateral", "Triangle") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([Quadrilateral, Triangle]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ShapeInterface.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ShapeInterface.ps1 new file mode 100644 index 000000000000..58865bc4a5f5 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ShapeInterface.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ShapeType +No description available. +.OUTPUTS + +ShapeInterface +#> + +function Initialize-PSShapeInterface { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ShapeType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSShapeInterface' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ShapeType) { + throw "invalid value for 'ShapeType', 'ShapeType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ShapeInterface + +.DESCRIPTION + +Convert from JSON to ShapeInterface + +.PARAMETER Json + +Json object + +.OUTPUTS + +ShapeInterface +#> +function ConvertFrom-PSJsonToShapeInterface { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSShapeInterface' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSShapeInterface + $AllProperties = ("shapeType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'shapeType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeType"))) { + throw "Error! JSON cannot be serialized due to the required property 'shapeType' missing." + } else { + $ShapeType = $JsonParameters.PSobject.Properties["shapeType"].value + } + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ShapeOrNull.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ShapeOrNull.ps1 new file mode 100644 index 000000000000..e630c4806ec1 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ShapeOrNull.ps1 @@ -0,0 +1,91 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +ShapeOrNull +#> +function ConvertFrom-PSJsonToShapeOrNull { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # nullable check + if ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { + return [PSCustomObject]@{ + "ActualType" = $null + "ActualInstance" = $null + "OneOfSchemas" = @("Quadrilateral", "Triangle") + } + } + + # try to match Quadrilateral defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToQuadrilateral $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Quadrilateral" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Quadrilateral' defined in oneOf (PSShapeOrNull). Proceeding to the next one if any." + } + + # try to match Triangle defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToTriangle $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "Triangle" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'Triangle' defined in oneOf (PSShapeOrNull). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([Quadrilateral, Triangle]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("Quadrilateral", "Triangle") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([Quadrilateral, Triangle]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/SimpleQuadrilateral.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/SimpleQuadrilateral.ps1 new file mode 100644 index 000000000000..456dbb50e0c6 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/SimpleQuadrilateral.ps1 @@ -0,0 +1,122 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER ShapeType +No description available. +.PARAMETER QuadrilateralType +No description available. +.OUTPUTS + +SimpleQuadrilateral +#> + +function Initialize-PSSimpleQuadrilateral { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${ShapeType}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${QuadrilateralType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSSimpleQuadrilateral' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ShapeType) { + throw "invalid value for 'ShapeType', 'ShapeType' cannot be null." + } + + if ($null -eq $QuadrilateralType) { + throw "invalid value for 'QuadrilateralType', 'QuadrilateralType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "quadrilateralType" = ${QuadrilateralType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to SimpleQuadrilateral + +.DESCRIPTION + +Convert from JSON to SimpleQuadrilateral + +.PARAMETER Json + +Json object + +.OUTPUTS + +SimpleQuadrilateral +#> +function ConvertFrom-PSJsonToSimpleQuadrilateral { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSSimpleQuadrilateral' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSSimpleQuadrilateral + $AllProperties = ("shapeType", "quadrilateralType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'shapeType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "shapeType"))) { + throw "Error! JSON cannot be serialized due to the required property 'shapeType' missing." + } else { + $ShapeType = $JsonParameters.PSobject.Properties["shapeType"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "quadrilateralType"))) { + throw "Error! JSON cannot be serialized due to the required property 'quadrilateralType' missing." + } else { + $QuadrilateralType = $JsonParameters.PSobject.Properties["quadrilateralType"].value + } + + $PSO = [PSCustomObject]@{ + "shapeType" = ${ShapeType} + "quadrilateralType" = ${QuadrilateralType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/SpecialModelName.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/SpecialModelName.ps1 new file mode 100644 index 000000000000..53f76346d130 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/SpecialModelName.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER SpecialPropertyName +No description available. +.PARAMETER SpecialModelName +No description available. +.OUTPUTS + +SpecialModelName +#> + +function Initialize-PSSpecialModelName { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Int64]] + ${SpecialPropertyName}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${SpecialModelName} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSSpecialModelName' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "$special[property.name]" = ${SpecialPropertyName} + "_special_model.name_" = ${SpecialModelName} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to SpecialModelName + +.DESCRIPTION + +Convert from JSON to SpecialModelName + +.PARAMETER Json + +Json object + +.OUTPUTS + +SpecialModelName +#> +function ConvertFrom-PSJsonToSpecialModelName { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSSpecialModelName' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSSpecialModelName + $AllProperties = ("$special[property.name]", "_special_model.name_") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "$special[property.name]"))) { #optional property not found + $SpecialPropertyName = $null + } else { + $SpecialPropertyName = $JsonParameters.PSobject.Properties["$special[property.name]"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "_special_model.name_"))) { #optional property not found + $SpecialModelName = $null + } else { + $SpecialModelName = $JsonParameters.PSobject.Properties["_special_model.name_"].value + } + + $PSO = [PSCustomObject]@{ + "$special[property.name]" = ${SpecialPropertyName} + "_special_model.name_" = ${SpecialModelName} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1 index 5a2d92bdb7c1..4f82edbd99b2 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -12,7 +12,7 @@ No summary available. .DESCRIPTION -A tag for a pet +No description available. .PARAMETER Id No description available. @@ -77,14 +77,12 @@ function ConvertFrom-PSJsonToTag { $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json - $PSTagAdditionalProperties = @{} # check if Json contains properties not defined in PSTag $AllProperties = ("id", "name") foreach ($name in $JsonParameters.PsObject.Properties.Name) { - # store undefined properties in additionalProperties if (!($AllProperties.Contains($name))) { - $PSTagAdditionalProperties[$name] = $JsonParameters.PSobject.Properties[$name].value + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } @@ -103,7 +101,6 @@ function ConvertFrom-PSJsonToTag { $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} - "AdditionalProperties" = $PSTagAdditionalProperties } return $PSO diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Triangle.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Triangle.ps1 new file mode 100644 index 000000000000..c184b72fed9e --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Triangle.ps1 @@ -0,0 +1,98 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Json + +JSON object + +.OUTPUTS + +Triangle +#> +function ConvertFrom-PSJsonToTriangle { + [CmdletBinding()] + Param ( + [AllowEmptyString()] + [string]$Json + ) + + Process { + $match = 0 + $matchType = $null + $matchInstance = $null + + # try to match EquilateralTriangle defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToEquilateralTriangle $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "EquilateralTriangle" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'EquilateralTriangle' defined in oneOf (PSTriangle). Proceeding to the next one if any." + } + + # try to match IsoscelesTriangle defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToIsoscelesTriangle $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "IsoscelesTriangle" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'IsoscelesTriangle' defined in oneOf (PSTriangle). Proceeding to the next one if any." + } + + # try to match ScaleneTriangle defined in the oneOf schemas + try { + $matchInstance = ConvertFrom-PSJsonToScaleneTriangle $Json + + foreach($property in $matchInstance.PsObject.Properties) { + if ($null -ne $property.Value) { + $matchType = "ScaleneTriangle" + $match++ + break + } + } + } catch { + # fail to match the schema defined in oneOf, proceed to the next one + Write-Debug "Failed to match 'ScaleneTriangle' defined in oneOf (PSTriangle). Proceeding to the next one if any." + } + + if ($match -gt 1) { + throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle]). JSON Payload: $($Json)" + } elseif ($match -eq 1) { + return [PSCustomObject]@{ + "ActualType" = ${matchType} + "ActualInstance" = ${matchInstance} + "OneOfSchemas" = @("EquilateralTriangle", "IsoscelesTriangle", "ScaleneTriangle") + } + } else { + throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle]). JSON Payload: $($Json)" + } + } +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/TriangleInterface.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/TriangleInterface.ps1 new file mode 100644 index 000000000000..229b67a3f63a --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/TriangleInterface.ps1 @@ -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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER TriangleType +No description available. +.OUTPUTS + +TriangleInterface +#> + +function Initialize-PSTriangleInterface { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${TriangleType} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSTriangleInterface' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $TriangleType) { + throw "invalid value for 'TriangleType', 'TriangleType' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "triangleType" = ${TriangleType} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to TriangleInterface + +.DESCRIPTION + +Convert from JSON to TriangleInterface + +.PARAMETER Json + +Json object + +.OUTPUTS + +TriangleInterface +#> +function ConvertFrom-PSJsonToTriangleInterface { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSTriangleInterface' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSTriangleInterface + $AllProperties = ("triangleType") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'triangleType' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "triangleType"))) { + throw "Error! JSON cannot be serialized due to the required property 'triangleType' missing." + } else { + $TriangleType = $JsonParameters.PSobject.Properties["triangleType"].value + } + + $PSO = [PSCustomObject]@{ + "triangleType" = ${TriangleType} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/User.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/User.ps1 index a021b75ec4c9..83086452cfe8 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/User.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/User.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -12,7 +12,7 @@ No summary available. .DESCRIPTION -A User who is purchasing from the pet store +No description available. .PARAMETER Id No description available. @@ -30,6 +30,14 @@ No description available. No description available. .PARAMETER UserStatus User Status +.PARAMETER ObjectWithNoDeclaredProps +test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. +.PARAMETER ObjectWithNoDeclaredPropsNullable +test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. +.PARAMETER AnyTypeProp +test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 +.PARAMETER AnyTypePropNullable +test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. .OUTPUTS User @@ -54,7 +62,6 @@ function Initialize-PSUser { [String] ${Email}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] - [ValidatePattern("[""A-Z]+-[0-9][0-9]")] [String] ${Password}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] @@ -62,7 +69,19 @@ function Initialize-PSUser { ${Phone}, [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] - ${UserStatus} + ${UserStatus}, + [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${ObjectWithNoDeclaredProps}, + [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${ObjectWithNoDeclaredPropsNullable}, + [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${AnyTypeProp}, + [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)] + [PSCustomObject] + ${AnyTypePropNullable} ) Process { @@ -79,6 +98,10 @@ function Initialize-PSUser { "password" = ${Password} "phone" = ${Phone} "userStatus" = ${UserStatus} + "objectWithNoDeclaredProps" = ${ObjectWithNoDeclaredProps} + "objectWithNoDeclaredPropsNullable" = ${ObjectWithNoDeclaredPropsNullable} + "anyTypeProp" = ${AnyTypeProp} + "anyTypePropNullable" = ${AnyTypePropNullable} } @@ -116,7 +139,7 @@ function ConvertFrom-PSJsonToUser { $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PSUser - $AllProperties = ("id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus") + $AllProperties = ("id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus", "objectWithNoDeclaredProps", "objectWithNoDeclaredPropsNullable", "anyTypeProp", "anyTypePropNullable") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" @@ -171,6 +194,30 @@ function ConvertFrom-PSJsonToUser { $UserStatus = $JsonParameters.PSobject.Properties["userStatus"].value } + if (!([bool]($JsonParameters.PSobject.Properties.name -match "objectWithNoDeclaredProps"))) { #optional property not found + $ObjectWithNoDeclaredProps = $null + } else { + $ObjectWithNoDeclaredProps = $JsonParameters.PSobject.Properties["objectWithNoDeclaredProps"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "objectWithNoDeclaredPropsNullable"))) { #optional property not found + $ObjectWithNoDeclaredPropsNullable = $null + } else { + $ObjectWithNoDeclaredPropsNullable = $JsonParameters.PSobject.Properties["objectWithNoDeclaredPropsNullable"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "anyTypeProp"))) { #optional property not found + $AnyTypeProp = $null + } else { + $AnyTypeProp = $JsonParameters.PSobject.Properties["anyTypeProp"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "anyTypePropNullable"))) { #optional property not found + $AnyTypePropNullable = $null + } else { + $AnyTypePropNullable = $JsonParameters.PSobject.Properties["anyTypePropNullable"].value + } + $PSO = [PSCustomObject]@{ "id" = ${Id} "username" = ${Username} @@ -180,6 +227,10 @@ function ConvertFrom-PSJsonToUser { "password" = ${Password} "phone" = ${Phone} "userStatus" = ${UserStatus} + "objectWithNoDeclaredProps" = ${ObjectWithNoDeclaredProps} + "objectWithNoDeclaredPropsNullable" = ${ObjectWithNoDeclaredPropsNullable} + "anyTypeProp" = ${AnyTypeProp} + "anyTypePropNullable" = ${AnyTypePropNullable} } return $PSO diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Whale.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Whale.ps1 new file mode 100644 index 000000000000..a87cfea4e735 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Whale.ps1 @@ -0,0 +1,131 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER HasBaleen +No description available. +.PARAMETER HasTeeth +No description available. +.PARAMETER ClassName +No description available. +.OUTPUTS + +Whale +#> + +function Initialize-PSWhale { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${HasBaleen}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [System.Nullable[Boolean]] + ${HasTeeth}, + [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSWhale' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "hasBaleen" = ${HasBaleen} + "hasTeeth" = ${HasTeeth} + "className" = ${ClassName} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Whale + +.DESCRIPTION + +Convert from JSON to Whale + +.PARAMETER Json + +Json object + +.OUTPUTS + +Whale +#> +function ConvertFrom-PSJsonToWhale { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSWhale' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSWhale + $AllProperties = ("hasBaleen", "hasTeeth", "className") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + if (!($AllProperties.Contains($name))) { + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "hasBaleen"))) { #optional property not found + $HasBaleen = $null + } else { + $HasBaleen = $JsonParameters.PSobject.Properties["hasBaleen"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "hasTeeth"))) { #optional property not found + $HasTeeth = $null + } else { + $HasTeeth = $JsonParameters.PSobject.Properties["hasTeeth"].value + } + + $PSO = [PSCustomObject]@{ + "hasBaleen" = ${HasBaleen} + "hasTeeth" = ${HasTeeth} + "className" = ${ClassName} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Zebra.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Zebra.ps1 new file mode 100644 index 000000000000..5bf388695db0 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Zebra.ps1 @@ -0,0 +1,122 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +<# +.SYNOPSIS + +No summary available. + +.DESCRIPTION + +No description available. + +.PARAMETER Type +No description available. +.PARAMETER ClassName +No description available. +.OUTPUTS + +Zebra +#> + +function Initialize-PSZebra { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("plains", "mountain", "grevys")] + [String] + ${Type}, + [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] + [String] + ${ClassName} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSZebra' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + if ($null -eq $ClassName) { + throw "invalid value for 'ClassName', 'ClassName' cannot be null." + } + + + $PSO = [PSCustomObject]@{ + "type" = ${Type} + "className" = ${ClassName} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to Zebra + +.DESCRIPTION + +Convert from JSON to Zebra + +.PARAMETER Json + +Json object + +.OUTPUTS + +Zebra +#> +function ConvertFrom-PSJsonToZebra { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSZebra' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + $PSZebraAdditionalProperties = @{} + + # check if Json contains properties not defined in PSZebra + $AllProperties = ("type", "className") + foreach ($name in $JsonParameters.PsObject.Properties.Name) { + # store undefined properties in additionalProperties + if (!($AllProperties.Contains($name))) { + $PSZebraAdditionalProperties[$name] = $JsonParameters.PSobject.Properties[$name].value + } + } + + If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json + throw "Error! Empty JSON cannot be serialized due to the required property 'className' missing." + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "className"))) { + throw "Error! JSON cannot be serialized due to the required property 'className' missing." + } else { + $ClassName = $JsonParameters.PSobject.Properties["className"].value + } + + if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found + $Type = $null + } else { + $Type = $JsonParameters.PSobject.Properties["type"].value + } + + $PSO = [PSCustomObject]@{ + "type" = ${Type} + "className" = ${ClassName} + "AdditionalProperties" = $PSZebraAdditionalProperties + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1 b/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1 index 2860418807da..1127e0c738d0 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1 +++ b/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1 @@ -3,7 +3,7 @@ # # Generated by: OpenAPI Generator Team # -# Generated on: 10/30/2021 +# Generated on: 04/08/2022 # @{ @@ -69,21 +69,107 @@ PowerShellVersion = '5.0' # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Add-PSPet', 'Remove-Pet', 'Find-PSPetsByStatus', 'Find-PSPetsByTags', +FunctionsToExport = 'Invoke-PS123TestSpecialTags', 'Invoke-PSFooGet', + 'Invoke-PSFakeHealthGet', 'Invoke-PSFakeOuterBooleanSerialize', + 'Invoke-PSFakeOuterCompositeSerialize', + 'Invoke-PSFakeOuterNumberSerialize', + 'Invoke-PSFakeOuterStringSerialize', 'Get-PSArrayOfEnums', + 'Test-PSBodyWithFileSchema', 'Test-PSBodyWithQueryParams', + 'Test-PSClientModel', 'Test-PSEndpointParameters', + 'Test-PSEnumParameters', 'Test-PSGroupParameters', + 'Test-PSInlineAdditionalProperties', 'Test-PSJsonFormData', + 'Test-PSQueryParameterCollectionFormat', 'Test-PSClassname', + 'Add-PSPet', 'Remove-Pet', 'Find-PSPetsByStatus', 'Find-PSPetsByTags', 'Get-PSPetById', 'Update-PSPet', 'Update-PSPetWithForm', - 'Invoke-PSUploadFile', 'Remove-PSOrder', 'Get-PSInventory', - 'Get-PSOrderById', 'Invoke-PSPlaceOrder', 'New-PSUser', - 'New-PSUsersWithArrayInput', 'New-PSUsersWithListInput', - 'Remove-PSUser', 'Get-PSUserByName', 'Invoke-PSLoginUser', - 'Invoke-PSLogoutUser', 'Update-PSUser', 'Initialize-PSApiResponse', - 'ConvertFrom-PSJsonToApiResponse', 'Initialize-PSCategory', - 'ConvertFrom-PSJsonToCategory', 'Initialize-PSInlineObject', - 'ConvertFrom-PSJsonToInlineObject', 'Initialize-PSInlineObject1', - 'ConvertFrom-PSJsonToInlineObject1', 'Initialize-PSOrder', - 'ConvertFrom-PSJsonToOrder', 'Initialize-PSPet', - 'ConvertFrom-PSJsonToPet', 'Initialize-PSTag', - 'ConvertFrom-PSJsonToTag', 'Initialize-PSUser', - 'ConvertFrom-PSJsonToUser', 'Get-PSConfiguration', + 'Invoke-PSUploadFile', 'Invoke-PSUploadFileWithRequiredFile', + 'Remove-PSOrder', 'Get-PSInventory', 'Get-PSOrderById', + 'Invoke-PSPlaceOrder', 'New-PSUser', 'New-PSUsersWithArrayInput', + 'New-PSUsersWithListInput', 'Remove-PSUser', 'Get-PSUserByName', + 'Invoke-PSLoginUser', 'Invoke-PSLogoutUser', 'Update-PSUser', + 'Initialize-PSAdditionalPropertiesClass', + 'ConvertFrom-PSJsonToAdditionalPropertiesClass', + 'Initialize-PSAnimal', 'ConvertFrom-PSJsonToAnimal', + 'Initialize-PSApiResponse', 'ConvertFrom-PSJsonToApiResponse', + 'Initialize-PSApple', 'ConvertFrom-PSJsonToApple', + 'Initialize-PSAppleReq', 'ConvertFrom-PSJsonToAppleReq', + 'Initialize-PSArrayOfArrayOfNumberOnly', + 'ConvertFrom-PSJsonToArrayOfArrayOfNumberOnly', + 'Initialize-PSArrayOfNumberOnly', + 'ConvertFrom-PSJsonToArrayOfNumberOnly', 'Initialize-PSArrayTest', + 'ConvertFrom-PSJsonToArrayTest', 'Initialize-PSBanana', + 'ConvertFrom-PSJsonToBanana', 'Initialize-PSBananaReq', + 'ConvertFrom-PSJsonToBananaReq', 'Initialize-PSBasquePig', + 'ConvertFrom-PSJsonToBasquePig', 'Initialize-PSCapitalization', + 'ConvertFrom-PSJsonToCapitalization', 'Initialize-PSCat', + 'ConvertFrom-PSJsonToCat', 'Initialize-PSCatAllOf', + 'ConvertFrom-PSJsonToCatAllOf', 'Initialize-PSCategory', + 'ConvertFrom-PSJsonToCategory', 'Initialize-PSClassModel', + 'ConvertFrom-PSJsonToClassModel', 'Initialize-PSClient', + 'ConvertFrom-PSJsonToClient', 'Initialize-PSComplexQuadrilateral', + 'ConvertFrom-PSJsonToComplexQuadrilateral', + 'Initialize-PSDanishPig', 'ConvertFrom-PSJsonToDanishPig', + 'Initialize-PSDeprecatedObject', + 'ConvertFrom-PSJsonToDeprecatedObject', 'Initialize-PSDog', + 'ConvertFrom-PSJsonToDog', 'Initialize-PSDogAllOf', + 'ConvertFrom-PSJsonToDogAllOf', 'Initialize-PSDrawing', + 'ConvertFrom-PSJsonToDrawing', 'Initialize-PSEnumArrays', + 'ConvertFrom-PSJsonToEnumArrays', 'Initialize-PSEnumTest', + 'ConvertFrom-PSJsonToEnumTest', 'Initialize-PSEquilateralTriangle', + 'ConvertFrom-PSJsonToEquilateralTriangle', 'Initialize-PSFile', + 'ConvertFrom-PSJsonToFile', 'Initialize-PSFileSchemaTestClass', + 'ConvertFrom-PSJsonToFileSchemaTestClass', 'Initialize-PSFoo', + 'ConvertFrom-PSJsonToFoo', 'Initialize-PSFormatTest', + 'ConvertFrom-PSJsonToFormatTest', 'ConvertFrom-PSJsonToFruit', + 'ConvertFrom-PSJsonToFruitReq', 'ConvertFrom-PSJsonToGmFruit', + 'Initialize-PSGrandparentAnimal', + 'ConvertFrom-PSJsonToGrandparentAnimal', + 'Initialize-PSHasOnlyReadOnly', + 'ConvertFrom-PSJsonToHasOnlyReadOnly', + 'Initialize-PSHealthCheckResult', + 'ConvertFrom-PSJsonToHealthCheckResult', + 'Initialize-PSInlineObject', 'ConvertFrom-PSJsonToInlineObject', + 'Initialize-PSInlineObject1', 'ConvertFrom-PSJsonToInlineObject1', + 'Initialize-PSInlineResponseDefault', + 'ConvertFrom-PSJsonToInlineResponseDefault', + 'Initialize-PSIsoscelesTriangle', + 'ConvertFrom-PSJsonToIsoscelesTriangle', 'Initialize-PSList', + 'ConvertFrom-PSJsonToList', 'ConvertFrom-PSJsonToMammal', + 'Initialize-PSMapTest', 'ConvertFrom-PSJsonToMapTest', + 'Initialize-PSMixedPropertiesAndAdditionalPropertiesClass', + 'ConvertFrom-PSJsonToMixedPropertiesAndAdditionalPropertiesClass', + 'Initialize-PSModel200Response', + 'ConvertFrom-PSJsonToModel200Response', 'Initialize-PSModelReturn', + 'ConvertFrom-PSJsonToModelReturn', 'Initialize-PSName', + 'ConvertFrom-PSJsonToName', 'Initialize-PSNullableClass', + 'ConvertFrom-PSJsonToNullableClass', + 'ConvertFrom-PSJsonToNullableShape', 'Initialize-PSNumberOnly', + 'ConvertFrom-PSJsonToNumberOnly', + 'Initialize-PSObjectWithDeprecatedFields', + 'ConvertFrom-PSJsonToObjectWithDeprecatedFields', + 'Initialize-PSOrder', 'ConvertFrom-PSJsonToOrder', + 'Initialize-PSOuterComposite', 'ConvertFrom-PSJsonToOuterComposite', + 'Initialize-PSParentPet', 'ConvertFrom-PSJsonToParentPet', + 'Initialize-PSPet', 'ConvertFrom-PSJsonToPet', + 'Initialize-PSPetWithRequiredTags', + 'ConvertFrom-PSJsonToPetWithRequiredTags', + 'ConvertFrom-PSJsonToPig', 'ConvertFrom-PSJsonToQuadrilateral', + 'Initialize-PSQuadrilateralInterface', + 'ConvertFrom-PSJsonToQuadrilateralInterface', + 'Initialize-PSReadOnlyFirst', 'ConvertFrom-PSJsonToReadOnlyFirst', + 'Initialize-PSScaleneTriangle', + 'ConvertFrom-PSJsonToScaleneTriangle', 'ConvertFrom-PSJsonToShape', + 'Initialize-PSShapeInterface', 'ConvertFrom-PSJsonToShapeInterface', + 'ConvertFrom-PSJsonToShapeOrNull', + 'Initialize-PSSimpleQuadrilateral', + 'ConvertFrom-PSJsonToSimpleQuadrilateral', + 'Initialize-PSSpecialModelName', + 'ConvertFrom-PSJsonToSpecialModelName', 'Initialize-PSTag', + 'ConvertFrom-PSJsonToTag', 'ConvertFrom-PSJsonToTriangle', + 'Initialize-PSTriangleInterface', + 'ConvertFrom-PSJsonToTriangleInterface', 'Initialize-PSUser', + 'ConvertFrom-PSJsonToUser', 'Initialize-PSWhale', + 'ConvertFrom-PSJsonToWhale', 'Initialize-PSZebra', + 'ConvertFrom-PSJsonToZebra', 'Get-PSConfiguration', 'Set-PSConfiguration', 'Set-PSConfigurationApiKey', 'Set-PSConfigurationApiKeyPrefix', 'Set-PSConfigurationDefaultHeader', 'Get-PSHostSetting', diff --git a/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psm1 b/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psm1 index bc8d8503afe3..8b0bd5f780e4 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psm1 +++ b/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psm1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/Get-CommonParameters.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/Get-CommonParameters.ps1 index 4073dbe44cc2..c24066ab1c66 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/Get-CommonParameters.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/Get-CommonParameters.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/Out-DebugParameter.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/Out-DebugParameter.ps1 index 3307691956aa..0ca752e7bada 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/Out-DebugParameter.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/Out-DebugParameter.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSApiClient.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/PSApiClient.ps1 index be338cd33eb4..ce637871f545 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSApiClient.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSApiClient.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # @@ -130,6 +130,23 @@ function Invoke-PSApiClient { } } + # http signature authentication + $httpSigningConfig = Get-PSConfigurationHttpSigning + if ($null -ne $httpSigningConfig) { + $httpSignHeaderArgument = @{ + Method = $Method + UriBuilder = $UriBuilder + Body = $Body + RequestHeader = $HeaderParameters + } + $signedHeader = Get-PSHttpSignedHeader @httpSignHeaderArgument + if($null -ne $signedHeader -and $signedHeader.Count -gt 0){ + foreach($item in $signedHeader.GetEnumerator()){ + $HeaderParameters[$item.Name] = $item.Value + } + } + } + if ($SkipCertificateCheck -eq $true) { if ($null -eq $Configuration["Proxy"]) { # skip certification check, no proxy diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 index 21bfb717d7b2..1b2b77175905 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 @@ -1,6 +1,6 @@ # # 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. +# This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs b/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs index 27f40d771724..ea6d93efa7fc 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs @@ -1,7 +1,7 @@ /* * 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. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/powershell/src/PSPetstore/en-US/about_PSPetstore.help.txt b/samples/client/petstore/powershell/src/PSPetstore/en-US/about_PSPetstore.help.txt index af56b5a29483..4f26f83ad410 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/en-US/about_PSPetstore.help.txt +++ b/samples/client/petstore/powershell/src/PSPetstore/en-US/about_PSPetstore.help.txt @@ -5,7 +5,7 @@ SHORT DESCRIPTION PSPetstore - the PowerShell module for the OpenAPI Petstore LONG DESCRIPTION - This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: "" \ This PowerShell module is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/samples/client/petstore/powershell/tests/Api/PSAnotherFakeApi.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSAnotherFakeApi.Tests.ps1 new file mode 100644 index 000000000000..34a93ab62c00 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Api/PSAnotherFakeApi.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSPSAnotherFakeApi' { + Context 'Invoke-PS123TestSpecialTags' { + It 'Test Invoke-PS123TestSpecialTags' { + #$TestResult = Invoke-PS123TestSpecialTags -Client "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + +} diff --git a/samples/client/petstore/powershell/tests/Api/PSDefaultApi.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSDefaultApi.Tests.ps1 new file mode 100644 index 000000000000..5df5a0ee821b --- /dev/null +++ b/samples/client/petstore/powershell/tests/Api/PSDefaultApi.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSPSDefaultApi' { + Context 'Invoke-PSFooGet' { + It 'Test Invoke-PSFooGet' { + #$TestResult = Invoke-PSFooGet + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + +} diff --git a/samples/client/petstore/powershell/tests/Api/PSFakeApi.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSFakeApi.Tests.ps1 new file mode 100644 index 000000000000..1900eab70f81 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Api/PSFakeApi.Tests.ps1 @@ -0,0 +1,129 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSPSFakeApi' { + Context 'Invoke-PSFakeHealthGet' { + It 'Test Invoke-PSFakeHealthGet' { + #$TestResult = Invoke-PSFakeHealthGet + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Invoke-PSFakeOuterBooleanSerialize' { + It 'Test Invoke-PSFakeOuterBooleanSerialize' { + #$TestResult = Invoke-PSFakeOuterBooleanSerialize -Body "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Invoke-PSFakeOuterCompositeSerialize' { + It 'Test Invoke-PSFakeOuterCompositeSerialize' { + #$TestResult = Invoke-PSFakeOuterCompositeSerialize -OuterComposite "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Invoke-PSFakeOuterNumberSerialize' { + It 'Test Invoke-PSFakeOuterNumberSerialize' { + #$TestResult = Invoke-PSFakeOuterNumberSerialize -Body "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Invoke-PSFakeOuterStringSerialize' { + It 'Test Invoke-PSFakeOuterStringSerialize' { + #$TestResult = Invoke-PSFakeOuterStringSerialize -Body "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Get-PSArrayOfEnums' { + It 'Test Get-PSArrayOfEnums' { + #$TestResult = Get-PSArrayOfEnums + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSBodyWithFileSchema' { + It 'Test Test-PSBodyWithFileSchema' { + #$TestResult = Test-PSBodyWithFileSchema -FileSchemaTestClass "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSBodyWithQueryParams' { + It 'Test Test-PSBodyWithQueryParams' { + #$TestResult = Test-PSBodyWithQueryParams -Query "TEST_VALUE" -User "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSClientModel' { + It 'Test Test-PSClientModel' { + #$TestResult = Test-PSClientModel -Client "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSEndpointParameters' { + It 'Test Test-PSEndpointParameters' { + #$TestResult = Test-PSEndpointParameters -Number "TEST_VALUE" -Double "TEST_VALUE" -PatternWithoutDelimiter "TEST_VALUE" -Byte "TEST_VALUE" -Integer "TEST_VALUE" -Int32 "TEST_VALUE" -Int64 "TEST_VALUE" -Float "TEST_VALUE" -String "TEST_VALUE" -Binary "TEST_VALUE" -Date "TEST_VALUE" -DateTime "TEST_VALUE" -Password "TEST_VALUE" -Callback "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSEnumParameters' { + It 'Test Test-PSEnumParameters' { + #$TestResult = Test-PSEnumParameters -EnumHeaderStringArray "TEST_VALUE" -EnumHeaderString "TEST_VALUE" -EnumQueryStringArray "TEST_VALUE" -EnumQueryString "TEST_VALUE" -EnumQueryInteger "TEST_VALUE" -EnumQueryDouble "TEST_VALUE" -EnumFormStringArray "TEST_VALUE" -EnumFormString "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSGroupParameters' { + It 'Test Test-PSGroupParameters' { + #$TestResult = Test-PSGroupParameters -RequiredStringGroup "TEST_VALUE" -RequiredBooleanGroup "TEST_VALUE" -RequiredInt64Group "TEST_VALUE" -StringGroup "TEST_VALUE" -BooleanGroup "TEST_VALUE" -Int64Group "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSInlineAdditionalProperties' { + It 'Test Test-PSInlineAdditionalProperties' { + #$TestResult = Test-PSInlineAdditionalProperties -RequestBody "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSJsonFormData' { + It 'Test Test-PSJsonFormData' { + #$TestResult = Test-PSJsonFormData -Param "TEST_VALUE" -Param2 "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Test-PSQueryParameterCollectionFormat' { + It 'Test Test-PSQueryParameterCollectionFormat' { + #$TestResult = Test-PSQueryParameterCollectionFormat -Pipe "TEST_VALUE" -Ioutil "TEST_VALUE" -Http "TEST_VALUE" -Url "TEST_VALUE" -Context "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + +} diff --git a/samples/client/petstore/powershell/tests/Api/PSFakeClassnameTags123Api.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSFakeClassnameTags123Api.Tests.ps1 new file mode 100644 index 000000000000..d652f093e6bd --- /dev/null +++ b/samples/client/petstore/powershell/tests/Api/PSFakeClassnameTags123Api.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSPSFakeClassnameTags123Api' { + Context 'Test-PSClassname' { + It 'Test Test-PSClassname' { + #$TestResult = Test-PSClassname -Client "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + +} diff --git a/samples/client/petstore/powershell/tests/Model/AdditionalPropertiesClass.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/AdditionalPropertiesClass.Tests.ps1 new file mode 100644 index 000000000000..5591ad86df46 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/AdditionalPropertiesClass.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSAdditionalPropertiesClass' { + Context 'PSAdditionalPropertiesClass' { + It 'Initialize-PSAdditionalPropertiesClass' { + # a simple test to create an object + #$NewObject = Initialize-PSAdditionalPropertiesClass -MapProperty "TEST_VALUE" -MapOfMapProperty "TEST_VALUE" -Anytype1 "TEST_VALUE" -MapWithUndeclaredPropertiesAnytype1 "TEST_VALUE" -MapWithUndeclaredPropertiesAnytype2 "TEST_VALUE" -MapWithUndeclaredPropertiesAnytype3 "TEST_VALUE" -EmptyMap "TEST_VALUE" -MapWithUndeclaredPropertiesString "TEST_VALUE" + #$NewObject | Should -BeOfType AdditionalPropertiesClass + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Animal.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Animal.Tests.ps1 new file mode 100644 index 000000000000..ed3c725f722c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Animal.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSAnimal' { + Context 'PSAnimal' { + It 'Initialize-PSAnimal' { + # a simple test to create an object + #$NewObject = Initialize-PSAnimal -ClassName "TEST_VALUE" -Color "TEST_VALUE" + #$NewObject | Should -BeOfType Animal + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Apple.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Apple.Tests.ps1 new file mode 100644 index 000000000000..ac286c7360fc --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Apple.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSApple' { + Context 'PSApple' { + It 'Initialize-PSApple' { + # a simple test to create an object + #$NewObject = Initialize-PSApple -Cultivar "TEST_VALUE" -Origin "TEST_VALUE" + #$NewObject | Should -BeOfType Apple + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/AppleReq.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/AppleReq.Tests.ps1 new file mode 100644 index 000000000000..f83d73f7df16 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/AppleReq.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSAppleReq' { + Context 'PSAppleReq' { + It 'Initialize-PSAppleReq' { + # a simple test to create an object + #$NewObject = Initialize-PSAppleReq -Cultivar "TEST_VALUE" -Mealy "TEST_VALUE" + #$NewObject | Should -BeOfType AppleReq + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ArrayOfArrayOfNumberOnly.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ArrayOfArrayOfNumberOnly.Tests.ps1 new file mode 100644 index 000000000000..ac7145839fdf --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ArrayOfArrayOfNumberOnly.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSArrayOfArrayOfNumberOnly' { + Context 'PSArrayOfArrayOfNumberOnly' { + It 'Initialize-PSArrayOfArrayOfNumberOnly' { + # a simple test to create an object + #$NewObject = Initialize-PSArrayOfArrayOfNumberOnly -ArrayArrayNumber "TEST_VALUE" + #$NewObject | Should -BeOfType ArrayOfArrayOfNumberOnly + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ArrayOfNumberOnly.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ArrayOfNumberOnly.Tests.ps1 new file mode 100644 index 000000000000..17d0a3e5b912 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ArrayOfNumberOnly.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSArrayOfNumberOnly' { + Context 'PSArrayOfNumberOnly' { + It 'Initialize-PSArrayOfNumberOnly' { + # a simple test to create an object + #$NewObject = Initialize-PSArrayOfNumberOnly -ArrayNumber "TEST_VALUE" + #$NewObject | Should -BeOfType ArrayOfNumberOnly + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ArrayTest.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ArrayTest.Tests.ps1 new file mode 100644 index 000000000000..9d83436a8055 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ArrayTest.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSArrayTest' { + Context 'PSArrayTest' { + It 'Initialize-PSArrayTest' { + # a simple test to create an object + #$NewObject = Initialize-PSArrayTest -ArrayOfString "TEST_VALUE" -ArrayArrayOfInteger "TEST_VALUE" -ArrayArrayOfModel "TEST_VALUE" + #$NewObject | Should -BeOfType ArrayTest + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Banana.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Banana.Tests.ps1 new file mode 100644 index 000000000000..dc3757c24e5a --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Banana.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSBanana' { + Context 'PSBanana' { + It 'Initialize-PSBanana' { + # a simple test to create an object + #$NewObject = Initialize-PSBanana -LengthCm "TEST_VALUE" + #$NewObject | Should -BeOfType Banana + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/BananaReq.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/BananaReq.Tests.ps1 new file mode 100644 index 000000000000..705e2952cead --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/BananaReq.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSBananaReq' { + Context 'PSBananaReq' { + It 'Initialize-PSBananaReq' { + # a simple test to create an object + #$NewObject = Initialize-PSBananaReq -LengthCm "TEST_VALUE" -Sweet "TEST_VALUE" + #$NewObject | Should -BeOfType BananaReq + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/BasquePig.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/BasquePig.Tests.ps1 new file mode 100644 index 000000000000..4ac6e20256ed --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/BasquePig.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSBasquePig' { + Context 'PSBasquePig' { + It 'Initialize-PSBasquePig' { + # a simple test to create an object + #$NewObject = Initialize-PSBasquePig -ClassName "TEST_VALUE" + #$NewObject | Should -BeOfType BasquePig + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Capitalization.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Capitalization.Tests.ps1 new file mode 100644 index 000000000000..83bf5c288fd8 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Capitalization.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSCapitalization' { + Context 'PSCapitalization' { + It 'Initialize-PSCapitalization' { + # a simple test to create an object + #$NewObject = Initialize-PSCapitalization -SmallCamel "TEST_VALUE" -CapitalCamel "TEST_VALUE" -SmallSnake "TEST_VALUE" -CapitalSnake "TEST_VALUE" -SCAETHFlowPoints "TEST_VALUE" -ATTNAME "TEST_VALUE" + #$NewObject | Should -BeOfType Capitalization + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Cat.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Cat.Tests.ps1 new file mode 100644 index 000000000000..d31b9a8dde9e --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Cat.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSCat' { + Context 'PSCat' { + It 'Initialize-PSCat' { + # a simple test to create an object + #$NewObject = Initialize-PSCat -ClassName "TEST_VALUE" -Color "TEST_VALUE" -Declawed "TEST_VALUE" + #$NewObject | Should -BeOfType Cat + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/CatAllOf.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/CatAllOf.Tests.ps1 new file mode 100644 index 000000000000..49a7a4862c5c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/CatAllOf.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSCatAllOf' { + Context 'PSCatAllOf' { + It 'Initialize-PSCatAllOf' { + # a simple test to create an object + #$NewObject = Initialize-PSCatAllOf -Declawed "TEST_VALUE" + #$NewObject | Should -BeOfType CatAllOf + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ClassModel.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ClassModel.Tests.ps1 new file mode 100644 index 000000000000..01b89314fc34 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ClassModel.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSClassModel' { + Context 'PSClassModel' { + It 'Initialize-PSClassModel' { + # a simple test to create an object + #$NewObject = Initialize-PSClassModel -Class "TEST_VALUE" + #$NewObject | Should -BeOfType ClassModel + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Client.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Client.Tests.ps1 new file mode 100644 index 000000000000..caf3bd8ffd93 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Client.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSClient' { + Context 'PSClient' { + It 'Initialize-PSClient' { + # a simple test to create an object + #$NewObject = Initialize-PSClient -Client "TEST_VALUE" + #$NewObject | Should -BeOfType Client + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ComplexQuadrilateral.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ComplexQuadrilateral.Tests.ps1 new file mode 100644 index 000000000000..106b06dc9b2c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ComplexQuadrilateral.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSComplexQuadrilateral' { + Context 'PSComplexQuadrilateral' { + It 'Initialize-PSComplexQuadrilateral' { + # a simple test to create an object + #$NewObject = Initialize-PSComplexQuadrilateral -ShapeType "TEST_VALUE" -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType ComplexQuadrilateral + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/DanishPig.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/DanishPig.Tests.ps1 new file mode 100644 index 000000000000..0396b0004fe2 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/DanishPig.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSDanishPig' { + Context 'PSDanishPig' { + It 'Initialize-PSDanishPig' { + # a simple test to create an object + #$NewObject = Initialize-PSDanishPig -ClassName "TEST_VALUE" + #$NewObject | Should -BeOfType DanishPig + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/DeprecatedObject.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/DeprecatedObject.Tests.ps1 new file mode 100644 index 000000000000..715b169a6179 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/DeprecatedObject.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSDeprecatedObject' { + Context 'PSDeprecatedObject' { + It 'Initialize-PSDeprecatedObject' { + # a simple test to create an object + #$NewObject = Initialize-PSDeprecatedObject -Name "TEST_VALUE" + #$NewObject | Should -BeOfType DeprecatedObject + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Dog.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Dog.Tests.ps1 new file mode 100644 index 000000000000..aa9921cc096a --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Dog.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSDog' { + Context 'PSDog' { + It 'Initialize-PSDog' { + # a simple test to create an object + #$NewObject = Initialize-PSDog -ClassName "TEST_VALUE" -Color "TEST_VALUE" -Breed "TEST_VALUE" + #$NewObject | Should -BeOfType Dog + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/DogAllOf.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/DogAllOf.Tests.ps1 new file mode 100644 index 000000000000..574addf84d2c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/DogAllOf.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSDogAllOf' { + Context 'PSDogAllOf' { + It 'Initialize-PSDogAllOf' { + # a simple test to create an object + #$NewObject = Initialize-PSDogAllOf -Breed "TEST_VALUE" + #$NewObject | Should -BeOfType DogAllOf + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Drawing.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Drawing.Tests.ps1 new file mode 100644 index 000000000000..183189b03211 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Drawing.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSDrawing' { + Context 'PSDrawing' { + It 'Initialize-PSDrawing' { + # a simple test to create an object + #$NewObject = Initialize-PSDrawing -MainShape "TEST_VALUE" -ShapeOrNull "TEST_VALUE" -NullableShape "TEST_VALUE" -Shapes "TEST_VALUE" + #$NewObject | Should -BeOfType Drawing + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/EnumArrays.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/EnumArrays.Tests.ps1 new file mode 100644 index 000000000000..2ce925ff56de --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/EnumArrays.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSEnumArrays' { + Context 'PSEnumArrays' { + It 'Initialize-PSEnumArrays' { + # a simple test to create an object + #$NewObject = Initialize-PSEnumArrays -JustSymbol "TEST_VALUE" -ArrayEnum "TEST_VALUE" + #$NewObject | Should -BeOfType EnumArrays + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/EnumClass.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/EnumClass.Tests.ps1 new file mode 100644 index 000000000000..9ed480f49421 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/EnumClass.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSEnumClass' { + Context 'PSEnumClass' { + It 'Initialize-PSEnumClass' { + # a simple test to create an object + #$NewObject = Initialize-PSEnumClass + #$NewObject | Should -BeOfType EnumClass + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/EnumTest.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/EnumTest.Tests.ps1 new file mode 100644 index 000000000000..e7f1a863029b --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/EnumTest.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSEnumTest' { + Context 'PSEnumTest' { + It 'Initialize-PSEnumTest' { + # a simple test to create an object + #$NewObject = Initialize-PSEnumTest -EnumString "TEST_VALUE" -EnumStringRequired "TEST_VALUE" -EnumInteger "TEST_VALUE" -EnumIntegerOnly "TEST_VALUE" -EnumNumber "TEST_VALUE" -OuterEnum "TEST_VALUE" -OuterEnumInteger "TEST_VALUE" -OuterEnumDefaultValue "TEST_VALUE" -OuterEnumIntegerDefaultValue "TEST_VALUE" + #$NewObject | Should -BeOfType EnumTest + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/EquilateralTriangle.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/EquilateralTriangle.Tests.ps1 new file mode 100644 index 000000000000..472983e6d354 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/EquilateralTriangle.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSEquilateralTriangle' { + Context 'PSEquilateralTriangle' { + It 'Initialize-PSEquilateralTriangle' { + # a simple test to create an object + #$NewObject = Initialize-PSEquilateralTriangle -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" + #$NewObject | Should -BeOfType EquilateralTriangle + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/File.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/File.Tests.ps1 new file mode 100644 index 000000000000..9ea991f0357d --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/File.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSFile' { + Context 'PSFile' { + It 'Initialize-PSFile' { + # a simple test to create an object + #$NewObject = Initialize-PSFile -SourceURI "TEST_VALUE" + #$NewObject | Should -BeOfType File + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/FileSchemaTestClass.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/FileSchemaTestClass.Tests.ps1 new file mode 100644 index 000000000000..e6850286c3a7 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/FileSchemaTestClass.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSFileSchemaTestClass' { + Context 'PSFileSchemaTestClass' { + It 'Initialize-PSFileSchemaTestClass' { + # a simple test to create an object + #$NewObject = Initialize-PSFileSchemaTestClass -File "TEST_VALUE" -Files "TEST_VALUE" + #$NewObject | Should -BeOfType FileSchemaTestClass + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Foo.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Foo.Tests.ps1 new file mode 100644 index 000000000000..98cc3a96fa70 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Foo.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSFoo' { + Context 'PSFoo' { + It 'Initialize-PSFoo' { + # a simple test to create an object + #$NewObject = Initialize-PSFoo -Bar "TEST_VALUE" + #$NewObject | Should -BeOfType Foo + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/FormatTest.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/FormatTest.Tests.ps1 new file mode 100644 index 000000000000..6cdb13c999b2 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/FormatTest.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSFormatTest' { + Context 'PSFormatTest' { + It 'Initialize-PSFormatTest' { + # a simple test to create an object + #$NewObject = Initialize-PSFormatTest -Integer "TEST_VALUE" -Int32 "TEST_VALUE" -Int64 "TEST_VALUE" -Number "TEST_VALUE" -Float "TEST_VALUE" -Double "TEST_VALUE" -Decimal "TEST_VALUE" -String "TEST_VALUE" -Byte "TEST_VALUE" -Binary "TEST_VALUE" -Date "TEST_VALUE" -DateTime "TEST_VALUE" -Uuid "TEST_VALUE" -Password "TEST_VALUE" -PatternWithDigits "TEST_VALUE" -PatternWithDigitsAndDelimiter "TEST_VALUE" + #$NewObject | Should -BeOfType FormatTest + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Fruit.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Fruit.Tests.ps1 new file mode 100644 index 000000000000..897b03f23dcd --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Fruit.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSFruit' { + Context 'PSFruit' { + It 'Initialize-PSFruit' { + # a simple test to create an object + #$NewObject = Initialize-PSFruit -Color "TEST_VALUE" -Cultivar "TEST_VALUE" -Origin "TEST_VALUE" -LengthCm "TEST_VALUE" + #$NewObject | Should -BeOfType Fruit + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/FruitReq.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/FruitReq.Tests.ps1 new file mode 100644 index 000000000000..c149369b4626 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/FruitReq.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSFruitReq' { + Context 'PSFruitReq' { + It 'Initialize-PSFruitReq' { + # a simple test to create an object + #$NewObject = Initialize-PSFruitReq -Cultivar "TEST_VALUE" -Mealy "TEST_VALUE" -LengthCm "TEST_VALUE" -Sweet "TEST_VALUE" + #$NewObject | Should -BeOfType FruitReq + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/GmFruit.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/GmFruit.Tests.ps1 new file mode 100644 index 000000000000..6b91433b9b26 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/GmFruit.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSGmFruit' { + Context 'PSGmFruit' { + It 'Initialize-PSGmFruit' { + # a simple test to create an object + #$NewObject = Initialize-PSGmFruit -Color "TEST_VALUE" -Cultivar "TEST_VALUE" -Origin "TEST_VALUE" -LengthCm "TEST_VALUE" + #$NewObject | Should -BeOfType GmFruit + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/GrandparentAnimal.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/GrandparentAnimal.Tests.ps1 new file mode 100644 index 000000000000..f22b1fe3af7c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/GrandparentAnimal.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSGrandparentAnimal' { + Context 'PSGrandparentAnimal' { + It 'Initialize-PSGrandparentAnimal' { + # a simple test to create an object + #$NewObject = Initialize-PSGrandparentAnimal -PetType "TEST_VALUE" + #$NewObject | Should -BeOfType GrandparentAnimal + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/HasOnlyReadOnly.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/HasOnlyReadOnly.Tests.ps1 new file mode 100644 index 000000000000..4235a31130e8 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/HasOnlyReadOnly.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSHasOnlyReadOnly' { + Context 'PSHasOnlyReadOnly' { + It 'Initialize-PSHasOnlyReadOnly' { + # a simple test to create an object + #$NewObject = Initialize-PSHasOnlyReadOnly -Bar "TEST_VALUE" -Foo "TEST_VALUE" + #$NewObject | Should -BeOfType HasOnlyReadOnly + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/HealthCheckResult.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/HealthCheckResult.Tests.ps1 new file mode 100644 index 000000000000..f46e6ba1a78a --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/HealthCheckResult.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSHealthCheckResult' { + Context 'PSHealthCheckResult' { + It 'Initialize-PSHealthCheckResult' { + # a simple test to create an object + #$NewObject = Initialize-PSHealthCheckResult -NullableMessage "TEST_VALUE" + #$NewObject | Should -BeOfType HealthCheckResult + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/InlineResponseDefault.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/InlineResponseDefault.Tests.ps1 new file mode 100644 index 000000000000..822b1d36d66d --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/InlineResponseDefault.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSInlineResponseDefault' { + Context 'PSInlineResponseDefault' { + It 'Initialize-PSInlineResponseDefault' { + # a simple test to create an object + #$NewObject = Initialize-PSInlineResponseDefault -String "TEST_VALUE" + #$NewObject | Should -BeOfType InlineResponseDefault + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/IsoscelesTriangle.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/IsoscelesTriangle.Tests.ps1 new file mode 100644 index 000000000000..0f49e370772f --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/IsoscelesTriangle.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSIsoscelesTriangle' { + Context 'PSIsoscelesTriangle' { + It 'Initialize-PSIsoscelesTriangle' { + # a simple test to create an object + #$NewObject = Initialize-PSIsoscelesTriangle -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" + #$NewObject | Should -BeOfType IsoscelesTriangle + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/List.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/List.Tests.ps1 new file mode 100644 index 000000000000..991de93aa475 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/List.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSList' { + Context 'PSList' { + It 'Initialize-PSList' { + # a simple test to create an object + #$NewObject = Initialize-PSList -Var123List "TEST_VALUE" + #$NewObject | Should -BeOfType List + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Mammal.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Mammal.Tests.ps1 new file mode 100644 index 000000000000..0093186d8cb0 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Mammal.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSMammal' { + Context 'PSMammal' { + It 'Initialize-PSMammal' { + # a simple test to create an object + #$NewObject = Initialize-PSMammal -HasBaleen "TEST_VALUE" -HasTeeth "TEST_VALUE" -ClassName "TEST_VALUE" -Type "TEST_VALUE" + #$NewObject | Should -BeOfType Mammal + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/MapTest.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/MapTest.Tests.ps1 new file mode 100644 index 000000000000..128d1f71f353 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/MapTest.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSMapTest' { + Context 'PSMapTest' { + It 'Initialize-PSMapTest' { + # a simple test to create an object + #$NewObject = Initialize-PSMapTest -MapMapOfString "TEST_VALUE" -MapOfEnumString "TEST_VALUE" -DirectMap "TEST_VALUE" -IndirectMap "TEST_VALUE" + #$NewObject | Should -BeOfType MapTest + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/MixedPropertiesAndAdditionalPropertiesClass.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/MixedPropertiesAndAdditionalPropertiesClass.Tests.ps1 new file mode 100644 index 000000000000..64611f06da62 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/MixedPropertiesAndAdditionalPropertiesClass.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSMixedPropertiesAndAdditionalPropertiesClass' { + Context 'PSMixedPropertiesAndAdditionalPropertiesClass' { + It 'Initialize-PSMixedPropertiesAndAdditionalPropertiesClass' { + # a simple test to create an object + #$NewObject = Initialize-PSMixedPropertiesAndAdditionalPropertiesClass -Uuid "TEST_VALUE" -DateTime "TEST_VALUE" -Map "TEST_VALUE" + #$NewObject | Should -BeOfType MixedPropertiesAndAdditionalPropertiesClass + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Model200Response.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Model200Response.Tests.ps1 new file mode 100644 index 000000000000..c7765ef03ecd --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Model200Response.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSModel200Response' { + Context 'PSModel200Response' { + It 'Initialize-PSModel200Response' { + # a simple test to create an object + #$NewObject = Initialize-PSModel200Response -Name "TEST_VALUE" -Class "TEST_VALUE" + #$NewObject | Should -BeOfType Model200Response + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ModelReturn.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ModelReturn.Tests.ps1 new file mode 100644 index 000000000000..16a8c142bc63 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ModelReturn.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSModelReturn' { + Context 'PSModelReturn' { + It 'Initialize-PSModelReturn' { + # a simple test to create an object + #$NewObject = Initialize-PSModelReturn -VarReturn "TEST_VALUE" + #$NewObject | Should -BeOfType ModelReturn + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Name.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Name.Tests.ps1 new file mode 100644 index 000000000000..ee7f033af661 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Name.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSName' { + Context 'PSName' { + It 'Initialize-PSName' { + # a simple test to create an object + #$NewObject = Initialize-PSName -Name "TEST_VALUE" -SnakeCase "TEST_VALUE" -Property "TEST_VALUE" -Var123Number "TEST_VALUE" + #$NewObject | Should -BeOfType Name + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/NullableClass.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/NullableClass.Tests.ps1 new file mode 100644 index 000000000000..fe7df5278ce5 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/NullableClass.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSNullableClass' { + Context 'PSNullableClass' { + It 'Initialize-PSNullableClass' { + # a simple test to create an object + #$NewObject = Initialize-PSNullableClass -IntegerProp "TEST_VALUE" -NumberProp "TEST_VALUE" -BooleanProp "TEST_VALUE" -StringProp "TEST_VALUE" -DateProp "TEST_VALUE" -DatetimeProp "TEST_VALUE" -ArrayNullableProp "TEST_VALUE" -ArrayAndItemsNullableProp "TEST_VALUE" -ArrayItemsNullable "TEST_VALUE" -ObjectNullableProp "TEST_VALUE" -ObjectAndItemsNullableProp "TEST_VALUE" -ObjectItemsNullable "TEST_VALUE" + #$NewObject | Should -BeOfType NullableClass + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/NullableShape.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/NullableShape.Tests.ps1 new file mode 100644 index 000000000000..4c66304bbe4f --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/NullableShape.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSNullableShape' { + Context 'PSNullableShape' { + It 'Initialize-PSNullableShape' { + # a simple test to create an object + #$NewObject = Initialize-PSNullableShape -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType NullableShape + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/NumberOnly.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/NumberOnly.Tests.ps1 new file mode 100644 index 000000000000..923419320e95 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/NumberOnly.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSNumberOnly' { + Context 'PSNumberOnly' { + It 'Initialize-PSNumberOnly' { + # a simple test to create an object + #$NewObject = Initialize-PSNumberOnly -JustNumber "TEST_VALUE" + #$NewObject | Should -BeOfType NumberOnly + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ObjectWithDeprecatedFields.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ObjectWithDeprecatedFields.Tests.ps1 new file mode 100644 index 000000000000..10ae61483760 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ObjectWithDeprecatedFields.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSObjectWithDeprecatedFields' { + Context 'PSObjectWithDeprecatedFields' { + It 'Initialize-PSObjectWithDeprecatedFields' { + # a simple test to create an object + #$NewObject = Initialize-PSObjectWithDeprecatedFields -Uuid "TEST_VALUE" -Id "TEST_VALUE" -DeprecatedRef "TEST_VALUE" -Bars "TEST_VALUE" + #$NewObject | Should -BeOfType ObjectWithDeprecatedFields + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/OuterComposite.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/OuterComposite.Tests.ps1 new file mode 100644 index 000000000000..0382b18586b0 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/OuterComposite.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSOuterComposite' { + Context 'PSOuterComposite' { + It 'Initialize-PSOuterComposite' { + # a simple test to create an object + #$NewObject = Initialize-PSOuterComposite -MyNumber "TEST_VALUE" -MyString "TEST_VALUE" -MyBoolean "TEST_VALUE" + #$NewObject | Should -BeOfType OuterComposite + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/OuterEnum.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/OuterEnum.Tests.ps1 new file mode 100644 index 000000000000..be5b62a9eb20 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/OuterEnum.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSOuterEnum' { + Context 'PSOuterEnum' { + It 'Initialize-PSOuterEnum' { + # a simple test to create an object + #$NewObject = Initialize-PSOuterEnum + #$NewObject | Should -BeOfType OuterEnum + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/OuterEnumDefaultValue.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/OuterEnumDefaultValue.Tests.ps1 new file mode 100644 index 000000000000..3992012be320 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/OuterEnumDefaultValue.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSOuterEnumDefaultValue' { + Context 'PSOuterEnumDefaultValue' { + It 'Initialize-PSOuterEnumDefaultValue' { + # a simple test to create an object + #$NewObject = Initialize-PSOuterEnumDefaultValue + #$NewObject | Should -BeOfType OuterEnumDefaultValue + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/OuterEnumInteger.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/OuterEnumInteger.Tests.ps1 new file mode 100644 index 000000000000..00d0eba96570 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/OuterEnumInteger.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSOuterEnumInteger' { + Context 'PSOuterEnumInteger' { + It 'Initialize-PSOuterEnumInteger' { + # a simple test to create an object + #$NewObject = Initialize-PSOuterEnumInteger + #$NewObject | Should -BeOfType OuterEnumInteger + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/OuterEnumIntegerDefaultValue.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/OuterEnumIntegerDefaultValue.Tests.ps1 new file mode 100644 index 000000000000..3f9f924aef26 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/OuterEnumIntegerDefaultValue.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSOuterEnumIntegerDefaultValue' { + Context 'PSOuterEnumIntegerDefaultValue' { + It 'Initialize-PSOuterEnumIntegerDefaultValue' { + # a simple test to create an object + #$NewObject = Initialize-PSOuterEnumIntegerDefaultValue + #$NewObject | Should -BeOfType OuterEnumIntegerDefaultValue + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ParentPet.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ParentPet.Tests.ps1 new file mode 100644 index 000000000000..cc9560dc885a --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ParentPet.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSParentPet' { + Context 'PSParentPet' { + It 'Initialize-PSParentPet' { + # a simple test to create an object + #$NewObject = Initialize-PSParentPet -PetType "TEST_VALUE" + #$NewObject | Should -BeOfType ParentPet + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/PetWithRequiredTags.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/PetWithRequiredTags.Tests.ps1 new file mode 100644 index 000000000000..a3ad7a11dcca --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/PetWithRequiredTags.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSPetWithRequiredTags' { + Context 'PSPetWithRequiredTags' { + It 'Initialize-PSPetWithRequiredTags' { + # a simple test to create an object + #$NewObject = Initialize-PSPetWithRequiredTags -Id "TEST_VALUE" -Category "TEST_VALUE" -Name "TEST_VALUE" -PhotoUrls "TEST_VALUE" -Tags "TEST_VALUE" -Status "TEST_VALUE" + #$NewObject | Should -BeOfType PetWithRequiredTags + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Pig.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Pig.Tests.ps1 new file mode 100644 index 000000000000..4cc331028d5e --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Pig.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSPig' { + Context 'PSPig' { + It 'Initialize-PSPig' { + # a simple test to create an object + #$NewObject = Initialize-PSPig -ClassName "TEST_VALUE" + #$NewObject | Should -BeOfType Pig + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Quadrilateral.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Quadrilateral.Tests.ps1 new file mode 100644 index 000000000000..4a054b1a5f8c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Quadrilateral.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSQuadrilateral' { + Context 'PSQuadrilateral' { + It 'Initialize-PSQuadrilateral' { + # a simple test to create an object + #$NewObject = Initialize-PSQuadrilateral -ShapeType "TEST_VALUE" -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType Quadrilateral + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/QuadrilateralInterface.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/QuadrilateralInterface.Tests.ps1 new file mode 100644 index 000000000000..0fd834fe34d4 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/QuadrilateralInterface.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSQuadrilateralInterface' { + Context 'PSQuadrilateralInterface' { + It 'Initialize-PSQuadrilateralInterface' { + # a simple test to create an object + #$NewObject = Initialize-PSQuadrilateralInterface -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType QuadrilateralInterface + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ReadOnlyFirst.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ReadOnlyFirst.Tests.ps1 new file mode 100644 index 000000000000..14260f1c8cc8 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ReadOnlyFirst.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSReadOnlyFirst' { + Context 'PSReadOnlyFirst' { + It 'Initialize-PSReadOnlyFirst' { + # a simple test to create an object + #$NewObject = Initialize-PSReadOnlyFirst -Bar "TEST_VALUE" -Baz "TEST_VALUE" + #$NewObject | Should -BeOfType ReadOnlyFirst + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ScaleneTriangle.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ScaleneTriangle.Tests.ps1 new file mode 100644 index 000000000000..9e3e01ac3e5e --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ScaleneTriangle.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSScaleneTriangle' { + Context 'PSScaleneTriangle' { + It 'Initialize-PSScaleneTriangle' { + # a simple test to create an object + #$NewObject = Initialize-PSScaleneTriangle -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" + #$NewObject | Should -BeOfType ScaleneTriangle + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Shape.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Shape.Tests.ps1 new file mode 100644 index 000000000000..10c579fc7ec8 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Shape.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSShape' { + Context 'PSShape' { + It 'Initialize-PSShape' { + # a simple test to create an object + #$NewObject = Initialize-PSShape -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType Shape + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ShapeInterface.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ShapeInterface.Tests.ps1 new file mode 100644 index 000000000000..595cdcde2727 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ShapeInterface.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSShapeInterface' { + Context 'PSShapeInterface' { + It 'Initialize-PSShapeInterface' { + # a simple test to create an object + #$NewObject = Initialize-PSShapeInterface -ShapeType "TEST_VALUE" + #$NewObject | Should -BeOfType ShapeInterface + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/ShapeOrNull.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ShapeOrNull.Tests.ps1 new file mode 100644 index 000000000000..c8aa986e7c44 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ShapeOrNull.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSShapeOrNull' { + Context 'PSShapeOrNull' { + It 'Initialize-PSShapeOrNull' { + # a simple test to create an object + #$NewObject = Initialize-PSShapeOrNull -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType ShapeOrNull + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/SimpleQuadrilateral.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/SimpleQuadrilateral.Tests.ps1 new file mode 100644 index 000000000000..891d4eea609a --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/SimpleQuadrilateral.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSSimpleQuadrilateral' { + Context 'PSSimpleQuadrilateral' { + It 'Initialize-PSSimpleQuadrilateral' { + # a simple test to create an object + #$NewObject = Initialize-PSSimpleQuadrilateral -ShapeType "TEST_VALUE" -QuadrilateralType "TEST_VALUE" + #$NewObject | Should -BeOfType SimpleQuadrilateral + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/SpecialModelName.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/SpecialModelName.Tests.ps1 new file mode 100644 index 000000000000..4eb3d0f163a3 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/SpecialModelName.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSSpecialModelName' { + Context 'PSSpecialModelName' { + It 'Initialize-PSSpecialModelName' { + # a simple test to create an object + #$NewObject = Initialize-PSSpecialModelName -SpecialPropertyName "TEST_VALUE" -SpecialModelName "TEST_VALUE" + #$NewObject | Should -BeOfType SpecialModelName + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Triangle.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Triangle.Tests.ps1 new file mode 100644 index 000000000000..b1b4af2efbb7 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Triangle.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSTriangle' { + Context 'PSTriangle' { + It 'Initialize-PSTriangle' { + # a simple test to create an object + #$NewObject = Initialize-PSTriangle -ShapeType "TEST_VALUE" -TriangleType "TEST_VALUE" + #$NewObject | Should -BeOfType Triangle + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/TriangleInterface.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/TriangleInterface.Tests.ps1 new file mode 100644 index 000000000000..630f18eb2d24 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/TriangleInterface.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSTriangleInterface' { + Context 'PSTriangleInterface' { + It 'Initialize-PSTriangleInterface' { + # a simple test to create an object + #$NewObject = Initialize-PSTriangleInterface -TriangleType "TEST_VALUE" + #$NewObject | Should -BeOfType TriangleInterface + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Whale.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Whale.Tests.ps1 new file mode 100644 index 000000000000..331782aa5563 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Whale.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSWhale' { + Context 'PSWhale' { + It 'Initialize-PSWhale' { + # a simple test to create an object + #$NewObject = Initialize-PSWhale -HasBaleen "TEST_VALUE" -HasTeeth "TEST_VALUE" -ClassName "TEST_VALUE" + #$NewObject | Should -BeOfType Whale + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/powershell/tests/Model/Zebra.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Zebra.Tests.ps1 new file mode 100644 index 000000000000..36feac5c870c --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/Zebra.Tests.ps1 @@ -0,0 +1,17 @@ +# +# 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: "" \ +# Version: 1.0.0 +# Generated by OpenAPI Generator: https://openapi-generator.tech +# + +Describe -tag 'PSPetstore' -name 'PSZebra' { + Context 'PSZebra' { + It 'Initialize-PSZebra' { + # a simple test to create an object + #$NewObject = Initialize-PSZebra -Type "TEST_VALUE" -ClassName "TEST_VALUE" + #$NewObject | Should -BeOfType Zebra + #$NewObject.property | Should -Be 0 + } + } +} diff --git a/samples/client/petstore/python-asyncio/docs/Model_200Response.md b/samples/client/petstore/python-asyncio/docs/Model_200Response.md new file mode 100644 index 000000000000..4fd119d12515 --- /dev/null +++ b/samples/client/petstore/python-asyncio/docs/Model_200Response.md @@ -0,0 +1,13 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **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/docs/Model_Return.md b/samples/client/petstore/python-asyncio/docs/Model_Return.md new file mode 100644 index 000000000000..674c441551b3 --- /dev/null +++ b/samples/client/petstore/python-asyncio/docs/Model_Return.md @@ -0,0 +1,12 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index 9f56ecf401d5..8719c9511f17 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 @@ -128,8 +128,7 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 24fe364a0bde..d76ff0a0676c 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 @@ -128,8 +128,7 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('xml_item') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -804,8 +803,7 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -947,12 +945,10 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -960,7 +956,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 + if local_var_params.get('query') is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1093,8 +1089,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -1304,20 +1299,16 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 - local_var_params['double'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 - local_var_params['byte'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('byte') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 @@ -1550,14 +1541,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_string'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_integer'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_double'] is not None: # noqa: E501 + if local_var_params.get('enum_query_double') is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1723,16 +1714,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 = {} @@ -1740,13 +1728,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['required_int64_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['int64_group'] is not None: # noqa: E501 + if local_var_params.get('int64_group') is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1871,8 +1859,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('param') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -2014,12 +2001,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 - local_var_params['param2'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('param2') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -2180,24 +2165,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 - local_var_params['ioutil'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 - local_var_params['http'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 - local_var_params['url'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 - local_var_params['context'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('context') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -2205,19 +2185,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['ioutil'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['http'] is not None: # noqa: E501 + if local_var_params.get('http') is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'ssv' # noqa: E501 - if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['context'] is not None: # noqa: E501 + if local_var_params.get('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_tags123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags123_api.py index 9934eee07539..7dd05dd2d3dc 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags123_api.py @@ -128,8 +128,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 da2a084682b1..b2cf9e3641cd 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 @@ -126,8 +126,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -269,8 +268,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -403,8 +401,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('status') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -412,7 +409,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + if local_var_params.get('status') is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -543,8 +540,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('tags') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -552,7 +548,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + if local_var_params.get('tags') is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -683,8 +679,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -821,8 +816,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -969,8 +963,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -1121,8 +1114,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -1279,12 +1271,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 93566fdb1d6e..4fa17d350ebf 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 @@ -128,8 +128,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -387,8 +386,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # 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 @@ -529,8 +527,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 550d852e0c2d..29e66939d737 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 @@ -128,8 +128,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -258,8 +257,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -388,8 +386,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -520,8 +517,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -650,8 +646,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -793,12 +788,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 - local_var_params['password'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('password') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -806,9 +799,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 + if local_var_params.get('username') is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 + if local_var_params.get('password') is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1062,12 +1055,10 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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/models/model_200_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/model_200_response.py new file mode 100644 index 000000000000..96498ac6b1df --- /dev/null +++ b/samples/client/petstore/python-asyncio/petstore_api/models/model_200_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from petstore_api.configuration import Configuration + + +class Model_200Response(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'int', + '_class': 'str' + } + + attribute_map = { + 'name': 'name', + '_class': 'class' + } + + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 + """Model_200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self.__class = None + self.discriminator = None + + if name is not None: + self.name = name + if _class is not None: + self._class = _class + + @property + def name(self): + """Gets the name of this Model_200Response. # noqa: E501 + + + :return: The name of this Model_200Response. # noqa: E501 + :rtype: int + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Model_200Response. + + + :param name: The name of this Model_200Response. # noqa: E501 + :type name: int + """ + + self._name = name + + @property + def _class(self): + """Gets the _class of this Model_200Response. # noqa: E501 + + + :return: The _class of this Model_200Response. # noqa: E501 + :rtype: str + """ + return self.__class + + @_class.setter + def _class(self, _class): + """Sets the _class of this Model_200Response. + + + :param _class: The _class of this Model_200Response. # noqa: E501 + :type _class: str + """ + + self.__class = _class + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Model_200Response): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Model_200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/test/test_model_200_response.py b/samples/client/petstore/python-asyncio/test/test_model_200_response.py new file mode 100644 index 000000000000..314ee5e3dde6 --- /dev/null +++ b/samples/client/petstore/python-asyncio/test/test_model_200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import petstore_api +from petstore_api.models.model_200_response import Model_200Response # noqa: E501 +from petstore_api.rest import ApiException + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Model_200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = petstore_api.models.model_200_response.Model_200Response() # noqa: E501 + if include_optional : + return Model_200Response( + name = 56, + _class = '' + ) + else : + return Model_200Response( + ) + + def testModel_200Response(self): + """Test Model_200Response""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python-legacy/docs/Model_200Response.md b/samples/client/petstore/python-legacy/docs/Model_200Response.md new file mode 100644 index 000000000000..4fd119d12515 --- /dev/null +++ b/samples/client/petstore/python-legacy/docs/Model_200Response.md @@ -0,0 +1,13 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **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-legacy/docs/Model_Return.md b/samples/client/petstore/python-legacy/docs/Model_Return.md new file mode 100644 index 000000000000..674c441551b3 --- /dev/null +++ b/samples/client/petstore/python-legacy/docs/Model_Return.md @@ -0,0 +1,12 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py index 9f56ecf401d5..8719c9511f17 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py @@ -128,8 +128,7 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/fake_api.py b/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py index 24fe364a0bde..d76ff0a0676c 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py @@ -128,8 +128,7 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('xml_item') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -804,8 +803,7 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -947,12 +945,10 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -960,7 +956,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 + if local_var_params.get('query') is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1093,8 +1089,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -1304,20 +1299,16 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 - local_var_params['double'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 - local_var_params['byte'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('byte') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 @@ -1550,14 +1541,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_string'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_integer'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_double'] is not None: # noqa: E501 + if local_var_params.get('enum_query_double') is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1723,16 +1714,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 = {} @@ -1740,13 +1728,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['required_int64_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['int64_group'] is not None: # noqa: E501 + if local_var_params.get('int64_group') is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1871,8 +1859,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('param') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -2014,12 +2001,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 - local_var_params['param2'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('param2') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -2180,24 +2165,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 - local_var_params['ioutil'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 - local_var_params['http'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 - local_var_params['url'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 - local_var_params['context'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('context') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -2205,19 +2185,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['ioutil'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['http'] is not None: # noqa: E501 + if local_var_params.get('http') is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'ssv' # noqa: E501 - if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['context'] is not None: # noqa: E501 + if local_var_params.get('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-legacy/petstore_api/api/fake_classname_tags123_api.py b/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py index 9934eee07539..7dd05dd2d3dc 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py @@ -128,8 +128,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/pet_api.py b/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py index da2a084682b1..b2cf9e3641cd 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -126,8 +126,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -269,8 +268,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -403,8 +401,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('status') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -412,7 +409,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + if local_var_params.get('status') is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -543,8 +540,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('tags') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -552,7 +548,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + if local_var_params.get('tags') is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -683,8 +679,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -821,8 +816,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -969,8 +963,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -1121,8 +1114,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -1279,12 +1271,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/store_api.py b/samples/client/petstore/python-legacy/petstore_api/api/store_api.py index 93566fdb1d6e..4fa17d350ebf 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/store_api.py @@ -128,8 +128,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -387,8 +386,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # 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 @@ -529,8 +527,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/user_api.py b/samples/client/petstore/python-legacy/petstore_api/api/user_api.py index 550d852e0c2d..29e66939d737 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/user_api.py @@ -128,8 +128,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -258,8 +257,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -388,8 +386,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -520,8 +517,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -650,8 +646,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -793,12 +788,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 - local_var_params['password'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('password') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -806,9 +799,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 + if local_var_params.get('username') is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 + if local_var_params.get('password') is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1062,12 +1055,10 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/models/model_200_response.py b/samples/client/petstore/python-legacy/petstore_api/models/model_200_response.py new file mode 100644 index 000000000000..96498ac6b1df --- /dev/null +++ b/samples/client/petstore/python-legacy/petstore_api/models/model_200_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from petstore_api.configuration import Configuration + + +class Model_200Response(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'int', + '_class': 'str' + } + + attribute_map = { + 'name': 'name', + '_class': 'class' + } + + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 + """Model_200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self.__class = None + self.discriminator = None + + if name is not None: + self.name = name + if _class is not None: + self._class = _class + + @property + def name(self): + """Gets the name of this Model_200Response. # noqa: E501 + + + :return: The name of this Model_200Response. # noqa: E501 + :rtype: int + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Model_200Response. + + + :param name: The name of this Model_200Response. # noqa: E501 + :type name: int + """ + + self._name = name + + @property + def _class(self): + """Gets the _class of this Model_200Response. # noqa: E501 + + + :return: The _class of this Model_200Response. # noqa: E501 + :rtype: str + """ + return self.__class + + @_class.setter + def _class(self, _class): + """Sets the _class of this Model_200Response. + + + :param _class: The _class of this Model_200Response. # noqa: E501 + :type _class: str + """ + + self.__class = _class + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Model_200Response): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Model_200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-legacy/test/test_model_200_response.py b/samples/client/petstore/python-legacy/test/test_model_200_response.py new file mode 100644 index 000000000000..314ee5e3dde6 --- /dev/null +++ b/samples/client/petstore/python-legacy/test/test_model_200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import petstore_api +from petstore_api.models.model_200_response import Model_200Response # noqa: E501 +from petstore_api.rest import ApiException + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Model_200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = petstore_api.models.model_200_response.Model_200Response() # noqa: E501 + if include_optional : + return Model_200Response( + name = 56, + _class = '' + ) + else : + return Model_200Response( + ) + + def testModel_200Response(self): + """Test Model_200Response""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python-tornado/docs/Model_200Response.md b/samples/client/petstore/python-tornado/docs/Model_200Response.md new file mode 100644 index 000000000000..4fd119d12515 --- /dev/null +++ b/samples/client/petstore/python-tornado/docs/Model_200Response.md @@ -0,0 +1,13 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **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/docs/Model_Return.md b/samples/client/petstore/python-tornado/docs/Model_Return.md new file mode 100644 index 000000000000..674c441551b3 --- /dev/null +++ b/samples/client/petstore/python-tornado/docs/Model_Return.md @@ -0,0 +1,12 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index 9f56ecf401d5..8719c9511f17 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 @@ -128,8 +128,7 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 24fe364a0bde..d76ff0a0676c 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 @@ -128,8 +128,7 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('xml_item') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -804,8 +803,7 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -947,12 +945,10 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -960,7 +956,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 + if local_var_params.get('query') is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1093,8 +1089,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -1304,20 +1299,16 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 - local_var_params['double'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 - local_var_params['byte'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('byte') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 @@ -1550,14 +1541,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_string'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_integer'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_double'] is not None: # noqa: E501 + if local_var_params.get('enum_query_double') is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1723,16 +1714,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 = {} @@ -1740,13 +1728,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['required_int64_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['int64_group'] is not None: # noqa: E501 + if local_var_params.get('int64_group') is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1871,8 +1859,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('param') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -2014,12 +2001,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 - local_var_params['param2'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('param2') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -2180,24 +2165,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 - local_var_params['ioutil'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 - local_var_params['http'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 - local_var_params['url'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 - local_var_params['context'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('context') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -2205,19 +2185,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['ioutil'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['http'] is not None: # noqa: E501 + if local_var_params.get('http') is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'ssv' # noqa: E501 - if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['context'] is not None: # noqa: E501 + if local_var_params.get('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_tags123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags123_api.py index 9934eee07539..7dd05dd2d3dc 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags123_api.py @@ -128,8 +128,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 da2a084682b1..b2cf9e3641cd 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 @@ -126,8 +126,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -269,8 +268,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -403,8 +401,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('status') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -412,7 +409,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + if local_var_params.get('status') is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -543,8 +540,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('tags') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -552,7 +548,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + if local_var_params.get('tags') is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -683,8 +679,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -821,8 +816,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -969,8 +963,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -1121,8 +1114,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -1279,12 +1271,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 93566fdb1d6e..4fa17d350ebf 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 @@ -128,8 +128,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -387,8 +386,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # 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 @@ -529,8 +527,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 550d852e0c2d..29e66939d737 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 @@ -128,8 +128,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -258,8 +257,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -388,8 +386,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -520,8 +517,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -650,8 +646,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -793,12 +788,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 - local_var_params['password'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('password') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -806,9 +799,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 + if local_var_params.get('username') is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 + if local_var_params.get('password') is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1062,12 +1055,10 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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/models/model_200_response.py b/samples/client/petstore/python-tornado/petstore_api/models/model_200_response.py new file mode 100644 index 000000000000..96498ac6b1df --- /dev/null +++ b/samples/client/petstore/python-tornado/petstore_api/models/model_200_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from petstore_api.configuration import Configuration + + +class Model_200Response(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'int', + '_class': 'str' + } + + attribute_map = { + 'name': 'name', + '_class': 'class' + } + + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 + """Model_200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self.__class = None + self.discriminator = None + + if name is not None: + self.name = name + if _class is not None: + self._class = _class + + @property + def name(self): + """Gets the name of this Model_200Response. # noqa: E501 + + + :return: The name of this Model_200Response. # noqa: E501 + :rtype: int + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Model_200Response. + + + :param name: The name of this Model_200Response. # noqa: E501 + :type name: int + """ + + self._name = name + + @property + def _class(self): + """Gets the _class of this Model_200Response. # noqa: E501 + + + :return: The _class of this Model_200Response. # noqa: E501 + :rtype: str + """ + return self.__class + + @_class.setter + def _class(self, _class): + """Sets the _class of this Model_200Response. + + + :param _class: The _class of this Model_200Response. # noqa: E501 + :type _class: str + """ + + self.__class = _class + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Model_200Response): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Model_200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/test/test_model_200_response.py b/samples/client/petstore/python-tornado/test/test_model_200_response.py new file mode 100644 index 000000000000..314ee5e3dde6 --- /dev/null +++ b/samples/client/petstore/python-tornado/test/test_model_200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import petstore_api +from petstore_api.models.model_200_response import Model_200Response # noqa: E501 +from petstore_api.rest import ApiException + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Model_200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = petstore_api.models.model_200_response.Model_200Response() # noqa: E501 + if include_optional : + return Model_200Response( + name = 56, + _class = '' + ) + else : + return Model_200Response( + ) + + def testModel_200Response(self): + """Test Model_200Response""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/.openapi-generator/FILES b/samples/client/petstore/python/.openapi-generator/FILES index 417028fbd1f8..9ea159533683 100644 --- a/samples/client/petstore/python/.openapi-generator/FILES +++ b/samples/client/petstore/python/.openapi-generator/FILES @@ -60,12 +60,19 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Player.md +docs/Polygon.md +docs/PolygonAllOf.md docs/ReadOnlyFirst.md +docs/Shape.md docs/SpecialModelName.md +docs/Square.md +docs/SquareAllOf.md docs/StoreApi.md docs/StringBooleanMap.md docs/StringEnum.md docs/Tag.md +docs/Triangle.md +docs/TriangleAllOf.md docs/TypeHolderDefault.md docs/TypeHolderExample.md docs/User.md @@ -139,11 +146,18 @@ petstore_api/model/parent_all_of.py petstore_api/model/parent_pet.py petstore_api/model/pet.py petstore_api/model/player.py +petstore_api/model/polygon.py +petstore_api/model/polygon_all_of.py petstore_api/model/read_only_first.py +petstore_api/model/shape.py petstore_api/model/special_model_name.py +petstore_api/model/square.py +petstore_api/model/square_all_of.py petstore_api/model/string_boolean_map.py petstore_api/model/string_enum.py petstore_api/model/tag.py +petstore_api/model/triangle.py +petstore_api/model/triangle_all_of.py petstore_api/model/type_holder_default.py petstore_api/model/type_holder_example.py petstore_api/model/user.py diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 8e57b995b3ec..4b34d32b616d 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -178,11 +178,18 @@ Class | Method | HTTP request | Description - [ParentPet](docs/ParentPet.md) - [Pet](docs/Pet.md) - [Player](docs/Player.md) + - [Polygon](docs/Polygon.md) + - [PolygonAllOf](docs/PolygonAllOf.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Shape](docs/Shape.md) - [SpecialModelName](docs/SpecialModelName.md) + - [Square](docs/Square.md) + - [SquareAllOf](docs/SquareAllOf.md) - [StringBooleanMap](docs/StringBooleanMap.md) - [StringEnum](docs/StringEnum.md) - [Tag](docs/Tag.md) + - [Triangle](docs/Triangle.md) + - [TriangleAllOf](docs/TriangleAllOf.md) - [TypeHolderDefault](docs/TypeHolderDefault.md) - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) diff --git a/samples/client/petstore/python/docs/Model_200Response.md b/samples/client/petstore/python/docs/Model_200Response.md new file mode 100644 index 000000000000..3d5777b2b108 --- /dev/null +++ b/samples/client/petstore/python/docs/Model_200Response.md @@ -0,0 +1,14 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/Model_Return.md b/samples/client/petstore/python/docs/Model_Return.md new file mode 100644 index 000000000000..d9c1a2d8119b --- /dev/null +++ b/samples/client/petstore/python/docs/Model_Return.md @@ -0,0 +1,13 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/Polygon.md b/samples/client/petstore/python/docs/Polygon.md new file mode 100644 index 000000000000..586c509a41e5 --- /dev/null +++ b/samples/client/petstore/python/docs/Polygon.md @@ -0,0 +1,14 @@ +# Polygon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**area** | **str** | | [optional] +**sides** | **int** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/PolygonAllOf.md b/samples/client/petstore/python/docs/PolygonAllOf.md new file mode 100644 index 000000000000..66548f78b747 --- /dev/null +++ b/samples/client/petstore/python/docs/PolygonAllOf.md @@ -0,0 +1,14 @@ +# PolygonAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**sides** | **int** | | [optional] +**area** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/Shape.md b/samples/client/petstore/python/docs/Shape.md new file mode 100644 index 000000000000..520db56a6fc5 --- /dev/null +++ b/samples/client/petstore/python/docs/Shape.md @@ -0,0 +1,13 @@ +# Shape + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**area** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/Square.md b/samples/client/petstore/python/docs/Square.md new file mode 100644 index 000000000000..901633cc6a40 --- /dev/null +++ b/samples/client/petstore/python/docs/Square.md @@ -0,0 +1,14 @@ +# Square + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | defaults to "Square" +**area** | **str** | | [optional] +**sides** | **int** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/SquareAllOf.md b/samples/client/petstore/python/docs/SquareAllOf.md new file mode 100644 index 000000000000..ad9520092db4 --- /dev/null +++ b/samples/client/petstore/python/docs/SquareAllOf.md @@ -0,0 +1,14 @@ +# SquareAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] if omitted the server will use the default value of "Square" +**sides** | **int** | | [optional] +**area** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/Triangle.md b/samples/client/petstore/python/docs/Triangle.md new file mode 100644 index 000000000000..28f18053371d --- /dev/null +++ b/samples/client/petstore/python/docs/Triangle.md @@ -0,0 +1,14 @@ +# Triangle + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | defaults to "Triangle" +**area** | **str** | | [optional] +**sides** | **int** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/docs/TriangleAllOf.md b/samples/client/petstore/python/docs/TriangleAllOf.md new file mode 100644 index 000000000000..44b8c0581cc1 --- /dev/null +++ b/samples/client/petstore/python/docs/TriangleAllOf.md @@ -0,0 +1,14 @@ +# TriangleAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] if omitted the server will use the default value of "Triangle" +**sides** | **int** | | [optional] +**area** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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 093a4ca6a337..d54ded04e311 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 @@ -129,6 +129,10 @@ def call_123_test_special_tags( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -160,6 +164,7 @@ def call_123_test_special_tags( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs) 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 f630549347fc..98536575b077 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -1142,6 +1142,10 @@ def array_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1173,6 +1177,7 @@ def array_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.array_model_endpoint.call_with_http_info(**kwargs) def boolean( @@ -1216,6 +1221,10 @@ def boolean( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1247,6 +1256,7 @@ def boolean( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.boolean_endpoint.call_with_http_info(**kwargs) def create_xml_item( @@ -1292,6 +1302,10 @@ def create_xml_item( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1323,6 +1337,7 @@ def create_xml_item( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['xml_item'] = \ xml_item return self.create_xml_item_endpoint.call_with_http_info(**kwargs) @@ -1368,6 +1383,10 @@ def number_with_validations( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1399,6 +1418,7 @@ def number_with_validations( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.number_with_validations_endpoint.call_with_http_info(**kwargs) def object_model_with_ref_props( @@ -1442,6 +1462,10 @@ def object_model_with_ref_props( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1473,6 +1497,7 @@ def object_model_with_ref_props( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.object_model_with_ref_props_endpoint.call_with_http_info(**kwargs) def string( @@ -1516,6 +1541,10 @@ def string( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1547,6 +1576,7 @@ def string( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.string_endpoint.call_with_http_info(**kwargs) def string_enum( @@ -1590,6 +1620,10 @@ def string_enum( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1621,6 +1655,7 @@ def string_enum( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.string_enum_endpoint.call_with_http_info(**kwargs) def test_body_with_file_schema( @@ -1666,6 +1701,10 @@ def test_body_with_file_schema( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1697,6 +1736,7 @@ def test_body_with_file_schema( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.test_body_with_file_schema_endpoint.call_with_http_info(**kwargs) @@ -1745,6 +1785,10 @@ def test_body_with_query_params( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1776,6 +1820,7 @@ def test_body_with_query_params( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['query'] = \ query kwargs['body'] = \ @@ -1825,6 +1870,10 @@ def test_client_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1856,6 +1905,7 @@ def test_client_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.test_client_model_endpoint.call_with_http_info(**kwargs) @@ -1911,6 +1961,10 @@ def test_endpoint_enums_length_one( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1942,6 +1996,7 @@ def test_endpoint_enums_length_one( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['query_integer'] = \ query_integer kwargs['query_string'] = \ @@ -2013,6 +2068,10 @@ def test_endpoint_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2044,6 +2103,7 @@ def test_endpoint_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['number'] = \ number kwargs['double'] = \ @@ -2102,6 +2162,10 @@ def test_enum_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2133,6 +2197,7 @@ def test_enum_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.test_enum_parameters_endpoint.call_with_http_info(**kwargs) def test_group_parameters( @@ -2185,6 +2250,10 @@ def test_group_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2216,6 +2285,7 @@ def test_group_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['required_string_group'] = \ required_string_group kwargs['required_boolean_group'] = \ @@ -2266,6 +2336,10 @@ def test_inline_additional_properties( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2297,6 +2371,7 @@ def test_inline_additional_properties( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['param'] = \ param return self.test_inline_additional_properties_endpoint.call_with_http_info(**kwargs) @@ -2345,6 +2420,10 @@ def test_json_form_data( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2376,6 +2455,7 @@ def test_json_form_data( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['param'] = \ param kwargs['param2'] = \ diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py index 70b4a535a815..e6abced84092 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py @@ -131,6 +131,10 @@ def test_classname( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -162,6 +166,7 @@ def test_classname( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.test_classname_endpoint.call_with_http_info(**kwargs) 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 70b4a535a815..69537296f488 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 @@ -131,6 +131,10 @@ def test_classname( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auth (dict): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -162,6 +166,7 @@ def test_classname( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auth'] = kwargs.get('_request_auth', None) kwargs['body'] = \ body return self.test_classname_endpoint.call_with_http_info(**kwargs) 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 290bf04cf1ee..af164a6ce79c 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -594,6 +594,10 @@ def add_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -625,6 +629,7 @@ def add_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.add_pet_endpoint.call_with_http_info(**kwargs) @@ -672,6 +677,10 @@ def delete_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -703,6 +712,7 @@ def delete_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.delete_pet_endpoint.call_with_http_info(**kwargs) @@ -750,6 +760,10 @@ def find_pets_by_status( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -781,6 +795,7 @@ def find_pets_by_status( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['status'] = \ status return self.find_pets_by_status_endpoint.call_with_http_info(**kwargs) @@ -828,6 +843,10 @@ def find_pets_by_tags( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -859,6 +878,7 @@ def find_pets_by_tags( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['tags'] = \ tags return self.find_pets_by_tags_endpoint.call_with_http_info(**kwargs) @@ -906,6 +926,10 @@ def get_pet_by_id( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -937,6 +961,7 @@ def get_pet_by_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.get_pet_by_id_endpoint.call_with_http_info(**kwargs) @@ -983,6 +1008,10 @@ def update_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1014,6 +1043,7 @@ def update_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.update_pet_endpoint.call_with_http_info(**kwargs) @@ -1062,6 +1092,10 @@ def update_pet_with_form( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1093,6 +1127,7 @@ def update_pet_with_form( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.update_pet_with_form_endpoint.call_with_http_info(**kwargs) @@ -1142,6 +1177,10 @@ def upload_file( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1173,6 +1212,7 @@ def upload_file( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.upload_file_endpoint.call_with_http_info(**kwargs) @@ -1222,6 +1262,10 @@ def upload_file_with_required_file( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1253,6 +1297,7 @@ def upload_file_with_required_file( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id kwargs['required_file'] = \ 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 a1172b1f10e5..98e47ccdf869 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -275,6 +275,10 @@ def delete_order( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -306,6 +310,7 @@ def delete_order( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order_id'] = \ order_id return self.delete_order_endpoint.call_with_http_info(**kwargs) @@ -350,6 +355,10 @@ def get_inventory( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -381,6 +390,7 @@ def get_inventory( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.get_inventory_endpoint.call_with_http_info(**kwargs) def get_order_by_id( @@ -426,6 +436,10 @@ def get_order_by_id( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -457,6 +471,7 @@ def get_order_by_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order_id'] = \ order_id return self.get_order_by_id_endpoint.call_with_http_info(**kwargs) @@ -503,6 +518,10 @@ def place_order( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -534,6 +553,7 @@ def place_order( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.place_order_endpoint.call_with_http_info(**kwargs) 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 6eabc2a0a015..5f3964342921 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -462,6 +462,10 @@ def create_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -493,6 +497,7 @@ def create_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.create_user_endpoint.call_with_http_info(**kwargs) @@ -539,6 +544,10 @@ def create_users_with_array_input( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -570,6 +579,7 @@ def create_users_with_array_input( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.create_users_with_array_input_endpoint.call_with_http_info(**kwargs) @@ -616,6 +626,10 @@ def create_users_with_list_input( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -647,6 +661,7 @@ def create_users_with_list_input( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.create_users_with_list_input_endpoint.call_with_http_info(**kwargs) @@ -694,6 +709,10 @@ def delete_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -725,6 +744,7 @@ def delete_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username return self.delete_user_endpoint.call_with_http_info(**kwargs) @@ -771,6 +791,10 @@ def get_user_by_name( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -802,6 +826,7 @@ def get_user_by_name( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username return self.get_user_by_name_endpoint.call_with_http_info(**kwargs) @@ -850,6 +875,10 @@ def login_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -881,6 +910,7 @@ def login_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username kwargs['password'] = \ @@ -926,6 +956,10 @@ def logout_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -957,6 +991,7 @@ def logout_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.logout_user_endpoint.call_with_http_info(**kwargs) def update_user( @@ -1004,6 +1039,10 @@ def update_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1035,6 +1074,7 @@ def update_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username kwargs['body'] = \ diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index da37b066d3a3..e283cf092d71 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -132,7 +132,8 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -182,7 +183,8 @@ def __call_api( # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -350,7 +352,8 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -398,6 +401,10 @@ def call_api( :param _check_type: boolean describing if the data back from the server should have its type checked. :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -412,7 +419,7 @@ def call_api( response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -425,7 +432,7 @@ def call_api( collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -597,7 +604,7 @@ def select_header_content_type(self, content_types, method=None, body=None): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -607,24 +614,34 @@ def update_params_for_auth(self, headers, queries, auth_settings, :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -674,7 +691,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -689,7 +707,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -864,4 +883,5 @@ def call_with_http_info(self, **kwargs): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python/petstore_api/apis/__init__.py b/samples/client/petstore/python/petstore_api/apis/__init__.py index 302dcf25c447..5ccd49eec8e0 100644 --- a/samples/client/petstore/python/petstore_api/apis/__init__.py +++ b/samples/client/petstore/python/petstore_api/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.another_fake_api import AnotherFakeApi +# from petstore_api.api.another_fake_api import AnotherFakeApi # # or import this package, but before doing it, use: # diff --git a/samples/client/petstore/python/petstore_api/exceptions.py b/samples/client/petstore/python/petstore_api/exceptions.py index 51527f606112..b0c764b6cbea 100644 --- a/samples/client/petstore/python/petstore_api/exceptions.py +++ b/samples/client/petstore/python/petstore_api/exceptions.py @@ -112,7 +112,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py b/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py index d98c15e0abb3..2d0c78c0ae19 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_array.py b/samples/client/petstore/python/petstore_api/model/additional_properties_array.py index c45c5af7f1f1..462219270afc 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_array.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_array.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py b/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py index de4abb39d434..7f3132131878 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/client/petstore/python/petstore_api/model/additional_properties_class.py index ae112087fcc8..451ef48c59b6 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_class.py @@ -168,7 +168,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -176,14 +176,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -266,14 +270,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py b/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py index cab715522292..880a80c1a868 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_number.py b/samples/client/petstore/python/petstore_api/model/additional_properties_number.py index 5a9b0c623ab5..79b1fc5e219f 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_number.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_number.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_object.py b/samples/client/petstore/python/petstore_api/model/additional_properties_object.py index 908865783525..f7afe571d71b 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_object.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_object.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_string.py b/samples/client/petstore/python/petstore_api/model/additional_properties_string.py index 07394244c688..c7dff4d382f4 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_string.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_string.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/animal.py b/samples/client/petstore/python/petstore_api/model/animal.py index ffcbc727b3be..cc35f796ed49 100644 --- a/samples/client/petstore/python/petstore_api/model/animal.py +++ b/samples/client/petstore/python/petstore_api/model/animal.py @@ -157,7 +157,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -165,14 +165,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -249,14 +253,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/animal_farm.py b/samples/client/petstore/python/petstore_api/model/animal_farm.py index 0cca3901cb37..89062cff69cb 100644 --- a/samples/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/client/petstore/python/petstore_api/model/animal_farm.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/api_response.py b/samples/client/petstore/python/petstore_api/model/api_response.py index ed202b6bdcca..5e21cdaf5988 100644 --- a/samples/client/petstore/python/petstore_api/model/api_response.py +++ b/samples/client/petstore/python/petstore_api/model/api_response.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -234,14 +238,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py index 39a76641c6d5..41e90e2ae966 100644 --- a/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/client/petstore/python/petstore_api/model/array_of_number_only.py index 73abf32b511f..068dc80b1a90 100644 --- a/samples/client/petstore/python/petstore_api/model/array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/model/array_of_number_only.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/array_test.py b/samples/client/petstore/python/petstore_api/model/array_test.py index fc4e6c345375..119a5ad1fdd0 100644 --- a/samples/client/petstore/python/petstore_api/model/array_test.py +++ b/samples/client/petstore/python/petstore_api/model/array_test.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/capitalization.py b/samples/client/petstore/python/petstore_api/model/capitalization.py index d5d7202f9af1..d57e30d2c85e 100644 --- a/samples/client/petstore/python/petstore_api/model/capitalization.py +++ b/samples/client/petstore/python/petstore_api/model/capitalization.py @@ -153,7 +153,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/cat.py b/samples/client/petstore/python/petstore_api/model/cat.py index 2764c714e13f..ee6854b119bc 100644 --- a/samples/client/petstore/python/petstore_api/model/cat.py +++ b/samples/client/petstore/python/petstore_api/model/cat.py @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -261,14 +265,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/cat_all_of.py b/samples/client/petstore/python/petstore_api/model/cat_all_of.py index 0fa2471efddc..f4e32d0b736a 100644 --- a/samples/client/petstore/python/petstore_api/model/cat_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/cat_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/category.py b/samples/client/petstore/python/petstore_api/model/category.py index b4557487e022..21fb7bd65b51 100644 --- a/samples/client/petstore/python/petstore_api/model/category.py +++ b/samples/client/petstore/python/petstore_api/model/category.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 name = kwargs.get('name', "default-name") _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -237,14 +241,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child.py b/samples/client/petstore/python/petstore_api/model/child.py index 23ef528ea748..e612dd923a23 100644 --- a/samples/client/petstore/python/petstore_api/model/child.py +++ b/samples/client/petstore/python/petstore_api/model/child.py @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -258,14 +262,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_all_of.py b/samples/client/petstore/python/petstore_api/model/child_all_of.py index 148fa59f6445..c54ff66da748 100644 --- a/samples/client/petstore/python/petstore_api/model/child_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_cat.py b/samples/client/petstore/python/petstore_api/model/child_cat.py index 5fd213c0ce9d..6d971fd192aa 100644 --- a/samples/client/petstore/python/petstore_api/model/child_cat.py +++ b/samples/client/petstore/python/petstore_api/model/child_cat.py @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -257,14 +261,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py b/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py index 21c3ac606b2b..92d2a18ab707 100644 --- a/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_dog.py b/samples/client/petstore/python/petstore_api/model/child_dog.py index d49a0fc295c2..b7b0c98c76b6 100644 --- a/samples/client/petstore/python/petstore_api/model/child_dog.py +++ b/samples/client/petstore/python/petstore_api/model/child_dog.py @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -257,14 +261,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py b/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py index e753ba145383..20d3d434d95c 100644 --- a/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_lizard.py b/samples/client/petstore/python/petstore_api/model/child_lizard.py index f714f3d1f909..37de49d0b1ae 100644 --- a/samples/client/petstore/python/petstore_api/model/child_lizard.py +++ b/samples/client/petstore/python/petstore_api/model/child_lizard.py @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -257,14 +261,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py b/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py index fe6896926bb3..28705f2c41f4 100644 --- a/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/class_model.py b/samples/client/petstore/python/petstore_api/model/class_model.py index d73e8f42ef7f..cbbd0ff1e81c 100644 --- a/samples/client/petstore/python/petstore_api/model/class_model.py +++ b/samples/client/petstore/python/petstore_api/model/class_model.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/client.py b/samples/client/petstore/python/petstore_api/model/client.py index 091a06051333..82c5a6ed6bb4 100644 --- a/samples/client/petstore/python/petstore_api/model/client.py +++ b/samples/client/petstore/python/petstore_api/model/client.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/dog.py b/samples/client/petstore/python/petstore_api/model/dog.py index c213921a2276..2a18fc5493ee 100644 --- a/samples/client/petstore/python/petstore_api/model/dog.py +++ b/samples/client/petstore/python/petstore_api/model/dog.py @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -261,14 +265,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/dog_all_of.py b/samples/client/petstore/python/petstore_api/model/dog_all_of.py index 967558a7de88..cbb9083244a2 100644 --- a/samples/client/petstore/python/petstore_api/model/dog_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/dog_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/client/petstore/python/petstore_api/model/enum_arrays.py index 56b055e4a517..65b981ab7be3 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_arrays.py +++ b/samples/client/petstore/python/petstore_api/model/enum_arrays.py @@ -149,7 +149,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -157,14 +157,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -238,14 +242,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/enum_class.py b/samples/client/petstore/python/petstore_api/model/enum_class.py index 476d3da6587e..bf9b682bd05d 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_class.py +++ b/samples/client/petstore/python/petstore_api/model/enum_class.py @@ -158,14 +158,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/enum_test.py b/samples/client/petstore/python/petstore_api/model/enum_test.py index 7ba923a9959b..8cef5c659c6c 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_test.py +++ b/samples/client/petstore/python/petstore_api/model/enum_test.py @@ -176,7 +176,7 @@ def _from_openapi_data(cls, enum_string_required, *args, **kwargs): # noqa: E50 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -184,14 +184,18 @@ def _from_openapi_data(cls, enum_string_required, *args, **kwargs): # noqa: E50 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -271,14 +275,18 @@ def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/file.py b/samples/client/petstore/python/petstore_api/model/file.py index 90ebbacfefe9..6d8d65f45752 100644 --- a/samples/client/petstore/python/petstore_api/model/file.py +++ b/samples/client/petstore/python/petstore_api/model/file.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py index 4dcd9995d8aa..d8db617ffa80 100644 --- a/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py +++ b/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py @@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -236,14 +240,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/format_test.py b/samples/client/petstore/python/petstore_api/model/format_test.py index 43c1c21afa8a..64b7ce721d97 100644 --- a/samples/client/petstore/python/petstore_api/model/format_test.py +++ b/samples/client/petstore/python/petstore_api/model/format_test.py @@ -211,7 +211,7 @@ def _from_openapi_data(cls, number, byte, date, password, *args, **kwargs): # n """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -219,14 +219,18 @@ def _from_openapi_data(cls, number, byte, date, password, *args, **kwargs): # n self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -317,14 +321,18 @@ def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/grandparent.py b/samples/client/petstore/python/petstore_api/model/grandparent.py index c3260576e4ba..0650a4ef7e39 100644 --- a/samples/client/petstore/python/petstore_api/model/grandparent.py +++ b/samples/client/petstore/python/petstore_api/model/grandparent.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/client/petstore/python/petstore_api/model/grandparent_animal.py index d57f18a695d1..fa467e99b34c 100644 --- a/samples/client/petstore/python/petstore_api/model/grandparent_animal.py +++ b/samples/client/petstore/python/petstore_api/model/grandparent_animal.py @@ -160,7 +160,7 @@ def _from_openapi_data(cls, pet_type, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -168,14 +168,18 @@ def _from_openapi_data(cls, pet_type, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -251,14 +255,18 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/client/petstore/python/petstore_api/model/has_only_read_only.py index 967d83544cd8..1ccc67be07a1 100644 --- a/samples/client/petstore/python/petstore_api/model/has_only_read_only.py +++ b/samples/client/petstore/python/petstore_api/model/has_only_read_only.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -232,14 +236,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/list.py b/samples/client/petstore/python/petstore_api/model/list.py index f22e79bdde21..1dfa33efc320 100644 --- a/samples/client/petstore/python/petstore_api/model/list.py +++ b/samples/client/petstore/python/petstore_api/model/list.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/map_test.py b/samples/client/petstore/python/petstore_api/model/map_test.py index 5ffaa783df3a..eccf9c9e610c 100644 --- a/samples/client/petstore/python/petstore_api/model/map_test.py +++ b/samples/client/petstore/python/petstore_api/model/map_test.py @@ -157,7 +157,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -165,14 +165,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -248,14 +252,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py index 780a112d2439..4d825b8dd46d 100644 --- a/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/model200_response.py b/samples/client/petstore/python/petstore_api/model/model200_response.py index 4fda496353e3..9bebea2423fd 100644 --- a/samples/client/petstore/python/petstore_api/model/model200_response.py +++ b/samples/client/petstore/python/petstore_api/model/model200_response.py @@ -141,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -149,14 +149,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -230,14 +234,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/model_200_response.py b/samples/client/petstore/python/petstore_api/model/model_200_response.py new file mode 100644 index 000000000000..d2f97900d188 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/model_200_response.py @@ -0,0 +1,267 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class Model_200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (int,), # noqa: E501 + '_class': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + '_class': 'class', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Model_200Response - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Model_200Response - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python/petstore_api/model/model_return.py b/samples/client/petstore/python/petstore_api/model/model_return.py index ed436bd3890a..f3bd5123dd74 100644 --- a/samples/client/petstore/python/petstore_api/model/model_return.py +++ b/samples/client/petstore/python/petstore_api/model/model_return.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/name.py b/samples/client/petstore/python/petstore_api/model/name.py index 65e733099c69..aec8c8b900cb 100644 --- a/samples/client/petstore/python/petstore_api/model/name.py +++ b/samples/client/petstore/python/petstore_api/model/name.py @@ -151,7 +151,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -159,14 +159,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -245,14 +249,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/number_only.py b/samples/client/petstore/python/petstore_api/model/number_only.py index 92d24e178c03..7a586085d7c1 100644 --- a/samples/client/petstore/python/petstore_api/model/number_only.py +++ b/samples/client/petstore/python/petstore_api/model/number_only.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/client/petstore/python/petstore_api/model/number_with_validations.py index d782cb7492a1..ba4e371b4ac0 100644 --- a/samples/client/petstore/python/petstore_api/model/number_with_validations.py +++ b/samples/client/petstore/python/petstore_api/model/number_with_validations.py @@ -161,14 +161,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -253,14 +257,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py index 68142db9a2b8..6058a6381fc0 100644 --- a/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py +++ b/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/order.py b/samples/client/petstore/python/petstore_api/model/order.py index eac0013231d2..98fe0b869760 100644 --- a/samples/client/petstore/python/petstore_api/model/order.py +++ b/samples/client/petstore/python/petstore_api/model/order.py @@ -158,7 +158,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -166,14 +166,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -251,14 +255,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/parent.py b/samples/client/petstore/python/petstore_api/model/parent.py index a4102110d47b..f610698d600d 100644 --- a/samples/client/petstore/python/petstore_api/model/parent.py +++ b/samples/client/petstore/python/petstore_api/model/parent.py @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/parent_all_of.py b/samples/client/petstore/python/petstore_api/model/parent_all_of.py index 2ec9da892e62..ed97f412dd9d 100644 --- a/samples/client/petstore/python/petstore_api/model/parent_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/parent_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/parent_pet.py b/samples/client/petstore/python/petstore_api/model/parent_pet.py index 3a3de6bcec95..9889f4c7a5be 100644 --- a/samples/client/petstore/python/petstore_api/model/parent_pet.py +++ b/samples/client/petstore/python/petstore_api/model/parent_pet.py @@ -163,14 +163,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -261,14 +265,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/pet.py b/samples/client/petstore/python/petstore_api/model/pet.py index 2a33b0889ab1..5eb4041e91d0 100644 --- a/samples/client/petstore/python/petstore_api/model/pet.py +++ b/samples/client/petstore/python/petstore_api/model/pet.py @@ -168,7 +168,7 @@ def _from_openapi_data(cls, name, photo_urls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -176,14 +176,18 @@ def _from_openapi_data(cls, name, photo_urls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -265,14 +269,18 @@ def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/player.py b/samples/client/petstore/python/petstore_api/model/player.py index 84ca922abd37..07894ecfa312 100644 --- a/samples/client/petstore/python/petstore_api/model/player.py +++ b/samples/client/petstore/python/petstore_api/model/player.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -235,14 +239,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/polygon.py b/samples/client/petstore/python/petstore_api/model/polygon.py new file mode 100644 index 000000000000..abe7f5e5ae81 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/polygon.py @@ -0,0 +1,334 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + +def lazy_import(): + from petstore_api.model.polygon_all_of import PolygonAllOf + from petstore_api.model.shape import Shape + globals()['PolygonAllOf'] = PolygonAllOf + globals()['Shape'] = Shape + + +class Polygon(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + 'SQUARE': "Square", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + 'sides': 'sides', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Polygon - a model defined in OpenAPI + + Keyword Args: + type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Polygon - a model defined in OpenAPI + + Keyword Args: + type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + PolygonAllOf, + Shape, + ], + 'oneOf': [ + ], + } diff --git a/samples/client/petstore/python/petstore_api/model/polygon_all_of.py b/samples/client/petstore/python/petstore_api/model/polygon_all_of.py new file mode 100644 index 000000000000..e596e25616af --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/polygon_all_of.py @@ -0,0 +1,281 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class PolygonAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + 'SQUARE': "Square", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'sides': 'sides', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """PolygonAllOf - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """PolygonAllOf - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python/petstore_api/model/read_only_first.py b/samples/client/petstore/python/petstore_api/model/read_only_first.py index bd2a75175ae5..965325c2864d 100644 --- a/samples/client/petstore/python/petstore_api/model/read_only_first.py +++ b/samples/client/petstore/python/petstore_api/model/read_only_first.py @@ -142,7 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -150,14 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/shape.py b/samples/client/petstore/python/petstore_api/model/shape.py new file mode 100644 index 000000000000..6a52a82fef71 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/shape.py @@ -0,0 +1,277 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class Shape(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + 'SQUARE': "Square", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """Shape - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """Shape - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python/petstore_api/model/special_model_name.py b/samples/client/petstore/python/petstore_api/model/special_model_name.py index 9a7743a2a42e..6044e5e10084 100644 --- a/samples/client/petstore/python/petstore_api/model/special_model_name.py +++ b/samples/client/petstore/python/petstore_api/model/special_model_name.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/square.py b/samples/client/petstore/python/petstore_api/model/square.py new file mode 100644 index 000000000000..dd8309f11df4 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/square.py @@ -0,0 +1,335 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + +def lazy_import(): + from petstore_api.model.polygon import Polygon + from petstore_api.model.square_all_of import SquareAllOf + globals()['Polygon'] = Polygon + globals()['SquareAllOf'] = SquareAllOf + + +class Square(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'SQUARE': "Square", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + 'sides': 'sides', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Square - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Square", must be one of ["Square", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Square") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Square - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Square", must be one of ["Square", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Square") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Polygon, + SquareAllOf, + ], + 'oneOf': [ + ], + } diff --git a/samples/client/petstore/python/petstore_api/model/square_all_of.py b/samples/client/petstore/python/petstore_api/model/square_all_of.py new file mode 100644 index 000000000000..414338a77858 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/square_all_of.py @@ -0,0 +1,274 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class SquareAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'SQUARE': "Square", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'sides': 'sides', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SquareAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Square" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SquareAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Square" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python/petstore_api/model/string_boolean_map.py b/samples/client/petstore/python/petstore_api/model/string_boolean_map.py index cb0e03f19e57..52b6f39964bd 100644 --- a/samples/client/petstore/python/petstore_api/model/string_boolean_map.py +++ b/samples/client/petstore/python/petstore_api/model/string_boolean_map.py @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -143,14 +143,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -222,14 +226,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/string_enum.py b/samples/client/petstore/python/petstore_api/model/string_enum.py index de5d86886d7e..5b8b59620b16 100644 --- a/samples/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/client/petstore/python/petstore_api/model/string_enum.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/tag.py b/samples/client/petstore/python/petstore_api/model/tag.py index 512587947dd5..55fc128a7157 100644 --- a/samples/client/petstore/python/petstore_api/model/tag.py +++ b/samples/client/petstore/python/petstore_api/model/tag.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -234,14 +238,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/triangle.py b/samples/client/petstore/python/petstore_api/model/triangle.py new file mode 100644 index 000000000000..3642426ffdd3 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/triangle.py @@ -0,0 +1,335 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + +def lazy_import(): + from petstore_api.model.polygon import Polygon + from petstore_api.model.triangle_all_of import TriangleAllOf + globals()['Polygon'] = Polygon + globals()['TriangleAllOf'] = TriangleAllOf + + +class Triangle(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + 'sides': 'sides', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Triangle - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Triangle", must be one of ["Triangle", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Triangle") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Triangle - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Triangle", must be one of ["Triangle", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Triangle") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Polygon, + TriangleAllOf, + ], + 'oneOf': [ + ], + } diff --git a/samples/client/petstore/python/petstore_api/model/triangle_all_of.py b/samples/client/petstore/python/petstore_api/model/triangle_all_of.py new file mode 100644 index 000000000000..0105c347d412 --- /dev/null +++ b/samples/client/petstore/python/petstore_api/model/triangle_all_of.py @@ -0,0 +1,274 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class TriangleAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'sides': 'sides', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TriangleAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Triangle" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TriangleAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Triangle" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python/petstore_api/model/type_holder_default.py b/samples/client/petstore/python/petstore_api/model/type_holder_default.py index ac3c78a4db2b..bd2a0cc2ec79 100644 --- a/samples/client/petstore/python/petstore_api/model/type_holder_default.py +++ b/samples/client/petstore/python/petstore_api/model/type_holder_default.py @@ -162,7 +162,7 @@ def _from_openapi_data(cls, array_item, *args, **kwargs): # noqa: E501 integer_item = kwargs.get('integer_item', -2) bool_item = kwargs.get('bool_item', True) _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -170,14 +170,18 @@ def _from_openapi_data(cls, array_item, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -267,14 +271,18 @@ def __init__(self, array_item, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/type_holder_example.py b/samples/client/petstore/python/petstore_api/model/type_holder_example.py index c12c79c27bb7..fd90c62f4fd4 100644 --- a/samples/client/petstore/python/petstore_api/model/type_holder_example.py +++ b/samples/client/petstore/python/petstore_api/model/type_holder_example.py @@ -164,7 +164,7 @@ def _from_openapi_data(cls, bool_item, array_item, *args, **kwargs): # noqa: E5 number_item = kwargs.get('number_item', 1.234) integer_item = kwargs.get('integer_item', -2) _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -172,14 +172,18 @@ def _from_openapi_data(cls, bool_item, array_item, *args, **kwargs): # noqa: E5 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -266,14 +270,18 @@ def __init__(self, bool_item, array_item, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/user.py b/samples/client/petstore/python/petstore_api/model/user.py index 3d0bf626cf9b..11f6290223f1 100644 --- a/samples/client/petstore/python/petstore_api/model/user.py +++ b/samples/client/petstore/python/petstore_api/model/user.py @@ -159,7 +159,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -167,14 +167,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model/xml_item.py b/samples/client/petstore/python/petstore_api/model/xml_item.py index 29e1bfe54e63..c6b82273f5a8 100644 --- a/samples/client/petstore/python/petstore_api/model/xml_item.py +++ b/samples/client/petstore/python/petstore_api/model/xml_item.py @@ -222,7 +222,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -230,14 +230,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -338,14 +342,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python/petstore_api/model_utils.py b/samples/client/petstore/python/petstore_api/model_utils.py index 6414688b772b..1b16e528b137 100644 --- a/samples/client/petstore/python/petstore_api/model_utils.py +++ b/samples/client/petstore/python/petstore_api/model_utils.py @@ -16,6 +16,7 @@ import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -192,7 +193,7 @@ def __copy__(self): if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ @@ -1399,7 +1400,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -1564,7 +1571,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + if (configuration + or (input_class_simple == dict + and not dict in valid_classes)): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, diff --git a/samples/client/petstore/python/petstore_api/models/__init__.py b/samples/client/petstore/python/petstore_api/models/__init__.py index 361e2bd9766c..06a63ac193e1 100644 --- a/samples/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/client/petstore/python/petstore_api/models/__init__.py @@ -63,11 +63,18 @@ from petstore_api.model.parent_pet import ParentPet from petstore_api.model.pet import Pet from petstore_api.model.player import Player +from petstore_api.model.polygon import Polygon +from petstore_api.model.polygon_all_of import PolygonAllOf from petstore_api.model.read_only_first import ReadOnlyFirst +from petstore_api.model.shape import Shape from petstore_api.model.special_model_name import SpecialModelName +from petstore_api.model.square import Square +from petstore_api.model.square_all_of import SquareAllOf from petstore_api.model.string_boolean_map import StringBooleanMap from petstore_api.model.string_enum import StringEnum from petstore_api.model.tag import Tag +from petstore_api.model.triangle import Triangle +from petstore_api.model.triangle_all_of import TriangleAllOf from petstore_api.model.type_holder_default import TypeHolderDefault from petstore_api.model.type_holder_example import TypeHolderExample from petstore_api.model.user import User diff --git a/samples/client/petstore/python/test/test_fake_api.py b/samples/client/petstore/python/test/test_fake_api.py index d17375a994d5..d5ea58566103 100644 --- a/samples/client/petstore/python/test/test_fake_api.py +++ b/samples/client/petstore/python/test/test_fake_api.py @@ -127,6 +127,7 @@ def test_test_endpoint_enums_length_one(self): _request_timeout=None, _return_http_data_only=True, _spec_property_naming=False, + _request_auths=None, async_req=False, header_number=1.234, path_integer=34, diff --git a/samples/client/petstore/python/test/test_model_200_response.py b/samples/client/petstore/python/test/test_model_200_response.py new file mode 100644 index 000000000000..5858658d2947 --- /dev/null +++ b/samples/client/petstore/python/test/test_model_200_response.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.model_200_response import Model_200Response + + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testModel_200Response(self): + """Test Model_200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = Model_200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_polygon.py b/samples/client/petstore/python/test/test_polygon.py new file mode 100644 index 000000000000..44c6f5430a57 --- /dev/null +++ b/samples/client/petstore/python/test/test_polygon.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon_all_of import PolygonAllOf +from petstore_api.model.shape import Shape +globals()['PolygonAllOf'] = PolygonAllOf +globals()['Shape'] = Shape +from petstore_api.model.polygon import Polygon + + +class TestPolygon(unittest.TestCase): + """Polygon unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPolygon(self): + """Test Polygon""" + # FIXME: construct object with mandatory attributes with example values + # model = Polygon() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_polygon_all_of.py b/samples/client/petstore/python/test/test_polygon_all_of.py new file mode 100644 index 000000000000..fb04385d7134 --- /dev/null +++ b/samples/client/petstore/python/test/test_polygon_all_of.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon_all_of import PolygonAllOf + + +class TestPolygonAllOf(unittest.TestCase): + """PolygonAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPolygonAllOf(self): + """Test PolygonAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = PolygonAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_shape.py b/samples/client/petstore/python/test/test_shape.py new file mode 100644 index 000000000000..7e1c0659eaa2 --- /dev/null +++ b/samples/client/petstore/python/test/test_shape.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.shape import Shape + + +class TestShape(unittest.TestCase): + """Shape unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShape(self): + """Test Shape""" + # FIXME: construct object with mandatory attributes with example values + # model = Shape() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_square.py b/samples/client/petstore/python/test/test_square.py new file mode 100644 index 000000000000..056c248d6a90 --- /dev/null +++ b/samples/client/petstore/python/test/test_square.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon import Polygon +from petstore_api.model.square_all_of import SquareAllOf +globals()['Polygon'] = Polygon +globals()['SquareAllOf'] = SquareAllOf +from petstore_api.model.square import Square + + +class TestSquare(unittest.TestCase): + """Square unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSquare(self): + """Test Square""" + # FIXME: construct object with mandatory attributes with example values + # model = Square() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_square_all_of.py b/samples/client/petstore/python/test/test_square_all_of.py new file mode 100644 index 000000000000..466d3acbc144 --- /dev/null +++ b/samples/client/petstore/python/test/test_square_all_of.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.square_all_of import SquareAllOf + + +class TestSquareAllOf(unittest.TestCase): + """SquareAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSquareAllOf(self): + """Test SquareAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = SquareAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_triangle.py b/samples/client/petstore/python/test/test_triangle.py new file mode 100644 index 000000000000..433e572edddc --- /dev/null +++ b/samples/client/petstore/python/test/test_triangle.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon import Polygon +from petstore_api.model.triangle_all_of import TriangleAllOf +globals()['Polygon'] = Polygon +globals()['TriangleAllOf'] = TriangleAllOf +from petstore_api.model.triangle import Triangle + + +class TestTriangle(unittest.TestCase): + """Triangle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTriangle(self): + """Test Triangle""" + # FIXME: construct object with mandatory attributes with example values + # model = Triangle() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python/test/test_triangle_all_of.py b/samples/client/petstore/python/test/test_triangle_all_of.py new file mode 100644 index 000000000000..322d2e802eb8 --- /dev/null +++ b/samples/client/petstore/python/test/test_triangle_all_of.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.triangle_all_of import TriangleAllOf + + +class TestTriangleAllOf(unittest.TestCase): + """TriangleAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTriangleAllOf(self): + """Test TriangleAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = TriangleAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES index 417028fbd1f8..9ea159533683 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES @@ -60,12 +60,19 @@ docs/ParentPet.md docs/Pet.md docs/PetApi.md docs/Player.md +docs/Polygon.md +docs/PolygonAllOf.md docs/ReadOnlyFirst.md +docs/Shape.md docs/SpecialModelName.md +docs/Square.md +docs/SquareAllOf.md docs/StoreApi.md docs/StringBooleanMap.md docs/StringEnum.md docs/Tag.md +docs/Triangle.md +docs/TriangleAllOf.md docs/TypeHolderDefault.md docs/TypeHolderExample.md docs/User.md @@ -139,11 +146,18 @@ petstore_api/model/parent_all_of.py petstore_api/model/parent_pet.py petstore_api/model/pet.py petstore_api/model/player.py +petstore_api/model/polygon.py +petstore_api/model/polygon_all_of.py petstore_api/model/read_only_first.py +petstore_api/model/shape.py petstore_api/model/special_model_name.py +petstore_api/model/square.py +petstore_api/model/square_all_of.py petstore_api/model/string_boolean_map.py petstore_api/model/string_enum.py petstore_api/model/tag.py +petstore_api/model/triangle.py +petstore_api/model/triangle_all_of.py petstore_api/model/type_holder_default.py petstore_api/model/type_holder_example.py petstore_api/model/user.py diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md index 8e57b995b3ec..4b34d32b616d 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md @@ -178,11 +178,18 @@ Class | Method | HTTP request | Description - [ParentPet](docs/ParentPet.md) - [Pet](docs/Pet.md) - [Player](docs/Player.md) + - [Polygon](docs/Polygon.md) + - [PolygonAllOf](docs/PolygonAllOf.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Shape](docs/Shape.md) - [SpecialModelName](docs/SpecialModelName.md) + - [Square](docs/Square.md) + - [SquareAllOf](docs/SquareAllOf.md) - [StringBooleanMap](docs/StringBooleanMap.md) - [StringEnum](docs/StringEnum.md) - [Tag](docs/Tag.md) + - [Triangle](docs/Triangle.md) + - [TriangleAllOf](docs/TriangleAllOf.md) - [TypeHolderDefault](docs/TypeHolderDefault.md) - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model_200Response.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model_200Response.md new file mode 100644 index 000000000000..4fd119d12515 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model_200Response.md @@ -0,0 +1,13 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **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_disallowAdditionalPropertiesIfNotPresent/docs/Model_Return.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model_Return.md new file mode 100644 index 000000000000..674c441551b3 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model_Return.md @@ -0,0 +1,12 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Polygon.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Polygon.md new file mode 100644 index 000000000000..ee26d74fab62 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Polygon.md @@ -0,0 +1,13 @@ +# Polygon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**area** | **str** | | [optional] +**sides** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PolygonAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PolygonAllOf.md new file mode 100644 index 000000000000..af335e0da304 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PolygonAllOf.md @@ -0,0 +1,13 @@ +# PolygonAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**sides** | **int** | | [optional] +**area** | **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_disallowAdditionalPropertiesIfNotPresent/docs/Shape.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Shape.md new file mode 100644 index 000000000000..d6ec61ccba2b --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Shape.md @@ -0,0 +1,12 @@ +# Shape + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**area** | **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_disallowAdditionalPropertiesIfNotPresent/docs/Square.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Square.md new file mode 100644 index 000000000000..f1e5416fb796 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Square.md @@ -0,0 +1,13 @@ +# Square + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | defaults to "Square" +**area** | **str** | | [optional] +**sides** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/SquareAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/SquareAllOf.md new file mode 100644 index 000000000000..0aee3fc5201e --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/SquareAllOf.md @@ -0,0 +1,13 @@ +# SquareAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] if omitted the server will use the default value of "Square" +**sides** | **int** | | [optional] +**area** | **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_disallowAdditionalPropertiesIfNotPresent/docs/Triangle.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Triangle.md new file mode 100644 index 000000000000..84770cd63f87 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Triangle.md @@ -0,0 +1,13 @@ +# Triangle + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | defaults to "Triangle" +**area** | **str** | | [optional] +**sides** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TriangleAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TriangleAllOf.md new file mode 100644 index 000000000000..4bd5a6970206 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TriangleAllOf.md @@ -0,0 +1,13 @@ +# TriangleAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] if omitted the server will use the default value of "Triangle" +**sides** | **int** | | [optional] +**area** | **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_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py index 093a4ca6a337..d54ded04e311 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py @@ -129,6 +129,10 @@ def call_123_test_special_tags( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -160,6 +164,7 @@ def call_123_test_special_tags( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py index f630549347fc..98536575b077 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py @@ -1142,6 +1142,10 @@ def array_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1173,6 +1177,7 @@ def array_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.array_model_endpoint.call_with_http_info(**kwargs) def boolean( @@ -1216,6 +1221,10 @@ def boolean( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1247,6 +1256,7 @@ def boolean( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.boolean_endpoint.call_with_http_info(**kwargs) def create_xml_item( @@ -1292,6 +1302,10 @@ def create_xml_item( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1323,6 +1337,7 @@ def create_xml_item( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['xml_item'] = \ xml_item return self.create_xml_item_endpoint.call_with_http_info(**kwargs) @@ -1368,6 +1383,10 @@ def number_with_validations( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1399,6 +1418,7 @@ def number_with_validations( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.number_with_validations_endpoint.call_with_http_info(**kwargs) def object_model_with_ref_props( @@ -1442,6 +1462,10 @@ def object_model_with_ref_props( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1473,6 +1497,7 @@ def object_model_with_ref_props( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.object_model_with_ref_props_endpoint.call_with_http_info(**kwargs) def string( @@ -1516,6 +1541,10 @@ def string( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1547,6 +1576,7 @@ def string( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.string_endpoint.call_with_http_info(**kwargs) def string_enum( @@ -1590,6 +1620,10 @@ def string_enum( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1621,6 +1655,7 @@ def string_enum( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.string_enum_endpoint.call_with_http_info(**kwargs) def test_body_with_file_schema( @@ -1666,6 +1701,10 @@ def test_body_with_file_schema( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1697,6 +1736,7 @@ def test_body_with_file_schema( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.test_body_with_file_schema_endpoint.call_with_http_info(**kwargs) @@ -1745,6 +1785,10 @@ def test_body_with_query_params( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1776,6 +1820,7 @@ def test_body_with_query_params( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['query'] = \ query kwargs['body'] = \ @@ -1825,6 +1870,10 @@ def test_client_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1856,6 +1905,7 @@ def test_client_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.test_client_model_endpoint.call_with_http_info(**kwargs) @@ -1911,6 +1961,10 @@ def test_endpoint_enums_length_one( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1942,6 +1996,7 @@ def test_endpoint_enums_length_one( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['query_integer'] = \ query_integer kwargs['query_string'] = \ @@ -2013,6 +2068,10 @@ def test_endpoint_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2044,6 +2103,7 @@ def test_endpoint_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['number'] = \ number kwargs['double'] = \ @@ -2102,6 +2162,10 @@ def test_enum_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2133,6 +2197,7 @@ def test_enum_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.test_enum_parameters_endpoint.call_with_http_info(**kwargs) def test_group_parameters( @@ -2185,6 +2250,10 @@ def test_group_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2216,6 +2285,7 @@ def test_group_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['required_string_group'] = \ required_string_group kwargs['required_boolean_group'] = \ @@ -2266,6 +2336,10 @@ def test_inline_additional_properties( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2297,6 +2371,7 @@ def test_inline_additional_properties( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['param'] = \ param return self.test_inline_additional_properties_endpoint.call_with_http_info(**kwargs) @@ -2345,6 +2420,10 @@ def test_json_form_data( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2376,6 +2455,7 @@ def test_json_form_data( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['param'] = \ param kwargs['param2'] = \ diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags123_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags123_api.py index 70b4a535a815..e6abced84092 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags123_api.py @@ -131,6 +131,10 @@ def test_classname( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -162,6 +166,7 @@ def test_classname( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.test_classname_endpoint.call_with_http_info(**kwargs) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py index 70b4a535a815..69537296f488 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py @@ -131,6 +131,10 @@ def test_classname( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auth (dict): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -162,6 +166,7 @@ def test_classname( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auth'] = kwargs.get('_request_auth', None) kwargs['body'] = \ body return self.test_classname_endpoint.call_with_http_info(**kwargs) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py index 290bf04cf1ee..af164a6ce79c 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py @@ -594,6 +594,10 @@ def add_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -625,6 +629,7 @@ def add_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.add_pet_endpoint.call_with_http_info(**kwargs) @@ -672,6 +677,10 @@ def delete_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -703,6 +712,7 @@ def delete_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.delete_pet_endpoint.call_with_http_info(**kwargs) @@ -750,6 +760,10 @@ def find_pets_by_status( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -781,6 +795,7 @@ def find_pets_by_status( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['status'] = \ status return self.find_pets_by_status_endpoint.call_with_http_info(**kwargs) @@ -828,6 +843,10 @@ def find_pets_by_tags( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -859,6 +878,7 @@ def find_pets_by_tags( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['tags'] = \ tags return self.find_pets_by_tags_endpoint.call_with_http_info(**kwargs) @@ -906,6 +926,10 @@ def get_pet_by_id( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -937,6 +961,7 @@ def get_pet_by_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.get_pet_by_id_endpoint.call_with_http_info(**kwargs) @@ -983,6 +1008,10 @@ def update_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1014,6 +1043,7 @@ def update_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.update_pet_endpoint.call_with_http_info(**kwargs) @@ -1062,6 +1092,10 @@ def update_pet_with_form( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1093,6 +1127,7 @@ def update_pet_with_form( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.update_pet_with_form_endpoint.call_with_http_info(**kwargs) @@ -1142,6 +1177,10 @@ def upload_file( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1173,6 +1212,7 @@ def upload_file( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.upload_file_endpoint.call_with_http_info(**kwargs) @@ -1222,6 +1262,10 @@ def upload_file_with_required_file( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1253,6 +1297,7 @@ def upload_file_with_required_file( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id kwargs['required_file'] = \ diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py index a1172b1f10e5..98e47ccdf869 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py @@ -275,6 +275,10 @@ def delete_order( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -306,6 +310,7 @@ def delete_order( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order_id'] = \ order_id return self.delete_order_endpoint.call_with_http_info(**kwargs) @@ -350,6 +355,10 @@ def get_inventory( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -381,6 +390,7 @@ def get_inventory( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.get_inventory_endpoint.call_with_http_info(**kwargs) def get_order_by_id( @@ -426,6 +436,10 @@ def get_order_by_id( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -457,6 +471,7 @@ def get_order_by_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order_id'] = \ order_id return self.get_order_by_id_endpoint.call_with_http_info(**kwargs) @@ -503,6 +518,10 @@ def place_order( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -534,6 +553,7 @@ def place_order( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.place_order_endpoint.call_with_http_info(**kwargs) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py index 6eabc2a0a015..5f3964342921 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py @@ -462,6 +462,10 @@ def create_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -493,6 +497,7 @@ def create_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.create_user_endpoint.call_with_http_info(**kwargs) @@ -539,6 +544,10 @@ def create_users_with_array_input( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -570,6 +579,7 @@ def create_users_with_array_input( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.create_users_with_array_input_endpoint.call_with_http_info(**kwargs) @@ -616,6 +626,10 @@ def create_users_with_list_input( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -647,6 +661,7 @@ def create_users_with_list_input( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.create_users_with_list_input_endpoint.call_with_http_info(**kwargs) @@ -694,6 +709,10 @@ def delete_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -725,6 +744,7 @@ def delete_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username return self.delete_user_endpoint.call_with_http_info(**kwargs) @@ -771,6 +791,10 @@ def get_user_by_name( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -802,6 +826,7 @@ def get_user_by_name( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username return self.get_user_by_name_endpoint.call_with_http_info(**kwargs) @@ -850,6 +875,10 @@ def login_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -881,6 +910,7 @@ def login_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username kwargs['password'] = \ @@ -926,6 +956,10 @@ def logout_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -957,6 +991,7 @@ def logout_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.logout_user_endpoint.call_with_http_info(**kwargs) def update_user( @@ -1004,6 +1039,10 @@ def update_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1035,6 +1074,7 @@ def update_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username kwargs['body'] = \ diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py index da37b066d3a3..e283cf092d71 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py @@ -132,7 +132,8 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -182,7 +183,8 @@ def __call_api( # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -350,7 +352,8 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -398,6 +401,10 @@ def call_api( :param _check_type: boolean describing if the data back from the server should have its type checked. :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -412,7 +419,7 @@ def call_api( response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -425,7 +432,7 @@ def call_api( collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -597,7 +604,7 @@ def select_header_content_type(self, content_types, method=None, body=None): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -607,24 +614,34 @@ def update_params_for_auth(self, headers, queries, auth_settings, :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -674,7 +691,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -689,7 +707,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -864,4 +883,5 @@ def call_with_http_info(self, **kwargs): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py index 302dcf25c447..5ccd49eec8e0 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.another_fake_api import AnotherFakeApi +# from petstore_api.api.another_fake_api import AnotherFakeApi # # or import this package, but before doing it, use: # diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py index 51527f606112..b0c764b6cbea 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py @@ -112,7 +112,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py index d98c15e0abb3..2d0c78c0ae19 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py index c45c5af7f1f1..462219270afc 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py index de4abb39d434..7f3132131878 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py index 5daea08d6efc..f241a1296c99 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py @@ -162,7 +162,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -170,14 +170,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -260,14 +264,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py index cab715522292..880a80c1a868 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py index 5a9b0c623ab5..79b1fc5e219f 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py index 908865783525..f7afe571d71b 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py index 07394244c688..c7dff4d382f4 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py index 874bb7f85773..8304f57dbfc8 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -242,14 +246,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py index 0cca3901cb37..89062cff69cb 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py index e3342da4b4d8..84a3c0f08cea 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -228,14 +232,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py index a05dc0dbbad1..35ac0a1e03c7 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py index ee080ed5d5a3..14785b2f4d50 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py index 3d1146f50cbc..20cc5749c7fa 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -233,14 +237,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py index 797721eebf5b..f08efa83487c 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py @@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py index 9a6866afe82b..57917bf29fca 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py @@ -154,14 +154,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py index 435f20644275..671e9b545de7 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py index 9542039484f4..e3452f7c3aef 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 name = kwargs.get('name', "default-name") _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py index 981c19faf91e..f0906314bbf1 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -251,14 +255,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py index c5ca4d148099..86dbe76aee22 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py index 6fbffb9fc083..610da6e1c6c9 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -250,14 +254,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py index 8e5c88070be3..80389884a8f3 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py index e6b17573c5bb..dd51694625dc 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -250,14 +254,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py index c1e24971772e..5a3cefff372d 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py index 90befa4eb00d..61bc109ff830 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -250,14 +254,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py index 789018bd8fa1..39150e0533cf 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py index 44580c1ca6f1..1a424d5a46d0 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py index 0c7ad8a06d45..0c0db8a6c723 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py index 02ec7f30cfe5..7039aa3e6f45 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py @@ -154,14 +154,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py index 887c999b895d..541db2ddd101 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py index c96038e71a76..0bb3ef17f4c6 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -232,14 +236,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py index 476d3da6587e..bf9b682bd05d 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py @@ -158,14 +158,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py index c06e9e6f7a96..f935dd5c7db1 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py @@ -169,7 +169,7 @@ def _from_openapi_data(cls, enum_string_required, *args, **kwargs): # noqa: E50 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -177,14 +177,18 @@ def _from_openapi_data(cls, enum_string_required, *args, **kwargs): # noqa: E50 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -264,14 +268,18 @@ def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py index 04a45eb77bdc..cc6f56f744c2 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py index ed37ce5cdd28..feabb50e960a 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -229,14 +233,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py index ee392df1b2d4..745fba3d79d1 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py @@ -205,7 +205,7 @@ def _from_openapi_data(cls, number, byte, date, password, *args, **kwargs): # n """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -213,14 +213,18 @@ def _from_openapi_data(cls, number, byte, date, password, *args, **kwargs): # n self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -311,14 +315,18 @@ def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py index 02af8c351653..5ee6a938ef99 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py index f092f0a94692..c70dd5a668d6 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py @@ -153,7 +153,7 @@ def _from_openapi_data(cls, pet_type, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -161,14 +161,18 @@ def _from_openapi_data(cls, pet_type, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -244,14 +248,18 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py index 9dd7a4a74d4b..8073662194b2 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py @@ -137,7 +137,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -145,14 +145,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py index 8f5755cb1c46..e25bdf99070c 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py index 280f49176afa..76774b1cb14e 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -241,14 +245,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py index efb028619a50..20318287b5cc 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -233,14 +237,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py index a57ce4b84caa..68b59f875c12 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -143,14 +143,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -224,14 +228,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_200_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_200_response.py new file mode 100644 index 000000000000..0163993dc53c --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_200_response.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class Model_200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (int,), # noqa: E501 + '_class': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + '_class': 'class', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Model_200Response - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Model_200Response - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py index 8463f3405872..026a7084affd 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py index 80bdb2200390..9327b59e5519 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py @@ -145,7 +145,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -153,14 +153,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -239,14 +243,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py index f5db0482a059..383c7068cdd5 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py index d782cb7492a1..ba4e371b4ac0 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py @@ -161,14 +161,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -253,14 +257,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py index a308dbd2013c..58201d4a406d 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -233,14 +237,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py index 620fc2371035..16e35d5eb3cc 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py @@ -152,7 +152,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -160,14 +160,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -245,14 +249,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py index ff20cef07b59..08bb8af4ae6f 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py @@ -148,14 +148,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -247,14 +251,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py index ff7c5d02e388..6eb1b6d1c2c7 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py index 28efff2107fb..d29d3b27adbd 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py @@ -156,14 +156,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py index b51c7d6dcbd5..433e0f3984b1 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py @@ -161,7 +161,7 @@ def _from_openapi_data(cls, name, photo_urls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -169,14 +169,18 @@ def _from_openapi_data(cls, name, photo_urls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -258,14 +262,18 @@ def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py index 8bbd2fa5a2ae..57322e4c8dba 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py @@ -137,7 +137,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -145,14 +145,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -229,14 +233,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/polygon.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/polygon.py new file mode 100644 index 000000000000..5cb7b464fe05 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/polygon.py @@ -0,0 +1,327 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + +def lazy_import(): + from petstore_api.model.polygon_all_of import PolygonAllOf + from petstore_api.model.shape import Shape + globals()['PolygonAllOf'] = PolygonAllOf + globals()['Shape'] = Shape + + +class Polygon(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + 'SQUARE': "Square", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + 'sides': 'sides', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Polygon - a model defined in OpenAPI + + Keyword Args: + type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Polygon - a model defined in OpenAPI + + Keyword Args: + type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + PolygonAllOf, + Shape, + ], + 'oneOf': [ + ], + } diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/polygon_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/polygon_all_of.py new file mode 100644 index 000000000000..69f646b3c4de --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/polygon_all_of.py @@ -0,0 +1,275 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class PolygonAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + 'SQUARE': "Square", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'sides': 'sides', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """PolygonAllOf - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """PolygonAllOf - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py index 7dff5dfe68a6..5931aa9b6d3a 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py @@ -136,7 +136,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -144,14 +144,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -225,14 +229,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/shape.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/shape.py new file mode 100644 index 000000000000..e6b84303dc76 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/shape.py @@ -0,0 +1,271 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class Shape(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + 'SQUARE': "Square", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """Shape - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """Shape - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py index 374c641f75bf..94bb3aeb12ad 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py @@ -132,7 +132,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -140,14 +140,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -220,14 +224,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/square.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/square.py new file mode 100644 index 000000000000..f402fd735610 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/square.py @@ -0,0 +1,328 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + +def lazy_import(): + from petstore_api.model.polygon import Polygon + from petstore_api.model.square_all_of import SquareAllOf + globals()['Polygon'] = Polygon + globals()['SquareAllOf'] = SquareAllOf + + +class Square(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'SQUARE': "Square", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + 'sides': 'sides', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Square - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Square", must be one of ["Square", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Square") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Square - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Square", must be one of ["Square", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Square") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Polygon, + SquareAllOf, + ], + 'oneOf': [ + ], + } diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/square_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/square_all_of.py new file mode 100644 index 000000000000..ad3f3fb1e934 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/square_all_of.py @@ -0,0 +1,268 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class SquareAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'SQUARE': "Square", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'sides': 'sides', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SquareAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Square" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SquareAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Square" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py index cb0e03f19e57..52b6f39964bd 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -143,14 +143,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -222,14 +226,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py index de5d86886d7e..5b8b59620b16 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py index 6f7dee860a51..4f909a39c872 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -228,14 +232,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/triangle.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/triangle.py new file mode 100644 index 000000000000..34029a961fdb --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/triangle.py @@ -0,0 +1,328 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + +def lazy_import(): + from petstore_api.model.polygon import Polygon + from petstore_api.model.triangle_all_of import TriangleAllOf + globals()['Polygon'] = Polygon + globals()['TriangleAllOf'] = TriangleAllOf + + +class Triangle(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'area': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'area': 'area', # noqa: E501 + 'sides': 'sides', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Triangle - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Triangle", must be one of ["Triangle", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Triangle") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Triangle - a model defined in OpenAPI + + Keyword Args: + type (str): defaults to "Triangle", must be one of ["Triangle", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area (str): [optional] # noqa: E501 + sides (int): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "Triangle") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Polygon, + TriangleAllOf, + ], + 'oneOf': [ + ], + } diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/triangle_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/triangle_all_of.py new file mode 100644 index 000000000000..00802c74d366 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/triangle_all_of.py @@ -0,0 +1,268 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class TriangleAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TRIANGLE': "Triangle", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'sides': (int,), # noqa: E501 + 'area': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'sides': 'sides', # noqa: E501 + 'area': 'area', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TriangleAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Triangle" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TriangleAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): [optional] if omitted the server will use the default value of "Triangle" # noqa: E501 + sides (int): [optional] # noqa: E501 + area (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py index d6b5b41e7fcd..09ea0b0a100e 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py @@ -156,7 +156,7 @@ def _from_openapi_data(cls, array_item, *args, **kwargs): # noqa: E501 integer_item = kwargs.get('integer_item', -2) bool_item = kwargs.get('bool_item', True) _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -164,14 +164,18 @@ def _from_openapi_data(cls, array_item, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -261,14 +265,18 @@ def __init__(self, array_item, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py index d9cce030f115..aaa2f5747c74 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py @@ -158,7 +158,7 @@ def _from_openapi_data(cls, bool_item, array_item, *args, **kwargs): # noqa: E5 number_item = kwargs.get('number_item', 1.234) integer_item = kwargs.get('integer_item', -2) _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -166,14 +166,18 @@ def _from_openapi_data(cls, bool_item, array_item, *args, **kwargs): # noqa: E5 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -260,14 +264,18 @@ def __init__(self, bool_item, array_item, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py index 8ed232432399..f57d763ed04f 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py @@ -153,7 +153,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -248,14 +252,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py index bf44ba72c71f..e7cee17e4d61 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py @@ -216,7 +216,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -224,14 +224,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -332,14 +336,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py index 6414688b772b..1b16e528b137 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py @@ -16,6 +16,7 @@ import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -192,7 +193,7 @@ def __copy__(self): if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ @@ -1399,7 +1400,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -1564,7 +1571,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + if (configuration + or (input_class_simple == dict + and not dict in valid_classes)): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py index 361e2bd9766c..06a63ac193e1 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py @@ -63,11 +63,18 @@ from petstore_api.model.parent_pet import ParentPet from petstore_api.model.pet import Pet from petstore_api.model.player import Player +from petstore_api.model.polygon import Polygon +from petstore_api.model.polygon_all_of import PolygonAllOf from petstore_api.model.read_only_first import ReadOnlyFirst +from petstore_api.model.shape import Shape from petstore_api.model.special_model_name import SpecialModelName +from petstore_api.model.square import Square +from petstore_api.model.square_all_of import SquareAllOf from petstore_api.model.string_boolean_map import StringBooleanMap from petstore_api.model.string_enum import StringEnum from petstore_api.model.tag import Tag +from petstore_api.model.triangle import Triangle +from petstore_api.model.triangle_all_of import TriangleAllOf from petstore_api.model.type_holder_default import TypeHolderDefault from petstore_api.model.type_holder_example import TypeHolderExample from petstore_api.model.user import User diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py index d17375a994d5..d5ea58566103 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py @@ -127,6 +127,7 @@ def test_test_endpoint_enums_length_one(self): _request_timeout=None, _return_http_data_only=True, _spec_property_naming=False, + _request_auths=None, async_req=False, header_number=1.234, path_integer=34, diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model_200_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model_200_response.py new file mode 100644 index 000000000000..5858658d2947 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model_200_response.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.model_200_response import Model_200Response + + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testModel_200Response(self): + """Test Model_200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = Model_200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_polygon.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_polygon.py new file mode 100644 index 000000000000..44c6f5430a57 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_polygon.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon_all_of import PolygonAllOf +from petstore_api.model.shape import Shape +globals()['PolygonAllOf'] = PolygonAllOf +globals()['Shape'] = Shape +from petstore_api.model.polygon import Polygon + + +class TestPolygon(unittest.TestCase): + """Polygon unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPolygon(self): + """Test Polygon""" + # FIXME: construct object with mandatory attributes with example values + # model = Polygon() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_polygon_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_polygon_all_of.py new file mode 100644 index 000000000000..fb04385d7134 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_polygon_all_of.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon_all_of import PolygonAllOf + + +class TestPolygonAllOf(unittest.TestCase): + """PolygonAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPolygonAllOf(self): + """Test PolygonAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = PolygonAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_shape.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_shape.py new file mode 100644 index 000000000000..7e1c0659eaa2 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_shape.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.shape import Shape + + +class TestShape(unittest.TestCase): + """Shape unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShape(self): + """Test Shape""" + # FIXME: construct object with mandatory attributes with example values + # model = Shape() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_square.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_square.py new file mode 100644 index 000000000000..056c248d6a90 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_square.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon import Polygon +from petstore_api.model.square_all_of import SquareAllOf +globals()['Polygon'] = Polygon +globals()['SquareAllOf'] = SquareAllOf +from petstore_api.model.square import Square + + +class TestSquare(unittest.TestCase): + """Square unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSquare(self): + """Test Square""" + # FIXME: construct object with mandatory attributes with example values + # model = Square() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_square_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_square_all_of.py new file mode 100644 index 000000000000..466d3acbc144 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_square_all_of.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.square_all_of import SquareAllOf + + +class TestSquareAllOf(unittest.TestCase): + """SquareAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSquareAllOf(self): + """Test SquareAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = SquareAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_triangle.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_triangle.py new file mode 100644 index 000000000000..433e572edddc --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_triangle.py @@ -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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.polygon import Polygon +from petstore_api.model.triangle_all_of import TriangleAllOf +globals()['Polygon'] = Polygon +globals()['TriangleAllOf'] = TriangleAllOf +from petstore_api.model.triangle import Triangle + + +class TestTriangle(unittest.TestCase): + """Triangle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTriangle(self): + """Test Triangle""" + # FIXME: construct object with mandatory attributes with example values + # model = Triangle() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_triangle_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_triangle_all_of.py new file mode 100644 index 000000000000..322d2e802eb8 --- /dev/null +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_triangle_all_of.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.triangle_all_of import TriangleAllOf + + +class TestTriangleAllOf(unittest.TestCase): + """TriangleAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTriangleAllOf(self): + """Test TriangleAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = TriangleAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES index 8eb7c988140f..754556bc311b 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES @@ -6,6 +6,7 @@ Gemfile README.md Rakefile docs/AdditionalPropertiesClass.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ApiResponse.md @@ -53,6 +54,7 @@ docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md @@ -71,6 +73,7 @@ lib/petstore/api_client.rb lib/petstore/api_error.rb lib/petstore/configuration.rb lib/petstore/models/additional_properties_class.rb +lib/petstore/models/all_of_with_single_ref.rb lib/petstore/models/animal.rb lib/petstore/models/api_response.rb lib/petstore/models/array_of_array_of_number_only.rb @@ -113,6 +116,7 @@ lib/petstore/models/outer_enum_integer_default_value.rb lib/petstore/models/outer_object_with_enum_property.rb lib/petstore/models/pet.rb lib/petstore/models/read_only_first.rb +lib/petstore/models/single_ref_type.rb lib/petstore/models/special_model_name.rb lib/petstore/models/tag.rb lib/petstore/models/user.rb diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 289f8a0833df..9eaef0f43844 100644 --- a/samples/client/petstore/ruby-faraday/README.md +++ b/samples/client/petstore/ruby-faraday/README.md @@ -121,6 +121,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Petstore::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Petstore::AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Petstore::Animal](docs/Animal.md) - [Petstore::ApiResponse](docs/ApiResponse.md) - [Petstore::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -163,6 +164,7 @@ Class | Method | HTTP request | Description - [Petstore::OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Petstore::Pet](docs/Pet.md) - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Petstore::SingleRefType](docs/SingleRefType.md) - [Petstore::SpecialModelName](docs/SpecialModelName.md) - [Petstore::Tag](docs/Tag.md) - [Petstore::User](docs/User.md) diff --git a/samples/client/petstore/ruby-faraday/docs/AllOfWithSingleRef.md b/samples/client/petstore/ruby-faraday/docs/AllOfWithSingleRef.md new file mode 100644 index 000000000000..3c14ac91c4aa --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/AllOfWithSingleRef.md @@ -0,0 +1,20 @@ +# Petstore::AllOfWithSingleRef + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **username** | **String** | | [optional] | +| **single_ref_type** | [**SingleRefType**](SingleRefType.md) | | [optional] | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::AllOfWithSingleRef.new( + username: null, + single_ref_type: null +) +``` + diff --git a/samples/client/petstore/ruby-faraday/docs/FakeApi.md b/samples/client/petstore/ruby-faraday/docs/FakeApi.md index 0491bf196a80..71fc522caf26 100644 --- a/samples/client/petstore/ruby-faraday/docs/FakeApi.md +++ b/samples/client/petstore/ruby-faraday/docs/FakeApi.md @@ -852,6 +852,7 @@ opts = { enum_query_string: '_abc', # String | Query parameter enum test (string) enum_query_integer: 1, # Integer | Query parameter enum test (double) enum_query_double: 1.1, # Float | Query parameter enum test (double) + enum_query_model_array: [Petstore::EnumClass::ABC], # Array | enum_form_string_array: ['>'], # Array | Form parameter enum test (string array) enum_form_string: '_abc' # String | Form parameter enum test (string) } @@ -892,6 +893,7 @@ end | **enum_query_string** | **String** | Query parameter enum test (string) | [optional][default to '-efg'] | | **enum_query_integer** | **Integer** | Query parameter enum test (double) | [optional] | | **enum_query_double** | **Float** | Query parameter enum test (double) | [optional] | +| **enum_query_model_array** | [**Array<EnumClass>**](EnumClass.md) | | [optional] | | **enum_form_string_array** | [**Array<String>**](String.md) | Form parameter enum test (string array) | [optional][default to '$'] | | **enum_form_string** | **String** | Form parameter enum test (string) | [optional][default to '-efg'] | @@ -911,7 +913,7 @@ No authorization required ## test_group_parameters -> test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts) +> test_group_parameters(opts) Fake endpoint to test group parameters (optional) @@ -929,18 +931,18 @@ Petstore.configure do |config| end api_instance = Petstore::FakeApi.new -required_string_group = 56 # Integer | Required String in group parameters -required_boolean_group = true # Boolean | Required Boolean in group parameters -required_int64_group = 789 # Integer | Required Integer in group parameters opts = { - string_group: 56, # Integer | String in group parameters - boolean_group: true, # Boolean | Boolean in group parameters - int64_group: 789 # Integer | Integer in group parameters + required_string_group: 56, # Integer | Required String in group parameters (required) + required_boolean_group: true, # Boolean | Required Boolean in group parameters (required) + required_int64_group: 789, # Integer | Required Integer in group parameters (required) + string_group: 56, # Integer | String in group parameters + boolean_group: true, # Boolean | Boolean in group parameters + int64_group: 789, # Integer | Integer in group parameters } begin # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts) + api_instance.test_group_parameters(opts) rescue Petstore::ApiError => e puts "Error when calling FakeApi->test_group_parameters: #{e}" end @@ -950,12 +952,12 @@ end This returns an Array which contains the response data (`nil` in this case), status code and headers. -> test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts) +> test_group_parameters_with_http_info(opts) ```ruby begin # Fake endpoint to test group parameters (optional) - data, status_code, headers = api_instance.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts) + data, status_code, headers = api_instance.test_group_parameters_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => nil diff --git a/samples/client/petstore/ruby-faraday/docs/SingleRefType.md b/samples/client/petstore/ruby-faraday/docs/SingleRefType.md new file mode 100644 index 000000000000..1f997e7bf8d9 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/SingleRefType.md @@ -0,0 +1,15 @@ +# Petstore::SingleRefType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::SingleRefType.new() +``` + diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index bac7b12ce6b0..a9c50fce10fd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -18,6 +18,7 @@ # Models require 'petstore/models/additional_properties_class' +require 'petstore/models/all_of_with_single_ref' require 'petstore/models/animal' require 'petstore/models/api_response' require 'petstore/models/array_of_array_of_number_only' @@ -58,6 +59,7 @@ require 'petstore/models/outer_object_with_enum_property' require 'petstore/models/pet' require 'petstore/models/read_only_first' +require 'petstore/models/single_ref_type' require 'petstore/models/special_model_name' require 'petstore/models/tag' require 'petstore/models/user' 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 0739d4509394..ec82b52f978d 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 @@ -900,6 +900,7 @@ def test_endpoint_parameters_with_http_info(number, double, pattern_without_deli # @option opts [String] :enum_query_string Query parameter enum test (string) (default to '-efg') # @option opts [Integer] :enum_query_integer Query parameter enum test (double) # @option opts [Float] :enum_query_double Query parameter enum test (double) + # @option opts [Array] :enum_query_model_array # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) (default to '$') # @option opts [String] :enum_form_string Form parameter enum test (string) (default to '-efg') # @return [nil] @@ -912,13 +913,14 @@ def test_enum_parameters(opts = {}) # To test enum parameters # @param [Hash] opts the optional parameters # @option opts [Array] :enum_header_string_array Header parameter enum test (string array) - # @option opts [String] :enum_header_string Header parameter enum test (string) + # @option opts [String] :enum_header_string Header parameter enum test (string) (default to '-efg') # @option opts [Array] :enum_query_string_array Query parameter enum test (string array) - # @option opts [String] :enum_query_string Query parameter enum test (string) + # @option opts [String] :enum_query_string Query parameter enum test (string) (default to '-efg') # @option opts [Integer] :enum_query_integer Query parameter enum test (double) # @option opts [Float] :enum_query_double Query parameter enum test (double) - # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) - # @option opts [String] :enum_form_string Form parameter enum test (string) + # @option opts [Array] :enum_query_model_array + # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) (default to '$') + # @option opts [String] :enum_form_string Form parameter enum test (string) (default to '-efg') # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.debugging @@ -965,6 +967,7 @@ def test_enum_parameters_with_http_info(opts = {}) query_params[:'enum_query_string'] = opts[:'enum_query_string'] if !opts[:'enum_query_string'].nil? query_params[:'enum_query_integer'] = opts[:'enum_query_integer'] if !opts[:'enum_query_integer'].nil? query_params[:'enum_query_double'] = opts[:'enum_query_double'] if !opts[:'enum_query_double'].nil? + query_params[:'enum_query_model_array'] = @api_client.build_collection_param(opts[:'enum_query_model_array'], :multi) if !opts[:'enum_query_model_array'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1009,33 +1012,37 @@ def test_enum_parameters_with_http_info(opts = {}) # Fake endpoint to test group parameters (optional) # Fake endpoint to test group parameters (optional) - # @param required_string_group [Integer] Required String in group parameters - # @param required_boolean_group [Boolean] Required Boolean in group parameters - # @param required_int64_group [Integer] Required Integer in group parameters - # @param [Hash] opts the optional parameters + # @param [Hash] opts the parameters + # @option opts [Integer] :required_string_group Required String in group parameters (required) + # @option opts [Boolean] :required_boolean_group Required Boolean in group parameters (required) + # @option opts [Integer] :required_int64_group Required Integer in group parameters (required) # @option opts [Integer] :string_group String in group parameters # @option opts [Boolean] :boolean_group Boolean in group parameters # @option opts [Integer] :int64_group Integer in group parameters # @return [nil] - def test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts = {}) - test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts) + def test_group_parameters(opts = {}) + test_group_parameters_with_http_info(opts) nil end # Fake endpoint to test group parameters (optional) # Fake endpoint to test group parameters (optional) - # @param required_string_group [Integer] Required String in group parameters - # @param required_boolean_group [Boolean] Required Boolean in group parameters - # @param required_int64_group [Integer] Required Integer in group parameters - # @param [Hash] opts the optional parameters + # @param [Hash] opts the parameters + # @option opts [Integer] :required_string_group Required String in group parameters (required) + # @option opts [Boolean] :required_boolean_group Required Boolean in group parameters (required) + # @option opts [Integer] :required_int64_group Required Integer in group parameters (required) # @option opts [Integer] :string_group String in group parameters # @option opts [Boolean] :boolean_group Boolean in group parameters # @option opts [Integer] :int64_group Integer in group parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts = {}) + def test_group_parameters_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FakeApi.test_group_parameters ...' end + # unbox the parameters from the hash + required_string_group = opts[:'required_string_group'] + required_boolean_group = opts[:'required_boolean_group'] + required_int64_group = opts[:'required_int64_group'] # verify the required parameter 'required_string_group' is set if @api_client.config.client_side_validation && required_string_group.nil? fail ArgumentError, "Missing the required parameter 'required_string_group' when calling FakeApi.test_group_parameters" 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 55a4331dd0df..2a373ecec940 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -16,6 +16,7 @@ require 'tempfile' require 'time' require 'faraday' +require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') module Petstore class ApiClient @@ -47,43 +48,24 @@ def self.default # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: # the data deserialized from response body (could be nil), response status code and response headers. def call_api(http_method, path, opts = {}) - ssl_options = { - :ca_file => @config.ssl_ca_file, - :verify => @config.ssl_verify, - :verify_mode => @config.ssl_verify_mode, - :client_cert => @config.ssl_client_cert, - :client_key => @config.ssl_client_key - } - - connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn| - conn.proxy = config.proxy if config.proxy - conn.request(:basic_auth, config.username, config.password) - @config.configure_middleware(conn) - if opts[:header_params]["Content-Type"] == "multipart/form-data" - conn.request :multipart - conn.request :url_encoded - end - conn.adapter(Faraday.default_adapter) - end - begin - response = connection.public_send(http_method.to_sym.downcase) do |req| + response = connection(opts).public_send(http_method.to_sym.downcase) do |req| build_request(http_method, path, req, opts) end - if @config.debugging - @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" end unless response.success? if response.status == 0 # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) + fail ApiError.new(code: 0, + message: response.return_message) else - fail ApiError.new(:code => response.status, - :response_headers => response.headers, - :response_body => response.body), + fail ApiError.new(code: response.status, + response_headers: response.headers, + response_body: response.body), response.reason_phrase end end @@ -120,21 +102,21 @@ def build_request(http_method, path, request, opts = {}) if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - if @config.debugging - @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request.headers = header_params request.body = req_body # Overload default options only if provided - request.options.params_encoding = @config.params_encoding if @config.params_encoding - request.options.timeout = @config.timeout if @config.timeout - request.options.verbose = @config.debugging if @config.debugging + request.options.params_encoder = config.params_encoder if config.params_encoder + request.options.timeout = config.timeout if config.timeout + request.options.verbose = config.debugging if config.debugging request.url url request.params = query_params - download_file(request) if opts[:return_type] == 'File' + download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' request end @@ -179,6 +161,50 @@ def download_file(request) end end + def connection(opts) + opts[:header_params]['Content-Type'] == 'multipart/form-data' ? connection_multipart : connection_regular + end + + def connection_multipart + @connection_multipart ||= build_connection do |conn| + conn.request :multipart + conn.request :url_encoded + end + end + + def connection_regular + @connection_regular ||= build_connection + end + + def build_connection + Faraday.new(url: config.base_url, ssl: ssl_options) do |conn| + basic_auth(conn) + config.configure_middleware(conn) + yield(conn) if block_given? + conn.adapter(Faraday.default_adapter) + end + end + + def ssl_options + { + ca_file: config.ssl_ca_file, + verify: config.ssl_verify, + verify_mode: config.ssl_verify_mode, + client_cert: config.ssl_client_cert, + client_key: config.ssl_client_key + } + end + + def basic_auth(conn) + if config.username && config.password + if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') + conn.request(:authorization, :basic, config.username, config.password) + else + conn.request(:basic_auth, config.username, config.password) + end + end + end + # Check if the given MIME is a JSON MIME. # JSON MIME examples: # application/json @@ -201,23 +227,30 @@ def deserialize(response, return_type) # handle file downloading - return the File instance processed in request callbacks # note that response body is empty when the file is written in chunks in request on_body callback if return_type == 'File' - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) + if @config.return_binary_data == true + # return byte stream + encoding = body.encoding + return @stream.join.force_encoding(encoding) else - prefix = 'download-' + # return file instead of binary data + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = body.encoding + @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + @tempfile.write(@stream.join.force_encoding(encoding)) + @tempfile.close + @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + return @tempfile end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = body.encoding - @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile.write(@stream.join.force_encoding(encoding)) - @tempfile.close - @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - return @tempfile end return nil if body.nil? || body.empty? diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index 225632038ada..df46409f2b5f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -125,12 +125,13 @@ class Configuration # HTTP Proxy settings attr_accessor :proxy - # Set this to customize parameters encoding of array parameter with multi collectionFormat. - # Default to nil. + # Set this to customize parameters encoder of array parameter. + # Default to nil. Faraday uses NestedParamsEncoder when nil. # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 - attr_accessor :params_encoding + # @see The params_encoder option of Faraday. Related source code: + # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders + attr_accessor :params_encoder + attr_accessor :inject_format @@ -156,6 +157,9 @@ def initialize @request_middlewares = [] @response_middlewares = [] @timeout = 60 + # return data as binary instead of file + @return_binary_data = false + @params_encoder = nil @debugging = false @inject_format = false @force_ending_format = false 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 ef7cdf93d9dd..97886f57f1d4 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 @@ -120,6 +120,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb new file mode 100644 index 000000000000..ceaa17adf4e9 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb @@ -0,0 +1,229 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class AllOfWithSingleRef + attr_accessor :username + + attr_accessor :single_ref_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'username' => :'username', + :'single_ref_type' => :'SingleRefType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'username' => :'String', + :'single_ref_type' => :'SingleRefType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'single_ref_type' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::AllOfWithSingleRef` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::AllOfWithSingleRef`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'single_ref_type') + self.single_ref_type = attributes[:'single_ref_type'] + end + 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 && + username == o.username && + single_ref_type == o.single_ref_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [username, single_ref_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + 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) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that 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 + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = Petstore.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + 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/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index 7e22de93da57..3f66a35e3d3d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -128,6 +128,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 031565289a0e..01b7e24fb7da 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 @@ -125,6 +125,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 659e25306ceb..9dfe05ac412a 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 @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 c495716c1184..a3fa60039da7 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 @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 c6ec6c1a90f4..cdf8f44ad245 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 @@ -155,6 +155,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 a89f96935010..61d4f6156651 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -153,6 +153,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 57cfa8343d09..7d97241f1aed 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -119,6 +119,7 @@ def self.build_from_hash(attributes) def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 10be8ec0a086..b9bccbcedb13 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 @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 ea966f177bce..759b9cdef4e5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -123,6 +123,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 b73022da326a..cc50c037ad55 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 @@ -108,6 +108,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 e874ebe700f4..1707a6ceba91 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb index ee7d5d3e0b0c..ef8bbe88c7f3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 7d692a46b61a..b53530336a21 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -119,6 +119,7 @@ def self.build_from_hash(attributes) def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 7e9649319fbd..ebf24ca7918c 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 @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 23580e86e680..63572bcad64e 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 @@ -152,6 +152,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 a972cfdb8858..8418463b16b6 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 @@ -250,6 +250,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 adbf1b367563..1b6a89c739c9 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 b99cf2a5305c..72d202322b20 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 @@ -118,6 +118,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 9361c7a52d33..e99d30105c31 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 607c2ddacb5e..3154a62361a8 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 @@ -467,6 +467,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 121251962cb6..9ad3ec6148f4 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 @@ -116,6 +116,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index 1d3d86c54969..82ab42a10850 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index 605524a3dcda..7e5e651d0bfa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 86bd8d8cc3f2..e2ef5624d610 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 1c7c233056aa..9871994960cb 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 @@ -164,6 +164,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 ba61734af036..7d3bfe95007e 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 @@ -127,6 +127,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 813d434348ee..5f358757d415 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 @@ -117,6 +117,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 9b6cb8a81743..c6aa50c23bb1 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 @@ -108,6 +108,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 260193852528..0ac6668ed28b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -140,6 +140,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index b33d22daadbe..8ccb8026c7fd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -228,6 +228,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 28148b318869..e2aabdb75826 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 @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb index ba7e2c9393fe..767b9a1824b1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb @@ -136,6 +136,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 374e7e85aff6..192efc23d90c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -189,6 +189,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 e0776697e635..3f6546159f58 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 @@ -125,6 +125,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb index a304dc9b46cc..a1ca10f4c3eb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb @@ -112,6 +112,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 68c3343d1d3a..a5029ee5b146 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -211,6 +211,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 6c18c4ea29c6..d67ba849d213 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 @@ -116,6 +116,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb new file mode 100644 index 000000000000..4675eb4a9e1a --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb @@ -0,0 +1,37 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class SingleRefType + ADMIN = "admin".freeze + USER = "user".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SingleRefType.constants.select { |c| SingleRefType::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #SingleRefType" if constantValues.empty? + value + end + end +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 a2e8925d2cea..4b89e1e89a36 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 @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 a9958f7d2136..3b176bebd31a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -116,6 +116,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) 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 f59454450b24..311d608dec30 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -171,6 +171,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 814f96b310d3..8f529b56b4c6 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -27,7 +27,8 @@ Gem::Specification.new do |s| s.license = "Unlicense" s.required_ruby_version = ">= 2.4" - s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1' + s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' + s.add_runtime_dependency 'faraday-multipart' s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' diff --git a/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb new file mode 100644 index 000000000000..61fe40343c7d --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb @@ -0,0 +1,40 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::AllOfWithSingleRef +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::AllOfWithSingleRef do + let(:instance) { Petstore::AllOfWithSingleRef.new } + + describe 'test an instance of AllOfWithSingleRef' do + it 'should create an instance of AllOfWithSingleRef' do + expect(instance).to be_instance_of(Petstore::AllOfWithSingleRef) + end + end + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "single_ref_type"' 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/single_ref_type_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/single_ref_type_spec.rb new file mode 100644 index 000000000000..7686eb34d2dc --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/single_ref_type_spec.rb @@ -0,0 +1,28 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::SingleRefType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::SingleRefType do + let(:instance) { Petstore::SingleRefType.new } + + describe 'test an instance of SingleRefType' do + it 'should create an instance of SingleRefType' do + expect(instance).to be_instance_of(Petstore::SingleRefType) + end + end +end diff --git a/samples/client/petstore/ruby/.openapi-generator/FILES b/samples/client/petstore/ruby/.openapi-generator/FILES index 8eb7c988140f..754556bc311b 100644 --- a/samples/client/petstore/ruby/.openapi-generator/FILES +++ b/samples/client/petstore/ruby/.openapi-generator/FILES @@ -6,6 +6,7 @@ Gemfile README.md Rakefile docs/AdditionalPropertiesClass.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ApiResponse.md @@ -53,6 +54,7 @@ docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md @@ -71,6 +73,7 @@ lib/petstore/api_client.rb lib/petstore/api_error.rb lib/petstore/configuration.rb lib/petstore/models/additional_properties_class.rb +lib/petstore/models/all_of_with_single_ref.rb lib/petstore/models/animal.rb lib/petstore/models/api_response.rb lib/petstore/models/array_of_array_of_number_only.rb @@ -113,6 +116,7 @@ lib/petstore/models/outer_enum_integer_default_value.rb lib/petstore/models/outer_object_with_enum_property.rb lib/petstore/models/pet.rb lib/petstore/models/read_only_first.rb +lib/petstore/models/single_ref_type.rb lib/petstore/models/special_model_name.rb lib/petstore/models/tag.rb lib/petstore/models/user.rb diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 289f8a0833df..9eaef0f43844 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -121,6 +121,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Petstore::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Petstore::AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Petstore::Animal](docs/Animal.md) - [Petstore::ApiResponse](docs/ApiResponse.md) - [Petstore::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -163,6 +164,7 @@ Class | Method | HTTP request | Description - [Petstore::OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Petstore::Pet](docs/Pet.md) - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Petstore::SingleRefType](docs/SingleRefType.md) - [Petstore::SpecialModelName](docs/SpecialModelName.md) - [Petstore::Tag](docs/Tag.md) - [Petstore::User](docs/User.md) diff --git a/samples/client/petstore/ruby/docs/AllOfWithSingleRef.md b/samples/client/petstore/ruby/docs/AllOfWithSingleRef.md new file mode 100644 index 000000000000..3c14ac91c4aa --- /dev/null +++ b/samples/client/petstore/ruby/docs/AllOfWithSingleRef.md @@ -0,0 +1,20 @@ +# Petstore::AllOfWithSingleRef + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **username** | **String** | | [optional] | +| **single_ref_type** | [**SingleRefType**](SingleRefType.md) | | [optional] | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::AllOfWithSingleRef.new( + username: null, + single_ref_type: null +) +``` + diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index 0491bf196a80..71fc522caf26 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -852,6 +852,7 @@ opts = { enum_query_string: '_abc', # String | Query parameter enum test (string) enum_query_integer: 1, # Integer | Query parameter enum test (double) enum_query_double: 1.1, # Float | Query parameter enum test (double) + enum_query_model_array: [Petstore::EnumClass::ABC], # Array | enum_form_string_array: ['>'], # Array | Form parameter enum test (string array) enum_form_string: '_abc' # String | Form parameter enum test (string) } @@ -892,6 +893,7 @@ end | **enum_query_string** | **String** | Query parameter enum test (string) | [optional][default to '-efg'] | | **enum_query_integer** | **Integer** | Query parameter enum test (double) | [optional] | | **enum_query_double** | **Float** | Query parameter enum test (double) | [optional] | +| **enum_query_model_array** | [**Array<EnumClass>**](EnumClass.md) | | [optional] | | **enum_form_string_array** | [**Array<String>**](String.md) | Form parameter enum test (string array) | [optional][default to '$'] | | **enum_form_string** | **String** | Form parameter enum test (string) | [optional][default to '-efg'] | @@ -911,7 +913,7 @@ No authorization required ## test_group_parameters -> test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts) +> test_group_parameters(opts) Fake endpoint to test group parameters (optional) @@ -929,18 +931,18 @@ Petstore.configure do |config| end api_instance = Petstore::FakeApi.new -required_string_group = 56 # Integer | Required String in group parameters -required_boolean_group = true # Boolean | Required Boolean in group parameters -required_int64_group = 789 # Integer | Required Integer in group parameters opts = { - string_group: 56, # Integer | String in group parameters - boolean_group: true, # Boolean | Boolean in group parameters - int64_group: 789 # Integer | Integer in group parameters + required_string_group: 56, # Integer | Required String in group parameters (required) + required_boolean_group: true, # Boolean | Required Boolean in group parameters (required) + required_int64_group: 789, # Integer | Required Integer in group parameters (required) + string_group: 56, # Integer | String in group parameters + boolean_group: true, # Boolean | Boolean in group parameters + int64_group: 789, # Integer | Integer in group parameters } begin # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts) + api_instance.test_group_parameters(opts) rescue Petstore::ApiError => e puts "Error when calling FakeApi->test_group_parameters: #{e}" end @@ -950,12 +952,12 @@ end This returns an Array which contains the response data (`nil` in this case), status code and headers. -> test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts) +> test_group_parameters_with_http_info(opts) ```ruby begin # Fake endpoint to test group parameters (optional) - data, status_code, headers = api_instance.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts) + data, status_code, headers = api_instance.test_group_parameters_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => nil diff --git a/samples/client/petstore/ruby/docs/SingleRefType.md b/samples/client/petstore/ruby/docs/SingleRefType.md new file mode 100644 index 000000000000..1f997e7bf8d9 --- /dev/null +++ b/samples/client/petstore/ruby/docs/SingleRefType.md @@ -0,0 +1,15 @@ +# Petstore::SingleRefType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::SingleRefType.new() +``` + diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index bac7b12ce6b0..a9c50fce10fd 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -18,6 +18,7 @@ # Models require 'petstore/models/additional_properties_class' +require 'petstore/models/all_of_with_single_ref' require 'petstore/models/animal' require 'petstore/models/api_response' require 'petstore/models/array_of_array_of_number_only' @@ -58,6 +59,7 @@ require 'petstore/models/outer_object_with_enum_property' require 'petstore/models/pet' require 'petstore/models/read_only_first' +require 'petstore/models/single_ref_type' require 'petstore/models/special_model_name' require 'petstore/models/tag' require 'petstore/models/user' diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 0739d4509394..ec82b52f978d 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -900,6 +900,7 @@ def test_endpoint_parameters_with_http_info(number, double, pattern_without_deli # @option opts [String] :enum_query_string Query parameter enum test (string) (default to '-efg') # @option opts [Integer] :enum_query_integer Query parameter enum test (double) # @option opts [Float] :enum_query_double Query parameter enum test (double) + # @option opts [Array] :enum_query_model_array # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) (default to '$') # @option opts [String] :enum_form_string Form parameter enum test (string) (default to '-efg') # @return [nil] @@ -912,13 +913,14 @@ def test_enum_parameters(opts = {}) # To test enum parameters # @param [Hash] opts the optional parameters # @option opts [Array] :enum_header_string_array Header parameter enum test (string array) - # @option opts [String] :enum_header_string Header parameter enum test (string) + # @option opts [String] :enum_header_string Header parameter enum test (string) (default to '-efg') # @option opts [Array] :enum_query_string_array Query parameter enum test (string array) - # @option opts [String] :enum_query_string Query parameter enum test (string) + # @option opts [String] :enum_query_string Query parameter enum test (string) (default to '-efg') # @option opts [Integer] :enum_query_integer Query parameter enum test (double) # @option opts [Float] :enum_query_double Query parameter enum test (double) - # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) - # @option opts [String] :enum_form_string Form parameter enum test (string) + # @option opts [Array] :enum_query_model_array + # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) (default to '$') + # @option opts [String] :enum_form_string Form parameter enum test (string) (default to '-efg') # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.debugging @@ -965,6 +967,7 @@ def test_enum_parameters_with_http_info(opts = {}) query_params[:'enum_query_string'] = opts[:'enum_query_string'] if !opts[:'enum_query_string'].nil? query_params[:'enum_query_integer'] = opts[:'enum_query_integer'] if !opts[:'enum_query_integer'].nil? query_params[:'enum_query_double'] = opts[:'enum_query_double'] if !opts[:'enum_query_double'].nil? + query_params[:'enum_query_model_array'] = @api_client.build_collection_param(opts[:'enum_query_model_array'], :multi) if !opts[:'enum_query_model_array'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1009,33 +1012,37 @@ def test_enum_parameters_with_http_info(opts = {}) # Fake endpoint to test group parameters (optional) # Fake endpoint to test group parameters (optional) - # @param required_string_group [Integer] Required String in group parameters - # @param required_boolean_group [Boolean] Required Boolean in group parameters - # @param required_int64_group [Integer] Required Integer in group parameters - # @param [Hash] opts the optional parameters + # @param [Hash] opts the parameters + # @option opts [Integer] :required_string_group Required String in group parameters (required) + # @option opts [Boolean] :required_boolean_group Required Boolean in group parameters (required) + # @option opts [Integer] :required_int64_group Required Integer in group parameters (required) # @option opts [Integer] :string_group String in group parameters # @option opts [Boolean] :boolean_group Boolean in group parameters # @option opts [Integer] :int64_group Integer in group parameters # @return [nil] - def test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts = {}) - test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts) + def test_group_parameters(opts = {}) + test_group_parameters_with_http_info(opts) nil end # Fake endpoint to test group parameters (optional) # Fake endpoint to test group parameters (optional) - # @param required_string_group [Integer] Required String in group parameters - # @param required_boolean_group [Boolean] Required Boolean in group parameters - # @param required_int64_group [Integer] Required Integer in group parameters - # @param [Hash] opts the optional parameters + # @param [Hash] opts the parameters + # @option opts [Integer] :required_string_group Required String in group parameters (required) + # @option opts [Boolean] :required_boolean_group Required Boolean in group parameters (required) + # @option opts [Integer] :required_int64_group Required Integer in group parameters (required) # @option opts [Integer] :string_group String in group parameters # @option opts [Boolean] :boolean_group Boolean in group parameters # @option opts [Integer] :int64_group Integer in group parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts = {}) + def test_group_parameters_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FakeApi.test_group_parameters ...' end + # unbox the parameters from the hash + required_string_group = opts[:'required_string_group'] + required_boolean_group = opts[:'required_boolean_group'] + required_int64_group = opts[:'required_int64_group'] # verify the required parameter 'required_string_group' is set if @api_client.config.client_side_validation && required_string_group.nil? fail ArgumentError, "Missing the required parameter 'required_string_group' when calling FakeApi.test_group_parameters" diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 382754288f7e..66a0f287d44f 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -93,6 +93,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -109,7 +110,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 66da7ab833d2..0f31f5e3f9e9 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -133,6 +133,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -150,10 +151,10 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false @inject_format = false @force_ending_format = false diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index ef7cdf93d9dd..97886f57f1d4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -120,6 +120,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb b/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb new file mode 100644 index 000000000000..ceaa17adf4e9 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb @@ -0,0 +1,229 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class AllOfWithSingleRef + attr_accessor :username + + attr_accessor :single_ref_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'username' => :'username', + :'single_ref_type' => :'SingleRefType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'username' => :'String', + :'single_ref_type' => :'SingleRefType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'single_ref_type' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::AllOfWithSingleRef` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::AllOfWithSingleRef`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'single_ref_type') + self.single_ref_type = attributes[:'single_ref_type'] + end + 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 && + username == o.username && + single_ref_type == o.single_ref_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [username, single_ref_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + 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) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that 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 + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = Petstore.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + 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/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 7e22de93da57..3f66a35e3d3d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -128,6 +128,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 031565289a0e..01b7e24fb7da 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -125,6 +125,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 659e25306ceb..9dfe05ac412a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index c495716c1184..a3fa60039da7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index c6ec6c1a90f4..cdf8f44ad245 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -155,6 +155,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index a89f96935010..61d4f6156651 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -153,6 +153,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 57cfa8343d09..7d97241f1aed 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -119,6 +119,7 @@ def self.build_from_hash(attributes) def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 10be8ec0a086..b9bccbcedb13 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index ea966f177bce..759b9cdef4e5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -123,6 +123,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index b73022da326a..cc50c037ad55 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -108,6 +108,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index e874ebe700f4..1707a6ceba91 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb index ee7d5d3e0b0c..ef8bbe88c7f3 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 7d692a46b61a..b53530336a21 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -119,6 +119,7 @@ def self.build_from_hash(attributes) def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index 7e9649319fbd..ebf24ca7918c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index 23580e86e680..63572bcad64e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -152,6 +152,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index a972cfdb8858..8418463b16b6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -250,6 +250,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index adbf1b367563..1b6a89c739c9 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index b99cf2a5305c..72d202322b20 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -118,6 +118,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index 9361c7a52d33..e99d30105c31 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 607c2ddacb5e..3154a62361a8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -467,6 +467,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 121251962cb6..9ad3ec6148f4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -116,6 +116,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index 1d3d86c54969..82ab42a10850 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -109,6 +109,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 605524a3dcda..7e5e651d0bfa 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index 86bd8d8cc3f2..e2ef5624d610 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 1c7c233056aa..9871994960cb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -164,6 +164,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index ba61734af036..7d3bfe95007e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -127,6 +127,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 813d434348ee..5f358757d415 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -117,6 +117,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 9b6cb8a81743..c6aa50c23bb1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -108,6 +108,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 260193852528..0ac6668ed28b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -140,6 +140,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index b33d22daadbe..8ccb8026c7fd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -228,6 +228,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 28148b318869..e2aabdb75826 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb index ba7e2c9393fe..767b9a1824b1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb @@ -136,6 +136,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 374e7e85aff6..192efc23d90c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -189,6 +189,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index e0776697e635..3f6546159f58 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -125,6 +125,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb index a304dc9b46cc..a1ca10f4c3eb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb @@ -112,6 +112,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 68c3343d1d3a..a5029ee5b146 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -211,6 +211,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 6c18c4ea29c6..d67ba849d213 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -116,6 +116,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb b/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb new file mode 100644 index 000000000000..4675eb4a9e1a --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb @@ -0,0 +1,37 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class SingleRefType + ADMIN = "admin".freeze + USER = "user".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SingleRefType.constants.select { |c| SingleRefType::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #SingleRefType" if constantValues.empty? + value + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index a2e8925d2cea..4b89e1e89a36 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -107,6 +107,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index a9958f7d2136..3b176bebd31a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -116,6 +116,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index f59454450b24..311d608dec30 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -171,6 +171,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb b/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb new file mode 100644 index 000000000000..61fe40343c7d --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb @@ -0,0 +1,40 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::AllOfWithSingleRef +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::AllOfWithSingleRef do + let(:instance) { Petstore::AllOfWithSingleRef.new } + + describe 'test an instance of AllOfWithSingleRef' do + it 'should create an instance of AllOfWithSingleRef' do + expect(instance).to be_instance_of(Petstore::AllOfWithSingleRef) + end + end + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "single_ref_type"' 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/spec/models/single_ref_type_spec.rb b/samples/client/petstore/ruby/spec/models/single_ref_type_spec.rb new file mode 100644 index 000000000000..7686eb34d2dc --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/single_ref_type_spec.rb @@ -0,0 +1,28 @@ +=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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::SingleRefType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::SingleRefType do + let(:instance) { Petstore::SingleRefType.new } + + describe 'test an instance of SingleRefType' do + it 'should create an instance of SingleRefType' do + expect(instance).to be_instance_of(Petstore::SingleRefType) + end + end +end diff --git a/samples/client/petstore/scala-akka/.openapi-generator/FILES b/samples/client/petstore/scala-akka/.openapi-generator/FILES index a6dd935c232f..7ca7b326fc6a 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/FILES +++ b/samples/client/petstore/scala-akka/.openapi-generator/FILES @@ -4,8 +4,11 @@ docs/ApiResponse.md docs/Category.md docs/Order.md docs/Pet.md +docs/PetApi.md +docs/StoreApi.md docs/Tag.md docs/User.md +docs/UserApi.md project/build.properties src/main/resources/reference.conf src/main/scala/org/openapitools/client/api/EnumsSerializers.scala diff --git a/samples/client/petstore/scala-akka/README.md b/samples/client/petstore/scala-akka/README.md index ce96f93b1887..d3e110f822ce 100644 --- a/samples/client/petstore/scala-akka/README.md +++ b/samples/client/petstore/scala-akka/README.md @@ -59,32 +59,79 @@ libraryDependencies += "org.openapitools" % "scala-akka-petstore-client" % "1.0. ## Getting Started +Please follow the [installation](#installation) instruction and execute the following Java code: + +```scala + +import org.openapitools.client.core._ +import org.openapitools.client.model._ +import org.openapitools.client.api.PetApi + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object PetApiExample extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Create invoker to execute requests + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val pet: Pet = // Pet | Pet object that needs to be added to the store + + val request = apiInstance.addPet(pet) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(org.openapitools.client.core.ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#addPet") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#addPet") + exception.printStackTrace(); + } + +} + +``` + ## Documentation for API Endpoints All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*PetApi* | **addPet** | **POST** /pet | Add a new pet to the store -*PetApi* | **deletePet** | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | **findPetsByStatus** | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | **findPetsByTags** | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | **getPetById** | **GET** /pet/{petId} | Find pet by ID -*PetApi* | **updatePet** | **PUT** /pet | Update an existing pet -*PetApi* | **updatePetWithForm** | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | **uploadFile** | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | **deleteOrder** | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | **getInventory** | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | **getOrderById** | **GET** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | **placeOrder** | **POST** /store/order | Place an order for a pet -*UserApi* | **createUser** | **POST** /user | Create user -*UserApi* | **createUsersWithArrayInput** | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | **createUsersWithListInput** | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | **deleteUser** | **DELETE** /user/{username} | Delete user -*UserApi* | **getUserByName** | **GET** /user/{username} | Get user by user name -*UserApi* | **loginUser** | **GET** /user/login | Logs user into the system -*UserApi* | **logoutUser** | **GET** /user/logout | Logs out current logged in user session -*UserApi* | **updateUser** | **PUT** /user/{username} | Updated user +*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 diff --git a/samples/client/petstore/scala-akka/docs/PetApi.md b/samples/client/petstore/scala-akka/docs/PetApi.md new file mode 100644 index 000000000000..9f6abc85363a --- /dev/null +++ b/samples/client/petstore/scala-akka/docs/PetApi.md @@ -0,0 +1,688 @@ +# 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 +[**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image + + + +## addPet + +> addPet(addPetRequest): ApiRequest[Pet] + +Add a new pet to the store + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val pet: Pet = // Pet | Pet object that needs to be added to the store + + val request = apiInstance.addPet(pet) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#addPet") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#addPet") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +ApiRequest[[**Pet**](Pet.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +## deletePet + +> deletePet(deletePetRequest): ApiRequest[Unit] + +Deletes a pet + + + +### Example + +```scala +// Import classes: +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val petId: Long = 789 // Long | Pet id to delete + + val apiKey: String = apiKey_example // String | + + val request = apiInstance.deletePet(petId, apiKey) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#deletePet") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#deletePet") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +## findPetsByStatus + +> findPetsByStatus(findPetsByStatusRequest): ApiRequest[Seq[Pet]] + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val status: Seq[String] = // Seq[String] | Status values that need to be considered for filter + + val request = apiInstance.findPetsByStatus(status) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#findPetsByStatus") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#findPetsByStatus") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**Seq[String]**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + +### Return type + +ApiRequest[[**Seq[Pet]**](Pet.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +## findPetsByTags + +> findPetsByTags(findPetsByTagsRequest): ApiRequest[Seq[Pet]] + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val tags: Seq[String] = // Seq[String] | Tags to filter by + + val request = apiInstance.findPetsByTags(tags) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#findPetsByTags") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#findPetsByTags") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**Seq[String]**](String.md)| Tags to filter by | + +### Return type + +ApiRequest[[**Seq[Pet]**](Pet.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +## getPetById + +> getPetById(getPetByIdRequest): ApiRequest[Pet] + +Find pet by ID + +Returns a single pet + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: api_key + implicit val api_key: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val petId: Long = 789 // Long | ID of pet to return + + val request = apiInstance.getPetById(petId) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#getPetById") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#getPetById") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to return | + +### Return type + +ApiRequest[[**Pet**](Pet.md)] + + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +## updatePet + +> updatePet(updatePetRequest): ApiRequest[Pet] + +Update an existing pet + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val pet: Pet = // Pet | Pet object that needs to be added to the store + + val request = apiInstance.updatePet(pet) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#updatePet") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#updatePet") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +ApiRequest[[**Pet**](Pet.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +## updatePetWithForm + +> updatePetWithForm(updatePetWithFormRequest): ApiRequest[Unit] + +Updates a pet in the store with form data + + + +### Example + +```scala +// Import classes: +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val petId: Long = 789 // Long | ID of pet that needs to be updated + + val name: String = name_example // String | Updated name of the pet + + val status: String = status_example // String | Updated status of the pet + + val request = apiInstance.updatePetWithForm(petId, name, status) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#updatePetWithForm") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#updatePetWithForm") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +## uploadFile + +> uploadFile(uploadFileRequest): ApiRequest[ApiResponse] + +uploads an image + + + +### Example + +```scala +// Import classes: +import +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = PetApi("http://petstore.swagger.io/v2") + val petId: Long = 789 // Long | ID of pet to update + + val additionalMetadata: String = additionalMetadata_example // String | Additional data to pass to server + + val file: File = BINARY_DATA_HERE // File | file to upload + + val request = apiInstance.uploadFile(petId, additionalMetadata, file) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling PetApi#uploadFile") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling PetApi#uploadFile") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **file** | **File**| file to upload | [optional] + +### Return type + +ApiRequest[[**ApiResponse**](ApiResponse.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/scala-akka/docs/StoreApi.md b/samples/client/petstore/scala-akka/docs/StoreApi.md new file mode 100644 index 000000000000..28f1bace83b0 --- /dev/null +++ b/samples/client/petstore/scala-akka/docs/StoreApi.md @@ -0,0 +1,335 @@ +# 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 +[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet +[**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet + + + +## deleteOrder + +> deleteOrder(deleteOrderRequest): ApiRequest[Unit] + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + +```scala +// Import classes: +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = StoreApi("http://petstore.swagger.io/v2") + val orderId: String = orderId_example // String | ID of the order that needs to be deleted + + val request = apiInstance.deleteOrder(orderId) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling StoreApi#deleteOrder") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling StoreApi#deleteOrder") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## getInventory + +> getInventory(): ApiRequest[Map[String, Int]] + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +```scala +// Import classes: +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: api_key + implicit val api_key: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = StoreApi("http://petstore.swagger.io/v2") + val request = apiInstance.getInventory() + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling StoreApi#getInventory") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling StoreApi#getInventory") + exception.printStackTrace(); + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiRequest[**Map[String, Int]**] + + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## getOrderById + +> getOrderById(getOrderByIdRequest): ApiRequest[Order] + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = StoreApi("http://petstore.swagger.io/v2") + val orderId: Long = 789 // Long | ID of pet that needs to be fetched + + val request = apiInstance.getOrderById(orderId) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling StoreApi#getOrderById") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling StoreApi#getOrderById") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Long**| ID of pet that needs to be fetched | + +### Return type + +ApiRequest[[**Order**](Order.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## placeOrder + +> placeOrder(placeOrderRequest): ApiRequest[Order] + +Place an order for a pet + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = StoreApi("http://petstore.swagger.io/v2") + val order: Order = // Order | order placed for purchasing the pet + + val request = apiInstance.placeOrder(order) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling StoreApi#placeOrder") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling StoreApi#placeOrder") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +ApiRequest[[**Order**](Order.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/scala-akka/docs/UserApi.md b/samples/client/petstore/scala-akka/docs/UserApi.md new file mode 100644 index 000000000000..e136cf0eb948 --- /dev/null +++ b/samples/client/petstore/scala-akka/docs/UserApi.md @@ -0,0 +1,680 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **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 +[**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user +[**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user + + + +## createUser + +> createUser(createUserRequest): ApiRequest[Unit] + +Create user + +This can only be done by the logged in user. + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: auth_cookie + implicit val auth_cookie: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val user: User = // User | Created user object + + val request = apiInstance.createUser(user) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#createUser") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#createUser") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| Created user object | + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +[auth_cookie](../README.md#auth_cookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## createUsersWithArrayInput + +> createUsersWithArrayInput(createUsersWithArrayInputRequest): ApiRequest[Unit] + +Creates list of users with given input array + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: auth_cookie + implicit val auth_cookie: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val user: Seq[User] = // Seq[User] | List of user object + + val request = apiInstance.createUsersWithArrayInput(user) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#createUsersWithArrayInput") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#createUsersWithArrayInput") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**Seq[User]**](User.md)| List of user object | + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +[auth_cookie](../README.md#auth_cookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## createUsersWithListInput + +> createUsersWithListInput(createUsersWithListInputRequest): ApiRequest[Unit] + +Creates list of users with given input array + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: auth_cookie + implicit val auth_cookie: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val user: Seq[User] = // Seq[User] | List of user object + + val request = apiInstance.createUsersWithListInput(user) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#createUsersWithListInput") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#createUsersWithListInput") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**Seq[User]**](User.md)| List of user object | + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +[auth_cookie](../README.md#auth_cookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## deleteUser + +> deleteUser(deleteUserRequest): ApiRequest[Unit] + +Delete user + +This can only be done by the logged in user. + +### Example + +```scala +// Import classes: +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: auth_cookie + implicit val auth_cookie: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val username: String = username_example // String | The name that needs to be deleted + + val request = apiInstance.deleteUser(username) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#deleteUser") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#deleteUser") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +[auth_cookie](../README.md#auth_cookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## getUserByName + +> getUserByName(getUserByNameRequest): ApiRequest[User] + +Get user by user name + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val username: String = username_example // String | The name that needs to be fetched. Use user1 for testing. + + val request = apiInstance.getUserByName(username) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#getUserByName") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#getUserByName") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +ApiRequest[[**User**](User.md)] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## loginUser + +> loginUser(loginUserRequest): ApiRequest[String] + +Logs user into the system + + + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val username: String = username_example // String | The user name for login + + val password: String = password_example // String | The password for login in clear text + + val request = apiInstance.loginUser(username, password) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + System.out.println(s"Response body: $content") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#loginUser") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#loginUser") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +ApiRequest[**String**] + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `auth_cookie` apiKey authentication.
    * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +| **400** | Invalid username/password supplied | - | + + +## logoutUser + +> logoutUser(): ApiRequest[Unit] + +Logs out current logged in user session + + + +### Example + +```scala +// Import classes: +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: auth_cookie + implicit val auth_cookie: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val request = apiInstance.logoutUser() + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#logoutUser") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#logoutUser") + exception.printStackTrace(); + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +[auth_cookie](../README.md#auth_cookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## updateUser + +> updateUser(updateUserRequest): ApiRequest[Unit] + +Updated user + +This can only be done by the logged in user. + +### Example + +```scala +// Import classes: +import +import org.openapitools.client.core._ +import org.openapitools.client.core.CollectionFormats._ +import org.openapitools.client.core.ApiKeyLocations._ + +import akka.actor.ActorSystem +import scala.concurrent.Future +import scala.util.{Failure, Success} + +object Example extends App { + + implicit val system: ActorSystem = ActorSystem() + import system.dispatcher + + // Configure API key authorization: auth_cookie + implicit val auth_cookie: ApiKeyValue = ApiKeyValue("YOUR API KEY") + + val apiInvoker = ApiInvoker() + val apiInstance = UserApi("http://petstore.swagger.io/v2") + val username: String = username_example // String | name that need to be deleted + + val user: User = // User | Updated user object + + val request = apiInstance.updateUser(username, user) + val response = apiInvoker.execute(request) + + response.onComplete { + case Success(ApiResponse(code, content, headers)) => + System.out.println(s"Status code: $code}") + System.out.println(s"Response headers: ${headers.mkString(", ")}") + + case Failure(error @ ApiError(code, message, responseContent, cause, headers)) => + System.err.println("Exception when calling UserApi#updateUser") + System.err.println(s"Status code: $code}") + System.err.println(s"Reason: $responseContent") + System.err.println(s"Response headers: ${headers.mkString(", ")}") + error.printStackTrace(); + + case Failure(exception) => + System.err.println("Exception when calling UserApi#updateUser") + exception.printStackTrace(); + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **user** | [**User**](User.md)| Updated user object | + +### Return type + + +ApiRequest[Unit] (empty response body) + +### Authorization + +[auth_cookie](../README.md#auth_cookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/scala-httpclient/build.sbt b/samples/client/petstore/scala-httpclient/build.sbt index d6eb1a71689b..196e17ab7359 100644 --- a/samples/client/petstore/scala-httpclient/build.sbt +++ b/samples/client/petstore/scala-httpclient/build.sbt @@ -4,8 +4,8 @@ organization := "org.openapitools" scalaVersion := "2.11.12" libraryDependencies ++= Seq( - "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.9", - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9", + "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.13.2", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.13.2", "com.sun.jersey" % "jersey-core" % "1.19.4", "com.sun.jersey" % "jersey-client" % "1.19.4", "com.sun.jersey.contribs" % "jersey-multipart" % "1.19.4", @@ -13,7 +13,7 @@ libraryDependencies ++= Seq( "io.swagger" % "swagger-core" % "1.5.8", "joda-time" % "joda-time" % "2.9.9", "org.joda" % "joda-convert" % "1.9.2", - "org.scalatest" %% "scalatest" % "3.0.4" % "test", + "org.scalatest" %% "scalatest" % "3.2.11" % "test", "junit" % "junit" % "4.13" % "test", "com.wordnik.swagger" %% "swagger-async-httpclient" % "0.3.5" ) diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala index 93e70e0015bf..3f6ad7782ee4 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala @@ -56,7 +56,7 @@ class PetApi(baseUrl: String) { basicRequest .method(Method.DELETE, uri"$baseUrl/pet/${petId}") .contentType("application/json") - .header("api_key", apiKey) + .header("api_key", apiKey.toString) .response(asJson[Unit]) /** diff --git a/samples/client/petstore/spring-cloud-async/pom.xml b/samples/client/petstore/spring-cloud-async/pom.xml index d542d02ebc73..5b7846a57eb0 100644 --- a/samples/client/petstore/spring-cloud-async/pom.xml +++ b/samples/client/petstore/spring-cloud-async/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2
    org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 48a96ee892ca..83d7a684f285 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "Pet", description = "the Pet API") +@Api(value = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 99070ab2aeb7..9c8f09cc9f9c 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "Store", description = "the Store API") +@Api(value = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index cc4826d5cd92..d9283bbc86e3 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "User", description = "the User API") +@Api(value = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index af9a5d3bbec9..9f5ef4d9f1ad 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -21,7 +21,7 @@ @ApiModel(description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index eb9d1d35f36d..52fb11fd3cf7 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -23,7 +23,7 @@ @ApiModel(description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 658d0de71681..66d9df6dfd95 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -24,7 +24,7 @@ @ApiModel(description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 1c0c076a38c1..1962262aea94 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -26,7 +26,7 @@ @ApiModel(description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 86be70f2d3ed..b30aa3fd9a2c 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -21,7 +21,7 @@ @ApiModel(description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index e350716a9338..8d71f0fcc040 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -21,7 +21,7 @@ @ApiModel(description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-date-time/pom.xml b/samples/client/petstore/spring-cloud-date-time/pom.xml index 36fac629b8d1..82dd5ef60b8a 100644 --- a/samples/client/petstore/spring-cloud-date-time/pom.xml +++ b/samples/client/petstore/spring-cloud-date-time/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2
    org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java index 545876e8643f..5523df897c1e 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("@type") private String atType = "Pet"; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/pom.xml b/samples/client/petstore/spring-cloud-spring-pageable/pom.xml index d6f807b454e5..d792d0954fc3 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/pom.xml +++ b/samples/client/petstore/spring-cloud-spring-pageable/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2
    org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 28086dede99b..5748a5710c33 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "Pet", description = "the Pet API") +@Api(value = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 85958e4169c8..d28a90a0ccf4 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "Store", description = "the Store API") +@Api(value = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 21ecbd7628bc..d5efac144436 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "User", description = "the User API") +@Api(value = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index af9a5d3bbec9..9f5ef4d9f1ad 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -21,7 +21,7 @@ @ApiModel(description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index eb9d1d35f36d..52fb11fd3cf7 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -23,7 +23,7 @@ @ApiModel(description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 658d0de71681..66d9df6dfd95 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -24,7 +24,7 @@ @ApiModel(description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 1c0c076a38c1..1962262aea94 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -26,7 +26,7 @@ @ApiModel(description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 86be70f2d3ed..b30aa3fd9a2c 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -21,7 +21,7 @@ @ApiModel(description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index e350716a9338..8d71f0fcc040 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -21,7 +21,7 @@ @ApiModel(description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud/pom.xml b/samples/client/petstore/spring-cloud/pom.xml index d542d02ebc73..5b7846a57eb0 100644 --- a/samples/client/petstore/spring-cloud/pom.xml +++ b/samples/client/petstore/spring-cloud/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2
    org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index ba7431a62317..64a724c16805 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "Pet", description = "the Pet API") +@Api(value = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 76d8756cbef5..9d5103b31776 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "Store", description = "the Store API") +@Api(value = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 981a6a622e19..4a9be0d55120 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "User", description = "the User API") +@Api(value = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index a34d3d591218..909b0aba4e34 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -21,7 +21,7 @@ @ApiModel(description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index eb9d1d35f36d..52fb11fd3cf7 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -23,7 +23,7 @@ @ApiModel(description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 658d0de71681..66d9df6dfd95 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -24,7 +24,7 @@ @ApiModel(description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 1c0c076a38c1..1962262aea94 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -26,7 +26,7 @@ @ApiModel(description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 86be70f2d3ed..b30aa3fd9a2c 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -21,7 +21,7 @@ @ApiModel(description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index e350716a9338..8d71f0fcc040 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -21,7 +21,7 @@ @ApiModel(description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-stubs/pom.xml b/samples/client/petstore/spring-stubs/pom.xml index 6a65cedf99b7..427ae554a225 100644 --- a/samples/client/petstore/spring-stubs/pom.xml +++ b/samples/client/petstore/spring-stubs/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index c72fa23629a6..ae3613d14241 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 1e410b3ff8bd..ccc4de0a1428 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index df51793e879e..09d2f680dcac 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index af9a5d3bbec9..9f5ef4d9f1ad 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -21,7 +21,7 @@ @ApiModel(description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index eb9d1d35f36d..52fb11fd3cf7 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -23,7 +23,7 @@ @ApiModel(description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 658d0de71681..66d9df6dfd95 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -24,7 +24,7 @@ @ApiModel(description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 1c0c076a38c1..1962262aea94 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -26,7 +26,7 @@ @ApiModel(description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index 86be70f2d3ed..b30aa3fd9a2c 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -21,7 +21,7 @@ @ApiModel(description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index e350716a9338..8d71f0fcc040 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -21,7 +21,7 @@ @ApiModel(description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift index 171ced2359bf..356d9c7454eb 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -34,14 +34,14 @@ extension CaseIterableDefaultsLast { /// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) /// or not encoded (`.encodeNothing`). Intended for request payloads. -public enum NullEncodable: Hashable { +internal enum NullEncodable: Hashable { case encodeNothing case encodeNull case encodeValue(Wrapped) } extension NullEncodable: Codable where Wrapped: Codable { - public init(from decoder: Decoder) throws { + internal init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() if let value = try? container.decode(Wrapped.self) { self = .encodeValue(value) @@ -52,7 +52,7 @@ extension NullEncodable: Codable where Wrapped: Codable { } } - public func encode(to encoder: Encoder) throws { + internal func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { case .encodeNothing: return diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 86beadcc71ce..6195dbe996a0 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +internal protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - internal func createURLSession() -> URLSession { + internal func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - internal func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + internal func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index ca22cb7e6e54..1d5288a137ad 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -9,6 +9,12 @@ import Foundation import MobileCoreServices #endif +public protocol URLSessionProtocol { + func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask +} + +extension URLSession: URLSessionProtocol {} + class URLSessionRequestBuilderFactory: RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type { return URLSessionRequestBuilder.self @@ -57,7 +63,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLSession configuration. */ - open func createURLSession() -> URLSession { + open func createURLSession() -> URLSessionProtocol { return defaultURLSession } @@ -76,7 +82,7 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/pet.service.ts index 955dc51f0508..e7a21a8ff1f9 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/store.service.ts index 20480749e90e..942714e216e1 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/user.service.ts index b90b53eb44ca..2a3277c5241d 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/pet.service.ts index 955dc51f0508..e7a21a8ff1f9 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/store.service.ts index 20480749e90e..942714e216e1 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/user.service.ts index b90b53eb44ca..2a3277c5241d 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/api/default.service.ts b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/api/default.service.ts index 71c70d99cc67..9a9065606157 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/api/default.service.ts +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/api/default.service.ts @@ -70,8 +70,7 @@ export class DefaultService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/pet.service.ts index 955dc51f0508..e7a21a8ff1f9 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/store.service.ts index 20480749e90e..942714e216e1 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/user.service.ts index b90b53eb44ca..2a3277c5241d 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/pet.service.ts index 955dc51f0508..e7a21a8ff1f9 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/store.service.ts index 20480749e90e..942714e216e1 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/user.service.ts index b90b53eb44ca..2a3277c5241d 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/package-lock.json b/samples/client/petstore/typescript-angular-v11-provided-in-root/package-lock.json index 808ca6bb24c6..29146134964a 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/package-lock.json +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/package-lock.json @@ -1,16 +1,16514 @@ { "name": "typescript-angular-v11-unit-tests", "version": "0.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "typescript-angular-v11-unit-tests", + "version": "0.0.0", + "dependencies": { + "@angular/animations": "^11.2.14", + "@angular/common": "^11.2.14", + "@angular/compiler": "^11.2.14", + "@angular/core": "^11.2.14", + "@angular/forms": "^11.2.14", + "@angular/platform-browser": "^11.2.14", + "@angular/platform-browser-dynamic": "^11.2.14", + "@angular/router": "^11.2.14", + "core-js": "^2.5.4", + "rxjs": "^6.6.7", + "tslib": "^2.0.0", + "zone.js": "~0.10.2" + }, + "devDependencies": { + "@angular-devkit/build-angular": "~0.1102.14", + "@angular/cli": "~11.2.14", + "@angular/compiler-cli": "^11.2.14", + "@angular/language-service": "^11.2.14", + "@types/jasmine": "~3.6.0", + "@types/jasminewd2": "~2.0.3", + "@types/node": "^12.11.1", + "codelyzer": "^6.0.0", + "jasmine-core": "~3.8.0", + "jasmine-spec-reporter": "~5.0.0", + "karma": "~6.3.4", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~4.0.0", + "karma-jasmine-html-reporter": "^1.7.0", + "ts-node": "~7.0.0", + "tslint": "~6.1.0", + "typescript": "~4.0.8" + } + }, + "node_modules/@angular-devkit/architect": { + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.18.tgz", + "integrity": "sha512-W561li5FM4LWuKPUA5fZxJqBRfOuqE3UL/HXSD8ivDErtyVE70oLF3bjPRW1S5UFeNPfaK+EAeoMss1DXz9DnQ==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "11.2.18", + "rxjs": "6.6.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/architect/node_modules/rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/architect/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular": { + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.1102.18.tgz", + "integrity": "sha512-RsLen4BSq94y69mEk3Y+VQeWu2O6yHYcJsyV0+7FohRDVQVDHH4zjmSOsJNQzOb+naTWg6+NYRaNSAUHsTpPHw==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1102.18", + "@angular-devkit/build-optimizer": "0.1102.18", + "@angular-devkit/build-webpack": "0.1102.18", + "@angular-devkit/core": "11.2.18", + "@babel/core": "7.12.10", + "@babel/generator": "7.12.11", + "@babel/plugin-transform-async-to-generator": "7.12.1", + "@babel/plugin-transform-runtime": "7.12.10", + "@babel/preset-env": "7.12.11", + "@babel/runtime": "7.12.5", + "@babel/template": "7.12.7", + "@discoveryjs/json-ext": "0.5.2", + "@jsdevtools/coverage-istanbul-loader": "3.0.5", + "@ngtools/webpack": "11.2.18", + "ansi-colors": "4.1.1", + "autoprefixer": "10.2.4", + "babel-loader": "8.2.2", + "browserslist": "^4.9.1", + "cacache": "15.0.5", + "caniuse-lite": "^1.0.30001032", + "circular-dependency-plugin": "5.2.2", + "copy-webpack-plugin": "6.3.2", + "core-js": "3.8.3", + "critters": "0.0.12", + "css-loader": "5.0.1", + "cssnano": "5.0.2", + "file-loader": "6.2.0", + "find-cache-dir": "3.3.1", + "glob": "7.1.6", + "https-proxy-agent": "5.0.0", + "inquirer": "7.3.3", + "jest-worker": "26.6.2", + "karma-source-map-support": "1.4.0", + "less": "4.1.1", + "less-loader": "7.3.0", + "license-webpack-plugin": "2.3.11", + "loader-utils": "2.0.0", + "mini-css-extract-plugin": "1.3.5", + "minimatch": "3.0.4", + "open": "7.4.0", + "ora": "5.3.0", + "parse5-html-rewriting-stream": "6.0.1", + "pnp-webpack-plugin": "1.6.4", + "postcss": "8.2.15", + "postcss-import": "14.0.0", + "postcss-loader": "4.2.0", + "raw-loader": "4.0.2", + "regenerator-runtime": "0.13.7", + "resolve-url-loader": "4.0.0", + "rimraf": "3.0.2", + "rollup": "2.38.4", + "rxjs": "6.6.3", + "sass": "1.32.6", + "sass-loader": "10.1.1", + "semver": "7.3.4", + "source-map": "0.7.3", + "source-map-loader": "1.1.3", + "source-map-support": "0.5.19", + "speed-measure-webpack-plugin": "1.4.2", + "style-loader": "2.0.0", + "stylus": "0.54.8", + "stylus-loader": "4.3.3", + "terser": "5.5.1", + "terser-webpack-plugin": "4.2.3", + "text-table": "0.2.0", + "tree-kill": "1.2.2", + "webpack": "4.44.2", + "webpack-dev-middleware": "3.7.2", + "webpack-dev-server": "3.11.3", + "webpack-merge": "5.7.3", + "webpack-sources": "2.2.0", + "webpack-subresource-integrity": "1.5.2", + "worker-plugin": "5.0.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^11.0.0 || ^11.2.0-next", + "@angular/localize": "^11.0.0 || ^11.2.0-next", + "@angular/service-worker": "^11.0.0 || ^11.2.0-next", + "karma": "^5.2.0 || ^6.0.0", + "ng-packagr": "^11.0.0 || ^11.2.0-next", + "protractor": "^7.0.0", + "tailwindcss": "^2.0.0", + "tslint": "^6.1.0", + "typescript": "~4.0.0 || ~4.1.0" + }, + "peerDependenciesMeta": { + "@angular/localize": { + "optional": true + }, + "@angular/service-worker": { + "optional": true + }, + "karma": { + "optional": true + }, + "ng-packagr": { + "optional": true + }, + "protractor": { + "optional": true + }, + "tailwindcss": { + "optional": true + }, + "tslint": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack": { + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-11.2.18.tgz", + "integrity": "sha512-5CsCQRc11g7sGGQzelnfrS7zQFVt9Ps7SiajJhUqI2hyNptdItzbc9TVyNMIy4cHIAT+j7kVwqdBSRhiylZcCw==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "11.2.18", + "enhanced-resolve": "5.7.0", + "webpack-sources": "2.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^11.0.0 || ^11.2.0-next", + "typescript": "~4.0.0 || ~4.1.0", + "webpack": "^4.0.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/core-js": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz", + "integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==", + "dev": true, + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/enhanced-resolve": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", + "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/build-optimizer": { + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1102.18.tgz", + "integrity": "sha512-bZ+Ma31Bkcm3Bp7RL08ltGD9k+m5qe6JpQgN9oKjfc0WwB5ldux7mgE1lz6OfxCaY5wsnLRCl1SdKWJDkyAz3A==", + "dev": true, + "dependencies": { + "loader-utils": "2.0.0", + "source-map": "0.7.3", + "tslib": "2.1.0", + "typescript": "4.1.5", + "webpack-sources": "2.2.0" + }, + "bin": { + "build-optimizer": "src/build-optimizer/cli.js" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/build-optimizer/node_modules/tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "dev": true + }, + "node_modules/@angular-devkit/build-optimizer/node_modules/typescript": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz", + "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@angular-devkit/build-webpack": { + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1102.18.tgz", + "integrity": "sha512-a/n4BoIb3A7imMupkvCA1bJRoP5zs9vuwAT2xmCM8QikE+mUURotz/PqBycuUCFVquG7bmj7qowSSp99z3RKGQ==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1102.18", + "@angular-devkit/core": "11.2.18", + "rxjs": "6.6.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "webpack": "^4.6.0", + "webpack-dev-server": "^3.1.4" + } + }, + "node_modules/@angular-devkit/build-webpack/node_modules/rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/build-webpack/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/core": { + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-11.2.18.tgz", + "integrity": "sha512-w7llSJfLg9/+Qb7kvFIZeUomt2kopt1Ujh6nsm/JGEoZWB6Ay63gtuj/IU/0i96Hw4UWkk6Oe7wKSKuDNMIO/w==", + "dev": true, + "dependencies": { + "ajv": "6.12.6", + "fast-json-stable-stringify": "2.1.0", + "magic-string": "0.25.7", + "rxjs": "6.6.3", + "source-map": "0.7.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/core/node_modules/rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/schematics": { + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-11.2.18.tgz", + "integrity": "sha512-MqqW/Ef1wp6yrdHEWSCWegjIBIQA9BblQ4eP6urjNaGnLRRawIrVJtzZQTcEgwIWJTbr0vIXJOdgKSIsqgPVTg==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "11.2.18", + "ora": "5.3.0", + "rxjs": "6.6.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular/animations": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-11.2.14.tgz", + "integrity": "sha512-Heq/nNrCmb3jbkusu+BQszOecfFI/31Oxxj+CDQkqqYpBcswk6bOJLoEE472o+vmgxaXbgeflU9qbIiCQhpMFA==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/core": "11.2.14" + } + }, + "node_modules/@angular/cli": { + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-11.2.18.tgz", + "integrity": "sha512-+62LVEjS737nUnd03YcMAynP5INpQmUf7k2LHgXFcdXfilTE6tv35GRecVHugGxa7m0pqm5atGiQOM26bllylw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@angular-devkit/architect": "0.1102.18", + "@angular-devkit/core": "11.2.18", + "@angular-devkit/schematics": "11.2.18", + "@schematics/angular": "11.2.18", + "@schematics/update": "0.1102.18", + "@yarnpkg/lockfile": "1.1.0", + "ansi-colors": "4.1.1", + "debug": "4.3.1", + "ini": "2.0.0", + "inquirer": "7.3.3", + "jsonc-parser": "3.0.0", + "npm-package-arg": "8.1.0", + "npm-pick-manifest": "6.1.0", + "open": "7.4.0", + "ora": "5.3.0", + "pacote": "11.2.4", + "resolve": "1.19.0", + "rimraf": "3.0.2", + "semver": "7.3.4", + "symbol-observable": "3.0.0", + "universal-analytics": "0.4.23", + "uuid": "8.3.2" + }, + "bin": { + "ng": "bin/ng" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular/common": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-11.2.14.tgz", + "integrity": "sha512-ZSLV/3j7eCTyLf/8g4yBFLWySjiLz3vLJAGWscYoUpnJWMnug1VRu6zoF/COxCbtORgE+Wz6K0uhfS6MziBGVw==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/core": "11.2.14", + "rxjs": "^6.5.3" + } + }, + "node_modules/@angular/compiler": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-11.2.14.tgz", + "integrity": "sha512-XBOK3HgA+/y6Cz7kOX4zcJYmgJ264XnfcbXUMU2cD7Ac+mbNhLPKohWrEiSWalfcjnpf5gRfufQrQP7lpAGu0A==", + "dependencies": { + "tslib": "^2.0.0" + } + }, + "node_modules/@angular/compiler-cli": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-11.2.14.tgz", + "integrity": "sha512-A7ltnCp03/EVqK/Q3tVUDsokgz5GHW3dSPGl0Csk7Ys5uBB9ibHTmVt4eiXA4jt0+6Bk+mKxwe5BEDqLvwYFAg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.8.6", + "@babel/types": "^7.8.6", + "canonical-path": "1.0.0", + "chokidar": "^3.0.0", + "convert-source-map": "^1.5.1", + "dependency-graph": "^0.7.2", + "fs-extra": "4.0.2", + "magic-string": "^0.25.0", + "minimist": "^1.2.0", + "reflect-metadata": "^0.1.2", + "semver": "^6.3.0", + "source-map": "^0.6.1", + "sourcemap-codec": "^1.4.8", + "tslib": "^2.0.0", + "yargs": "^16.2.0" + }, + "bin": { + "ivy-ngcc": "ngcc/main-ivy-ngcc.js", + "ng-xi18n": "src/extract_i18n.js", + "ngc": "src/main.js", + "ngcc": "ngcc/main-ngcc.js" + }, + "engines": { + "node": ">=10.0" + }, + "peerDependencies": { + "@angular/compiler": "11.2.14", + "typescript": ">=4.0 <4.2" + } + }, + "node_modules/@angular/compiler-cli/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@angular/compiler-cli/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@angular/core": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-11.2.14.tgz", + "integrity": "sha512-vpR4XqBGitk1Faph37CSpemwIYTmJ3pdIVNoHKP6jLonpWu+0azkchf0f7oD8/2ivj2F81opcIw0tcsy/D/5Vg==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "rxjs": "^6.5.3", + "zone.js": "^0.10.2 || ^0.11.3" + } + }, + "node_modules/@angular/forms": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-11.2.14.tgz", + "integrity": "sha512-4LWqY6KEIk1AZQFnk+4PJSOCamlD4tumuVN06gO4D0dZo9Cx+GcvW6pM6N0CPubRvPs3sScCnu20WT11HNWC1w==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/common": "11.2.14", + "@angular/core": "11.2.14", + "@angular/platform-browser": "11.2.14", + "rxjs": "^6.5.3" + } + }, + "node_modules/@angular/language-service": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-11.2.14.tgz", + "integrity": "sha512-3+0F0X4r1WeNOV6VmaMzYnJENPVmLX2/MX3/lugwZPNYKVXl/oGyh/4PB8ktntIj0tnxQuErzqRSeucNStNGRw==", + "dev": true + }, + "node_modules/@angular/platform-browser": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-11.2.14.tgz", + "integrity": "sha512-fb7b7ss/gRoP8wLAN17W62leMgjynuyjEPU2eUoAAazsG9f2cgM+z3rK29GYncDVyYQxZUZYnjSqvL6GSXx86A==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/animations": "11.2.14", + "@angular/common": "11.2.14", + "@angular/core": "11.2.14" + }, + "peerDependenciesMeta": { + "@angular/animations": { + "optional": true + } + } + }, + "node_modules/@angular/platform-browser-dynamic": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-11.2.14.tgz", + "integrity": "sha512-TWTPdFs6iBBcp+/YMsgCRQwdHpWGq8KjeJDJ2tfatGgBD3Gqt2YaHOMST1zPW6RkrmupytTejuVqXzeaKWFxuw==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/common": "11.2.14", + "@angular/compiler": "11.2.14", + "@angular/core": "11.2.14", + "@angular/platform-browser": "11.2.14" + } + }, + "node_modules/@angular/router": { + "version": "11.2.14", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-11.2.14.tgz", + "integrity": "sha512-3aYBmj+zrEL9yf/ntIQxHIYaWShZOBKP3U07X2mX+TPMpGlvHDnR7L6bWhQVZwewzMMz7YVR16ldg50IFuAlfA==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/common": "11.2.14", + "@angular/core": "11.2.14", + "@angular/platform-browser": "11.2.14", + "rxjs": "^6.5.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz", + "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.10", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.10", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/core/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz", + "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.11", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/generator/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", + "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^5.0.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name/node_modules/@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.6.tgz", + "integrity": "sha512-2ULmRdqoOMpdvkbT8jONrZML/XALfzxlb052bldftkicAUy8AxSCkD5trDPQcwHNmolcl7wP6ehNqMlyUw6AaA==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms/node_modules/@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function/node_modules/@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", + "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.0", + "@babel/types": "^7.17.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers/node_modules/@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", + "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.17.0", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.16.10", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", + "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz", + "integrity": "sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "dev": true, + "dependencies": { + "regenerator-transform": "^0.14.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz", + "integrity": "sha512-xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.12.5", + "@babel/helper-plugin-utils": "^7.10.4", + "semver": "^5.5.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz", + "integrity": "sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.12.7", + "@babel/helper-compilation-targets": "^7.12.5", + "@babel/helper-module-imports": "^7.12.5", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.11", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.7", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.11", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.7", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.10", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.11", + "core-js-compat": "^3.8.0", + "semver": "^5.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + } + }, + "node_modules/@babel/template": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" + } + }, + "node_modules/@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", + "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz", + "integrity": "sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jsdevtools/coverage-istanbul-loader": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jsdevtools/coverage-istanbul-loader/-/coverage-istanbul-loader-3.0.5.tgz", + "integrity": "sha512-EUCPEkaRPvmHjWAAZkWMT7JDzpw7FKB00WTISaiXsbNOd5hCHg77XLA8sLYLFDo1zepYLo2w7GstN8YBqRXZfA==", + "dev": true, + "dependencies": { + "convert-source-map": "^1.7.0", + "istanbul-lib-instrument": "^4.0.3", + "loader-utils": "^2.0.0", + "merge-source-map": "^1.1.0", + "schema-utils": "^2.7.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/ci-detect": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.4.0.tgz", + "integrity": "sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q==", + "dev": true + }, + "node_modules/@npmcli/git": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.1.0.tgz", + "integrity": "sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw==", + "dev": true, + "dependencies": { + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^6.0.0", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^6.1.1", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" + } + }, + "node_modules/@npmcli/git/node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/@npmcli/git/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/npm-package-arg": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz", + "integrity": "sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q==", + "dev": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "semver": "^7.3.4", + "validate-npm-package-name": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/npm-pick-manifest": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz", + "integrity": "sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA==", + "dev": true, + "dependencies": { + "npm-install-checks": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1", + "npm-package-arg": "^8.1.2", + "semver": "^7.3.4" + } + }, + "node_modules/@npmcli/git/node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@npmcli/git/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "dev": true, + "dependencies": { + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + }, + "bin": { + "installed-package-contents": "index.js" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "dev": true + }, + "node_modules/@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "dev": true, + "dependencies": { + "infer-owner": "^1.0.4" + } + }, + "node_modules/@npmcli/run-script": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-1.8.6.tgz", + "integrity": "sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g==", + "dev": true, + "dependencies": { + "@npmcli/node-gyp": "^1.0.2", + "@npmcli/promise-spawn": "^1.3.2", + "node-gyp": "^7.1.0", + "read-package-json-fast": "^2.0.1" + } + }, + "node_modules/@npmcli/run-script/node_modules/read-package-json-fast": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", + "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "dev": true, + "dependencies": { + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@schematics/angular": { + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-11.2.18.tgz", + "integrity": "sha512-i1cTkpLzXmm9/lD6jaBW5fJe0eDNjr7ie+0/cCsNVuYEIs71j1y3n/iezlBifeQr83/odDniG/k75GQX410xrA==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "11.2.18", + "@angular-devkit/schematics": "11.2.18", + "jsonc-parser": "3.0.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@schematics/update": { + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1102.18.tgz", + "integrity": "sha512-w3jM/0C3c2+KKLGCilraYzOyJkvLfY5hegFR8NVoaF2FH7UV14YfkQJh15HLi4ItC3l0tG0B5p2hef+qAhfaEA==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "11.2.18", + "@angular-devkit/schematics": "11.2.18", + "@yarnpkg/lockfile": "1.1.0", + "ini": "2.0.0", + "npm-package-arg": "^8.0.0", + "pacote": "11.2.4", + "semver": "7.3.4", + "semver-intersect": "1.4.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@socket.io/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@socket.io/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-dOlCBKnDw4iShaIsH/bxujKTM18+2TOAsYz+KSc11Am38H4q5Xw8Bbz97ZYdrVNM+um3p7w86Bvvmcn9q+5+eQ==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/component-emitter": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", + "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", + "dev": true + }, + "node_modules/@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "node_modules/@types/cors": { + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", + "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", + "dev": true + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/jasmine": { + "version": "3.6.11", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.6.11.tgz", + "integrity": "sha512-S6pvzQDvMZHrkBz2Mcn/8Du7cpr76PlRJBAoHnSDNbulULsH5dp0Gns+WRyNX5LHejz/ljxK4/vIHK/caHt6SQ==", + "dev": true + }, + "node_modules/@types/jasminewd2": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.10.tgz", + "integrity": "sha512-J7mDz7ovjwjc+Y9rR9rY53hFWKATcIkrr9DwQWmOas4/pnIPJTXawnzjwpHm3RSxz/e3ZVUvQ7cRbd5UQLo10g==", + "dev": true, + "dependencies": { + "@types/jasmine": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "12.20.46", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.46.tgz", + "integrity": "sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A==", + "dev": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "node_modules/@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", + "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", + "dev": true + }, + "node_modules/@types/webpack-sources": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.9.tgz", + "integrity": "sha512-bvzMnzqoK16PQIC8AYHNdW45eREJQMd6WG/msQWX5V2+vZmODCOPb4TJcbgRljTZZTwTM4wUMcsI8FftNA7new==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.6.1" + } + }, + "node_modules/@types/webpack-sources/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "dependencies": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "node_modules/@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "node_modules/abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/adjust-sourcemap-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "regex-parser": "^2.2.11" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true, + "peerDependencies": { + "ajv": ">=5.0.0" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/app-root-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", + "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==", + "dev": true, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/are-we-there-yet/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/argparse/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/aria-query": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", + "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", + "dev": true, + "dependencies": { + "ast-types-flow": "0.0.7", + "commander": "^2.11.0" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "dependencies": { + "object-assign": "^4.1.1", + "util": "0.10.3" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "dependencies": { + "inherits": "2.0.1" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", + "dev": true + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/autoprefixer": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.4.tgz", + "integrity": "sha512-DCCdUQiMD+P/as8m3XkeTUkUKuuRqLGcwD0nll7wevhqoJfMRpJlkFd1+MQh1pvupjiQuip42lc/VFvfUTMSKw==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.1", + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "fraction.js": "^4.0.13", + "normalize-range": "^0.1.2", + "postcss-value-parser": "^4.1.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/axobject-query": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", + "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", + "dev": true, + "dependencies": { + "ast-types-flow": "0.0.7" + } + }, + "node_modules/babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "dev": true, + "dependencies": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + }, + "engines": { + "node": ">= 8.9" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "webpack": ">=2" + } + }, + "node_modules/babel-loader/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/babel-loader/node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "dev": true, + "engines": { + "node": "^4.5.0 || >= 5.9" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.9.7", + "raw-body": "2.4.3", + "type-is": "~1.6.18" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "dependencies": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/browserslist": { + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", + "integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001312", + "electron-to-chromium": "^1.4.71", + "escalade": "^3.1.1", + "node-releases": "^2.0.2", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "node_modules/builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz", + "integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==", + "dev": true, + "dependencies": { + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.0", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001312", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz", + "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/canonical-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-1.0.0.tgz", + "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", + "dev": true + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/circular-dependency-plugin": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz", + "integrity": "sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==", + "dev": true, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "webpack": ">=4.0.1" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/codelyzer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-6.0.2.tgz", + "integrity": "sha512-v3+E0Ucu2xWJMOJ2fA/q9pDT/hlxHftHGPUay1/1cTgyPV5JTHFdO9hqo837Sx2s9vKBMTt5gO+lhF95PO6J+g==", + "dev": true, + "dependencies": { + "@angular/compiler": "9.0.0", + "@angular/core": "9.0.0", + "app-root-path": "^3.0.0", + "aria-query": "^3.0.0", + "axobject-query": "2.0.2", + "css-selector-tokenizer": "^0.7.1", + "cssauron": "^1.4.0", + "damerau-levenshtein": "^1.0.4", + "rxjs": "^6.5.3", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.7", + "sprintf-js": "^1.1.2", + "tslib": "^1.10.0", + "zone.js": "~0.10.3" + }, + "peerDependencies": { + "@angular/compiler": ">=2.3.1 <13.0.0 || ^12.0.0-next || ^12.1.0-next || ^12.2.0-next", + "@angular/core": ">=2.3.1 <13.0.0 || ^12.0.0-next || ^12.1.0-next || ^12.2.0-next", + "tslint": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/codelyzer/node_modules/@angular/compiler": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-9.0.0.tgz", + "integrity": "sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ==", + "dev": true, + "peerDependencies": { + "tslib": "^1.10.0" + } + }, + "node_modules/codelyzer/node_modules/@angular/core": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-9.0.0.tgz", + "integrity": "sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w==", + "dev": true, + "peerDependencies": { + "rxjs": "^6.5.3", + "tslib": "^1.10.0", + "zone.js": "~0.10.2" + } + }, + "node_modules/codelyzer/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/codelyzer/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/colord": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", + "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==", + "dev": true + }, + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/concat-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "node_modules/copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "dependencies": { + "is-what": "^3.14.1" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "dependencies": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "node_modules/copy-concurrently/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/copy-concurrently/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-webpack-plugin": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-6.3.2.tgz", + "integrity": "sha512-MgJ1uouLIbDg4ST1GzqrGQyKoXY5iPqi6fghFqarijam7FQcBa/r6Rg0VkoIuzx75Xq8iAMghyOueMkWUQ5OaA==", + "dev": true, + "dependencies": { + "cacache": "^15.0.5", + "fast-glob": "^3.2.4", + "find-cache-dir": "^3.3.1", + "glob-parent": "^5.1.1", + "globby": "^11.0.1", + "loader-utils": "^2.0.0", + "normalize-path": "^3.0.0", + "p-limit": "^3.0.2", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "webpack-sources": "^1.4.3" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.37.0 || ^5.0.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/copy-webpack-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/core-js-compat": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", + "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", + "dev": true, + "dependencies": { + "browserslist": "^4.19.1", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dev": true, + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/critters": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.12.tgz", + "integrity": "sha512-ujxKtKc/mWpjrOKeaACTaQ1aP0O31M0ZPWhfl85jZF1smPU4Ivb9va5Ox2poif4zVJQQo0LCFlzGtEZAsCAPcw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "css-select": "^4.1.3", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "postcss": "^8.3.7", + "pretty-bytes": "^5.3.0" + } + }, + "node_modules/critters/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/critters/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/critters/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/critters/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/critters/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/critters/node_modules/postcss": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.7.tgz", + "integrity": "sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==", + "dev": true, + "dependencies": { + "nanoid": "^3.3.1", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/critters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/cross-spawn/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + } + }, + "node_modules/css-declaration-sorter": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.4.tgz", + "integrity": "sha512-lpfkqS0fctcmZotJGhnxkIyJWvBXgpyi2wsFd4J8VB7wzyrT6Ch/3Q+FMNJpjK4gu1+GN5khOnpU2ZVKrLbhCw==", + "dev": true, + "dependencies": { + "timsort": "^0.3.0" + }, + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/css-loader": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.0.1.tgz", + "integrity": "sha512-cXc2ti9V234cq7rJzFKhirb2L2iPy8ZjALeVJAozXYz9te3r4eqLSixNAbMDJSgJEQywqXzs8gonxaboeKqwiw==", + "dev": true, + "dependencies": { + "camelcase": "^6.2.0", + "cssesc": "^3.0.0", + "icss-utils": "^5.0.0", + "loader-utils": "^2.0.0", + "postcss": "^8.1.4", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.27.0 || ^5.0.0" + } + }, + "node_modules/css-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/css-parse": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", + "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", + "dev": true, + "dependencies": { + "css": "^2.0.0" + } + }, + "node_modules/css-select": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", + "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^5.1.0", + "domhandler": "^4.3.0", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-selector-tokenizer": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz", + "integrity": "sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-tree/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-what": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", + "dev": true, + "dependencies": { + "through": "X.X.X" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.0.2.tgz", + "integrity": "sha512-8JK3EnPsjQsULme9/e5M2hF564f/480hwsdcHvQ7ZtAIMfQ1O3SCfs+b8Mjf5KJxhYApyRshR2QSovEJi2K72Q==", + "dev": true, + "dependencies": { + "cosmiconfig": "^7.0.0", + "cssnano-preset-default": "^5.0.1", + "is-resolvable": "^1.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" + }, + "peerDependencies": { + "postcss": "^8.2.1" + } + }, + "node_modules/cssnano-preset-default": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.0.tgz", + "integrity": "sha512-3N5Vcptj2pqVKpHVqH6ezOJvqikR2PdLTbTrsrhF61FbLRQuujAqZ2sKN5rvcMsb7hFjrNnjZT8CGEkxoN/Pwg==", + "dev": true, + "dependencies": { + "css-declaration-sorter": "^6.0.3", + "cssnano-utils": "^3.1.0", + "postcss-calc": "^8.2.3", + "postcss-colormin": "^5.3.0", + "postcss-convert-values": "^5.1.0", + "postcss-discard-comments": "^5.1.0", + "postcss-discard-duplicates": "^5.1.0", + "postcss-discard-empty": "^5.1.0", + "postcss-discard-overridden": "^5.1.0", + "postcss-merge-longhand": "^5.1.0", + "postcss-merge-rules": "^5.1.0", + "postcss-minify-font-values": "^5.1.0", + "postcss-minify-gradients": "^5.1.0", + "postcss-minify-params": "^5.1.0", + "postcss-minify-selectors": "^5.2.0", + "postcss-normalize-charset": "^5.1.0", + "postcss-normalize-display-values": "^5.1.0", + "postcss-normalize-positions": "^5.1.0", + "postcss-normalize-repeat-style": "^5.1.0", + "postcss-normalize-string": "^5.1.0", + "postcss-normalize-timing-functions": "^5.1.0", + "postcss-normalize-unicode": "^5.1.0", + "postcss-normalize-url": "^5.1.0", + "postcss-normalize-whitespace": "^5.1.0", + "postcss-ordered-values": "^5.1.0", + "postcss-reduce-initial": "^5.1.0", + "postcss-reduce-transforms": "^5.1.0", + "postcss-svgo": "^5.1.0", + "postcss-unique-selectors": "^5.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "dev": true + }, + "node_modules/cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/date-format": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz", + "integrity": "sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "dependencies": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/default-gateway": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", + "dev": true, + "dependencies": { + "execa": "^1.0.0", + "ip-regex": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "dependencies": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/del/node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del/node_modules/globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "dependencies": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del/node_modules/globby/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del/node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/del/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/del/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/dependency-graph": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", + "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true + }, + "node_modules/di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "dev": true + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "node_modules/dns-packet": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz", + "integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==", + "dev": true, + "dependencies": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "dependencies": { + "buffer-indexof": "^1.0.0" + } + }, + "node_modules/dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "dev": true, + "dependencies": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true, + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", + "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/duplexify/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/duplexify/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.75", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.75.tgz", + "integrity": "sha512-LxgUNeu3BVU7sXaKjUDD9xivocQLxFtq6wgERrutdY/yIOps3ODOZExK1jg8DTEg4U8TUCb5MLGeWFOYuxjF3Q==", + "dev": true + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/engine.io": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.3.tgz", + "integrity": "sha512-rqs60YwkvWTLLnfazqgZqLa/aKo+9cueVfEi/dZ8PyGyaf8TLOxj++4QMIgeG3Gn0AhrWiFXvghsoY9L9h25GA==", + "dev": true, + "dependencies": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.0.3", + "ws": "~8.2.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/engine.io-parser": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.3.tgz", + "integrity": "sha512-BtQxwF27XUNnSafQLvDi0dQ8s3i6VgzSoQMJacpIcGNrlUdfHSKbgm3jmjCVvQluGzqwujQMPAoMai3oYSTurg==", + "dev": true, + "dependencies": { + "@socket.io/base64-arraybuffer": "~1.0.2" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/enhanced-resolve/node_modules/memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/enhanced-resolve/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/enhanced-resolve/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", + "dev": true + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/eventsource": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", + "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", + "dev": true, + "dependencies": { + "original": "^1.0.0" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/express": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz", + "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==", + "dev": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.19.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.4.2", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.9.7", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.17.2", + "serve-static": "1.14.2", + "setprototypeof": "1.2.0", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/express/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/file-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/flush-write-stream/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/flush-write-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fraction.js": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.3.tgz", + "integrity": "sha512-pUHWWt6vHzZZiQJcM6S/0PXfS+g6FM4BF5rj9wZyreivhQPdsh5PpE25VtSNxq80wHS5RfY51Ii+8Z0Zl/pmzg==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/from2/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/from2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/fs-extra": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", + "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "node_modules/fs-write-stream-atomic/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/fs-write-stream-atomic/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "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" + } + }, + "node_modules/gauge/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "node_modules/http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz", + "integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==", + "dev": true + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-middleware": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", + "dev": true, + "dependencies": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-proxy-middleware/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "dev": true, + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-walk": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", + "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", + "dev": true, + "dependencies": { + "minimatch": "^3.0.4" + } + }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "dev": true, + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "dependencies": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/import-local/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/import-local/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/import-local/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/inquirer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/inquirer/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/internal-ip": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "dev": true, + "dependencies": { + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "node_modules/ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "dependencies": { + "is-path-inside": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "dependencies": { + "path-is-inside": "^1.0.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isbinaryfile": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", + "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==", + "dev": true, + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jasmine-core": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.8.0.tgz", + "integrity": "sha512-zl0nZWDrmbCiKns0NcjkFGYkVTGCPUgoHypTaj+G2AzaWus7QGoXARSlYsSle2VRpSdfJmM+hzmFKzQNhF2kHg==", + "dev": true + }, + "node_modules/jasmine-spec-reporter": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-5.0.2.tgz", + "integrity": "sha512-6gP1LbVgJ+d7PKksQBc2H0oDGNRQI3gKUsWlswKaQ2fif9X5gzhQcgM5+kiJGCQVurOG09jqNhk7payggyp5+g==", + "dev": true, + "dependencies": { + "colors": "1.4.0" + } + }, + "node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/karma": { + "version": "6.3.17", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.17.tgz", + "integrity": "sha512-2TfjHwrRExC8yHoWlPBULyaLwAFmXmxQrcuFImt/JsAsSZu1uOWTZ1ZsWjqQtWpHLiatJOHL5jFjXSJIgCd01g==", + "dev": true, + "dependencies": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", + "braces": "^3.0.2", + "chokidar": "^3.5.1", + "connect": "^3.7.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.1", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", + "http-proxy": "^1.18.1", + "isbinaryfile": "^4.0.8", + "lodash": "^4.17.21", + "log4js": "^6.4.1", + "mime": "^2.5.2", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", + "qjobs": "^1.2.0", + "range-parser": "^1.2.1", + "rimraf": "^3.0.2", + "socket.io": "^4.2.0", + "source-map": "^0.6.1", + "tmp": "^0.2.1", + "ua-parser-js": "^0.7.30", + "yargs": "^16.1.1" + }, + "bin": { + "karma": "bin/karma" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/karma-chrome-launcher": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.0.tgz", + "integrity": "sha512-3dPs/n7vgz1rxxtynpzZTvb9y/GIaW8xjAwcIGttLbycqoFtI7yo1NGnQi6oFTherRE+GIhCAHZC4vEqWGhNvg==", + "dev": true, + "dependencies": { + "which": "^1.2.1" + } + }, + "node_modules/karma-coverage-istanbul-reporter": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-3.0.3.tgz", + "integrity": "sha512-wE4VFhG/QZv2Y4CdAYWDbMmcAHeS926ZIji4z+FkB2aF/EposRb6DP6G5ncT/wXhqUfAb/d7kZrNKPonbvsATw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^3.0.2", + "minimatch": "^3.0.4" + }, + "funding": { + "url": "https://github.com/sponsors/mattlewis92" + } + }, + "node_modules/karma-jasmine": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-4.0.1.tgz", + "integrity": "sha512-h8XDAhTiZjJKzfkoO1laMH+zfNlra+dEQHUAjpn5JV1zCPtOIVWGQjLBrqhnzQa/hrU2XrZwSyBa6XjEBzfXzw==", + "dev": true, + "dependencies": { + "jasmine-core": "^3.6.0" + }, + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "karma": "*" + } + }, + "node_modules/karma-jasmine-html-reporter": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.7.0.tgz", + "integrity": "sha512-pzum1TL7j90DTE86eFt48/s12hqwQuiD+e5aXx2Dc9wDEn2LfGq6RoAxEZZjFiN0RDSCOnosEKRZWxbQ+iMpQQ==", + "dev": true, + "peerDependencies": { + "jasmine-core": ">=3.8", + "karma": ">=0.9", + "karma-jasmine": ">=1.1" + } + }, + "node_modules/karma-source-map-support": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", + "dev": true, + "dependencies": { + "source-map-support": "^0.5.5" + } + }, + "node_modules/karma/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/karma/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/karma/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/karma/node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/killable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", + "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", + "dev": true + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klona": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz", + "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/less": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/less/-/less-4.1.1.tgz", + "integrity": "sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw==", + "dev": true, + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^1.10.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^2.5.2", + "source-map": "~0.6.0" + } + }, + "node_modules/less-loader": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-7.3.0.tgz", + "integrity": "sha512-Mi8915g7NMaLlgi77mgTTQvK022xKRQBIVDSyfl3ErTuBhmZBQab0mjeJjNNqGbdR+qrfTleKXqbGI4uEFavxg==", + "dev": true, + "dependencies": { + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "less": "^3.5.0 || ^4.0.0", + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/less-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/less/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/less/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/less/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/less/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/license-webpack-plugin": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.3.11.tgz", + "integrity": "sha512-0iVGoX5vx0WDy8dmwTTpOOMYiGqILyUbDeVMFH52AjgBlS58lHwOlFMSoqg5nY8Kxl6+FRKyUZY/UdlQaOyqDw==", + "dev": true, + "dependencies": { + "@types/webpack-sources": "^0.1.5", + "webpack-sources": "^1.2.0" + } + }, + "node_modules/license-webpack-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/license-webpack-plugin/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log4js": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", + "dev": true, + "dependencies": { + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/log4js/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/loglevel": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.0.tgz", + "integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/make-fetch-happen": { + "version": "8.0.14", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz", + "integrity": "sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.0.5", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^5.0.0", + "ssri": "^8.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/make-fetch-happen/node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/make-fetch-happen/node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "node_modules/memory-fs/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/memory-fs/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "node_modules/merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/merge-source-map/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "dev": true, + "dependencies": { + "mime-db": "1.51.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.5.tgz", + "integrity": "sha512-tvmzcwqJJXau4OQE5vT72pRT18o2zF+tQJp8CWchqvfQnTlflkzS+dANYcRdyPRWUWRkfmeNTKltx0NZI/b5dQ==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "webpack-sources": "^1.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.4.0 || ^5.0.0" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/minipass": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "dev": true, + "dependencies": { + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "optionalDependencies": { + "encoding": "^0.1.12" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "dev": true, + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "dependencies": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "dependencies": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "node_modules/move-concurrently/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/move-concurrently/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "dependencies": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "node_modules/nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true, + "optional": true + }, + "node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/needle": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.1.tgz", + "integrity": "sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==", + "dev": true, + "optional": true, + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "optional": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", + "dev": true, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/node-gyp": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz", + "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.3", + "nopt": "^5.0.0", + "npmlog": "^4.1.2", + "request": "^2.88.2", + "rimraf": "^3.0.2", + "semver": "^7.3.2", + "tar": "^6.0.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": ">= 10.12.0" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "dependencies": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + } + }, + "node_modules/node-libs-browser/node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/node-libs-browser/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/node-libs-browser/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "dev": true + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-bundled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "dev": true, + "dependencies": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "node_modules/npm-install-checks": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", + "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", + "dev": true, + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, + "node_modules/npm-package-arg": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.0.tgz", + "integrity": "sha512-/ep6QDxBkm9HvOhOg0heitSd7JHA1U7y1qhhlRlteYYAi9Pdb/ZV7FW5aHpkrpM8+P+4p/jjR8zCyKPBMBjSig==", + "dev": true, + "dependencies": { + "hosted-git-info": "^3.0.6", + "semver": "^7.0.0", + "validate-npm-package-name": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-packlist": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz", + "integrity": "sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==", + "dev": true, + "dependencies": { + "glob": "^7.1.6", + "ignore-walk": "^3.0.3", + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + }, + "bin": { + "npm-packlist": "bin/index.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-pick-manifest": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.0.tgz", + "integrity": "sha512-ygs4k6f54ZxJXrzT0x34NybRlLeZ4+6nECAIbr2i0foTnijtS1TJiyzpqtuUAJOps/hO0tNDr8fRV5g+BtRlTw==", + "dev": true, + "dependencies": { + "npm-install-checks": "^4.0.0", + "npm-package-arg": "^8.0.0", + "semver": "^7.0.0" + } + }, + "node_modules/npm-registry-fetch": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz", + "integrity": "sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA==", + "dev": true, + "dependencies": { + "@npmcli/ci-detect": "^1.0.0", + "lru-cache": "^6.0.0", + "make-fetch-happen": "^8.0.9", + "minipass": "^3.1.3", + "minipass-fetch": "^1.3.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.0.0", + "npm-package-arg": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/nth-check": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.0.tgz", + "integrity": "sha512-PGoBCX/lclIWlpS/R2PQuIR4NJoXh6X5AwVzE7WXnWRGvHg7+4TBCgsujUgiPpm0K1y4qvQeWnCWVTpTKZBtvA==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "dev": true, + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/opn/node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ora": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz", + "integrity": "sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "log-symbols": "^4.0.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "dev": true, + "dependencies": { + "url-parse": "^1.4.3" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "dependencies": { + "retry": "^0.12.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-retry/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pacote": { + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-11.2.4.tgz", + "integrity": "sha512-GfTeVQGJ6WyBQbQD4t3ocHbyOmTQLmWjkCKSZPmKiGFKYKNUaM5U2gbLzUW8WG1XmS9yQFnsTFA0k3o1+q4klQ==", + "dev": true, + "dependencies": { + "@npmcli/git": "^2.0.1", + "@npmcli/installed-package-contents": "^1.0.5", + "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/run-script": "^1.3.0", + "cacache": "^15.0.5", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "infer-owner": "^1.0.4", + "minipass": "^3.1.3", + "mkdirp": "^1.0.3", + "npm-package-arg": "^8.0.1", + "npm-packlist": "^2.1.4", + "npm-pick-manifest": "^6.0.0", + "npm-registry-fetch": "^9.0.0", + "promise-retry": "^1.1.1", + "read-package-json-fast": "^1.1.3", + "rimraf": "^3.0.2", + "ssri": "^8.0.0", + "tar": "^6.1.0" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "dependencies": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "node_modules/parallel-transform/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/parallel-transform/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/parse5-html-rewriting-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-6.0.1.tgz", + "integrity": "sha512-vwLQzynJVEfUlURxgnf51yAJDQTtVpNyGD8tKi2Za7m+akukNHxCcUQMAa/mUGLhCeicFdpy7Tlvj8ZNKadprg==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1", + "parse5-sax-parser": "^6.0.1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parse5-sax-parser": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-6.0.1.tgz", + "integrity": "sha512-kXX+5S81lgESA0LsDuGjAlBybImAChYRMT+/uKCEXFBFOeEhS52qUCydGhU3qLRD8D9DVjaUo821WK7DM4iCeg==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pnp-webpack-plugin": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", + "integrity": "sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==", + "dev": true, + "dependencies": { + "ts-pnp": "^1.1.6" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "dependencies": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/portfinder/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/portfinder/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.2.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.15.tgz", + "integrity": "sha512-2zO3b26eJD/8rb106Qu2o7Qgg52ND5HPjcyQiK2B98O388h43A448LCslC0dI2P97wCAQRJsFvwTRcXxTKds+Q==", + "dev": true, + "dependencies": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map": "^0.6.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-calc": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": "^8.2.2" + } + }, + "node_modules/postcss-colormin": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", + "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-convert-values": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.0.tgz", + "integrity": "sha512-GkyPbZEYJiWtQB0KZ0X6qusqFHUepguBCNFi9t5JJc7I2OTXG7C0twbTLvCfaKOLl3rSXmpAwV7W5txd91V84g==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-comments": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.0.tgz", + "integrity": "sha512-L0IKF4jAshRyn03SkEO6ar/Ipz2oLywVbg2THf2EqqdNkBwmVMxuTR/RoAltOw4piiaLt3gCAdrbAqmTBInmhg==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-empty": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.0.tgz", + "integrity": "sha512-782T/buGgb3HOuHOJAHpdyKzAAKsv/BxWqsutnZ+QsiHEcDkY7v+6WWdturuBiSal6XMOO1p1aJvwXdqLD5vhA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-import": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.0.0.tgz", + "integrity": "sha512-gFDDzXhqr9ELmnLHgCC3TbGfA6Dm/YMb/UN8/f7Uuq4fL7VTk2vOIj6hwINEwbokEmp123bLD7a5m+E+KIetRg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-loader": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.2.0.tgz", + "integrity": "sha512-mqgScxHqbiz1yxbnNcPdKYo/6aVt+XExURmEbQlviFVWogDbM4AJ0A/B+ZBpYsJrTRxKw7HyRazg9x0Q9SWwLA==", + "dev": true, + "dependencies": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.4" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/postcss-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/postcss-merge-longhand": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.0.tgz", + "integrity": "sha512-Gr46srN2tsLD8fudKYoHO56RG0BLQ2nsBRnSZGY04eNBPwTeWa9KeHrbL3tOLAHyB2aliikycPH2TMJG1U+W6g==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-merge-rules": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.0.tgz", + "integrity": "sha512-NecukEJovQ0mG7h7xV8wbYAkXGTO3MPKnXvuiXzOKcxoOodfTTKYjeo8TMhAswlSkjcPIBlnKbSFcTuVSDaPyQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^3.1.0", + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", + "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.0.tgz", + "integrity": "sha512-J/TMLklkONn3LuL8wCwfwU8zKC1hpS6VcxFkNUNjmVt53uKqrrykR3ov11mdUYyqVMEx67slMce0tE14cE4DTg==", + "dev": true, + "dependencies": { + "colord": "^2.9.1", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-params": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.0.tgz", + "integrity": "sha512-q67dcts4Hct6x8+JmhBgctHkbvUsqGIg2IItenjE63iZXMbhjr7AlVZkNnKtIGt/1Wsv7p/7YzeSII6Q+KPXRg==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.0.tgz", + "integrity": "sha512-vYxvHkW+iULstA+ctVNx0VoRAR4THQQRkG77o0oa4/mBS0OzGvvzLIvHDv/nNEM0crzN2WIyFU5X7wZhaUK3RA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", + "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz", + "integrity": "sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz", + "integrity": "sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-string": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", + "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", + "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz", + "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", + "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", + "dev": true, + "dependencies": { + "normalize-url": "^6.0.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.0.tgz", + "integrity": "sha512-7O1FanKaJkpWFyCghFzIkLhehujV/frGkdofGLwhg5upbLyGsSfiTcZAdSzoPsSUgyPCkBkNMeWR8yVgPdQybg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-ordered-values": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.0.tgz", + "integrity": "sha512-wU4Z4D4uOIH+BUKkYid36gGDJNQtkVJT7Twv8qH6UyfttbbJWyw4/xIPuVEkkCtQLAJ0EdsNSh8dlvqkXb49TA==", + "dev": true, + "dependencies": { + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz", + "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", + "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", + "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-svgo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz", + "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.0.tgz", + "integrity": "sha512-LmUhgGobtpeVJJHuogzjLRwJlN7VH+BL5c9GKMVJSS/ejoyePZkXvNsYUtk//F6vKOGK86gfRS0xH7fXQSDtvA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/postcss/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "node_modules/promise-retry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", + "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", + "dev": true, + "dependencies": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/pumpify/node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true, + "engines": { + "node": ">=0.9" + } + }, + "node_modules/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", + "dev": true, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz", + "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", + "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/raw-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/read-package-json-fast": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-1.2.2.tgz", + "integrity": "sha512-39DbPJjkltEzfXJXB6D8/Ir3GFOU2YbSKa2HaB/Y3nKrc/zY+0XrALpID6/13ezWyzqvOHrBbR4t4cjQuTdBVQ==", + "dev": true, + "dependencies": { + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-parser": { + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz", + "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==", + "dev": true + }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", + "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpu-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "dependencies": { + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/resolve-url-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-4.0.0.tgz", + "integrity": "sha512-05VEMczVREcbtT7Bz+C+96eUO5HDNvdthIiMB34t7FcF8ehcu4wC0sSgPUubs3XW2Q3CNLJk/BJrCU9wVRymiA==", + "dev": true, + "dependencies": { + "adjust-sourcemap-loader": "^4.0.0", + "convert-source-map": "^1.7.0", + "loader-utils": "^2.0.0", + "postcss": "^7.0.35", + "source-map": "0.6.1" + }, + "engines": { + "node": ">=8.9" + }, + "peerDependencies": { + "rework": "1.0.1", + "rework-visit": "1.0.0" + }, + "peerDependenciesMeta": { + "rework": { + "optional": true + }, + "rework-visit": { + "optional": true + } + } + }, + "node_modules/resolve-url-loader/node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/resolve-url-loader/node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/resolve-url-loader/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rollup": { + "version": "2.38.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.38.4.tgz", + "integrity": "sha512-B0LcJhjiwKkTl79aGVF/u5KdzsH8IylVfV56Ut6c9ouWLJcUK17T83aZBetNYSnZtXf2OHD4+2PbmRW+Fp5ulg==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "dependencies": { + "aproba": "^1.1.1" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sass": { + "version": "1.32.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.6.tgz", + "integrity": "sha512-1bcDHDcSqeFtMr0JXI3xc/CXX6c4p0wHHivJdru8W7waM7a1WjKMm4m/Z5sY7CbVw4Whi2Chpcw6DFfSWwGLzQ==", + "dev": true, + "dependencies": { + "chokidar": ">=2.0.0 <4.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/sass-loader": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.1.1.tgz", + "integrity": "sha512-W6gVDXAd5hR/WHsPicvZdjAWHBcEJ44UahgxcIE196fW2ong0ZHMPO1kZuI5q0VlvMQZh32gpv69PLWQm70qrw==", + "dev": true, + "dependencies": { + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^4.0.0 || ^5.0.0", + "sass": "^1.3.0", + "webpack": "^4.36.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/sass-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "node_modules/schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "node_modules/selfsigned": { + "version": "1.10.14", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz", + "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", + "dev": true, + "dependencies": { + "node-forge": "^0.10.0" + } + }, + "node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "dev": true, + "dependencies": { + "semver": "^5.3.0" + } + }, + "node_modules/semver-dsl/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-intersect": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", + "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", + "dev": true, + "dependencies": { + "semver": "^5.0.0" + } + }, + "node_modules/semver-intersect/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", + "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "1.8.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "node_modules/serve-static": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", + "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "dev": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/socket.io": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz", + "integrity": "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.2", + "engine.io": "~6.1.0", + "socket.io-adapter": "~2.3.3", + "socket.io-parser": "~4.0.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz", + "integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==", + "dev": true + }, + "node_modules/socket.io-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz", + "integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==", + "dev": true, + "dependencies": { + "@types/component-emitter": "^1.2.10", + "component-emitter": "~1.3.0", + "debug": "~4.3.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/socket.io/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/sockjs-client": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.6.0.tgz", + "integrity": "sha512-qVHJlyfdHFht3eBFZdKEXKTlb7I4IV41xnVNo8yUKA1UHcPJwgW2SvTq9LhnjjCywSkSK7c/e4nghU0GOoMCRQ==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "eventsource": "^1.1.0", + "faye-websocket": "^0.11.4", + "inherits": "^2.0.4", + "url-parse": "^1.5.10" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://tidelift.com/funding/github/npm/sockjs-client" + } + }, + "node_modules/sockjs-client/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/socks": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "dev": true, + "dependencies": { + "ip": "^1.1.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz", + "integrity": "sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "4", + "socks": "^2.3.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-1.1.3.tgz", + "integrity": "sha512-6YHeF+XzDOrT/ycFJNI53cgEsp/tHTMl37hi7uVyqFAlTXW109JazaQCkbc+jjoL2637qkH1amLi+JzrIpt5lA==", + "dev": true, + "dependencies": { + "abab": "^2.0.5", + "iconv-lite": "^0.6.2", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "source-map": "^0.6.1", + "whatwg-mimetype": "^2.3.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/source-map-loader/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/source-map-loader/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/speed-measure-webpack-plugin": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.4.2.tgz", + "integrity": "sha512-AtVzD0bnIy2/B0fWqJpJgmhcrfWFhBlduzSo0uwplr/QvB33ZNZj2NEth3NONgdnZJqicK0W0mSxnLSbsVCDbw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "webpack": "^1 || ^2 || ^3 || ^4 || ^5" + } + }, + "node_modules/speed-measure-webpack-plugin/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/speed-measure-webpack-plugin/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/speed-measure-webpack-plugin/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/speed-measure-webpack-plugin/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/speed-measure-webpack-plugin/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/speed-measure-webpack-plugin/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/stream-browserify/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "node_modules/stream-http/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/stream-http/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "node_modules/streamroller": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.2.tgz", + "integrity": "sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==", + "dev": true, + "dependencies": { + "date-format": "^4.0.3", + "debug": "^4.1.1", + "fs-extra": "^10.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/streamroller/node_modules/fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/streamroller/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/streamroller/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/style-loader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz", + "integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/style-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/stylehacks": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", + "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/stylus": { + "version": "0.54.8", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.8.tgz", + "integrity": "sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg==", + "dev": true, + "dependencies": { + "css-parse": "~2.0.0", + "debug": "~3.1.0", + "glob": "^7.1.6", + "mkdirp": "~1.0.4", + "safer-buffer": "^2.1.2", + "sax": "~1.2.4", + "semver": "^6.3.0", + "source-map": "^0.7.3" + }, + "bin": { + "stylus": "bin/stylus" + }, + "engines": { + "node": "*" + } + }, + "node_modules/stylus-loader": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-4.3.3.tgz", + "integrity": "sha512-PpWB5PnCXUzW4WMYhCvNzAHJBjIBPMXwsdfkkKuA9W7k8OQFMl/19/AQvaWsxz2IptxUlCseyJ6TY/eEKJ4+UQ==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.4", + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "normalize-path": "^3.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "stylus": ">=0.52.4", + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/stylus-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/stylus/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/stylus/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/stylus/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "dev": true, + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/symbol-observable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-3.0.0.tgz", + "integrity": "sha512-6tDOXSHiVjuCaasQSWTmHUWn4PuG7qa3+1WT031yTc/swT7+rLiw3GOrFxaH1E3lLP09dH3bVuVDf2gK5rxG3Q==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/terser": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", + "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", + "dev": true, + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz", + "integrity": "sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ==", + "dev": true, + "dependencies": { + "cacache": "^15.0.5", + "find-cache-dir": "^3.3.1", + "jest-worker": "^26.5.0", + "p-limit": "^3.0.2", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "source-map": "^0.6.1", + "terser": "^5.3.4", + "webpack-sources": "^1.4.3" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser-webpack-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ts-pnp": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz", + "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/tslint/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslint/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/tslint/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tslint/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tslint/node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, + "node_modules/tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "node_modules/typescript": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.8.tgz", + "integrity": "sha512-oz1765PN+imfz1MlZzSZPtC/tqcwsCyIYA8L47EkRnRW97ztRk83SzMiWLrnChC0vqoYxSU1fcFUDA5gV/ZiPg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ua-parser-js": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "engines": { + "node": "*" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "dependencies": { + "unique-slug": "^2.0.0" + } + }, + "node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + } + }, + "node_modules/universal-analytics": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/universal-analytics/-/universal-analytics-0.4.23.tgz", + "integrity": "sha512-lgMIH7XBI6OgYn1woDEmxhGdj8yDefMKg7GkWdeATAlQZFrMrNyxSkpDzY57iY0/6fdlzTbBV03OawvvzG+q7A==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "request": "^2.88.2", + "uuid": "^3.0.0" + } + }, + "node_modules/universal-analytics/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "dependencies": { + "builtins": "^1.0.3" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + }, + "optionalDependencies": { + "chokidar": "^3.4.1", + "watchpack-chokidar2": "^2.0.1" + } + }, + "node_modules/watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "dev": true, + "optional": true, + "dependencies": { + "chokidar": "^2.1.8" + } + }, + "node_modules/watchpack-chokidar2/node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "optional": true, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/watchpack-chokidar2/node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "optional": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "optional": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", + "dev": true, + "optional": true, + "dependencies": { + "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", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/watchpack-chokidar2/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "optional": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "optional": true, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "optional": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "optional": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "optional": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/watchpack-chokidar2/node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "optional": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/watchpack-chokidar2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/watchpack-chokidar2/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "optional": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webpack": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", + "integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.3.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + }, + "webpack-command": { + "optional": true + } + } + }, + "node_modules/webpack-dev-middleware": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", + "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", + "dev": true, + "dependencies": { + "memory-fs": "^0.4.1", + "mime": "^2.4.4", + "mkdirp": "^0.5.1", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "webpack": "^4.0.0" + } + }, + "node_modules/webpack-dev-middleware/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/webpack-dev-server": { + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.3.tgz", + "integrity": "sha512-3x31rjbEQWKMNzacUZRE6wXvUFuGpH7vr0lIEbYpMAG9BOxi0928QU1BBswOAP3kg3H1O4hiS+sq4YyAn6ANnA==", + "dev": true, + "dependencies": { + "ansi-html-community": "0.0.8", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.3.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.8", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.26", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.8", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "^0.3.21", + "sockjs-client": "^1.5.0", + "spdy": "^4.0.2", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "^13.3.2" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 6.11.5" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/webpack-dev-server/node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", + "dev": true, + "dependencies": { + "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", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/webpack-dev-server/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/webpack-dev-server/node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/webpack-dev-server/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/webpack-dev-server/node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/webpack-dev-server/node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/webpack-dev-server/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/webpack-dev-server/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/webpack-dev-server/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/webpack-dev-server/node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/webpack-dev-server/node_modules/schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "dependencies": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/webpack-dev-server/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/webpack-dev-server/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/webpack-dev-server/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/string-width/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/string-width/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "dev": true, + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/webpack-dev-server/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/webpack-dev-server/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/webpack-dev-server/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/webpack-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", + "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "dev": true, + "dependencies": { + "ansi-colors": "^3.0.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/webpack-log/node_modules/ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-log/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/webpack-merge": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.7.3.tgz", + "integrity": "sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz", + "integrity": "sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-sources/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-subresource-integrity": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.5.2.tgz", + "integrity": "sha512-GBWYBoyalbo5YClwWop9qe6Zclp8CIXYGIz12OPclJhIrSplDxs1Ls1JDMH8xBPPrg1T6ISaTW9Y6zOrwEiAzw==", + "dev": true, + "dependencies": { + "webpack-sources": "^1.3.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "html-webpack-plugin": ">= 2.21.0 < 5", + "webpack": ">= 1.12.11 < 6" + }, + "peerDependenciesMeta": { + "html-webpack-plugin": { + "optional": true + } + } + }, + "node_modules/webpack-subresource-integrity/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-subresource-integrity/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/webpack/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "dependencies": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "node_modules/webpack/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/webpack/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/webpack/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/webpack/node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/webpack/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/webpack/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/webpack/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/webpack/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/webpack/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "dependencies": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/webpack/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/webpack/node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/webpack/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "dependencies": { + "figgy-pudding": "^3.5.1" + } + }, + "node_modules/webpack/node_modules/terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/webpack/node_modules/terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dev": true, + "dependencies": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "webpack": "^4.0.0" + } + }, + "node_modules/webpack/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/webpack/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/webpack/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "node_modules/worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "dependencies": { + "errno": "~0.1.7" + } + }, + "node_modules/worker-plugin": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/worker-plugin/-/worker-plugin-5.0.0.tgz", + "integrity": "sha512-AXMUstURCxDD6yGam2r4E34aJg6kW85IiaeX72hi+I1cxyaMUtrvVY6sbfpGKAj5e7f68Acl62BjQF5aOOx2IQ==", + "dev": true, + "dependencies": { + "loader-utils": "^1.1.0" + }, + "peerDependencies": { + "webpack": ">= 4" + } + }, + "node_modules/worker-plugin/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/worker-plugin/node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/ws": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zone.js": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.10.3.tgz", + "integrity": "sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==" + } + }, "dependencies": { "@angular-devkit/architect": { - "version": "0.1102.14", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.14.tgz", - "integrity": "sha512-965TVXuBtRb8RySgxRxUEO+YTd7mT0xiqVHSe+MHvMtUCmEE9vwRofFZl6axkK5ri4fiomiMnOVE19aw4spgNQ==", + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.18.tgz", + "integrity": "sha512-W561li5FM4LWuKPUA5fZxJqBRfOuqE3UL/HXSD8ivDErtyVE70oLF3bjPRW1S5UFeNPfaK+EAeoMss1DXz9DnQ==", "dev": true, "requires": { - "@angular-devkit/core": "11.2.14", + "@angular-devkit/core": "11.2.18", "rxjs": "6.6.3" }, "dependencies": { @@ -32,15 +16530,15 @@ } }, "@angular-devkit/build-angular": { - "version": "0.1102.14", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.1102.14.tgz", - "integrity": "sha512-SyX9SK3qfpk6xNIrxpxYi8zxP/cN2kny4I+XYbkKvgGiE3qhkrC/PRJE9OWj0sloekLD0CDfFWOvIiw3GMc4Tg==", + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.1102.18.tgz", + "integrity": "sha512-RsLen4BSq94y69mEk3Y+VQeWu2O6yHYcJsyV0+7FohRDVQVDHH4zjmSOsJNQzOb+naTWg6+NYRaNSAUHsTpPHw==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1102.14", - "@angular-devkit/build-optimizer": "0.1102.14", - "@angular-devkit/build-webpack": "0.1102.14", - "@angular-devkit/core": "11.2.14", + "@angular-devkit/architect": "0.1102.18", + "@angular-devkit/build-optimizer": "0.1102.18", + "@angular-devkit/build-webpack": "0.1102.18", + "@angular-devkit/core": "11.2.18", "@babel/core": "7.12.10", "@babel/generator": "7.12.11", "@babel/plugin-transform-async-to-generator": "7.12.1", @@ -50,7 +16548,7 @@ "@babel/template": "7.12.7", "@discoveryjs/json-ext": "0.5.2", "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@ngtools/webpack": "11.2.14", + "@ngtools/webpack": "11.2.18", "ansi-colors": "4.1.1", "autoprefixer": "10.2.4", "babel-loader": "8.2.2", @@ -60,7 +16558,7 @@ "circular-dependency-plugin": "5.2.2", "copy-webpack-plugin": "6.3.2", "core-js": "3.8.3", - "critters": "0.0.7", + "critters": "0.0.12", "css-loader": "5.0.1", "cssnano": "5.0.2", "file-loader": "6.2.0", @@ -105,31 +16603,38 @@ "tree-kill": "1.2.2", "webpack": "4.44.2", "webpack-dev-middleware": "3.7.2", - "webpack-dev-server": "3.11.2", + "webpack-dev-server": "3.11.3", "webpack-merge": "5.7.3", "webpack-sources": "2.2.0", "webpack-subresource-integrity": "1.5.2", "worker-plugin": "5.0.0" }, "dependencies": { + "@ngtools/webpack": { + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-11.2.18.tgz", + "integrity": "sha512-5CsCQRc11g7sGGQzelnfrS7zQFVt9Ps7SiajJhUqI2hyNptdItzbc9TVyNMIy4cHIAT+j7kVwqdBSRhiylZcCw==", + "dev": true, + "requires": { + "@angular-devkit/core": "11.2.18", + "enhanced-resolve": "5.7.0", + "webpack-sources": "2.2.0" + } + }, "core-js": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz", "integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==", "dev": true }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "enhanced-resolve": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", + "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" } }, "rxjs": { @@ -141,32 +16646,11 @@ "tslib": "^1.9.0" } }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true }, "tslib": { "version": "1.14.1", @@ -177,9 +16661,9 @@ } }, "@angular-devkit/build-optimizer": { - "version": "0.1102.14", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1102.14.tgz", - "integrity": "sha512-1j69rFqE6tPMO0lQvOH8ogF7vE+p+Ws1/OtdZKUkZPOerIbQ8A3n5wzCx6/ZzMVhBQ3sXNhaShb4b9/1YuwU/g==", + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1102.18.tgz", + "integrity": "sha512-bZ+Ma31Bkcm3Bp7RL08ltGD9k+m5qe6JpQgN9oKjfc0WwB5ldux7mgE1lz6OfxCaY5wsnLRCl1SdKWJDkyAz3A==", "dev": true, "requires": { "loader-utils": "2.0.0", @@ -204,13 +16688,13 @@ } }, "@angular-devkit/build-webpack": { - "version": "0.1102.14", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1102.14.tgz", - "integrity": "sha512-+dJvzrwjbHY0bNr8fUDVbn4D4pAT/h1YVpGVyaoX7q66LN0x61zRC3e10gJ/Mr54l3yfc26M0OPD9KG8iZRbCA==", + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1102.18.tgz", + "integrity": "sha512-a/n4BoIb3A7imMupkvCA1bJRoP5zs9vuwAT2xmCM8QikE+mUURotz/PqBycuUCFVquG7bmj7qowSSp99z3RKGQ==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1102.14", - "@angular-devkit/core": "11.2.14", + "@angular-devkit/architect": "0.1102.18", + "@angular-devkit/core": "11.2.18", "rxjs": "6.6.3" }, "dependencies": { @@ -232,9 +16716,9 @@ } }, "@angular-devkit/core": { - "version": "11.2.14", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-11.2.14.tgz", - "integrity": "sha512-Ad1fHqLxDwhkQgLPqq9i+G65NSOoIHXQx7ILcSPACKurV3XLS1RO9BgP/BDaqHAG+WslUAPbMStaTzzPm+9dNw==", + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-11.2.18.tgz", + "integrity": "sha512-w7llSJfLg9/+Qb7kvFIZeUomt2kopt1Ujh6nsm/JGEoZWB6Ay63gtuj/IU/0i96Hw4UWkk6Oe7wKSKuDNMIO/w==", "dev": true, "requires": { "ajv": "6.12.6", @@ -262,12 +16746,12 @@ } }, "@angular-devkit/schematics": { - "version": "11.2.14", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-11.2.14.tgz", - "integrity": "sha512-Ol6+0qdGKzuVJm5gCtQr47X0OCihTfAxI4h047cHYhPFIGGPSvkG/QeJMZugflgoobi2k/xcYokOu/VAkRtWbQ==", + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-11.2.18.tgz", + "integrity": "sha512-MqqW/Ef1wp6yrdHEWSCWegjIBIQA9BblQ4eP6urjNaGnLRRawIrVJtzZQTcEgwIWJTbr0vIXJOdgKSIsqgPVTg==", "dev": true, "requires": { - "@angular-devkit/core": "11.2.14", + "@angular-devkit/core": "11.2.18", "ora": "5.3.0", "rxjs": "6.6.3" }, @@ -298,16 +16782,16 @@ } }, "@angular/cli": { - "version": "11.2.14", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-11.2.14.tgz", - "integrity": "sha512-8Ud7vcUK7CKjzT2Ks1glLhleAPIC5ChcrA15XtOb7k+/uMHBkMscP/UKymbVQiBjCJlglbzJoyj8cpVYTZY5KA==", + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-11.2.18.tgz", + "integrity": "sha512-+62LVEjS737nUnd03YcMAynP5INpQmUf7k2LHgXFcdXfilTE6tv35GRecVHugGxa7m0pqm5atGiQOM26bllylw==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1102.14", - "@angular-devkit/core": "11.2.14", - "@angular-devkit/schematics": "11.2.14", - "@schematics/angular": "11.2.14", - "@schematics/update": "0.1102.14", + "@angular-devkit/architect": "0.1102.18", + "@angular-devkit/core": "11.2.18", + "@angular-devkit/schematics": "11.2.18", + "@schematics/angular": "11.2.18", + "@schematics/update": "0.1102.18", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.1", "debug": "4.3.1", @@ -325,42 +16809,6 @@ "symbol-observable": "3.0.0", "universal-analytics": "0.4.23", "uuid": "8.3.2" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dev": true, - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true - } } }, "@angular/common": { @@ -402,47 +16850,6 @@ "yargs": "^16.2.0" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -454,44 +16861,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true } } }, @@ -542,18 +16911,18 @@ } }, "@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", "dev": true }, "@babel/core": { @@ -579,6 +16948,12 @@ "source-map": "^0.5.0" }, "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -607,33 +16982,33 @@ } }, "@babel/helper-annotate-as-pure": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", - "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", - "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-compilation-targets": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", - "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, "requires": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", "semver": "^6.3.0" }, "dependencies": { @@ -646,411 +17021,414 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", - "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", + "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-split-export-declaration": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", - "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^5.0.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "regexpu-core": "^4.7.1" + "@babel/types": "^7.16.7" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", - "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", - "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" }, "dependencies": { "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } } } }, "@babel/helper-get-function-arity": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", - "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-hoist-variables": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", - "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", - "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", "dev": true, "requires": { - "@babel/types": "^7.15.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-imports": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", - "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-transforms": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", - "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-simple-access": "^7.14.8", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.6.tgz", + "integrity": "sha512-2ULmRdqoOMpdvkbT8jONrZML/XALfzxlb052bldftkicAUy8AxSCkD5trDPQcwHNmolcl7wP6ehNqMlyUw6AaA==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" }, "dependencies": { "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } } } }, "@babel/helper-optimise-call-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", - "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", - "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-wrap-function": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" } }, "@babel/helper-replace-supers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", - "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-simple-access": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", - "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, "requires": { - "@babel/types": "^7.14.8" + "@babel/types": "^7.16.7" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", - "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", - "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", - "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" }, "dependencies": { "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } } } }, "@babel/helpers": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", - "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", + "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", "dev": true, "requires": { - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.0", + "@babel/types": "^7.17.0" }, "dependencies": { "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } } } }, "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - } } }, "@babel/parser": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", - "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", + "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", - "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", - "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", - "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", - "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", - "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", - "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", - "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", - "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", - "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", "dev": true, "requires": { - "@babel/compat-data": "^7.14.7", - "@babel/helper-compilation-targets": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/compat-data": "^7.17.0", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.14.5" + "@babel/plugin-transform-parameters": "^7.16.7" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", - "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", - "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.10", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", - "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-async-generators": { @@ -1162,12 +17540,12 @@ } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", - "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-async-to-generator": { @@ -1182,230 +17560,232 @@ } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", - "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", - "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-classes": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", - "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", - "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-destructuring": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", - "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz", + "integrity": "sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", - "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", - "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", - "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-for-of": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", - "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", - "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", - "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", - "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", - "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", - "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", - "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", - "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", - "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7" } }, "@babel/plugin-transform-new-target": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", - "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-object-super": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", - "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" } }, "@babel/plugin-transform-parameters": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", - "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-property-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", - "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-regenerator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", - "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", "dev": true, "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", - "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-runtime": { @@ -1417,71 +17797,79 @@ "@babel/helper-module-imports": "^7.12.5", "@babel/helper-plugin-utils": "^7.10.4", "semver": "^5.5.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", - "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-spread": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", - "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", - "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-template-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", - "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", - "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", - "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", - "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/preset-env": { @@ -1556,12 +17944,20 @@ "@babel/types": "^7.12.11", "core-js-compat": "^3.8.0", "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -1592,29 +17988,30 @@ } }, "@babel/traverse": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", - "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { "@babel/generator": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", - "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", + "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", "dev": true, "requires": { - "@babel/types": "^7.15.0", + "@babel/types": "^7.17.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -1628,15 +18025,21 @@ } }, "@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true + }, "@discoveryjs/json-ext": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz", @@ -1662,17 +18065,6 @@ "schema-utils": "^2.7.0" } }, - "@ngtools/webpack": { - "version": "11.2.14", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-11.2.14.tgz", - "integrity": "sha512-6q57tEWtUJRsxfTKE19L20iXvNesfVy8hrVdyzVk64DZQh0lIl4/xZT4d5bJCWOuQQDaAeZK4YbEFcYJn7k1yw==", - "dev": true, - "requires": { - "@angular-devkit/core": "11.2.14", - "enhanced-resolve": "5.7.0", - "webpack-sources": "2.2.0" - } - }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1700,9 +18092,9 @@ } }, "@npmcli/ci-detect": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz", - "integrity": "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.4.0.tgz", + "integrity": "sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q==", "dev": true }, "@npmcli/git": { @@ -1721,21 +18113,21 @@ "which": "^2.0.2" }, "dependencies": { + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, "hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, "npm-package-arg": { "version": "8.1.5", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz", @@ -1769,6 +18161,12 @@ "retry": "^0.12.0" } }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -1807,20 +18205,12 @@ "requires": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } } }, "@npmcli/node-gyp": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.2.tgz", - "integrity": "sha512-yrJUe6reVMpktcvagumoqD9r08fH1iRo01gn1u0zoCApa9lnZGEigVKUd2hzsCId4gdtkZZIVscLhNxMECKgRg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", "dev": true }, "@npmcli/promise-spawn": { @@ -1857,43 +18247,38 @@ } }, "@schematics/angular": { - "version": "11.2.14", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-11.2.14.tgz", - "integrity": "sha512-nErn5BFYp4HB7mOkt23kF+dyM6zPxolejM8eXQ5vd/rdhcc6ROaMZ0EmeEAWkfqB3+vqaSDz/D2Nm/IjJlyW/Q==", + "version": "11.2.18", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-11.2.18.tgz", + "integrity": "sha512-i1cTkpLzXmm9/lD6jaBW5fJe0eDNjr7ie+0/cCsNVuYEIs71j1y3n/iezlBifeQr83/odDniG/k75GQX410xrA==", "dev": true, "requires": { - "@angular-devkit/core": "11.2.14", - "@angular-devkit/schematics": "11.2.14", + "@angular-devkit/core": "11.2.18", + "@angular-devkit/schematics": "11.2.18", "jsonc-parser": "3.0.0" } }, "@schematics/update": { - "version": "0.1102.14", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1102.14.tgz", - "integrity": "sha512-OsWuC0iyNjpST1+hVUUZAegXAFpEFpS5uKYSQF3jsbyw8XHx7oA5/HbEwyr2WkX2EdV1tKrDLz6BrD5b8W6EYw==", + "version": "0.1102.18", + "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1102.18.tgz", + "integrity": "sha512-w3jM/0C3c2+KKLGCilraYzOyJkvLfY5hegFR8NVoaF2FH7UV14YfkQJh15HLi4ItC3l0tG0B5p2hef+qAhfaEA==", "dev": true, "requires": { - "@angular-devkit/core": "11.2.14", - "@angular-devkit/schematics": "11.2.14", + "@angular-devkit/core": "11.2.18", + "@angular-devkit/schematics": "11.2.18", "@yarnpkg/lockfile": "1.1.0", "ini": "2.0.0", "npm-package-arg": "^8.0.0", "pacote": "11.2.4", "semver": "7.3.4", "semver-intersect": "1.4.0" - }, - "dependencies": { - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, + "@socket.io/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@socket.io/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-dOlCBKnDw4iShaIsH/bxujKTM18+2TOAsYz+KSc11Am38H4q5Xw8Bbz97ZYdrVNM+um3p7w86Bvvmcn9q+5+eQ==", + "dev": true + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -1901,15 +18286,15 @@ "dev": true }, "@trysound/sax": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz", - "integrity": "sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true }, "@types/component-emitter": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz", - "integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", + "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", "dev": true }, "@types/cookie": { @@ -1925,9 +18310,9 @@ "dev": true }, "@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, "requires": { "@types/minimatch": "*", @@ -1941,9 +18326,9 @@ "dev": true }, "@types/jasminewd2": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.6.tgz", - "integrity": "sha512-2ZOKrxb8bKRmP/po5ObYnRDgFE4i+lQiEB27bAMmtMWLgJSqlIDqlLx6S0IRorpOmOPRQ6O80NujTmQAtBkeNw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.10.tgz", + "integrity": "sha512-J7mDz7ovjwjc+Y9rR9rY53hFWKATcIkrr9DwQWmOas4/pnIPJTXawnzjwpHm3RSxz/e3ZVUvQ7cRbd5UQLo10g==", "dev": true, "requires": { "@types/jasmine": "*" @@ -1962,9 +18347,9 @@ "dev": true }, "@types/node": { - "version": "12.20.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.19.tgz", - "integrity": "sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw==", + "version": "12.20.46", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.46.tgz", + "integrity": "sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A==", "dev": true }, "@types/parse-json": { @@ -2204,13 +18589,13 @@ "dev": true }, "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, "acorn": { @@ -2239,9 +18624,9 @@ } }, "agentkeepalive": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.4.tgz", - "integrity": "sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -2275,19 +18660,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true + "dev": true, + "requires": {} }, "ansi-colors": { "version": "4.1.1", @@ -2304,16 +18685,16 @@ "type-fest": "^0.21.3" } }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", "dev": true }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -2348,9 +18729,9 @@ "dev": true }, "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", "dev": true, "requires": { "delegates": "^1.0.0", @@ -2390,6 +18771,14 @@ "dev": true, "requires": { "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } } }, "aria-query": { @@ -2451,9 +18840,9 @@ "dev": true }, "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "requires": { "safer-buffer": "~2.1.0" @@ -2623,12 +19012,6 @@ "emojis-list": "^3.0.0", "json5": "^1.0.1" } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true } } }, @@ -2642,9 +19025,9 @@ } }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base": { @@ -2670,44 +19053,9 @@ "requires": { "is-descriptor": "^1.0.0" } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } } } }, - "base64-arraybuffer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", - "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", - "dev": true - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2766,14 +19114,6 @@ "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - } } }, "bluebird": { @@ -2789,29 +19129,23 @@ "dev": true }, "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==", "dev": true, "requires": { - "bytes": "3.1.0", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", - "http-errors": "1.7.2", + "http-errors": "1.8.1", "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "qs": "6.9.7", + "raw-body": "2.4.3", + "type-is": "~1.6.18" }, "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2938,12 +19272,6 @@ "safe-buffer": "^5.2.0" }, "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2962,16 +19290,16 @@ } }, "browserslist": { - "version": "4.16.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", - "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", + "integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001251", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.811", + "caniuse-lite": "^1.0.30001312", + "electron-to-chromium": "^1.4.71", "escalade": "^3.1.1", - "node-releases": "^1.1.75" + "node-releases": "^2.0.2", + "picocolors": "^1.0.0" } }, "buffer": { @@ -2985,9 +19313,9 @@ } }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "buffer-indexof": { @@ -3021,9 +19349,9 @@ "dev": true }, "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, "cacache": { @@ -3049,28 +19377,6 @@ "ssri": "^8.0.0", "tar": "^6.0.2", "unique-filename": "^1.1.1" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } } }, "cache-base": { @@ -3107,9 +19413,9 @@ "dev": true }, "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "caniuse-api": { @@ -3125,9 +19431,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001251", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", - "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "version": "1.0.30001312", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz", + "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==", "dev": true }, "canonical-path": { @@ -3143,9 +19449,9 @@ "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -3160,9 +19466,9 @@ "dev": true }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -3201,7 +19507,8 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz", "integrity": "sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==", - "dev": true + "dev": true, + "requires": {} }, "class-utils": { "version": "0.3.6", @@ -3223,6 +19530,63 @@ "requires": { "is-descriptor": "^0.1.0" } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, @@ -3242,9 +19606,9 @@ } }, "cli-spinners": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", - "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", "dev": true }, "cli-width": { @@ -3254,54 +19618,14 @@ "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "clone": { @@ -3353,13 +19677,15 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-9.0.0.tgz", "integrity": "sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ==", - "dev": true + "dev": true, + "requires": {} }, "@angular/core": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@angular/core/-/core-9.0.0.tgz", "integrity": "sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w==", - "dev": true + "dev": true, + "requires": {} }, "source-map": { "version": "0.5.7", @@ -3367,12 +19693,6 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -3407,15 +19727,15 @@ "dev": true }, "colord": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.7.0.tgz", - "integrity": "sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", + "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==", "dev": true }, "colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true }, "colors": { @@ -3434,9 +19754,9 @@ } }, "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, "commondir": { @@ -3475,6 +19795,12 @@ "vary": "~1.1.2" }, "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -3590,12 +19916,20 @@ "dev": true }, "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } } }, "content-type": { @@ -3614,9 +19948,9 @@ } }, "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "dev": true }, "cookie-signature": { @@ -3626,12 +19960,12 @@ "dev": true }, "copy-anything": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz", - "integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", "dev": true, "requires": { - "is-what": "^3.12.0" + "is-what": "^3.14.1" } }, "copy-concurrently": { @@ -3648,6 +19982,15 @@ "run-queue": "^1.0.0" }, "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -3684,15 +20027,6 @@ "webpack-sources": "^1.4.3" }, "dependencies": { - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, "schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", @@ -3723,17 +20057,17 @@ } }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" }, "core-js-compat": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.2.tgz", - "integrity": "sha512-4lUshXtBXsdmp8cDWh6KKiHUg40AjiuPD3bOWkNVsr1xkAhpUqCjaZ8lB1bKx9Gb5fXcbRbFJ4f4qpRIRTuJqQ==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", + "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", "dev": true, "requires": { - "browserslist": "^4.16.7", + "browserslist": "^4.19.1", "semver": "7.0.0" }, "dependencies": { @@ -3762,9 +20096,9 @@ } }, "cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", "dev": true, "requires": { "@types/parse-json": "^4.0.0", @@ -3820,15 +20154,16 @@ } }, "critters": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.7.tgz", - "integrity": "sha512-qUF2SaAWFYjNPdCcPpu68p2DnHiosia84yx5mPTlUMQjkjChR+n6sO1/I7yn2U2qNDgSPTd2SoaTIDQcUL+EwQ==", + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.12.tgz", + "integrity": "sha512-ujxKtKc/mWpjrOKeaACTaQ1aP0O31M0ZPWhfl85jZF1smPU4Ivb9va5Ox2poif4zVJQQo0LCFlzGtEZAsCAPcw==", "dev": true, "requires": { "chalk": "^4.1.0", - "css": "^3.0.0", + "css-select": "^4.1.3", "parse5": "^6.0.1", "parse5-htmlparser2-tree-adapter": "^6.0.1", + "postcss": "^8.3.7", "pretty-bytes": "^5.3.0" }, "dependencies": { @@ -3872,6 +20207,17 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "postcss": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.7.tgz", + "integrity": "sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==", + "dev": true, + "requires": { + "nanoid": "^3.3.1", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3894,6 +20240,14 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "crypto-browserify": { @@ -3916,22 +20270,17 @@ } }, "css": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", - "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", "dev": true, "requires": { - "inherits": "^2.0.4", + "inherits": "^2.0.3", "source-map": "^0.6.1", - "source-map-resolve": "^0.6.0" + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" }, "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3940,16 +20289,10 @@ } } }, - "css-color-names": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-1.0.1.tgz", - "integrity": "sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA==", - "dev": true - }, "css-declaration-sorter": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.1.tgz", - "integrity": "sha512-BZ1aOuif2Sb7tQYY1GeCjG7F++8ggnwUkH5Ictw0mrdpqpEd+zWmcPdstnH2TItlb74FqR0DrVEieon221T/1Q==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.4.tgz", + "integrity": "sha512-lpfkqS0fctcmZotJGhnxkIyJWvBXgpyi2wsFd4J8VB7wzyrT6Ch/3Q+FMNJpjK4gu1+GN5khOnpU2ZVKrLbhCw==", "dev": true, "requires": { "timsort": "^0.3.0" @@ -3985,15 +20328,6 @@ "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -4004,52 +20338,19 @@ "dev": true, "requires": { "css": "^2.0.0" - }, - "dependencies": { - "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - } } }, "css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", + "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" + "css-what": "^5.1.0", + "domhandler": "^4.3.0", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" } }, "css-selector-tokenizer": { @@ -4081,9 +20382,9 @@ } }, "css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", "dev": true }, "cssauron": { @@ -4113,47 +20414,48 @@ } }, "cssnano-preset-default": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz", - "integrity": "sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.0.tgz", + "integrity": "sha512-3N5Vcptj2pqVKpHVqH6ezOJvqikR2PdLTbTrsrhF61FbLRQuujAqZ2sKN5rvcMsb7hFjrNnjZT8CGEkxoN/Pwg==", "dev": true, "requires": { "css-declaration-sorter": "^6.0.3", - "cssnano-utils": "^2.0.1", - "postcss-calc": "^8.0.0", - "postcss-colormin": "^5.2.0", - "postcss-convert-values": "^5.0.1", - "postcss-discard-comments": "^5.0.1", - "postcss-discard-duplicates": "^5.0.1", - "postcss-discard-empty": "^5.0.1", - "postcss-discard-overridden": "^5.0.1", - "postcss-merge-longhand": "^5.0.2", - "postcss-merge-rules": "^5.0.2", - "postcss-minify-font-values": "^5.0.1", - "postcss-minify-gradients": "^5.0.2", - "postcss-minify-params": "^5.0.1", - "postcss-minify-selectors": "^5.1.0", - "postcss-normalize-charset": "^5.0.1", - "postcss-normalize-display-values": "^5.0.1", - "postcss-normalize-positions": "^5.0.1", - "postcss-normalize-repeat-style": "^5.0.1", - "postcss-normalize-string": "^5.0.1", - "postcss-normalize-timing-functions": "^5.0.1", - "postcss-normalize-unicode": "^5.0.1", - "postcss-normalize-url": "^5.0.2", - "postcss-normalize-whitespace": "^5.0.1", - "postcss-ordered-values": "^5.0.2", - "postcss-reduce-initial": "^5.0.1", - "postcss-reduce-transforms": "^5.0.1", - "postcss-svgo": "^5.0.2", - "postcss-unique-selectors": "^5.0.1" + "cssnano-utils": "^3.1.0", + "postcss-calc": "^8.2.3", + "postcss-colormin": "^5.3.0", + "postcss-convert-values": "^5.1.0", + "postcss-discard-comments": "^5.1.0", + "postcss-discard-duplicates": "^5.1.0", + "postcss-discard-empty": "^5.1.0", + "postcss-discard-overridden": "^5.1.0", + "postcss-merge-longhand": "^5.1.0", + "postcss-merge-rules": "^5.1.0", + "postcss-minify-font-values": "^5.1.0", + "postcss-minify-gradients": "^5.1.0", + "postcss-minify-params": "^5.1.0", + "postcss-minify-selectors": "^5.2.0", + "postcss-normalize-charset": "^5.1.0", + "postcss-normalize-display-values": "^5.1.0", + "postcss-normalize-positions": "^5.1.0", + "postcss-normalize-repeat-style": "^5.1.0", + "postcss-normalize-string": "^5.1.0", + "postcss-normalize-timing-functions": "^5.1.0", + "postcss-normalize-unicode": "^5.1.0", + "postcss-normalize-url": "^5.1.0", + "postcss-normalize-whitespace": "^5.1.0", + "postcss-ordered-values": "^5.1.0", + "postcss-reduce-initial": "^5.1.0", + "postcss-reduce-transforms": "^5.1.0", + "postcss-svgo": "^5.1.0", + "postcss-unique-selectors": "^5.1.0" } }, "cssnano-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz", - "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==", - "dev": true + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", + "dev": true, + "requires": {} }, "csso": { "version": "4.2.0", @@ -4177,9 +20479,9 @@ "dev": true }, "damerau-levenshtein": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz", - "integrity": "sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, "dashdash": { @@ -4192,15 +20494,15 @@ } }, "date-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", - "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz", + "integrity": "sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ==", "dev": true }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -4268,37 +20570,6 @@ "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } } }, "del": { @@ -4352,6 +20623,12 @@ "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -4510,18 +20787,18 @@ "dev": true }, "domhandler": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", - "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", + "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", "dev": true, "requires": { "domelementtype": "^2.2.0" } }, "domutils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", - "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "dev": true, "requires": { "dom-serializer": "^1.0.1", @@ -4584,9 +20861,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.813", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.813.tgz", - "integrity": "sha512-YcSRImHt6JZZ2sSuQ4Bzajtk98igQ0iKkksqlzZLzbh4p0OIyJRSvUbsgqfcR8txdfsoYCc4ym306t4p2kP/aw==", + "version": "1.4.75", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.75.tgz", + "integrity": "sha512-LxgUNeu3BVU7sXaKjUDD9xivocQLxFtq6wgERrutdY/yIOps3ODOZExK1jg8DTEg4U8TUCb5MLGeWFOYuxjF3Q==", "dev": true }, "elliptic": { @@ -4609,12 +20886,6 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true } } }, @@ -4668,51 +20939,77 @@ } }, "engine.io": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-4.1.1.tgz", - "integrity": "sha512-t2E9wLlssQjGw0nluF6aYyfX8LwYU8Jj0xct+pAhfWfv/YrBn6TSNtEYsgxHIfaMqfrLx07czcMg9bMN6di+3w==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.3.tgz", + "integrity": "sha512-rqs60YwkvWTLLnfazqgZqLa/aKo+9cueVfEi/dZ8PyGyaf8TLOxj++4QMIgeG3Gn0AhrWiFXvghsoY9L9h25GA==", "dev": true, "requires": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", "cookie": "~0.4.1", "cors": "~2.8.5", "debug": "~4.3.1", - "engine.io-parser": "~4.0.0", - "ws": "~7.4.2" - }, - "dependencies": { - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "dev": true - }, - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true - } + "engine.io-parser": "~5.0.3", + "ws": "~8.2.3" } }, "engine.io-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz", - "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.3.tgz", + "integrity": "sha512-BtQxwF27XUNnSafQLvDi0dQ8s3i6VgzSoQMJacpIcGNrlUdfHSKbgm3jmjCVvQluGzqwujQMPAoMai3oYSTurg==", "dev": true, "requires": { - "base64-arraybuffer": "0.1.4" + "@socket.io/base64-arraybuffer": "~1.0.2" } }, "enhanced-resolve": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", - "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", "dev": true, "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "ent": { @@ -4734,9 +21031,9 @@ "dev": true }, "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", "dev": true }, "errno": { @@ -4801,9 +21098,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -4914,6 +21211,69 @@ "is-extendable": "^0.1.0" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -4923,17 +21283,17 @@ } }, "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz", + "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==", "dev": true, "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.19.2", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.4.2", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", @@ -4947,13 +21307,13 @@ "on-finished": "~2.3.0", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.9.7", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", + "safe-buffer": "5.2.1", + "send": "0.17.2", + "serve-static": "1.14.2", + "setprototypeof": "1.2.0", "statuses": "~1.5.0", "type-is": "~1.6.18", "utils-merge": "1.0.1", @@ -4980,6 +21340,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true } } }, @@ -4997,17 +21363,6 @@ "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } } }, "external-editor": { @@ -5055,34 +21410,11 @@ "is-extendable": "^0.1.0" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true } } }, @@ -5099,9 +21431,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -5124,9 +21456,9 @@ "dev": true }, "fastq": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", - "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -5249,9 +21581,9 @@ } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "flush-write-stream": { @@ -5291,9 +21623,9 @@ } }, "follow-redirects": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz", - "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==", + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", "dev": true }, "for-in": { @@ -5326,9 +21658,9 @@ "dev": true }, "fraction.js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz", - "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.3.tgz", + "integrity": "sha512-pUHWWt6vHzZZiQJcM6S/0PXfS+g6FM4BF5rj9wZyreivhQPdsh5PpE25VtSNxq80wHS5RfY51Ii+8Z0Zl/pmzg==", "dev": true }, "fragment-cache": { @@ -5560,9 +21892,9 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -5589,23 +21921,23 @@ "dev": true }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, "handle-thing": { @@ -5646,9 +21978,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, "has-tostringtag": { @@ -5729,12 +22061,6 @@ "safe-buffer": "^5.2.0" }, "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -5836,22 +22162,22 @@ "dev": true }, "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", "dev": true, "requires": { "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "toidentifier": "1.0.1" } }, "http-parser-js": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", - "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz", + "integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==", "dev": true }, "http-proxy": { @@ -5940,6 +22266,12 @@ } } }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -6042,7 +22374,8 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true + "dev": true, + "requires": {} }, "ieee754": { "version": "1.2.1", @@ -6057,9 +22390,9 @@ "dev": true }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "ignore-walk": { @@ -6117,6 +22450,15 @@ "path-exists": "^3.0.0" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", @@ -6172,9 +22514,9 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "ini": { @@ -6290,23 +22632,12 @@ "dev": true }, "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "kind-of": "^6.0.0" } }, "is-arguments": { @@ -6341,32 +22672,21 @@ "dev": true }, "is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dev": true, "requires": { "has": "^1.0.3" } }, "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "kind-of": "^6.0.0" } }, "is-date-object": { @@ -6379,22 +22699,14 @@ } }, "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "is-docker": { @@ -6404,10 +22716,13 @@ "dev": true }, "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } }, "is-extglob": { "version": "2.1.1", @@ -6422,9 +22737,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -6567,9 +22882,9 @@ "dev": true }, "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true }, "istanbul-lib-instrument": { @@ -6633,15 +22948,6 @@ "source-map": "^0.6.1" }, "dependencies": { - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "istanbul-lib-coverage": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", @@ -6658,10 +22964,10 @@ "semver": "^5.6.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "rimraf": { @@ -6688,9 +22994,9 @@ } }, "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -6698,9 +23004,9 @@ } }, "jasmine-core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.6.0.tgz", - "integrity": "sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.8.0.tgz", + "integrity": "sha512-zl0nZWDrmbCiKns0NcjkFGYkVTGCPUgoHypTaj+G2AzaWus7QGoXARSlYsSle2VRpSdfJmM+hzmFKzQNhF2kHg==", "dev": true }, "jasmine-spec-reporter": { @@ -6740,6 +23046,12 @@ } } }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", @@ -6775,9 +23087,9 @@ "dev": true }, "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { @@ -6792,12 +23104,6 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", - "dev": true - }, "json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", @@ -6805,14 +23111,6 @@ "dev": true, "requires": { "minimist": "^1.2.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } } }, "jsonc-parser": { @@ -6837,27 +23135,27 @@ "dev": true }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" } }, "karma": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.4.tgz", - "integrity": "sha512-hbhRogUYIulfkBTZT7xoPrCYhRBnBoqbbL4fszWD0ReFGUxU+LYBr3dwKdAluaDQ/ynT9/7C+Lf7pPNW4gSx4Q==", + "version": "6.3.17", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.17.tgz", + "integrity": "sha512-2TfjHwrRExC8yHoWlPBULyaLwAFmXmxQrcuFImt/JsAsSZu1uOWTZ1ZsWjqQtWpHLiatJOHL5jFjXSJIgCd01g==", "dev": true, "requires": { + "@colors/colors": "1.5.0", "body-parser": "^1.19.0", "braces": "^3.0.2", "chokidar": "^3.5.1", - "colors": "^1.4.0", "connect": "^3.7.0", "di": "^0.0.1", "dom-serialize": "^2.2.1", @@ -6866,58 +23164,24 @@ "http-proxy": "^1.18.1", "isbinaryfile": "^4.0.8", "lodash": "^4.17.21", - "log4js": "^6.3.0", + "log4js": "^6.4.1", "mime": "^2.5.2", "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", "qjobs": "^1.2.0", "range-parser": "^1.2.1", "rimraf": "^3.0.2", - "socket.io": "^3.1.0", + "socket.io": "^4.2.0", "source-map": "^0.6.1", "tmp": "^0.2.1", - "ua-parser-js": "^0.7.28", + "ua-parser-js": "^0.7.30", "yargs": "^16.1.1" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -6928,11 +23192,14 @@ "path-is-absolute": "^1.0.0" } }, - "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", - "dev": true + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } }, "source-map": { "version": "0.6.1", @@ -6948,44 +23215,6 @@ "requires": { "rimraf": "^3.0.0" } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true } } }, @@ -7018,21 +23247,14 @@ "dev": true, "requires": { "jasmine-core": "^3.6.0" - }, - "dependencies": { - "jasmine-core": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.8.0.tgz", - "integrity": "sha512-zl0nZWDrmbCiKns0NcjkFGYkVTGCPUgoHypTaj+G2AzaWus7QGoXARSlYsSle2VRpSdfJmM+hzmFKzQNhF2kHg==", - "dev": true - } } }, "karma-jasmine-html-reporter": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.7.0.tgz", "integrity": "sha512-pzum1TL7j90DTE86eFt48/s12hqwQuiD+e5aXx2Dc9wDEn2LfGq6RoAxEZZjFiN0RDSCOnosEKRZWxbQ+iMpQQ==", - "dev": true + "dev": true, + "requires": {} }, "karma-source-map-support": { "version": "1.4.0", @@ -7056,9 +23278,9 @@ "dev": true }, "klona": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", - "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz", + "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==", "dev": true }, "less": { @@ -7090,6 +23312,20 @@ "semver": "^5.6.0" } }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "optional": true + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -7165,9 +23401,9 @@ } }, "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "loader-runner": { @@ -7276,22 +23512,33 @@ } }, "log4js": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", - "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", "dev": true, "requires": { - "date-format": "^3.0.0", - "debug": "^4.1.1", - "flatted": "^2.0.1", - "rfdc": "^1.1.4", - "streamroller": "^2.2.4" + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } } }, "loglevel": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", - "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.0.tgz", + "integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==", "dev": true }, "lru-cache": { @@ -7330,9 +23577,9 @@ } }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "make-fetch-happen": { @@ -7358,6 +23605,12 @@ "ssri": "^8.0.0" }, "dependencies": { + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, "promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", @@ -7367,6 +23620,12 @@ "err-code": "^2.0.2", "retry": "^0.12.0" } + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true } } }, @@ -7514,24 +23773,24 @@ } }, "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "dev": true }, "mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true }, "mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "requires": { - "mime-db": "1.49.0" + "mime-db": "1.51.0" } }, "mimic-fn": { @@ -7602,15 +23861,15 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -7626,9 +23885,9 @@ } }, "minipass-fetch": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.3.4.tgz", - "integrity": "sha512-TielGogIzbUEtd1LsjZFs47RWuHHfhl6TiCx1InVxApBAmQ8bL0dL5ilkLGcRvuyW/A9nE+Lvn855Ewz8S0PnQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "dev": true, "requires": { "encoding": "^0.1.12", @@ -7710,27 +23969,13 @@ "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } } }, "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "move-concurrently": { "version": "1.0.1", @@ -7746,6 +23991,15 @@ "run-queue": "^1.0.3" }, "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -7793,9 +24047,9 @@ "optional": true }, "nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true }, "nanomatch": { @@ -7818,9 +24072,9 @@ } }, "needle": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.8.0.tgz", - "integrity": "sha512-ZTq6WYkN/3782H1393me3utVYdq2XyqNUFBsprEE3VMAT0+hP/cItpnITpqsY6ep2yeFE4Tqtqwc74VqUlUYtw==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.1.tgz", + "integrity": "sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==", "dev": true, "optional": true, "requires": { @@ -7842,9 +24096,9 @@ } }, "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "neo-async": { @@ -7877,35 +24131,12 @@ "nopt": "^5.0.0", "npmlog": "^4.1.2", "request": "^2.88.2", - "rimraf": "^3.0.2", - "semver": "^7.3.2", - "tar": "^6.0.2", - "which": "^2.0.2" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, + "rimraf": "^3.0.2", + "semver": "^7.3.2", + "tar": "^6.0.2", + "which": "^2.0.2" + }, + "dependencies": { "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7978,25 +24209,23 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" - }, - "dependencies": { - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" } } } }, "node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", "dev": true }, "nopt": { @@ -8042,17 +24271,6 @@ "dev": true, "requires": { "semver": "^7.1.1" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "npm-normalize-package-bin": { @@ -8070,17 +24288,6 @@ "hosted-git-info": "^3.0.6", "semver": "^7.0.0", "validate-npm-package-name": "^3.0.0" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "npm-packlist": { @@ -8093,22 +24300,6 @@ "ignore-walk": "^3.0.3", "npm-bundled": "^1.1.1", "npm-normalize-package-bin": "^1.0.1" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } } }, "npm-pick-manifest": { @@ -8120,17 +24311,6 @@ "npm-install-checks": "^4.0.0", "npm-package-arg": "^8.0.0", "semver": "^7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "npm-registry-fetch": { @@ -8171,9 +24351,9 @@ } }, "nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", "dev": true, "requires": { "boolbase": "^1.0.0" @@ -8217,6 +24397,43 @@ "is-descriptor": "^0.1.0" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -8435,12 +24652,12 @@ "dev": true }, "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { @@ -8450,6 +24667,17 @@ "dev": true, "requires": { "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } } }, "p-map": { @@ -8468,6 +24696,14 @@ "dev": true, "requires": { "retry": "^0.12.0" + }, + "dependencies": { + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + } } }, "p-try": { @@ -8501,14 +24737,6 @@ "rimraf": "^3.0.2", "ssri": "^8.0.0", "tar": "^6.1.0" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } } }, "pako": { @@ -8660,7 +24888,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -8677,9 +24905,9 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-to-regexp": { @@ -8713,16 +24941,22 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "pinkie": { @@ -8778,12 +25012,6 @@ "ms": "^2.1.1" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -8821,59 +25049,63 @@ } }, "postcss-calc": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.0.0.tgz", - "integrity": "sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", "dev": true, "requires": { - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" } }, "postcss-colormin": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.0.tgz", - "integrity": "sha512-+HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", + "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", "dev": true, "requires": { "browserslist": "^4.16.6", "caniuse-api": "^3.0.0", - "colord": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" } }, "postcss-convert-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz", - "integrity": "sha512-C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.0.tgz", + "integrity": "sha512-GkyPbZEYJiWtQB0KZ0X6qusqFHUepguBCNFi9t5JJc7I2OTXG7C0twbTLvCfaKOLl3rSXmpAwV7W5txd91V84g==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-discard-comments": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz", - "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==", - "dev": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.0.tgz", + "integrity": "sha512-L0IKF4jAshRyn03SkEO6ar/Ipz2oLywVbg2THf2EqqdNkBwmVMxuTR/RoAltOw4piiaLt3gCAdrbAqmTBInmhg==", + "dev": true, + "requires": {} }, "postcss-discard-duplicates": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz", - "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==", - "dev": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", + "dev": true, + "requires": {} }, "postcss-discard-empty": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz", - "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==", - "dev": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.0.tgz", + "integrity": "sha512-782T/buGgb3HOuHOJAHpdyKzAAKsv/BxWqsutnZ+QsiHEcDkY7v+6WWdturuBiSal6XMOO1p1aJvwXdqLD5vhA==", + "dev": true, + "requires": {} }, "postcss-discard-overridden": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz", - "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==", - "dev": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", + "dev": true, + "requires": {} }, "postcss-import": { "version": "14.0.0", @@ -8909,82 +25141,68 @@ "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, "postcss-merge-longhand": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz", - "integrity": "sha512-BMlg9AXSI5G9TBT0Lo/H3PfUy63P84rVz3BjCFE9e9Y9RXQZD3+h3YO1kgTNsNJy7bBc1YQp8DmSnwLIW5VPcw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.0.tgz", + "integrity": "sha512-Gr46srN2tsLD8fudKYoHO56RG0BLQ2nsBRnSZGY04eNBPwTeWa9KeHrbL3tOLAHyB2aliikycPH2TMJG1U+W6g==", "dev": true, "requires": { - "css-color-names": "^1.0.1", - "postcss-value-parser": "^4.1.0", - "stylehacks": "^5.0.1" + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.1.0" } }, "postcss-merge-rules": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz", - "integrity": "sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.0.tgz", + "integrity": "sha512-NecukEJovQ0mG7h7xV8wbYAkXGTO3MPKnXvuiXzOKcxoOodfTTKYjeo8TMhAswlSkjcPIBlnKbSFcTuVSDaPyQ==", "dev": true, "requires": { "browserslist": "^4.16.6", "caniuse-api": "^3.0.0", - "cssnano-utils": "^2.0.1", - "postcss-selector-parser": "^6.0.5", - "vendors": "^1.0.3" + "cssnano-utils": "^3.1.0", + "postcss-selector-parser": "^6.0.5" } }, "postcss-minify-font-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz", - "integrity": "sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", + "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-minify-gradients": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz", - "integrity": "sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.0.tgz", + "integrity": "sha512-J/TMLklkONn3LuL8wCwfwU8zKC1hpS6VcxFkNUNjmVt53uKqrrykR3ov11mdUYyqVMEx67slMce0tE14cE4DTg==", "dev": true, "requires": { - "colord": "^2.6", - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "colord": "^2.9.1", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" } }, "postcss-minify-params": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz", - "integrity": "sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.0.tgz", + "integrity": "sha512-q67dcts4Hct6x8+JmhBgctHkbvUsqGIg2IItenjE63iZXMbhjr7AlVZkNnKtIGt/1Wsv7p/7YzeSII6Q+KPXRg==", "dev": true, "requires": { - "alphanum-sort": "^1.0.2", - "browserslist": "^4.16.0", - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0", - "uniqs": "^2.0.0" + "browserslist": "^4.16.6", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" } }, "postcss-minify-selectors": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz", - "integrity": "sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.0.tgz", + "integrity": "sha512-vYxvHkW+iULstA+ctVNx0VoRAR4THQQRkG77o0oa4/mBS0OzGvvzLIvHDv/nNEM0crzN2WIyFU5X7wZhaUK3RA==", "dev": true, "requires": { - "alphanum-sort": "^1.0.2", "postcss-selector-parser": "^6.0.5" } }, @@ -8992,7 +25210,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -9024,123 +25243,119 @@ } }, "postcss-normalize-charset": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz", - "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==", - "dev": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", + "dev": true, + "requires": {} }, "postcss-normalize-display-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz", - "integrity": "sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", + "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-positions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz", - "integrity": "sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz", + "integrity": "sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-repeat-style": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz", - "integrity": "sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz", + "integrity": "sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-string": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz", - "integrity": "sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", + "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-timing-functions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz", - "integrity": "sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", + "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-unicode": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz", - "integrity": "sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz", + "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==", "dev": true, "requires": { - "browserslist": "^4.16.0", - "postcss-value-parser": "^4.1.0" + "browserslist": "^4.16.6", + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-url": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz", - "integrity": "sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", + "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", "dev": true, "requires": { - "is-absolute-url": "^3.0.3", "normalize-url": "^6.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-whitespace": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz", - "integrity": "sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.0.tgz", + "integrity": "sha512-7O1FanKaJkpWFyCghFzIkLhehujV/frGkdofGLwhg5upbLyGsSfiTcZAdSzoPsSUgyPCkBkNMeWR8yVgPdQybg==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-ordered-values": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz", - "integrity": "sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.0.tgz", + "integrity": "sha512-wU4Z4D4uOIH+BUKkYid36gGDJNQtkVJT7Twv8qH6UyfttbbJWyw4/xIPuVEkkCtQLAJ0EdsNSh8dlvqkXb49TA==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" } }, "postcss-reduce-initial": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz", - "integrity": "sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz", + "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==", "dev": true, "requires": { - "browserslist": "^4.16.0", + "browserslist": "^4.16.6", "caniuse-api": "^3.0.0" } }, "postcss-reduce-transforms": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz", - "integrity": "sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", + "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", + "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==", "dev": true, "requires": { "cssesc": "^3.0.0", @@ -9148,30 +25363,28 @@ } }, "postcss-svgo": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.0.2.tgz", - "integrity": "sha512-YzQuFLZu3U3aheizD+B1joQ94vzPfE6BNUcSYuceNxlVnKKsOtdo6hL9/zyC168Q8EwfLSgaDSalsUGa9f2C0A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz", + "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0", - "svgo": "^2.3.0" + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" } }, "postcss-unique-selectors": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz", - "integrity": "sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.0.tgz", + "integrity": "sha512-LmUhgGobtpeVJJHuogzjLRwJlN7VH+BL5c9GKMVJSS/ejoyePZkXvNsYUtk//F6vKOGK86gfRS0xH7fXQSDtvA==", "dev": true, "requires": { - "alphanum-sort": "^1.0.2", - "postcss-selector-parser": "^6.0.5", - "uniqs": "^2.0.0" + "postcss-selector-parser": "^6.0.5" } }, "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "pretty-bytes": { @@ -9206,20 +25419,6 @@ "requires": { "err-code": "^1.0.0", "retry": "^0.10.0" - }, - "dependencies": { - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", - "dev": true - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", - "dev": true - } } }, "proxy-addr": { @@ -9312,9 +25511,9 @@ "dev": true }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", "dev": true }, "querystring": { @@ -9367,23 +25566,15 @@ "dev": true }, "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz", + "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==", "dev": true, "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", + "bytes": "3.1.2", + "http-errors": "1.8.1", "iconv-lite": "0.4.24", "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - } } }, "raw-loader": { @@ -9416,14 +25607,6 @@ "dev": true, "requires": { "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "read-package-json-fast": { @@ -9469,12 +25652,12 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", "dev": true, "requires": { - "regenerate": "^1.4.0" + "regenerate": "^1.4.2" } }, "regenerator-runtime": { @@ -9509,9 +25692,9 @@ "dev": true }, "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", + "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -9519,29 +25702,29 @@ } }, "regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", "dev": true, "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" } }, "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", "dev": true }, "regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -9602,9 +25785,15 @@ }, "dependencies": { "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true } } @@ -9628,12 +25817,12 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { - "is-core-module": "^2.2.0", + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, @@ -9679,37 +25868,20 @@ "source-map": "0.6.1" }, "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true }, "postcss": { - "version": "7.0.36", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", - "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", "dev": true, "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" + "picocolors": "^0.2.1", + "source-map": "^0.6.1" } }, "source-map": { @@ -9717,15 +25889,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -9746,9 +25909,9 @@ "dev": true }, "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", "dev": true }, "reusify": { @@ -9883,15 +26046,6 @@ "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -9919,19 +26073,22 @@ "dev": true }, "selfsigned": { - "version": "1.10.11", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz", - "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==", + "version": "1.10.14", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz", + "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", "dev": true, "requires": { "node-forge": "^0.10.0" } }, "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "semver-dsl": { "version": "1.0.1", @@ -9940,6 +26097,14 @@ "dev": true, "requires": { "semver": "^5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "semver-intersect": { @@ -9949,12 +26114,20 @@ "dev": true, "requires": { "semver": "^5.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", + "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", "dev": true, "requires": { "debug": "2.6.9", @@ -9964,9 +26137,9 @@ "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.7.2", + "http-errors": "1.8.1", "mime": "1.6.0", - "ms": "2.1.1", + "ms": "2.1.3", "on-finished": "~2.3.0", "range-parser": "~1.2.1", "statuses": "~1.5.0" @@ -9989,10 +26162,16 @@ } } }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } @@ -10042,6 +26221,12 @@ "statuses": ">= 1.4.0 < 2" } }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -10057,15 +26242,15 @@ } }, "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", + "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", "dev": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.1" + "send": "0.17.2" } }, "set-blocking": { @@ -10094,6 +26279,12 @@ "requires": { "is-extendable": "^0.1.0" } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true } } }, @@ -10104,9 +26295,9 @@ "dev": true }, "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, "sha.js": { @@ -10144,9 +26335,9 @@ "dev": true }, "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "slash": { @@ -10204,6 +26395,69 @@ "is-extendable": "^0.1.0" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -10215,19 +26469,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } } } }, @@ -10250,35 +26491,6 @@ "requires": { "is-descriptor": "^1.0.0" } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } } } }, @@ -10303,26 +26515,34 @@ } }, "socket.io": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-3.1.2.tgz", - "integrity": "sha512-JubKZnTQ4Z8G4IZWtaAZSiRP3I/inpy8c/Bsx2jrwGrTbKeVU5xd6qkKMHpChYeM3dWZSO0QACiGK+obhBNwYw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz", + "integrity": "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg==", "dev": true, "requires": { - "@types/cookie": "^0.4.0", - "@types/cors": "^2.8.8", - "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "~2.0.0", - "debug": "~4.3.1", - "engine.io": "~4.1.0", - "socket.io-adapter": "~2.1.0", - "socket.io-parser": "~4.0.3" + "debug": "~4.3.2", + "engine.io": "~6.1.0", + "socket.io-adapter": "~2.3.3", + "socket.io-parser": "~4.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } } }, "socket.io-adapter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.1.0.tgz", - "integrity": "sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz", + "integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==", "dev": true }, "socket.io-parser": { @@ -10337,28 +26557,27 @@ } }, "sockjs": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz", - "integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw==", + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", "dev": true, "requires": { "faye-websocket": "^0.11.3", - "uuid": "^3.4.0", + "uuid": "^8.3.2", "websocket-driver": "^0.7.4" } }, "sockjs-client": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.1.tgz", - "integrity": "sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.6.0.tgz", + "integrity": "sha512-qVHJlyfdHFht3eBFZdKEXKTlb7I4IV41xnVNo8yUKA1UHcPJwgW2SvTq9LhnjjCywSkSK7c/e4nghU0GOoMCRQ==", "dev": true, "requires": { - "debug": "^3.2.6", - "eventsource": "^1.0.7", - "faye-websocket": "^0.11.3", + "debug": "^3.2.7", + "eventsource": "^1.1.0", + "faye-websocket": "^0.11.4", "inherits": "^2.0.4", - "json3": "^3.3.3", - "url-parse": "^1.5.1" + "url-parse": "^1.5.10" }, "dependencies": { "debug": { @@ -10369,23 +26588,17 @@ "requires": { "ms": "^2.1.1" } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true } } }, "socks": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz", - "integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "dev": true, "requires": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" } }, "socks-proxy-agent": { @@ -10411,6 +26624,12 @@ "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, "source-map-loader": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-1.1.3.tgz", @@ -10454,19 +26673,22 @@ } }, "source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -10590,15 +26812,15 @@ } }, "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -10645,6 +26867,63 @@ "requires": { "is-descriptor": "^0.1.0" } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, @@ -10746,46 +27025,45 @@ "dev": true }, "streamroller": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", - "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.2.tgz", + "integrity": "sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==", "dev": true, "requires": { - "date-format": "^2.1.0", + "date-format": "^4.0.3", "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "fs-extra": "^10.0.0" }, "dependencies": { - "date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", - "dev": true - }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", "dev": true, "requires": { "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true } } }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -10803,13 +27081,24 @@ } } }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "strip-eof": { @@ -10842,12 +27131,12 @@ } }, "stylehacks": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.1.tgz", - "integrity": "sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", + "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==", "dev": true, "requires": { - "browserslist": "^4.16.0", + "browserslist": "^4.16.6", "postcss-selector-parser": "^6.0.4" } }, @@ -10876,26 +27165,6 @@ "ms": "2.0.0" } }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -10946,17 +27215,17 @@ } }, "svgo": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.4.0.tgz", - "integrity": "sha512-W25S1UUm9Lm9VnE0TvCzL7aso/NCzDEaXLaElCUO/KaVitw0+IBicSVfM1L1c0YHK5TOFh73yQ2naCpVHEQ/OQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", "dev": true, "requires": { - "@trysound/sax": "0.1.1", - "colorette": "^1.2.2", - "commander": "^7.1.0", + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", "css-select": "^4.1.3", - "css-tree": "^1.1.2", + "css-tree": "^1.1.3", "csso": "^4.2.0", + "picocolors": "^1.0.0", "stable": "^0.1.8" }, "dependencies": { @@ -10975,15 +27244,15 @@ "dev": true }, "tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", "dev": true }, "tar": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.10.tgz", - "integrity": "sha512-kvvfiVvjGMxeUNB6MyYv5z7vhfFRwbwCXJAeL0/lnbrttBVqcMOnpHUf0X42LrPMR8mMpgapkJMchFH4FSHzNA==", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "dev": true, "requires": { "chownr": "^2.0.0", @@ -10992,14 +27261,6 @@ "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } } }, "terser": { @@ -11011,32 +27272,6 @@ "commander": "^2.20.0", "source-map": "~0.7.2", "source-map-support": "~0.5.19" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - } } }, "terser-webpack-plugin": { @@ -11056,15 +27291,6 @@ "webpack-sources": "^1.4.3" }, "dependencies": { - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, "schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", @@ -11102,7 +27328,7 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, @@ -11226,9 +27452,9 @@ } }, "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true }, "tough-cookie": { @@ -11263,11 +27489,14 @@ "yn": "^2.0.0" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } } } }, @@ -11309,12 +27538,6 @@ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -11324,28 +27547,26 @@ "minimist": "^1.2.5" } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true - } - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } } } }, @@ -11399,37 +27620,37 @@ "dev": true }, "ua-parser-js": { - "version": "0.7.28", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", - "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==", + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", "dev": true }, "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "dev": true }, "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" } }, "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, "union-value": { @@ -11442,14 +27663,16 @@ "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + } } }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -11477,6 +27700,14 @@ "debug": "^4.1.1", "request": "^2.88.2", "uuid": "^3.0.0" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "universalify": { @@ -11571,9 +27802,9 @@ } }, "url-parse": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz", - "integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "requires": { "querystringify": "^2.1.1", @@ -11593,6 +27824,14 @@ "dev": true, "requires": { "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } } }, "util-deprecate": { @@ -11608,9 +27847,9 @@ "dev": true }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "validate-npm-package-name": { @@ -11628,12 +27867,6 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true - }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -11830,6 +28063,13 @@ "binary-extensions": "^1.0.0" } }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "optional": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -12032,35 +28272,6 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "enhanced-resolve": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", - "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - } - } - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -12104,19 +28315,11 @@ "locate-path": "^3.0.0" } }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true }, "is-number": { "version": "3.0.0", @@ -12214,12 +28417,6 @@ "to-regex": "^3.0.2" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -12229,6 +28426,15 @@ "minimist": "^1.2.5" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", @@ -12244,6 +28450,12 @@ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -12253,21 +28465,6 @@ "find-up": "^3.0.0" } }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -12309,16 +28506,6 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "ssri": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", @@ -12328,21 +28515,6 @@ "figgy-pudding": "^3.5.1" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true - }, "terser": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", @@ -12391,6 +28563,12 @@ "source-map": "~0.6.1" } }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -12412,21 +28590,24 @@ "webpack-log": "^2.0.0" }, "dependencies": { - "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", - "dev": true + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } } } }, "webpack-dev-server": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz", - "integrity": "sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ==", + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.3.tgz", + "integrity": "sha512-3x31rjbEQWKMNzacUZRE6wXvUFuGpH7vr0lIEbYpMAG9BOxi0928QU1BBswOAP3kg3H1O4hiS+sq4YyAn6ANnA==", "dev": true, "requires": { - "ansi-html": "0.0.7", + "ansi-html-community": "0.0.8", "bonjour": "^3.5.0", "chokidar": "^2.1.8", "compression": "^1.7.4", @@ -12523,6 +28704,12 @@ } } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", @@ -12543,6 +28730,40 @@ "upath": "^1.1.1" } }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -12566,6 +28787,15 @@ } } }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "fsevents": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", @@ -12607,6 +28837,18 @@ "binary-extensions": "^1.0.0" } }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -12627,6 +28869,16 @@ } } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -12648,6 +28900,30 @@ "to-regex": "^3.0.2" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -12700,6 +28976,34 @@ "safe-buffer": "~5.1.0" } }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -12727,6 +29031,77 @@ "is-number": "^3.0.0", "repeat-string": "^1.6.1" } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -12745,6 +29120,12 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true } } }, @@ -12842,45 +29223,12 @@ "dev": true }, "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "string-width": "^1.0.2 || 2 || 3 || 4" } }, "wildcard": { @@ -12926,63 +29274,43 @@ "emojis-list": "^3.0.0", "json5": "^1.0.1" } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true } } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "color-convert": "^2.0.1" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "color-name": "~1.1.4" } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true } } }, @@ -12993,13 +29321,11 @@ "dev": true }, "ws": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", - "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } + "requires": {} }, "xtend": { "version": "4.0.2", @@ -13008,9 +29334,9 @@ "dev": true }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { @@ -13026,114 +29352,25 @@ "dev": true }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true }, "yn": { "version": "2.0.0", diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/package.json b/samples/client/petstore/typescript-angular-v11-provided-in-root/package.json index a845b80dbc95..e1a95fa9bea1 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/package.json +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/package.json @@ -32,13 +32,13 @@ "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", - "jasmine-core": "~3.6.0", + "jasmine-core": "~3.8.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.4", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", - "karma-jasmine-html-reporter": "^1.5.0", + "karma-jasmine-html-reporter": "^1.7.0", "ts-node": "~7.0.0", "tslint": "~6.1.0", "typescript": "~4.0.8" diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts index dcc8df3f3c82..23ec222806fd 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts index 06d4df352ea0..511c81f10d06 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts index a820ab296317..a7783d4acc50 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts index dcc8df3f3c82..23ec222806fd 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts index 06d4df352ea0..511c81f10d06 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts index a820ab296317..a7783d4acc50 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts index dcc8df3f3c82..23ec222806fd 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts index 06d4df352ea0..511c81f10d06 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts index a820ab296317..a7783d4acc50 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts index dcc8df3f3c82..23ec222806fd 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts index 06d4df352ea0..511c81f10d06 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts index a820ab296317..a7783d4acc50 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/.editorconfig b/samples/client/petstore/typescript-angular-v6-provided-in-root/.editorconfig deleted file mode 100644 index 6e87a003da89..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/.gitignore b/samples/client/petstore/typescript-angular-v6-provided-in-root/.gitignore deleted file mode 100644 index ee5c9d8336b7..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp -/out-tsc - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/angular.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/angular.json deleted file mode 100644 index c8a34aab8b0d..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/angular.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "tests", - "projects": { - "test-default": { - "root": "tests/default", - "sourceRoot": "tests/default/src", - "projectType": "application", - "prefix": "app", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "tests/default/dist", - "index": "tests/default/src/index.html", - "main": "tests/default/src/main.ts", - "polyfills": "tests/default/src/polyfills.ts", - "tsConfig": "tests/default/src/tsconfig.app.json", - "assets": [ - "tests/default/src/favicon.ico", - "tests/default/src/assets" - ], - "styles": [ - "tests/default/src/styles.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "tests/default/src/environments/environment.ts", - "with": "tests/default/src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "test-default:build" - }, - "configurations": { - "production": { - "browserTarget": "test-default:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "test-default:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "tests/default/src/test.ts", - "polyfills": "tests/default/src/polyfills.ts", - "tsConfig": "tests/default/src/tsconfig.spec.json", - "karmaConfig": "tests/default/src/karma.conf.js", - "styles": [ - "tests/default/src/styles.css" - ], - "scripts": [], - "assets": [ - "tests/default/src/favicon.ico", - "tests/default/src/assets" - ] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tests/default/src/tsconfig.app.json", - "tests/default/src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - } - } - }, - "cli-e2e": { - "root": "e2e/", - "projectType": "application", - "architect": { - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "tests/default/e2e/protractor.conf.js", - "devServerTarget": "test-default:serve" - }, - "configurations": { - "production": { - "devServerTarget": "test-default:serve:production" - } - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": "tests/default/e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] - } - } - } - } - }, - "defaultProject": "test-default" -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/package-lock.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/package-lock.json deleted file mode 100644 index 9c7eea84de1c..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/package-lock.json +++ /dev/null @@ -1,10755 +0,0 @@ -{ - "name": "cli", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular-devkit/architect": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.6.8.tgz", - "integrity": "sha512-ZKTm/zC61iY9IBHOEAKoMSzZpvhkmv+1O/HHzpHEuR551jCzu6vSyCmMY9Z7GBcccscCV+hjeSMwgFrFRcqlkw==", - "dev": true, - "requires": { - "@angular-devkit/core": "0.6.8", - "rxjs": "^6.0.0" - } - }, - "@angular-devkit/build-angular": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.6.8.tgz", - "integrity": "sha512-VGqYAk8jpISraz2UHfsDre270NOUmV0CTSZw2p9sm5g/XIr5m+IHetFZz3gpoAr9+If2aFTs8Rt3sGdCRzwBqA==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.6.8", - "@angular-devkit/build-optimizer": "0.6.8", - "@angular-devkit/core": "0.6.8", - "@ngtools/webpack": "6.0.8", - "ajv": "~6.4.0", - "autoprefixer": "^8.4.1", - "cache-loader": "^1.2.2", - "chalk": "~2.2.2", - "circular-dependency-plugin": "^5.0.2", - "clean-css": "^4.1.11", - "copy-webpack-plugin": "^4.5.1", - "file-loader": "^1.1.11", - "glob": "^7.0.3", - "html-webpack-plugin": "^3.0.6", - "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.1", - "karma-source-map-support": "^1.2.0", - "less": "^3.0.4", - "less-loader": "^4.1.0", - "license-webpack-plugin": "^1.3.1", - "lodash": "^4.17.4", - "memory-fs": "^0.4.1", - "mini-css-extract-plugin": "~0.4.0", - "minimatch": "^3.0.4", - "node-sass": "^4.9.0", - "opn": "^5.1.0", - "parse5": "^4.0.0", - "portfinder": "^1.0.13", - "postcss": "^6.0.22", - "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.5", - "postcss-url": "^7.3.2", - "raw-loader": "^0.5.1", - "resolve": "^1.5.0", - "rxjs": "^6.0.0", - "sass-loader": "^7.0.1", - "silent-error": "^1.1.0", - "source-map-support": "^0.5.0", - "stats-webpack-plugin": "^0.6.2", - "style-loader": "^0.21.0", - "stylus": "^0.54.5", - "stylus-loader": "^3.0.2", - "tree-kill": "^1.2.0", - "uglifyjs-webpack-plugin": "^1.2.5", - "url-loader": "^1.0.1", - "webpack": "~4.8.1", - "webpack-dev-middleware": "^3.1.3", - "webpack-dev-server": "^3.1.4", - "webpack-merge": "^4.1.2", - "webpack-sources": "^1.1.0", - "webpack-subresource-integrity": "^1.1.0-rc.4" - } - }, - "@angular-devkit/build-optimizer": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.6.8.tgz", - "integrity": "sha512-of5syQbv3uNPp4AQkfRecfnp8AE8kvffbfYi+FFPZ6OGr7e59T1fGwk6+Zgb2qQFQg8HO2tzWI/uygtLIqmbmw==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "source-map": "^0.5.6", - "typescript": "~2.9.1", - "webpack-sources": "^1.1.0" - }, - "dependencies": { - "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", - "dev": true - } - } - }, - "@angular-devkit/core": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.6.8.tgz", - "integrity": "sha512-rkIa1OSVWTt4g9leLSK/PsqOj3HZbDKHbZjqlslyfVa3AyCeiumFoOgViOVXlYgPX3HHDbE5uH24nyUWSD8uww==", - "dev": true, - "requires": { - "ajv": "~6.4.0", - "chokidar": "^2.0.3", - "rxjs": "^6.0.0", - "source-map": "^0.5.6" - } - }, - "@angular-devkit/schematics": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.6.8.tgz", - "integrity": "sha512-R4YqAUdo62wtrhX/5HSRGSKXNTWqfQb66ZE6m8jj6GEJNFKdNXMdxOchxr07LCiKTxfh1w6G3nGzxIsu/+D4KA==", - "dev": true, - "requires": { - "@angular-devkit/core": "0.6.8", - "rxjs": "^6.0.0" - } - }, - "@angular/animations": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.5.tgz", - "integrity": "sha512-zW/qX3CvsuRDOcTNFFSf7uXktvq1jRrfKR8LdGQ/DER1GU3o8pR3z3H8gHy8lAFc3PESfETtzXinKUNzvTDfpA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/cli": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-6.0.8.tgz", - "integrity": "sha512-DhH1Zq5Yonthw6zh6W07fhf+9XrAZbD1fcQ0MrmbxlieCfLlTAdBqyK2LavFCKwSZkUMLF6UHM3+jiNRVZSSIg==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.6.8", - "@angular-devkit/core": "0.6.8", - "@angular-devkit/schematics": "0.6.8", - "@schematics/angular": "0.6.8", - "@schematics/update": "0.6.8", - "opn": "~5.3.0", - "resolve": "^1.1.7", - "rxjs": "^6.0.0", - "semver": "^5.1.0", - "silent-error": "^1.0.0", - "symbol-observable": "^1.2.0", - "yargs-parser": "^10.0.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "yargs-parser": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.0.0.tgz", - "integrity": "sha512-+DHejWujTVYeMHLff8U96rLc4uE4Emncoftvn5AjhB1Jw1pWxLzgBUT/WYbPrHmy6YPEBTZQx5myHhVcuuu64g==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "@angular/common": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.5.tgz", - "integrity": "sha512-xL4Aq+uGQcmHYs90WSKsS9vBC1XO042hM5lSVz+zyYtYzYHdt/Qg1CIuR3zkP+8DG+mf1QZqbg5YtQx5XykmgA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.5.tgz", - "integrity": "sha512-Oe0VRCyKfHLatalRuXjCdgaY6hhiMXEL/ueknMJFC0+xA73mEchmLYXj64/1ed753cjnLOM2qbVVwqhc26tmEg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler-cli": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.5.tgz", - "integrity": "sha512-onRlVLWo1mTdyxLMRtW4iPntTUglJl9T0hacRlscKKlAUT8jaSfqIyknCF3jEXJrTnfKdypen053U7g2ajifrA==", - "dev": true, - "requires": { - "chokidar": "^1.4.2", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "tsickle": "^0.29.0" - }, - "dependencies": { - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "@angular/core": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.5.tgz", - "integrity": "sha512-yG4Qz5wHWgFYOCtX62F8MmJ1wZwZA1ALbyQC+WAZfi7Y8Asx8TShJ+3QKUDYwO1jj530pqNbfauDTCmPzzPvaQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/forms": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-6.0.5.tgz", - "integrity": "sha512-d1SdhAQ/W1n3vtm1lp5y16EaUylcZ2wftLUj6MSne3bH/2MJ6JsxJKwX+MfPcQCo+DCfG5bF0UMCa1KAwUQthQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/http": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.5.tgz", - "integrity": "sha512-N9lx1s1h4wki1ob4qne3FdyAWG3TcCAGnUAjDmZ1+c/hhxtcv0iEJ22nBrGkPIsUxIPXg0JgsD1hKhu5DGEbWg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/language-service": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-6.0.5.tgz", - "integrity": "sha512-PH06chMTcWTLfVxZqpXksIx9969N/azEghYx0U+MzlGomeaaBXr7RuZWHRVn/lD5XljrqdWAQSMc+abbn1oKgg==", - "dev": true - }, - "@angular/platform-browser": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.5.tgz", - "integrity": "sha512-FSsA9C3cJa7S4SPUAhypKlTQf4uA4hiqx/h65v7frDiyRVHv22oWKX7aKmyyb9oP5FHN/TDeQiRn4m8XNqG6AQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser-dynamic": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.5.tgz", - "integrity": "sha512-TTSLOMVrgRXI29xmBWsnSp8187vbWnbj0YEehuyup2FmltUl+H5Vms7poWV9/6fI3RnW3Yg9Ziv3T5iKqsiADQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/router": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.5.tgz", - "integrity": "sha512-M3cb5CDX+WvkM2xmFeP64zPwLJ6by6cyzl5OCfEQjoTGKOFY7N2B4kHAOw5KJN3nIEd0PersSBgf11Y9g7GPwA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@ngtools/webpack": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.0.8.tgz", - "integrity": "sha512-jorGpTd82ILbyUwg4JQekovHFaYwSMlZan4f7x+sd3+2WgyL3Z1+ZbVSGKvXZWKS/mAVx7eLkRikzJkuC4FgHw==", - "dev": true, - "requires": { - "@angular-devkit/core": "0.6.8", - "tree-kill": "^1.0.0", - "webpack-sources": "^1.1.0" - } - }, - "@schematics/angular": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.6.8.tgz", - "integrity": "sha512-9kRphqTYG5Df/I8fvnT1zMsw0YNDPO9tl18tQZXj4am4raT7l9UCr+WkwJdlBoA5pwG6baWE9sL0iGWV/bzF/g==", - "dev": true, - "requires": { - "@angular-devkit/core": "0.6.8", - "@angular-devkit/schematics": "0.6.8", - "typescript": ">=2.6.2 <2.8" - } - }, - "@schematics/update": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.6.8.tgz", - "integrity": "sha512-1Uq7LYnwL2wBwGVCgNz76QAR13ghAk+2vDDHOi+VX5+usHManxydrpoMGeX66OBPd+y5D3D2MFb+8mYHE7mygg==", - "dev": true, - "requires": { - "@angular-devkit/core": "0.6.8", - "@angular-devkit/schematics": "0.6.8", - "npm-registry-client": "^8.5.1", - "rxjs": "^6.0.0", - "semver": "^5.3.0", - "semver-intersect": "^1.1.2" - } - }, - "@types/jasmine": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.8.tgz", - "integrity": "sha512-OJSUxLaxXsjjhob2DBzqzgrkLmukM3+JMpRp0r0E4HTdT1nwDCWhaswjYxazPij6uOdzHCJfNbDjmQ1/rnNbCg==", - "dev": true - }, - "@types/jasminewd2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.3.tgz", - "integrity": "sha512-hYDVmQZT5VA2kigd4H4bv7vl/OhlympwREUemqBdOqtrYTo5Ytm12a5W5/nGgGYdanGVxj0x/VhZ7J3hOg/YKg==", - "dev": true, - "requires": { - "@types/jasmine": "*" - } - }, - "@types/node": { - "version": "8.9.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", - "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", - "dev": true - }, - "@types/q": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", - "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", - "dev": true - }, - "@types/selenium-webdriver": { - "version": "2.53.43", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", - "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.4.3.tgz", - "integrity": "sha512-S6npYhPcTHDYe9nlsKa9CyWByFi8Vj8HovcAgtmMAQZUOczOZbQ8CnwMYKYC5HEZzxEE+oY0jfQk4cVlI3J59Q==", - "dev": true, - "requires": { - "@webassemblyjs/helper-wasm-bytecode": "1.4.3", - "@webassemblyjs/wast-parser": "1.4.3", - "debug": "^3.1.0", - "webassemblyjs": "1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.4.3.tgz", - "integrity": "sha512-3zTkSFswwZOPNHnzkP9ONq4bjJSeKVMcuahGXubrlLmZP8fmTIJ58dW7h/zOVWiFSuG2em3/HH3BlCN7wyu9Rw==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.4.3.tgz", - "integrity": "sha512-e8+KZHh+RV8MUvoSRtuT1sFXskFnWG9vbDy47Oa166xX+l0dD5sERJ21g5/tcH8Yo95e9IN3u7Jc3NbhnUcSkw==", - "dev": true, - "requires": { - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.4.3.tgz", - "integrity": "sha512-9FgHEtNsZQYaKrGCtsjswBil48Qp1agrzRcPzCbQloCoaTbOXLJ9IRmqT+uEZbenpULLRNFugz3I4uw18hJM8w==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.4.3" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.4.3.tgz", - "integrity": "sha512-JINY76U+702IRf7ePukOt037RwmtH59JHvcdWbTTyHi18ixmQ+uOuNhcdCcQHTquDAH35/QgFlp3Y9KqtyJsCQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.4.3.tgz", - "integrity": "sha512-I7bS+HaO0K07Io89qhJv+z1QipTpuramGwUSDkwEaficbSvCcL92CUZEtgykfNtk5wb0CoLQwWlmXTwGbNZUeQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.4.3.tgz", - "integrity": "sha512-p0yeeO/h2r30PyjnJX9xXSR6EDcvJd/jC6xa/Pxg4lpfcNi7JUswOpqDToZQ55HMMVhXDih/yqkaywHWGLxqyQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/helper-buffer": "1.4.3", - "@webassemblyjs/helper-wasm-bytecode": "1.4.3", - "@webassemblyjs/wasm-gen": "1.4.3", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/leb128": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.4.3.tgz", - "integrity": "sha512-4u0LJLSPzuRDWHwdqsrThYn+WqMFVqbI2ltNrHvZZkzFPO8XOZ0HFQ5eVc4jY/TNHgXcnwrHjONhPGYuuf//KQ==", - "dev": true, - "requires": { - "leb": "^0.3.0" - } - }, - "@webassemblyjs/validation": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/validation/-/validation-1.4.3.tgz", - "integrity": "sha512-R+rRMKfhd9mq0rj2mhU9A9NKI2l/Rw65vIYzz4lui7eTKPcCu1l7iZNi4b9Gen8D42Sqh/KGiaQNk/x5Tn/iBQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3" - } - }, - "@webassemblyjs/wasm-edit": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.4.3.tgz", - "integrity": "sha512-qzuwUn771PV6/LilqkXcS0ozJYAeY/OKbXIWU3a8gexuqb6De2p4ya/baBeH5JQ2WJdfhWhSvSbu86Vienttpw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/helper-buffer": "1.4.3", - "@webassemblyjs/helper-wasm-bytecode": "1.4.3", - "@webassemblyjs/helper-wasm-section": "1.4.3", - "@webassemblyjs/wasm-gen": "1.4.3", - "@webassemblyjs/wasm-opt": "1.4.3", - "@webassemblyjs/wasm-parser": "1.4.3", - "@webassemblyjs/wast-printer": "1.4.3", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.4.3.tgz", - "integrity": "sha512-eR394T8dHZfpLJ7U/Z5pFSvxl1L63JdREebpv9gYc55zLhzzdJPAuxjBYT4XqevUdW67qU2s0nNA3kBuNJHbaQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/helper-wasm-bytecode": "1.4.3", - "@webassemblyjs/leb128": "1.4.3" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.4.3.tgz", - "integrity": "sha512-7Gp+nschuKiDuAL1xmp4Xz0rgEbxioFXw4nCFYEmy+ytynhBnTeGc9W9cB1XRu1w8pqRU2lbj2VBBA4cL5Z2Kw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/helper-buffer": "1.4.3", - "@webassemblyjs/wasm-gen": "1.4.3", - "@webassemblyjs/wasm-parser": "1.4.3", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.4.3.tgz", - "integrity": "sha512-KXBjtlwA3BVukR/yWHC9GF+SCzBcgj0a7lm92kTOaa4cbjaTaa47bCjXw6cX4SGQpkncB9PU2hHGYVyyI7wFRg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/helper-wasm-bytecode": "1.4.3", - "@webassemblyjs/leb128": "1.4.3", - "@webassemblyjs/wasm-parser": "1.4.3", - "webassemblyjs": "1.4.3" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.4.3.tgz", - "integrity": "sha512-QhCsQzqV0CpsEkRYyTzQDilCNUZ+5j92f+g35bHHNqS22FppNTywNFfHPq8ZWZfYCgbectc+PoghD+xfzVFh1Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/floating-point-hex-parser": "1.4.3", - "@webassemblyjs/helper-code-frame": "1.4.3", - "@webassemblyjs/helper-fsm": "1.4.3", - "long": "^3.2.0", - "webassemblyjs": "1.4.3" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.4.3.tgz", - "integrity": "sha512-EgXk4anf8jKmuZJsqD8qy5bz2frEQhBvZruv+bqwNoLWUItjNSFygk8ywL3JTEz9KtxTlAmqTXNrdD1d9gNDtg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/wast-parser": "1.4.3", - "long": "^3.2.0" - } - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, - "adm-zip": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", - "integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=", - "dev": true - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "ajv": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", - "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", - "dev": true, - "requires": { - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0", - "uri-js": "^3.0.2" - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "app-root-path": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.0.1.tgz", - "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=", - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", - "dev": true - }, - "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" - } - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", - "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", - "dev": true - }, - "autoprefixer": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.3.tgz", - "integrity": "sha512-KkQyCHBxma7R2eoEkjja/RHUBw+Fc1nY46LdV62fzJI5D7i8mLLCtAZ/AVR3UbXhDZ8mUz4C/PF4lZrbiHa1ZQ==", - "dev": true, - "requires": { - "browserslist": "^3.2.8", - "caniuse-lite": "^1.0.30000856", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.22", - "postcss-value-parser": "^3.2.3" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "blob": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", - "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "optional": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "blocking-proxy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", - "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", - "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "~1.6.15" - }, - "dependencies": { - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", - "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cache-loader": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", - "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mkdirp": "^0.5.1", - "neo-async": "^2.5.0", - "schema-utils": "^0.4.2" - } - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "caniuse-lite": { - "version": "1.0.30000856", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000856.tgz", - "integrity": "sha512-x3mYcApHMQemyaHuH/RyqtKCGIYTgEA63fdi+VBvDz8xUSmRiVWTLeyKcoGQCGG6UPR9/+4qG4OKrTa6aSQRKg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", - "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", - "dev": true, - "requires": { - "ansi-styles": "^3.1.0", - "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } - } - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", - "dev": true - }, - "chrome-trace-event": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", - "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-dependency-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", - "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", - "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", - "dev": true, - "requires": { - "source-map": "0.5.x" - } - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - } - } - }, - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", - "dev": true - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "codelyzer": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.2.1.tgz", - "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", - "dev": true, - "requires": { - "app-root-path": "^2.0.1", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.6", - "sprintf-js": "^1.0.3" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "dev": true, - "requires": { - "lodash": "^4.5.0" - } - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "compare-versions": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", - "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, - "compressible": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", - "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", - "dev": true, - "requires": { - "mime-db": ">= 1.34.0 < 2" - }, - "dependencies": { - "mime-db": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.34.0.tgz", - "integrity": "sha1-RS0Oz/XDA0am3B5kseruDTcZ/5o=", - "dev": true - } - } - }, - "compression": { - "version": "1.7.2", - "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", - "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "bytes": "3.0.0", - "compressible": "~2.0.13", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.1", - "vary": "~1.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - }, - "dependencies": { - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - } - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - } - } - }, - "connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", - "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - } - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", - "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.4.3", - "minimist": "^1.2.0", - "object-assign": "^4.1.0", - "os-homedir": "^1.0.1", - "parse-json": "^2.2.0", - "require-from-string": "^1.1.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", - "dev": true - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-selector-tokenizer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", - "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - } - }, - "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", - "dev": true - }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", - "dev": true, - "requires": { - "through": "X.X.X" - } - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true, - "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "detect-node": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", - "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", - "dev": true - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", - "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", - "dev": true, - "requires": { - "utila": "~0.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", - "dev": true, - "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", - "dev": true - }, - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.48", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", - "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=", - "dev": true - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "engine.io": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.8.3.tgz", - "integrity": "sha1-jef5eJXSDTm4X4ju7nd7K9QrE9Q=", - "dev": true, - "requires": { - "accepts": "1.3.3", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "2.3.3", - "engine.io-parser": "1.3.2", - "ws": "1.1.2" - }, - "dependencies": { - "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", - "dev": true, - "requires": { - "mime-types": "~2.1.11", - "negotiator": "0.6.1" - } - }, - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", - "dev": true, - "requires": { - "ms": "0.7.2" - } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true - } - } - }, - "engine.io-client": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.3.tgz", - "integrity": "sha1-F5jtk0USRkU9TG9jXXogH+lA1as=", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "2.3.3", - "engine.io-parser": "1.3.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parsejson": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "1.1.2", - "xmlhttprequest-ssl": "1.5.3", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", - "dev": true, - "requires": { - "ms": "0.7.2" - } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true - } - } - }, - "engine.io-parser": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz", - "integrity": "sha1-k3sHnwAH0Ik+xW1GyyILjLQ1Igo=", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "0.0.6", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.4", - "has-binary": "0.1.7", - "wtf-8": "1.0.0" - } - }, - "enhanced-resolve": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", - "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "es5-ext": { - "version": "0.10.45", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } - } - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", - "dev": true, - "requires": { - "original": ">=0.0.5" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "dev": true, - "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" - }, - "dependencies": { - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "dev": true, - "requires": { - "expand-range": "^0.1.0" - } - }, - "expand-range": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "dev": true, - "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" - } - }, - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", - "dev": true - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "express": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.2", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", - "qs": "6.5.1", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.1", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastparse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", - "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "file-loader": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", - "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^0.4.5" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "dev": true, - "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - } - }, - "follow-redirects": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", - "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", - "dev": true, - "requires": { - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "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" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "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": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "optional": true, - "requires": { - "globule": "^1.0.0" - } - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true, - "optional": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "optional": true, - "requires": { - "is-property": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "optional": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "optional": true - } - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", - "integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz", - "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true, - "optional": true - }, - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-minifier": { - "version": "3.5.16", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.16.tgz", - "integrity": "sha512-zP5EfLSpiLRp0aAgud4CQXPQZm9kXwWjR/cF0PfdOj+jjWnOaCgeZcll4kYXSvIBPeUMmyaSc7mM4IDtA+kboA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.1.x", - "commander": "2.15.x", - "he": "1.1.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.3.x" - } - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.1", - "domutils": "1.1", - "readable-stream": "1.0" - }, - "dependencies": { - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", - "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", - "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==", - "dev": true - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true - }, - "import-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", - "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", - "dev": true, - "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true, - "optional": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "internal-ip": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", - "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", - "dev": true, - "requires": { - "meow": "^3.3.0" - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ipaddr.js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", - "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true, - "optional": true - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "dev": true, - "optional": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true, - "optional": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isbinaryfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", - "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-api": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", - "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", - "dev": true, - "requires": { - "async": "^2.1.4", - "compare-versions": "^3.1.0", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", - "istanbul-lib-report": "^1.1.4", - "istanbul-lib-source-maps": "^1.2.4", - "istanbul-reports": "^1.3.0", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", - "once": "^1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", - "dev": true, - "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", - "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", - "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", - "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", - "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", - "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", - "dev": true, - "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.8.0" - }, - "dependencies": { - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", - "dev": true - } - } - }, - "jasmine-core": { - "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", - "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", - "dev": true - }, - "jasmine-spec-reporter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", - "dev": true, - "requires": { - "colors": "1.1.2" - } - }, - "jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=", - "dev": true - }, - "js-base64": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.5.tgz", - "integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ==", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "optional": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true, - "optional": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jszip": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", - "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", - "dev": true, - "requires": { - "core-js": "~2.3.0", - "es6-promise": "~3.0.2", - "lie": "~3.1.0", - "pako": "~1.0.2", - "readable-stream": "~2.0.6" - }, - "dependencies": { - "core-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", - "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=", - "dev": true - }, - "es6-promise": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", - "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "karma": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", - "integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "chokidar": "^1.4.1", - "colors": "^1.1.0", - "combine-lists": "^1.0.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^3.8.0", - "log4js": "^0.6.31", - "mime": "^1.3.4", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "1.7.3", - "source-map": "^0.5.3", - "tmp": "0.0.31", - "useragent": "^2.1.12" - }, - "dependencies": { - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - } - } - }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", - "dev": true, - "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" - } - }, - "karma-coverage-istanbul-reporter": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz", - "integrity": "sha512-UcgrHkFehI5+ivMouD8NH/UOHiX4oCAtwaANylzPFdcAuD52fnCUuelacq2gh8tZ4ydhU3+xiXofSq7j5Ehygw==", - "dev": true, - "requires": { - "istanbul-api": "^1.3.1", - "minimatch": "^3.0.4" - } - }, - "karma-jasmine": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.2.tgz", - "integrity": "sha1-OU8rJf+0pkS5rabyLUQ+L9CIhsM=", - "dev": true - }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", - "dev": true, - "requires": { - "karma-jasmine": "^1.0.2" - } - }, - "karma-source-map-support": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", - "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", - "dev": true, - "requires": { - "source-map-support": "^0.5.5" - } - }, - "killable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", - "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "leb": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/leb/-/leb-0.3.0.tgz", - "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", - "dev": true - }, - "less": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/less/-/less-3.0.4.tgz", - "integrity": "sha512-q3SyEnPKbk9zh4l36PGeW2fgynKu+FpbhiUNx/yaiBUQ3V0CbACCgb9FzYWcRgI2DJlP6eI4jc8XPrCTi55YcQ==", - "dev": true, - "requires": { - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "license-webpack-plugin": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", - "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", - "dev": true, - "requires": { - "ejs": "^2.5.7" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "dev": true, - "requires": { - "immediate": "~3.0.5" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true, - "optional": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true, - "optional": true - }, - "lodash.tail": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", - "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "log4js": { - "version": "0.6.38", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", - "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", - "dev": true, - "requires": { - "readable-stream": "~1.0.2", - "semver": "~4.3.3" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loglevelnext": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", - "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", - "dev": true, - "requires": { - "es6-symbol": "^3.1.1", - "object.assign": "^4.1.0" - } - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", - "dev": true - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", - "dev": true - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "requires": { - "mime-db": "~1.33.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", - "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "webpack-sources": "^1.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", - "dev": true, - "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-gyp": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz", - "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", - "dev": true, - "optional": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": ">=2.9.0 <2.82.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true, - "optional": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true, - "optional": true - } - } - }, - "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-sass": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", - "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", - "dev": true, - "optional": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.3.1", - "npmlog": "^4.0.0", - "request": "~2.79.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "optional": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true, - "optional": true - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "qs": "~6.3.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1", - "uuid": "^3.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true, - "optional": true - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" - } - }, - "npm-registry-client": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", - "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", - "dev": true, - "requires": { - "concat-stream": "^1.5.2", - "graceful-fs": "^4.1.6", - "normalize-package-data": "~1.0.1 || ^2.0.0", - "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", - "npmlog": "2 || ^3.1.0 || ^4.0.0", - "once": "^1.3.3", - "request": "^2.74.0", - "retry": "^0.10.0", - "safe-buffer": "^5.1.1", - "semver": "2 >=2.2.1 || 3.x || 4 || 5", - "slide": "^1.1.3", - "ssri": "^5.2.4" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - } - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "opn": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", - "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", - "dev": true - }, - "original": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.1.tgz", - "integrity": "sha512-IEvtB5vM5ULvwnqMxWBLxkS13JIEXbakizMSo3yoPNPCIWzg8TG3Usn/UhXoZFM/m+FuEA20KdzPSFq/0rS+UA==", - "dev": true, - "requires": { - "url-parse": "~1.4.0" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "optional": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true - }, - "parsejson": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", - "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "portfinder": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", - "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "6.0.22", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", - "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-import": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", - "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", - "dev": true, - "requires": { - "postcss": "^6.0.1", - "postcss-value-parser": "^3.2.3", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - } - }, - "postcss-load-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", - "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", - "dev": true, - "requires": { - "cosmiconfig": "^2.1.0", - "object-assign": "^4.1.0", - "postcss-load-options": "^1.2.0", - "postcss-load-plugins": "^2.3.0" - } - }, - "postcss-load-options": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", - "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", - "dev": true, - "requires": { - "cosmiconfig": "^2.1.0", - "object-assign": "^4.1.0" - } - }, - "postcss-load-plugins": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", - "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", - "dev": true, - "requires": { - "cosmiconfig": "^2.1.1", - "object-assign": "^4.1.0" - } - }, - "postcss-loader": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz", - "integrity": "sha512-pV7kB5neJ0/1tZ8L1uGOBNTVBCSCXQoIsZMsrwvO8V2rKGa2tBl/f80GGVxow2jJnRJ2w1ocx693EKhZAb9Isg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^6.0.0", - "postcss-load-config": "^1.2.0", - "schema-utils": "^0.4.0" - } - }, - "postcss-url": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", - "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", - "dev": true, - "requires": { - "mime": "^1.4.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.0", - "postcss": "^6.0.1", - "xxhashjs": "^0.2.1" - } - }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "protractor": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.2.tgz", - "integrity": "sha512-pw4uwwiy5lHZjIguxNpkEwJJa7hVz+bJsvaTI+IbXlfn2qXwzbF8eghW/RmrZwE2sGx82I8etb8lVjQ+JrjejA==", - "dev": true, - "requires": { - "@types/node": "^6.0.46", - "@types/q": "^0.0.32", - "@types/selenium-webdriver": "~2.53.39", - "blocking-proxy": "^1.0.0", - "chalk": "^1.1.3", - "glob": "^7.0.3", - "jasmine": "2.8.0", - "jasminewd2": "^2.1.0", - "optimist": "~0.6.0", - "q": "1.4.1", - "saucelabs": "^1.5.0", - "selenium-webdriver": "3.6.0", - "source-map-support": "~0.4.0", - "webdriver-js-extender": "^1.0.0", - "webdriver-manager": "^12.0.6" - }, - "dependencies": { - "@types/node": { - "version": "6.0.113", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.113.tgz", - "integrity": "sha512-f9XXUWFqryzjkZA1EqFvJHSFyqyasV17fq8zCDIzbRV4ctL7RrJGKvG+lcex86Rjbzd1GrER9h9VmF5sSjV0BQ==", - "dev": true - }, - "adm-zip": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz", - "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "webdriver-manager": { - "version": "12.0.6", - "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", - "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", - "dev": true, - "requires": { - "adm-zip": "^0.4.7", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.78.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - } - } - } - }, - "proxy-addr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", - "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.6.0" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", - "dev": true - }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", - "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", - "dev": true - }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", - "dev": true - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "dev": true, - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - } - } - }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", - "dev": true, - "requires": { - "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reflect-metadata": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", - "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==", - "dev": true - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", - "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "~0.1", - "htmlparser2": "~3.3.0", - "strip-ansi": "^3.0.0", - "utila": "~0.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", - "dev": true - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rxjs": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.1.tgz", - "integrity": "sha512-OwMxHxmnmHTUpgO+V7dZChf3Tixf4ih95cmXjzzadULziVl/FKhHScGLj4goEw9weePVOH2Q0+GcCBUhKCZc/g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true, - "optional": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - } - } - } - }, - "sass-loader": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.0.3.tgz", - "integrity": "sha512-iaSFtQcGo4SSgDw5Aes5p4VTrA5jCGSA7sGmhPIcOloBlgI1VktM2MUrk2IHHjbNagckXlPz+HWq1vAAPrcYxA==", - "dev": true, - "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0" - } - }, - "saucelabs": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", - "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", - "dev": true, - "requires": { - "https-proxy-agent": "^2.2.1" - } - }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", - "dev": true - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "optional": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", - "dev": true, - "requires": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" - }, - "dependencies": { - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - } - } - }, - "selfsigned": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", - "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "semver-intersect": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz", - "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=", - "dev": true, - "requires": { - "semver": "^5.0.0" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "silent-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", - "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", - "dev": true, - "requires": { - "debug": "^2.2.0" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "socket.io": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.7.3.tgz", - "integrity": "sha1-uK+cq6AJSeVo42nxMn6pvp6iRhs=", - "dev": true, - "requires": { - "debug": "2.3.3", - "engine.io": "1.8.3", - "has-binary": "0.1.7", - "object-assign": "4.1.0", - "socket.io-adapter": "0.5.0", - "socket.io-client": "1.7.3", - "socket.io-parser": "2.3.1" - }, - "dependencies": { - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", - "dev": true, - "requires": { - "ms": "0.7.2" - } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true - }, - "object-assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=", - "dev": true - } - } - }, - "socket.io-adapter": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz", - "integrity": "sha1-y21LuL7IHhB4uZZ3+c7QBGBmu4s=", - "dev": true, - "requires": { - "debug": "2.3.3", - "socket.io-parser": "2.3.1" - }, - "dependencies": { - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", - "dev": true, - "requires": { - "ms": "0.7.2" - } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true - } - } - }, - "socket.io-client": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.3.tgz", - "integrity": "sha1-sw6GqhDV7zVGYBwJzeR2Xjgdo3c=", - "dev": true, - "requires": { - "backo2": "1.0.2", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "2.3.3", - "engine.io-client": "1.8.3", - "has-binary": "0.1.7", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseuri": "0.0.5", - "socket.io-parser": "2.3.1", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", - "dev": true, - "requires": { - "ms": "0.7.2" - } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true - } - } - }, - "socket.io-parser": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz", - "integrity": "sha1-3VMgJRA85Clpcya+/WQAX8/ltKA=", - "dev": true, - "requires": { - "component-emitter": "1.1.2", - "debug": "2.2.0", - "isarray": "0.0.1", - "json3": "3.3.2" - }, - "dependencies": { - "component-emitter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", - "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=", - "dev": true - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "dev": true, - "requires": { - "ms": "0.7.1" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", - "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", - "dev": true, - "requires": { - "debug": "^2.6.6", - "eventsource": "0.1.6", - "faye-websocket": "~0.11.0", - "inherits": "^2.0.1", - "json3": "^3.3.2", - "url-parse": "^1.1.8" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", - "dev": true, - "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" - } - }, - "spdy-transport": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", - "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stats-webpack-plugin": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", - "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", - "dev": true, - "requires": { - "lodash": "^4.17.4" - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, - "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "style-loader": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", - "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^0.4.5" - } - }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", - "dev": true, - "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "tapable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", - "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", - "dev": true - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "optional": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", - "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tmp": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", - "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", - "dev": true - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", - "dev": true, - "optional": true, - "requires": { - "glob": "^6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "optional": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "ts-node": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz", - "integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "chalk": "^2.3.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.3", - "yn": "^2.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "tsickle": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.29.0.tgz", - "integrity": "sha512-JpID0Lv8/irRtPmqJJxb5fCwfZhjZeKmav9Zna7UjqVuJoSbI49Wue/c2PPybX1SbRrjl7bbI/JsCl0dSUJygA==", - "dev": true, - "requires": { - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map": "^0.6.0", - "source-map-support": "^0.5.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "tslib": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.2.tgz", - "integrity": "sha512-AVP5Xol3WivEr7hnssHDsaM+lVrVXWUvd1cfXTRkTj80b//6g2wIFEH6hZG0muGZRnHGrfttpdzRk3YlBkWjKw==" - }, - "tslint": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", - "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.12.1" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, - "tsutils": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.27.1.tgz", - "integrity": "sha512-AE/7uzp32MmaHvNNFES85hhUDHFdFZp6OAiZcd6y4ZKKIg6orJTm8keYWBhIhrJQH3a4LzNKat7ZPXZt5aTf6w==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", - "dev": true - }, - "uglify-js": { - "version": "3.3.28", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.28.tgz", - "integrity": "sha512-68Rc/aA6cswiaQ5SrE979UJcXX+ADA1z33/ZsPd+fbAiVdjZ16OXdbtGO+rJUUBgK6qdf3SOPhQf3K/ybF5Miw==", - "dev": true, - "requires": { - "commander": "~2.15.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", - "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", - "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-join": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", - "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", - "dev": true - }, - "url-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz", - "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mime": "^2.0.3", - "schema-utils": "^0.4.3" - }, - "dependencies": { - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", - "dev": true - } - } - }, - "url-parse": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.1.tgz", - "integrity": "sha512-x95Td74QcvICAA0+qERaVkRpTGKyBHHYdwL2LXZm5t/gBtCB9KQSO/0zQgSTYEV1p0WcvSg79TLNPSvd5IDJMQ==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "useragent": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", - "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", - "dev": true, - "requires": { - "lru-cache": "4.1.x", - "tmp": "0.0.x" - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "dev": true, - "requires": { - "builtins": "^1.0.3" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webassemblyjs": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webassemblyjs/-/webassemblyjs-1.4.3.tgz", - "integrity": "sha512-4lOV1Lv6olz0PJkDGQEp82HempAn147e6BXijWDzz9g7/2nSebVP9GVg62Fz5ZAs55mxq13GA0XLyvY8XkyDjg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/validation": "1.4.3", - "@webassemblyjs/wasm-parser": "1.4.3", - "@webassemblyjs/wast-parser": "1.4.3", - "long": "^3.2.0" - } - }, - "webdriver-js-extender": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", - "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", - "dev": true, - "requires": { - "@types/selenium-webdriver": "^2.53.35", - "selenium-webdriver": "^2.53.2" - }, - "dependencies": { - "sax": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz", - "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=", - "dev": true - }, - "selenium-webdriver": { - "version": "2.53.3", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", - "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", - "dev": true, - "requires": { - "adm-zip": "0.4.4", - "rimraf": "^2.2.8", - "tmp": "0.0.24", - "ws": "^1.0.1", - "xml2js": "0.4.4" - } - }, - "tmp": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", - "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=", - "dev": true - }, - "xml2js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", - "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", - "dev": true, - "requires": { - "sax": "0.6.x", - "xmlbuilder": ">=1.0.0" - } - } - } - }, - "webpack": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.8.3.tgz", - "integrity": "sha512-/hfAjBISycdK597lxONjKEFX7dSIU1PsYwC3XlXUXoykWBlv9QV5HnO+ql3HvrrgfBJ7WXdnjO9iGPR2aAc5sw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.4.3", - "@webassemblyjs/wasm-edit": "1.4.3", - "@webassemblyjs/wasm-parser": "1.4.3", - "acorn": "^5.0.0", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^0.1.1", - "enhanced-resolve": "^4.0.0", - "eslint-scope": "^3.7.1", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.0.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", - "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", - "dev": true, - "requires": { - "loud-rejection": "^1.6.0", - "memory-fs": "~0.4.1", - "mime": "^2.1.0", - "path-is-absolute": "^1.0.0", - "range-parser": "^1.0.3", - "url-join": "^4.0.0", - "webpack-log": "^1.0.1" - }, - "dependencies": { - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.4.tgz", - "integrity": "sha512-itcIUDFkHuj1/QQxzUFOEXXmxOj5bku2ScLEsOFPapnq2JRTm58gPdtnBphBJOKL2+M3p6+xygL64bI+3eyzzw==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "array-includes": "^3.0.3", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^1.0.0", - "internal-ip": "1.2.0", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "selfsigned": "^1.9.1", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.1.4", - "spdy": "^3.4.1", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "webpack-dev-middleware": "3.1.3", - "webpack-log": "^1.1.2", - "yargs": "11.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "webpack-log": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", - "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", - "dev": true, - "requires": { - "chalk": "^2.1.0", - "log-symbols": "^2.1.0", - "loglevelnext": "^1.0.1", - "uuid": "^3.1.0" - } - }, - "webpack-merge": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.3.tgz", - "integrity": "sha512-zxwAIGK7nKdu5CIZL0BjTQoq3elV0t0MfB7rUC1zj668geid52abs6hN/ACwZdK6LeMS8dC9B6WmtF978zH5mg==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "webpack-sources": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", - "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "webpack-subresource-integrity": { - "version": "1.1.0-rc.4", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.4.tgz", - "integrity": "sha1-xcTj1pD50vZKlVDgeodn+Xlqpdg=", - "dev": true, - "requires": { - "webpack-core": "^0.6.8" - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", - "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", - "dev": true, - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } - }, - "wtf-8": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz", - "integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=", - "dev": true - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - }, - "dependencies": { - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - } - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xmlhttprequest-ssl": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz", - "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "xxhashjs": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", - "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", - "dev": true, - "requires": { - "cuint": "^0.2.2" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true - } - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, - "zone.js": { - "version": "0.8.26", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz", - "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" - } - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/package.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/package.json deleted file mode 100644 index 7169c84e6d88..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "cli", - "version": "0.0.0", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "^6.0.3", - "@angular/common": "^6.0.3", - "@angular/compiler": "^6.0.3", - "@angular/core": "^6.0.3", - "@angular/forms": "^6.0.3", - "@angular/http": "^6.0.3", - "@angular/platform-browser": "^6.0.3", - "@angular/platform-browser-dynamic": "^6.0.3", - "@angular/router": "^6.0.3", - "core-js": "^2.5.4", - "rxjs": "^6.0.0", - "zone.js": "^0.8.26" - }, - "devDependencies": { - "@angular/compiler-cli": "^6.0.3", - "@angular-devkit/build-angular": "~0.6.8", - "typescript": "~2.7.2", - "@angular/cli": "~6.0.8", - "@angular/language-service": "^6.0.3", - "@types/jasmine": "~2.8.6", - "@types/jasminewd2": "~2.0.3", - "@types/node": "~8.9.4", - "codelyzer": "~4.2.1", - "jasmine-core": "~2.99.1", - "jasmine-spec-reporter": "~4.2.1", - "karma": "~1.7.1", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.0", - "karma-jasmine": "~1.1.1", - "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.3.0", - "ts-node": "~5.0.1", - "tslint": "~5.9.1" - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml b/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml deleted file mode 100644 index ee3bb1ecffd0..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptAngular6PestoreClientTests - pom - 1.0-SNAPSHOT - TS Angular 6 Petstore Client Tests - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - pre-integration-test - - exec - - - npm - - install - - - - - npm-test - integration-test - - exec - - - npm - - test - -- - --progress=false - --no-watch - --browsers - ChromeHeadless - - - - - - - - diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/protractor.conf.js b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/protractor.conf.js deleted file mode 100644 index 86776a391a5b..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.e2e.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/src/app.e2e-spec.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/src/app.e2e-spec.ts deleted file mode 100644 index d2a931c238e9..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AppPage } from './app.po'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to Typescript Angular v6 (provided in root)!'); - }); -}); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/src/app.po.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/src/app.po.ts deleted file mode 100644 index 82ea75ba504a..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/src/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo() { - return browser.get('/'); - } - - getParagraphText() { - return element(by.css('app-root h1')).getText(); - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/tsconfig.e2e.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/tsconfig.e2e.json deleted file mode 100644 index fe036e83a45f..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/e2e/tsconfig.e2e.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.css b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.css deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.html b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.html deleted file mode 100644 index b843d662b671..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.html +++ /dev/null @@ -1,44 +0,0 @@ -
    -

    - Welcome to {{ title }}! -

    -
    -
    -

    Pet API

    - - - - - - - -
    -
    -

    Pet

    -
    -

    Name: {{ pet.name }}

    -

    ID: {{ pet.id }}

    -
    - -
    -
    -

    Store API

    - -
    -
    -

    Store

    -
      -
    • {{item.key}}: {{item.number}}
    • -
    - -
    diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.spec.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.spec.ts deleted file mode 100644 index e82f9f0c32d3..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.spec.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClientModule } from '@angular/common/http'; -import { - ApiModule, - Configuration, - ConfigurationParameters, - PetService, - StoreService, - UserService, -} from '@swagger/typescript-angular-petstore'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - - const apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - apiKeys: { api_key: "foobar" }, - }; - - const apiConfig = new Configuration(apiConfigurationParams); - - const getApiConfig: () => Configuration = () => { - return apiConfig; - }; - - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientModule, - ApiModule.forRoot(getApiConfig), - ], - providers: [ - PetService, - StoreService, - UserService, - ], - declarations: [ - AppComponent, - ], - }).compileComponents(); - })); - - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - - it(`should have as title 'Typescript Angular v6 (provided in root)'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('Typescript Angular v6 (provided in root)'); - })); - - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to Typescript Angular v6 (provided in root)!'); - })); - - describe(`constructor()`, () => { - it(`should have a petService provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should have a storeService provided`, () => { - const storeService = TestBed.get(StoreService); - expect(storeService).toBeTruthy(); - }); - - it(`should have a userService provided`, () => { - const userService = TestBed.get(UserService); - expect(userService).toBeTruthy(); - }); - }); - - describe('addPet()', () => { - it(`should add a new pet`, () => { - const fixture = TestBed.createComponent(AppComponent); - const instance = fixture.componentInstance; - const petService = TestBed.get(PetService); - - spyOn(petService, 'addPet').and.callThrough(); - - fixture.detectChanges(); - instance.addPet(); - - expect(petService.addPet).toHaveBeenCalledWith({ - name: `pet`, - photoUrls: [] - }); - }); - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.ts deleted file mode 100644 index 01b6bcb3860e..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Component } from '@angular/core'; -import { - PetService, - StoreService, - UserService, - Pet -} from '@swagger/typescript-angular-petstore'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Typescript Angular v6 (provided in root)'; - pet: Pet; - store: { key: string, number: number }[]; - - constructor(private petService: PetService, - private storeService: StoreService, - private userService: UserService, - ) { - this.pet = { - name: `pet`, - photoUrls: [] - }; - } - - public addPet() { - this.petService.addPet(this.pet) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public getPetByID() { - this.petService.getPetById(this.pet.id) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public updatePet() { - this.petService.updatePet(this.pet) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public deletePet() { - this.petService.deletePet(this.pet.id) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public getStoreInventory() { - this.storeService.getInventory() - .subscribe((result) => { - this.store = []; - for(let item in result) { - const number = result[item]; - this.store.push({ key: item, number: number}); - } - }) - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.module.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.module.ts deleted file mode 100644 index 33239063d6ce..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/app/app.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { HttpClientModule } from '@angular/common/http'; -import { - ApiModule, - Configuration, - ConfigurationParameters -} from '@swagger/typescript-angular-petstore' - -import { AppComponent } from './app.component'; - -export const apiConfigurationParams: ConfigurationParameters = { - apiKeys: { api_key: "foobar" } -}; - -export const apiConfig = new Configuration(apiConfigurationParams); - -export function getApiConfig() { - return apiConfig; -} - -@NgModule({ - declarations: [ - AppComponent, - ], - imports: [ - BrowserModule, - HttpClientModule, - ApiModule.forRoot(getApiConfig), - ], - providers: [ - ], - bootstrap: [AppComponent] -}) -export class AppModule { } - diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/browserslist b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/browserslist deleted file mode 100644 index 8e09ab492e26..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/browserslist +++ /dev/null @@ -1,9 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# For IE 9-11 support, please uncomment the last line of the file and adjust as needed -> 0.5% -last 2 versions -Firefox ESR -not dead -# IE 9-11 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/environments/environment.prod.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/environments/environment.prod.ts deleted file mode 100644 index 3612073bc31c..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/environments/environment.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/environments/environment.ts deleted file mode 100644 index 012182efa3b9..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/environments/environment.ts +++ /dev/null @@ -1,15 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false -}; - -/* - * In development mode, to ignore zone related error stack frames such as - * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can - * import the following file, but please comment it out in production mode - * because it will have performance impact when throw error - */ -// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/favicon.ico b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/favicon.ico deleted file mode 100644 index 8081c7ceaf2b..000000000000 Binary files a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/favicon.ico and /dev/null differ diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/index.html b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/index.html deleted file mode 100644 index 0d92535c76f2..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Cli - - - - - - - - - diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/karma.conf.js b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/karma.conf.js deleted file mode 100644 index b870f8aa6439..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - // require('karma-phantomjs-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../coverage'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }); -}; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/main.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/main.ts deleted file mode 100644 index 91ec6da5f078..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.log(err)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/polyfills.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/polyfills.ts deleted file mode 100644 index d310405a6817..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/polyfills.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - - -/** Evergreen browsers require these. **/ -// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. -import 'core-js/es7/reflect'; - - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - */ - - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - - /* - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - */ -// (window as any).__Zone_enable_cross_context_check = true; - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/styles.css b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/styles.css deleted file mode 100644 index 90d4ee0072ce..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/styles.css +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test.ts deleted file mode 100644 index 16317897b1c5..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test.ts +++ /dev/null @@ -1,20 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/api.spec.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/api.spec.ts deleted file mode 100644 index 0b83092641d8..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/api.spec.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClientModule } from '@angular/common/http'; -import { - ApiModule, - Configuration, - ConfigurationParameters, - PetService, - StoreService, - UserService, - Pet, - User, -} from '@swagger/typescript-angular-petstore'; - - -describe(`API (functionality)`, () => { - - const getUser: () => User = () => { - const time = Date.now(); - return { - username: `user-${time}`, - } - }; - - const getPet: () => Pet = () => { - const time = Date.now(); - return { - name: `pet-${time}`, - photoUrls: [], - } - }; - - const newPet: Pet = getPet(); - let createdPet: Pet; - - const newUser: User = getUser(); - - const apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - apiKeys: { api_key: "foobar" } - }; - - const apiConfig = new Configuration(apiConfigurationParams); - - const getApiConfig = () => { - return apiConfig; - }; - - let originalTimeout; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientModule, - ApiModule.forRoot(getApiConfig) - ], - providers: [ - PetService, - StoreService, - UserService, - ] - }); - - originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; - }); - - afterEach(() => { - jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should add a pet`, async(() => { - const petService = TestBed.get(PetService); - - return petService.addPet(newPet).subscribe( - (result) => { - createdPet = result; - return expect(result.id).toBeGreaterThan(0); - }, - error => fail(`expected a result, not the error: ${error.message}`), - ); - })); - - it(`should have created a pet`, () => { - expect(createdPet.name).toEqual(newPet.name); - }); - - it(`should get the pet data by id`, async(() => { - const petService = TestBed.get(PetService); - return petService.getPetById(createdPet.id).subscribe( - result => expect(result.name).toEqual(newPet.name), - error => fail(`expected a result, not the error: ${error.message}`), - ); - })); - - it(`should update the pet name by pet object`, async(() => { - const petService = TestBed.get(PetService); - const newName = `pet-${Date.now()}`; - createdPet.name = newName; - - return petService.updatePet(createdPet).subscribe( - result => expect(result.name).toEqual(newName), - error => fail(`expected a result, not the error: ${error.message}`), - ); - })); - - it(`should delete the pet`, async(() => { - const petService = TestBed.get(PetService); - - return petService.deletePet(createdPet.id).subscribe( - result => expect(result.code).toEqual(200), - error => fail(`expected a result, not the error: ${error.message}`), - ); - })); - - }); - - describe(`StoreService`, () => { - it(`should be provided`, () => { - const storeService = TestBed.get(StoreService); - expect(storeService).toBeTruthy(); - }); - - it(`should get the inventory`, async(() => { - const storeService = TestBed.get(StoreService); - - return storeService.getInventory().subscribe( - result => expect(result).toBeTruthy(), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - })); - - }); - - describe(`UserService`, () => { - it(`should be provided`, () => { - const userService = TestBed.get(UserService); - expect(userService).toBeTruthy(); - }); - - it(`should create the user`, async(() => { - const userService = TestBed.get(UserService); - - return userService.createUser(newUser).subscribe( - result => expect(result.code).toEqual(200), - error => fail(`expected a result, not the error: ${error.message}`), - ); - })); - - }); -}); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/basePath.spec.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/basePath.spec.ts deleted file mode 100644 index 18f5bc9f3f6e..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/basePath.spec.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClient } from '@angular/common/http'; -import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; -import { - ApiModule, - PetService, - Pet, -} from '@swagger/typescript-angular-petstore'; -import {BASE_PATH} from "../../../../builds/default/variables"; - -describe(`API (basePath)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule, - ], - providers: [ - PetService, - { provide: BASE_PATH, useValue: '//test'} - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call to the injected basePath //test/pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('//test/pet'); - expect(req.request.method).toEqual('POST'); - req.flush(pet); - })); - - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/configuration.spec.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/configuration.spec.ts deleted file mode 100644 index 0b8ec658ac1d..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/configuration.spec.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClient } from '@angular/common/http'; -import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; -import { - ApiModule, - Configuration, - ConfigurationParameters, - PetService, - Pet, -} from '@swagger/typescript-angular-petstore'; - -describe(`API (with ConfigurationFactory)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - let apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - basePath: '//test-initial' - }; - - let apiConfig: Configuration = new Configuration(apiConfigurationParams); - - const getApiConfig = () => { - return apiConfig; - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule.forRoot(getApiConfig) - ], - providers: [ - PetService, - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call initially configured basePath //test-initial/pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('//test-initial/pet'); - - expect(req.request.method).toEqual('POST'); - - req.flush(pet); - })); - - - it(`should call updated basePath //test-changed/pet`, async(() => { - apiConfig.basePath = '//test-changed'; - - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('//test-changed/pet'); - - expect(req.request.method).toEqual('POST'); - - req.flush(pet); - })); - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/no-configuration.spec.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/no-configuration.spec.ts deleted file mode 100644 index 789e278296c7..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/test/no-configuration.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClient } from '@angular/common/http'; -import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; -import { - ApiModule, - PetService, - Pet, -} from '@swagger/typescript-angular-petstore'; - -describe(`API (no configuration)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule, - ], - providers: [ - PetService, - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call to the default basePath http://petstore.swagger.io/v2/pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('http://petstore.swagger.io/v2/pet'); - expect(req.request.method).toEqual('POST'); - req.flush(pet); - })); - - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tsconfig.app.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tsconfig.app.json deleted file mode 100644 index 9bc31060c422..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tsconfig.app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "module": "es2015", - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tsconfig.spec.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tsconfig.spec.json deleted file mode 100644 index f98950dbe754..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tsconfig.spec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "module": "commonjs", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tslint.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tslint.json deleted file mode 100644 index 78a62a0db6d7..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tests/default/src/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tsconfig.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/tsconfig.json deleted file mode 100644 index f307c198c813..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es5", - "typeRoots": [ - "node_modules/@types" - ], - "paths": { - "@swagger/typescript-angular-petstore": ["builds/default"] - }, - "lib": [ - "es2017", - "dom" - ] - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/tslint.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/tslint.json deleted file mode 100644 index 3ea984c776ef..000000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/tslint.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/.editorconfig b/samples/client/petstore/typescript-angular-v7-provided-in-root/.editorconfig deleted file mode 100644 index 6e87a003da89..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/.gitignore b/samples/client/petstore/typescript-angular-v7-provided-in-root/.gitignore deleted file mode 100644 index ee5c9d8336b7..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp -/out-tsc - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/angular.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/angular.json deleted file mode 100644 index 105361edb1a8..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/angular.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "tests", - "projects": { - "test-default": { - "root": "tests/default", - "sourceRoot": "tests/default/src", - "projectType": "application", - "prefix": "app", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "tests/default/dist", - "index": "tests/default/src/index.html", - "main": "tests/default/src/main.ts", - "polyfills": "tests/default/src/polyfills.ts", - "tsConfig": "tests/default/src/tsconfig.app.json", - "assets": [ - "tests/default/src/favicon.ico", - "tests/default/src/assets" - ], - "styles": [ - "tests/default/src/styles.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "tests/default/src/environments/environment.ts", - "with": "tests/default/src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "test-default:build" - }, - "configurations": { - "production": { - "browserTarget": "test-default:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "test-default:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "tests/default/src/test.ts", - "polyfills": "tests/default/src/polyfills.ts", - "tsConfig": "tests/default/src/tsconfig.spec.json", - "karmaConfig": "tests/default/src/karma.conf.js", - "styles": [ - "tests/default/src/styles.css" - ], - "scripts": [], - "assets": [ - "tests/default/src/favicon.ico", - "tests/default/src/assets" - ] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tests/default/src/tsconfig.app.json", - "tests/default/src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - } - } - } - }, - "defaultProject": "test-default" -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/package-lock.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/package-lock.json deleted file mode 100644 index 2dd63ba9d639..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/package-lock.json +++ /dev/null @@ -1,10565 +0,0 @@ -{ - "name": "cli", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular-devkit/architect": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.11.1.tgz", - "integrity": "sha512-MdcZ5KclwL2SBXCQSn8uI2hakBX58EyuAwFWsM/pKrNt9j8RqIk93l4amd2OkaMtZRFP5zWodyf/3qOwacjuQg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.1.1", - "rxjs": "6.3.3" - } - }, - "@angular-devkit/build-angular": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.11.1.tgz", - "integrity": "sha512-hA/3GVMmRwOPXWhImrBG9gZTdERr937NMuedKhTXuNj6TNMNjk9XQ+q2erd0LZVbgfhL/nC0wHnpy0dUWXu8jA==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.11.1", - "@angular-devkit/build-optimizer": "0.11.1", - "@angular-devkit/build-webpack": "0.11.1", - "@angular-devkit/core": "7.1.1", - "@ngtools/webpack": "7.1.1", - "ajv": "6.5.3", - "autoprefixer": "9.3.1", - "circular-dependency-plugin": "5.0.2", - "clean-css": "4.2.1", - "copy-webpack-plugin": "4.5.4", - "file-loader": "2.0.0", - "glob": "7.1.3", - "istanbul": "0.4.5", - "istanbul-instrumenter-loader": "3.0.1", - "karma-source-map-support": "1.3.0", - "less": "3.8.1", - "less-loader": "4.1.0", - "license-webpack-plugin": "2.0.2", - "loader-utils": "1.1.0", - "mini-css-extract-plugin": "0.4.4", - "minimatch": "3.0.4", - "node-sass": "4.10.0", - "opn": "5.3.0", - "parse5": "4.0.0", - "portfinder": "1.0.17", - "postcss": "7.0.5", - "postcss-import": "12.0.0", - "postcss-loader": "3.0.0", - "raw-loader": "0.5.1", - "rxjs": "6.3.3", - "sass-loader": "7.1.0", - "semver": "5.5.1", - "source-map-loader": "0.2.4", - "source-map-support": "0.5.9", - "speed-measure-webpack-plugin": "1.2.3", - "stats-webpack-plugin": "0.7.0", - "style-loader": "0.23.1", - "stylus": "0.54.5", - "stylus-loader": "3.0.2", - "terser-webpack-plugin": "1.1.0", - "tree-kill": "1.2.0", - "webpack": "4.23.1", - "webpack-dev-middleware": "3.4.0", - "webpack-dev-server": "3.1.10", - "webpack-merge": "4.1.4", - "webpack-sources": "1.3.0", - "webpack-subresource-integrity": "1.1.0-rc.6" - } - }, - "@angular-devkit/build-optimizer": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.11.1.tgz", - "integrity": "sha512-pyFP6ykZf8Iq8nRkgP2XKq8knpIG6ye0qYklnBC9815AC5RAO126Y4fmtd6tnH+5p1mQxnt5HegG0j5xOCgDRw==", - "dev": true, - "requires": { - "loader-utils": "1.1.0", - "source-map": "0.5.6", - "typescript": "3.1.6", - "webpack-sources": "1.2.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.6", - "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", - "dev": true - }, - "webpack-sources": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.2.0.tgz", - "integrity": "sha512-9BZwxR85dNsjWz3blyxdOhTgtnQvv3OEs5xofI0wPYTwu5kaWxS08UuD1oI7WLBLpRO+ylf0ofnXLXWmGb2WMw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - } - } - }, - "@angular-devkit/build-webpack": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.11.1.tgz", - "integrity": "sha512-p7fPHOi2Wfq2VPtnRVowg3n99MujghpOp6zW0gBJQD1TQhGVzPK6AX42S0NA4d05ahNBCDU2n7Y+5TjNJRIGJw==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.11.1", - "@angular-devkit/core": "7.1.1", - "rxjs": "6.3.3" - } - }, - "@angular-devkit/core": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.1.1.tgz", - "integrity": "sha512-rODqECpOiV6vX+L1qd63GLiF3SG+V1O+d8WYtnKPOxnsMM9yWpWmqmroHtXfisjucu/zwoqj8HoO/noJZCfynw==", - "dev": true, - "requires": { - "ajv": "6.5.3", - "chokidar": "2.0.4", - "fast-json-stable-stringify": "2.0.0", - "rxjs": "6.3.3", - "source-map": "0.7.3" - } - }, - "@angular-devkit/schematics": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.1.1.tgz", - "integrity": "sha512-yjzTw8ZWMPg0Fc9VQCHNpUCAH7aiNxrUDs0IbhdC0CyKTBoqH+cx2xP4Z6ECf4uNwceLKJlE0l3ot42Ypnlziw==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.1.1", - "rxjs": "6.3.3" - } - }, - "@angular/animations": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-7.1.1.tgz", - "integrity": "sha512-iTNxhPPraCZsE4rgM23lguT1kDV4mfYAr+Bsi5J0+v9ZJA+VaKvi6eRW8ZGrx4/rDz6hzTnBn1jgPppHFbsOcw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/cli": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.1.1.tgz", - "integrity": "sha512-lPVKsk035T5Ls0Mf83OngrNoLZu/ucZSjRLN/GWZK1O/YYVmb/dTgVl/a7HC+G480tWQ34nlqnCRbrP7sE9v7g==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.11.1", - "@angular-devkit/core": "7.1.1", - "@angular-devkit/schematics": "7.1.1", - "@schematics/angular": "7.1.1", - "@schematics/update": "0.11.1", - "inquirer": "6.2.0", - "opn": "5.3.0", - "semver": "5.5.1", - "symbol-observable": "1.2.0" - } - }, - "@angular/common": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-7.1.1.tgz", - "integrity": "sha512-SngekFx9v39sjgi9pON0Wehxpu+NdUk7OEebw4Fa8dKqTgydTkuhmnNH+9WQe264asoeCt51oufPRjIqMLNohA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.1.1.tgz", - "integrity": "sha512-oJvBe8XZ+DXF/W/DxWBTbBcixJTuPeZWdkcZIGWhJoQP7K5GnGnj8ffP9Lp6Dh4TKv85awtC6OfIKhbHxa650Q==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler-cli": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-7.1.1.tgz", - "integrity": "sha512-4NXlkDhOEQgaP3Agigqw93CvXJvsfnXa0xiglq9e/wjL+6XbtM9WcDb5lfRQz41N9RSkO3pEHGvKMweKZGgogA==", - "dev": true, - "requires": { - "canonical-path": "1.0.0", - "chokidar": "^1.4.2", - "convert-source-map": "^1.5.1", - "dependency-graph": "^0.7.2", - "magic-string": "^0.25.0", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "shelljs": "^0.8.1", - "source-map": "^0.6.1", - "tslib": "^1.9.0", - "yargs": "9.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "@angular/core": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-7.1.1.tgz", - "integrity": "sha512-Osig5SRgDRQ+Hec/liN7nq/BCJieB+4/pqRh9rFbOXezb2ptgRZqdXOXN8P17i4AwPVf308Mh55V0niJ5Eu3Rw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/forms": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.1.1.tgz", - "integrity": "sha512-yCWuPjpu23Wc3XUw7v/ACNn/e249oT0bYlM8aaMQ1F5OwrmmC4NJC12Rpl9Ihza61RIHIKzNcHVEgzc7WhcSag==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/http": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-7.1.1.tgz", - "integrity": "sha512-pRk+c/kz9aJ8te5xzCxlPLpFnwB0d/E9YkOo3/ydaXF9vZw13RTzk00YyzJ41PDzJf8oPDdXtueTQ+vtJ7Srtw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/language-service": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-7.1.1.tgz", - "integrity": "sha512-X+5g20PMtNRGZIa3svMv4PLJdJehn4wqrS8nwOtzH5XkSn5vA3IxjsJVdSzAy2AN0/sKKJK5jmQorPtKO4saJg==", - "dev": true - }, - "@angular/platform-browser": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.1.1.tgz", - "integrity": "sha512-I6OPjecynGJSbPtzu0gvEgSmIR6X6/xEAhg4L9PycW1ryjzptTC9klWRTWIqsIBqMxhVnY44uKLeRNrDwMOwyA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser-dynamic": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.1.1.tgz", - "integrity": "sha512-ZIu48Vn4S6gjD7CMbGlKGaPQ8v9rYkWzlNYi4vTYzgiqKKNC3hqLsVESU3mSvr5oeQBxSIBidTdHSyafHFrA2w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/router": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-7.1.1.tgz", - "integrity": "sha512-jbnqEq/1iDBkeH8Vn13hauGPTzhwllWM+MLfmdNGTiMzGRx4pmkWa57seDOeBF/GNYBL9JjkWTCrkKFAc2FJKw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.0.tgz", - "integrity": "sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==", - "dev": true, - "requires": { - "@babel/types": "^7.2.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.10", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - } - } - }, - "@babel/parser": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.0.tgz", - "integrity": "sha512-M74+GvK4hn1eejD9lZ7967qAwvqTZayQa3g10ag4s9uewgR7TKjeaT0YMyoq+gVfKYABiWZ4MQD701/t5e1Jhg==", - "dev": true - }, - "@babel/template": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", - "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.2", - "@babel/types": "^7.1.2" - } - }, - "@babel/traverse": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.6.tgz", - "integrity": "sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.6", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.6", - "@babel/types": "^7.1.6", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.10" - }, - "dependencies": { - "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.0.tgz", - "integrity": "sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.10", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } - } - }, - "@ngtools/webpack": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.1.1.tgz", - "integrity": "sha512-XW/YDjiDZlwOYK4YvGAIKIVEkqtdwPLwTWAmDbnfpEHQc8UALsBrzGdjze0jSfXQdQxkbmXo0aolZgNc7uL/wQ==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.1.1", - "enhanced-resolve": "4.1.0", - "rxjs": "6.3.3", - "tree-kill": "1.2.0", - "webpack-sources": "1.2.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "webpack-sources": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.2.0.tgz", - "integrity": "sha512-9BZwxR85dNsjWz3blyxdOhTgtnQvv3OEs5xofI0wPYTwu5kaWxS08UuD1oI7WLBLpRO+ylf0ofnXLXWmGb2WMw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - } - } - }, - "@schematics/angular": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.1.1.tgz", - "integrity": "sha512-jMaj8y3rNTQQXuH38uoWfAOmwYjtzqo1RelNfACnT54mfO/Dat+k7WasBLHWuvzvnN4/Ga3kXL7sJpkeMciiIg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.1.1", - "@angular-devkit/schematics": "7.1.1", - "typescript": "3.1.6" - } - }, - "@schematics/update": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.11.1.tgz", - "integrity": "sha512-IzPXamoMpDb2eY2zSW4fPuuH+7RfJLte9XVzQM2y3ZTBhlJQFLqx7qJtOXdcXUboonC6o61KCayNDERFnDUdPg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.1.1", - "@angular-devkit/schematics": "7.1.1", - "@yarnpkg/lockfile": "1.1.0", - "ini": "1.3.5", - "pacote": "9.1.1", - "rxjs": "6.3.3", - "semver": "5.5.1", - "semver-intersect": "1.4.0" - } - }, - "@types/jasmine": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.12.tgz", - "integrity": "sha512-eE+xeiGBPgQsNcyg61JBqQS6NtxC+s2yfOikMCnc0Z4NqKujzmSahmtjLCKVQU/AyrTEQ76TOwQBnr8wGP2bmA==", - "dev": true - }, - "@types/jasminewd2": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.6.tgz", - "integrity": "sha512-2ZOKrxb8bKRmP/po5ObYnRDgFE4i+lQiEB27bAMmtMWLgJSqlIDqlLx6S0IRorpOmOPRQ6O80NujTmQAtBkeNw==", - "dev": true, - "requires": { - "@types/jasmine": "*" - } - }, - "@types/node": { - "version": "8.9.5", - "resolved": "http://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", - "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.10.tgz", - "integrity": "sha512-wTUeaByYN2EA6qVqhbgavtGc7fLTOx0glG2IBsFlrFG51uXIGlYBTyIZMf4SPLo3v1bgV/7lBN3l7Z0R6Hswew==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/wast-parser": "1.7.10" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.10.tgz", - "integrity": "sha512-gMsGbI6I3p/P1xL2UxqhNh1ga2HCsx5VBB2i5VvJFAaqAjd2PBTRULc3BpTydabUQEGlaZCzEUQhLoLG7TvEYQ==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.10.tgz", - "integrity": "sha512-DoYRlPWtuw3yd5BOr9XhtrmB6X1enYF0/54yNvQWGXZEPDF5PJVNI7zQ7gkcKfTESzp8bIBWailaFXEK/jjCsw==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.10.tgz", - "integrity": "sha512-+RMU3dt/dPh4EpVX4u5jxsOlw22tp3zjqE0m3ftU2tsYxnPULb4cyHlgaNd2KoWuwasCQqn8Mhr+TTdbtj3LlA==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.10.tgz", - "integrity": "sha512-UiytbpKAULOEab2hUZK2ywXen4gWJVrgxtwY3Kn+eZaaSWaRM8z/7dAXRSoamhKFiBh1uaqxzE/XD9BLlug3gw==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.7.10" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.10.tgz", - "integrity": "sha512-w2vDtUK9xeSRtt5+RnnlRCI7wHEvLjF0XdnxJpgx+LJOvklTZPqWkuy/NhwHSLP19sm9H8dWxKeReMR7sCkGZA==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.10.tgz", - "integrity": "sha512-yE5x/LzZ3XdPdREmJijxzfrf+BDRewvO0zl8kvORgSWmxpRrkqY39KZSq6TSgIWBxkK4SrzlS3BsMCv2s1FpsQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.10.tgz", - "integrity": "sha512-u5qy4SJ/OrxKxZqJ9N3qH4ZQgHaAzsopsYwLvoWJY6Q33r8PhT3VPyNMaJ7ZFoqzBnZlCcS/0f4Sp8WBxylXfg==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.10.tgz", - "integrity": "sha512-Ecvww6sCkcjatcyctUrn22neSJHLN/TTzolMGG/N7S9rpbsTZ8c6Bl98GpSpV77EvzNijiNRHBG0+JO99qKz6g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-buffer": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/wasm-gen": "1.7.10" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.10.tgz", - "integrity": "sha512-HRcWcY+YWt4+s/CvQn+vnSPfRaD4KkuzQFt5MNaELXXHSjelHlSEA8ZcqT69q0GTIuLWZ6JaoKar4yWHVpZHsQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.10.tgz", - "integrity": "sha512-og8MciYlA8hvzCLR71hCuZKPbVBfLQeHv7ImKZ4nlyxrYbG7uJHYtHiHu6OV9SqrGuD03H/HtXC4Bgdjfm9FHw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/utf8": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.10.tgz", - "integrity": "sha512-Ng6Pxv6siyZp635xCSnH3mKmIFgqWPCcGdoo0GBYgyGdxu7cUj4agV7Uu1a8REP66UYUFXJLudeGgd4RvuJAnQ==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.10.tgz", - "integrity": "sha512-e9RZFQlb+ZuYcKRcW9yl+mqX/Ycj9+3/+ppDI8nEE/NCY6FoK8f3dKBcfubYV/HZn44b+ND4hjh+4BYBt+sDnA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-buffer": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/helper-wasm-section": "1.7.10", - "@webassemblyjs/wasm-gen": "1.7.10", - "@webassemblyjs/wasm-opt": "1.7.10", - "@webassemblyjs/wasm-parser": "1.7.10", - "@webassemblyjs/wast-printer": "1.7.10" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.10.tgz", - "integrity": "sha512-M0lb6cO2Y0PzDye/L39PqwV+jvO+2YxEG5ax+7dgq7EwXdAlpOMx1jxyXJTScQoeTpzOPIb+fLgX/IkLF8h2yw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/ieee754": "1.7.10", - "@webassemblyjs/leb128": "1.7.10", - "@webassemblyjs/utf8": "1.7.10" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.10.tgz", - "integrity": "sha512-R66IHGCdicgF5ZliN10yn5HaC7vwYAqrSVJGjtJJQp5+QNPBye6heWdVH/at40uh0uoaDN/UVUfXK0gvuUqtVg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-buffer": "1.7.10", - "@webassemblyjs/wasm-gen": "1.7.10", - "@webassemblyjs/wasm-parser": "1.7.10" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.10.tgz", - "integrity": "sha512-AEv8mkXVK63n/iDR3T693EzoGPnNAwKwT3iHmKJNBrrALAhhEjuPzo/lTE4U7LquEwyvg5nneSNdTdgrBaGJcA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-api-error": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/ieee754": "1.7.10", - "@webassemblyjs/leb128": "1.7.10", - "@webassemblyjs/utf8": "1.7.10" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.10.tgz", - "integrity": "sha512-YTPEtOBljkCL0VjDp4sHe22dAYSm3ZwdJ9+2NTGdtC7ayNvuip1wAhaAS8Zt9Q6SW9E5Jf5PX7YE3XWlrzR9cw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/floating-point-hex-parser": "1.7.10", - "@webassemblyjs/helper-api-error": "1.7.10", - "@webassemblyjs/helper-code-frame": "1.7.10", - "@webassemblyjs/helper-fsm": "1.7.10", - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.10.tgz", - "integrity": "sha512-mJ3QKWtCchL1vhU/kZlJnLPuQZnlDOdZsyP0bbLWPGdYsQDnSBvyTLhzwBA3QAMlzEL9V4JHygEmK6/OTEyytA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/wast-parser": "1.7.10", - "@xtuc/long": "4.2.1" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "agentkeepalive": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", - "dev": true, - "requires": { - "humanize-ms": "^1.2.1" - } - }, - "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz", - "integrity": "sha1-7PAh+hCP0X37Xms4Py3SM+Mf/Fk=", - "dev": true - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.2.tgz", - "integrity": "sha512-kJmcp4PrviBBEx95fC3dYRiC/QSN3EBd0GU1XoNEk/IuUa92rsB6o90zP3w5VAyNznR38Vkc9i8vk5zK6T7TxA==", - "dev": true - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "app-root-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz", - "integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=", - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true, - "optional": true - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true, - "optional": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true, - "optional": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.3.1.tgz", - "integrity": "sha512-DY9gOh8z3tnCbJ13JIWaeQsoYncTGdsrgCceBaQSIL4nvdrLxgbRSBPevg2XbX7u4QCSfLheSJEEIUUSlkbx6Q==", - "dev": true, - "requires": { - "browserslist": "^4.3.3", - "caniuse-lite": "^1.0.30000898", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.5", - "postcss-value-parser": "^3.3.1" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true, - "optional": true - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", - "dev": true - }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "optional": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.5.tgz", - "integrity": "sha512-z9ZhGc3d9e/sJ9dIx5NFXkKoaiQTnrvrMsN3R1fGb1tkWWNSz12UewJn9TNxGo1l7J23h0MRaPmk7jfeTZYs1w==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000912", - "electron-to-chromium": "^1.3.86", - "node-releases": "^1.0.5" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "10.0.4", - "resolved": "http://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true, - "optional": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000914", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000914.tgz", - "integrity": "sha512-qqj0CL1xANgg6iDOybiPTIxtsmAnfIky9mBC35qgWrnK4WwmhqfpmkDYMYgwXJ8LRZ3/2jXlCntulO8mBaAgSg==", - "dev": true - }, - "canonical-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-1.0.0.tgz", - "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-dependency-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", - "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", - "dev": true - }, - "circular-json": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz", - "integrity": "sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "codelyzer": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.3.0.tgz", - "integrity": "sha512-RLMrtLwrBS0dfo2/KTP+2NHofCpzcuh0bEp/A/naqvQonbUL4AW/qWQdbpn8dMNudtpmzEx9eS8KEpGdVPg1BA==", - "dev": true, - "requires": { - "app-root-path": "^2.0.1", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.0.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "dev": true, - "requires": { - "lodash": "^4.5.0" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "compare-versions": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", - "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, - "compressible": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz", - "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==", - "dev": true, - "requires": { - "mime-db": ">= 1.36.0 < 2" - } - }, - "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.14", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - }, - "dependencies": { - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - } - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - } - } - }, - "connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.4.tgz", - "integrity": "sha512-0lstlEyj74OAtYMrDxlNZsU7cwFijAI3Ofz2fD6Mpo9r4xCv4yegfa3uHIKvZY1NSuOtE9nvG6TAhJ+uz9gDaQ==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - } - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", - "dev": true - }, - "css-selector-tokenizer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", - "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - } - }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", - "dev": true, - "requires": { - "through": "X.X.X" - } - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "optional": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-format": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", - "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", - "dev": true, - "requires": { - "execa": "^0.10.0", - "ip-regex": "^2.1.0" - } - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "dependency-graph": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", - "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", - "dev": true, - "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "duplexify": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", - "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.88", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz", - "integrity": "sha512-UPV4NuQMKeUh1S0OWRvwg0PI8ASHN9kBC8yDTk1ROXLC85W5GnhTRu/MZu3Teqx3JjlQYuckuHYXSUSgtb3J+A==", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "engine.io": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-client": { - "version": "3.2.1", - "resolved": "http://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", - "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-promise": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", - "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "http://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "source-map": { - "version": "0.2.0", - "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } - } - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", - "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "dev": true, - "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" - }, - "dependencies": { - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "dev": true, - "requires": { - "expand-range": "^0.1.0" - } - }, - "expand-range": { - "version": "0.1.1", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "dev": true, - "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" - } - }, - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", - "dev": true - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true, - "optional": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-loader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-2.0.0.tgz", - "integrity": "sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "dev": true, - "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } - }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "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" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "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": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "optional": true, - "requires": { - "globule": "^1.0.0" - } - }, - "genfun": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true, - "optional": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "optional": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "handle-thing": { - "version": "1.2.5", - "resolved": "http://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", - "dev": true - }, - "handlebars": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", - "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", - "dev": true, - "requires": { - "async": "^2.5.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "optional": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", - "dev": true, - "optional": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", - "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "dev": true, - "requires": { - "ms": "^2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true, - "optional": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "optional": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", - "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.17.10", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", - "dev": true, - "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" - } - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true, - "optional": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true, - "optional": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", - "dev": true, - "requires": { - "buffer-alloc": "^1.2.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true, - "optional": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-api": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.0.6.tgz", - "integrity": "sha512-8W5oeAGWXhtTJjAyVfvavOLVyZCTNCKsyF6GON/INKlBdO7uJ/bv3qnPj5M6ERKzmMCJS1kntnjjGuJ86fn3rQ==", - "dev": true, - "requires": { - "async": "^2.6.1", - "compare-versions": "^3.2.1", - "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.1", - "istanbul-lib-hook": "^2.0.1", - "istanbul-lib-instrument": "^3.0.0", - "istanbul-lib-report": "^2.0.2", - "istanbul-lib-source-maps": "^2.0.1", - "istanbul-reports": "^2.0.1", - "js-yaml": "^3.12.0", - "make-dir": "^1.3.0", - "once": "^1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz", - "integrity": "sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==", - "dev": true, - "requires": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.1", - "semver": "^5.5.0" - } - } - } - }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", - "dev": true, - "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.1.tgz", - "integrity": "sha512-ufiZoiJ8CxY577JJWEeFuxXZoMqiKpq/RqZtOAYuQLvlkbJWscq9n3gc4xrCGH9n4pW0qnTxOz1oyMmVtk8E1w==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz", - "integrity": "sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.1", - "make-dir": "^1.3.0", - "supports-color": "^5.4.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - } - } - }, - "istanbul-lib-source-maps": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-2.0.1.tgz", - "integrity": "sha512-30l40ySg+gvBLcxTrLzR4Z2XTRj3HgRCA/p2rnbs/3OiTaoj054gAbuP5DcLOtwqmy4XW8qXBHzrmP2/bQ9i3A==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^2.0.1", - "make-dir": "^1.3.0", - "rimraf": "^2.6.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz", - "integrity": "sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==", - "dev": true, - "requires": { - "handlebars": "^4.0.11" - } - }, - "jasmine-core": { - "version": "2.99.1", - "resolved": "http://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", - "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", - "dev": true - }, - "jasmine-spec-reporter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", - "dev": true, - "requires": { - "colors": "1.1.2" - } - }, - "js-base64": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", - "integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true, - "optional": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "karma": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-3.0.0.tgz", - "integrity": "sha512-ZTjyuDXVXhXsvJ1E4CnZzbCjSxD6sEdzEsFYogLuZM0yqvg/mgz+O+R1jb0J7uAQeuzdY8kJgx6hSNXLwFuHIQ==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "chokidar": "^2.0.3", - "colors": "^1.1.0", - "combine-lists": "^1.0.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^4.17.4", - "log4js": "^3.0.0", - "mime": "^2.3.1", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "2.1.1", - "source-map": "^0.6.1", - "tmp": "0.0.33", - "useragent": "2.2.1" - }, - "dependencies": { - "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", - "dev": true, - "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" - } - }, - "karma-coverage-istanbul-reporter": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.4.tgz", - "integrity": "sha512-xJS7QSQIVU6VK9HuJ/ieE5yynxKhjCCkd96NLY/BX/HXsx0CskU9JJiMQbd4cHALiddMwI4OWh1IIzeWrsavJw==", - "dev": true, - "requires": { - "istanbul-api": "^2.0.5", - "minimatch": "^3.0.4" - } - }, - "karma-jasmine": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.2.tgz", - "integrity": "sha1-OU8rJf+0pkS5rabyLUQ+L9CIhsM=", - "dev": true - }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "http://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", - "dev": true, - "requires": { - "karma-jasmine": "^1.0.2" - } - }, - "karma-source-map-support": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", - "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", - "dev": true, - "requires": { - "source-map-support": "^0.5.5" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "less": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz", - "integrity": "sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q==", - "dev": true, - "requires": { - "clone": "^2.1.2", - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "license-webpack-plugin": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.0.2.tgz", - "integrity": "sha512-GsomZw5VoT20ST8qH2tOjBgbyhn6Pgs9M94g0mbvfBIV1VXufm1iKY+4dbgfTObj1Mp6nSRE3Zf74deOZr0KwA==", - "dev": true, - "requires": { - "webpack-sources": "^1.2.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "optional": true - } - } - }, - "loader-runner": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", - "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true, - "optional": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true, - "optional": true - }, - "lodash.tail": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", - "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", - "dev": true - }, - "log4js": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.6.tgz", - "integrity": "sha512-ezXZk6oPJCWL483zj64pNkMuY/NcRX5MPiB0zE6tjZM137aeusrOnW1ecxgF9cmwMWkBMhjteQxBPoZBh9FDxQ==", - "dev": true, - "requires": { - "circular-json": "^0.5.5", - "date-format": "^1.2.0", - "debug": "^3.1.0", - "rfdc": "^1.1.2", - "streamroller": "0.7.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "optional": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "magic-string": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", - "integrity": "sha512-sCuTz6pYom8Rlt4ISPFn6wuFodbKMIHUMv4Qko9P17dpxb7s52KJTmRuZZqHdGmLCK9AOcDare039nRIcfdkEg==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.1" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "make-fetch-happen": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", - "integrity": "sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ==", - "dev": true, - "requires": { - "agentkeepalive": "^3.4.1", - "cacache": "^11.0.1", - "http-cache-semantics": "^3.8.1", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", - "promise-retry": "^1.1.1", - "socks-proxy-agent": "^4.0.0", - "ssri": "^6.0.0" - }, - "dependencies": { - "cacache": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.1.tgz", - "integrity": "sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "figgy-pudding": "^3.1.0", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.3", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.0", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - } - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "optional": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", - "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^1.0.0", - "p-is-promise": "^1.1.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "optional": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true, - "optional": true - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "optional": true - }, - "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", - "dev": true - }, - "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", - "dev": true, - "requires": { - "mime-db": "~1.37.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.4.tgz", - "integrity": "sha512-o+Jm+ocb0asEngdM6FsZWtZsRzA8koFUudIDwYUfl94M3PejPHG7Vopw5hN9V8WsMkSFpm3tZP3Fesz89EyrfQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - }, - "dependencies": { - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - } - } - }, - "minizlib": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.1.tgz", - "integrity": "sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg==", - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", - "dev": true, - "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "json-parse-better-errors": "^1.0.0", - "safe-buffer": "^5.1.1" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "dev": true, - "optional": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true, - "optional": true - } - } - }, - "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-releases": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.5.tgz", - "integrity": "sha512-Ky7q0BO1BBkG/rQz6PkEZ59rwo+aSfhczHP1wwq8IowoVdN/FpiP7qp0XW0P2+BVCWe5fQUBozdbVd54q1RbCQ==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "node-sass": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.10.0.tgz", - "integrity": "sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q==", - "dev": true, - "optional": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "npm-bundled": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", - "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==", - "dev": true - }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" - } - }, - "npm-packlist": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.12.tgz", - "integrity": "sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g==", - "dev": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npm-pick-manifest": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", - "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "npm-package-arg": "^6.0.0", - "semver": "^5.4.1" - } - }, - "npm-registry-fetch": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz", - "integrity": "sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw==", - "dev": true, - "requires": { - "JSONStream": "^1.3.4", - "bluebird": "^3.5.1", - "figgy-pudding": "^3.4.1", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", - "npm-package-arg": "^6.1.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - } - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "opn": { - "version": "5.3.0", - "resolved": "http://registry.npmjs.org/opn/-/opn-5.3.0.tgz", - "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "optional": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pacote": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.1.1.tgz", - "integrity": "sha512-f28Rq5ozzKAA9YwIKw61/ipwAatUZseYmVssDbHHaexF0wRIVotapVEZPAjOT7Eu3LYVqEp0NVpNizoAnYBUaA==", - "dev": true, - "requires": { - "bluebird": "^3.5.2", - "cacache": "^11.2.0", - "figgy-pudding": "^3.5.1", - "get-stream": "^4.1.0", - "glob": "^7.1.3", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", - "minimatch": "^3.0.4", - "minipass": "^2.3.5", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "normalize-package-data": "^2.4.0", - "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.12", - "npm-pick-manifest": "^2.1.0", - "npm-registry-fetch": "^3.8.0", - "osenv": "^0.1.5", - "promise-inflight": "^1.0.1", - "promise-retry": "^1.1.1", - "protoduck": "^5.0.1", - "rimraf": "^2.6.2", - "safe-buffer": "^5.1.2", - "semver": "^5.6.0", - "ssri": "^6.0.1", - "tar": "^4.4.6", - "unique-filename": "^1.1.1", - "which": "^1.3.1" - }, - "dependencies": { - "cacache": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.1.tgz", - "integrity": "sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "figgy-pudding": "^3.1.0", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.3", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.0", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - } - } - }, - "pako": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.7.tgz", - "integrity": "sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true, - "optional": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "portfinder": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", - "integrity": "sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-import": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-12.0.0.tgz", - "integrity": "sha512-3KqKRZcaZAvxbY8DVLdd81tG5uKzbUQuiWIvy0o0fzEC42bKacqPYFWbfCQyw6L4LWUaqPz/idvIdbhpgQ32eQ==", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "postcss-value-parser": "^3.2.3", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - } - }, - "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", - "dev": true, - "requires": { - "cosmiconfig": "^4.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", - "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "promise-retry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", - "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", - "dev": true, - "requires": { - "err-code": "^1.0.0", - "retry": "^0.10.0" - } - }, - "protoduck": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", - "dev": true, - "requires": { - "genfun": "^5.0.0" - } - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", - "dev": true, - "optional": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", - "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==", - "dev": true - }, - "randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - } - }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", - "dev": true, - "requires": { - "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "optional": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "optional": true - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "optional": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "optional": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "optional": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "optional": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reflect-metadata": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", - "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==", - "dev": true - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", - "dev": true - }, - "rfdc": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.2.tgz", - "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA==", - "dev": true - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - } - }, - "sass-loader": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz", - "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", - "dev": true, - "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0", - "semver": "^5.5.0" - } - }, - "sax": { - "version": "0.5.8", - "resolved": "http://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "optional": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", - "dev": true - }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "semver-intersect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", - "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", - "dev": true, - "requires": { - "semver": "^5.0.0" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "smart-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", - "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "socket.io": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", - "dev": true, - "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true - }, - "socket.io-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.2.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "socket.io-parser": { - "version": "3.2.0", - "resolved": "http://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", - "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", - "dev": true, - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "socks": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.2.tgz", - "integrity": "sha512-g6wjBnnMOZpE0ym6e0uHSddz9p3a+WsBaaYQaBaSCJYvrC4IXykQR9MNGjLQf38e9iIIhp3b1/Zk8YZI3KGJ0Q==", - "dev": true, - "requires": { - "ip": "^1.1.5", - "smart-buffer": "^4.0.1" - } - }, - "socks-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", - "dev": true, - "requires": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - }, - "source-map-loader": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", - "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", - "dev": true, - "requires": { - "async": "^2.5.0", - "loader-utils": "^1.1.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", - "dev": true - }, - "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", - "dev": true - }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", - "dev": true, - "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" - } - }, - "spdy-transport": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.1.tgz", - "integrity": "sha512-q7D8c148escoB3Z7ySCASadkegMmUZW8Wb/Q1u0/XBgDKMO880rLQDj8Twiew/tYi7ghemKUi/whSYOwE17f5Q==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" - } - }, - "speed-measure-webpack-plugin": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.2.3.tgz", - "integrity": "sha512-p+taQ69VkRUXYMoZOx2nxV/Tz8tt79ahctoZJyJDHWP7fEYvwFNf5Pd73k5kZ6auu0pTsPNLEUwWpM8mCk85Zw==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", - "dev": true, - "optional": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stats-webpack-plugin": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.7.0.tgz", - "integrity": "sha512-NT0YGhwuQ0EOX+uPhhUcI6/+1Sq/pMzNuSCBVT4GbFl/ac6I/JZefBcjlECNfAb1t3GOx5dEj1Z7x0cAxeeVLQ==", - "dev": true, - "requires": { - "lodash": "^4.17.4" - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "streamroller": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", - "dev": true, - "requires": { - "date-format": "^1.2.0", - "debug": "^3.1.0", - "mkdirp": "^0.5.1", - "readable-stream": "^2.3.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "optional": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "optional": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "style-loader": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", - "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" - } - }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", - "dev": true, - "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "tapable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", - "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", - "dev": true - }, - "tar": { - "version": "2.2.1", - "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "optional": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "terser": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.11.0.tgz", - "integrity": "sha512-5iLMdhEPIq3zFWskpmbzmKwMQixKmTYwY3Ox9pjtSklBLnHiuQ0GKJLhL1HSYtyffHM3/lDIFBnb82m9D7ewwQ==", - "dev": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1", - "source-map-support": "~0.5.6" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz", - "integrity": "sha512-61lV0DSxMAZ8AyZG7/A4a3UPlrbOBo8NIQ4tJzLPAdGOQ+yoNC7l5ijEow27lBAL2humer01KLS6bGIMYQxKoA==", - "dev": true, - "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.8.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "cacache": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.1.tgz", - "integrity": "sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "figgy-pudding": "^3.1.0", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.3", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.0", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - } - } - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "optional": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - } - } - }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", - "dev": true - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true, - "optional": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.2" - } - }, - "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" - }, - "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz", - "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==", - "dev": true - }, - "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "uglifyjs-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz", - "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", - "dev": true, - "requires": { - "lru-cache": "2.2.x", - "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", - "dev": true - } - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "dev": true, - "requires": { - "builtins": "^1.0.3" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webpack": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.23.1.tgz", - "integrity": "sha512-iE5Cu4rGEDk7ONRjisTOjVHv3dDtcFfwitSxT7evtYj/rANJpt1OuC/Kozh1pBa99AUBr1L/LsaNB+D9Xz3CEg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-module-context": "1.7.10", - "@webassemblyjs/wasm-edit": "1.7.10", - "@webassemblyjs/wasm-parser": "1.7.10", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.1.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", - "dev": true, - "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.10.tgz", - "integrity": "sha512-RqOAVjfqZJtQcB0LmrzJ5y4Jp78lv9CK0MZ1YJDTaTmedMZ9PU9FLMQNrMCfVu8hHzaVLVOJKBlGEHMN10z+ww==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^2.0.0", - "internal-ip": "^3.0.1", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^3.4.1", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "webpack-dev-middleware": "3.4.0", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "os-locale": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz", - "integrity": "sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw==", - "dev": true, - "requires": { - "execa": "^0.10.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.4.tgz", - "integrity": "sha512-TmSe1HZKeOPey3oy1Ov2iS3guIZjWvMT2BBJDzzT5jScHTjVC3mpjJofgueEzaEd6ibhxRDD6MIblDr8tzh8iQ==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "webpack-subresource-integrity": { - "version": "1.1.0-rc.6", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz", - "integrity": "sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w==", - "dev": true, - "requires": { - "webpack-core": "^0.6.8" - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true - }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true, - "optional": true - } - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true - } - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, - "zone.js": { - "version": "0.8.26", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz", - "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" - } - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/package.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/package.json deleted file mode 100644 index cc61e95b0dec..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "typescript-angular-v7-unit-tests", - "version": "0.0.0", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint" - }, - "private": true, - "dependencies": { - "@angular/animations": "^7.1.1", - "@angular/common": "^7.1.1", - "@angular/compiler": "^7.1.1", - "@angular/core": "^7.1.1", - "@angular/forms": "^7.1.1", - "@angular/http": "^7.1.1", - "@angular/platform-browser": "^7.1.1", - "@angular/platform-browser-dynamic": "^7.1.1", - "@angular/router": "^7.1.1", - "core-js": "^2.5.4", - "rxjs": "^6.3.0", - "zone.js": "^0.8.26" - }, - "devDependencies": { - "@angular-devkit/build-angular": "~0.11.0", - "@angular/cli": "~7.1.1", - "@angular/compiler-cli": "^7.1.1", - "@angular/language-service": "^7.1.1", - "@types/jasmine": "~2.8.8", - "@types/jasminewd2": "~2.0.3", - "@types/node": "~8.9.4", - "codelyzer": "~4.3.0", - "jasmine-core": "~2.99.1", - "jasmine-spec-reporter": "~4.2.1", - "karma": "~3.0.0", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.1", - "karma-jasmine": "~1.1.2", - "karma-jasmine-html-reporter": "^0.2.2", - "ts-node": "~7.0.0", - "tslint": "~5.11.0", - "typescript": "~3.1.6" - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/pom.xml b/samples/client/petstore/typescript-angular-v7-provided-in-root/pom.xml deleted file mode 100644 index ba8bfd809f94..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptAngular7PestoreClientTests - pom - 1.0-SNAPSHOT - TS Angular 7 Petstore Client Tests - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - pre-integration-test - - exec - - - npm - - install - - - - - npm-test - integration-test - - exec - - - npm - - test - -- - --progress=false - --no-watch - --browsers - ChromeHeadless - - - - - - - - diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.css b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.css deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.html b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.html deleted file mode 100644 index b843d662b671..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.html +++ /dev/null @@ -1,44 +0,0 @@ -
    -

    - Welcome to {{ title }}! -

    -
    -
    -

    Pet API

    - - - - - - - -
    -
    -

    Pet

    -
    -

    Name: {{ pet.name }}

    -

    ID: {{ pet.id }}

    -
    - -
    -
    -

    Store API

    - -
    -
    -

    Store

    -
      -
    • {{item.key}}: {{item.number}}
    • -
    - -
    diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts deleted file mode 100644 index 3495ad9e0e5b..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClientModule } from '@angular/common/http'; -import { - ApiModule, - Configuration, - ConfigurationParameters, - PetService, - StoreService, - UserService, -} from '@swagger/typescript-angular-petstore'; -import { AppComponent } from './app.component'; -import {fakePetstoreBackendProviders} from "../test/fakeBackend"; - -describe('AppComponent', () => { - - const apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - apiKeys: { api_key: 'foobar' }, - }; - - const apiConfig = new Configuration(apiConfigurationParams); - - const getApiConfig: () => Configuration = () => { - return apiConfig; - }; - - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientModule, - ApiModule.forRoot(getApiConfig), - ], - providers: [ - PetService, - StoreService, - UserService, - ...fakePetstoreBackendProviders, - ], - declarations: [ - AppComponent, - ], - }).compileComponents(); - })); - - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - - it(`should have as title 'Typescript Angular v7 (provided in root)'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('Typescript Angular v7 (provided in root)'); - })); - - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to Typescript Angular v7 (provided in root)!'); - })); - - describe(`constructor()`, () => { - it(`should have a petService provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should have a storeService provided`, () => { - const storeService = TestBed.get(StoreService); - expect(storeService).toBeTruthy(); - }); - - it(`should have a userService provided`, () => { - const userService = TestBed.get(UserService); - expect(userService).toBeTruthy(); - }); - }); - - describe('addPet()', () => { - it(`should add a new pet`, () => { - const fixture = TestBed.createComponent(AppComponent); - const instance = fixture.componentInstance; - const petService = TestBed.get(PetService); - - spyOn(petService, 'addPet').and.callThrough(); - - fixture.detectChanges(); - instance.addPet(); - - expect(petService.addPet).toHaveBeenCalledWith({ - name: `pet`, - photoUrls: [] - }); - }); - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts deleted file mode 100644 index 0259ba12434a..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Component } from '@angular/core'; -import { - PetService, - StoreService, - UserService, - Pet -} from '@swagger/typescript-angular-petstore'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Typescript Angular v7 (provided in root)'; - pet: Pet; - store: { key: string, number: number }[]; - - constructor(private petService: PetService, - private storeService: StoreService, - private userService: UserService, - ) { - this.pet = { - name: `pet`, - photoUrls: [] - }; - } - - public addPet() { - this.petService.addPet(this.pet) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public getPetByID() { - this.petService.getPetById(this.pet.id) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public updatePet() { - this.petService.updatePet(this.pet) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public deletePet() { - this.petService.deletePet(this.pet.id) - .subscribe((result) => { - this.pet = result; - } - ); - } - - public getStoreInventory() { - this.storeService.getInventory() - .subscribe((result) => { - this.store = []; - for(let item in result) { - const number = result[item]; - this.store.push({ key: item, number: number}); - } - }) - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.module.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.module.ts deleted file mode 100644 index 33239063d6ce..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { HttpClientModule } from '@angular/common/http'; -import { - ApiModule, - Configuration, - ConfigurationParameters -} from '@swagger/typescript-angular-petstore' - -import { AppComponent } from './app.component'; - -export const apiConfigurationParams: ConfigurationParameters = { - apiKeys: { api_key: "foobar" } -}; - -export const apiConfig = new Configuration(apiConfigurationParams); - -export function getApiConfig() { - return apiConfig; -} - -@NgModule({ - declarations: [ - AppComponent, - ], - imports: [ - BrowserModule, - HttpClientModule, - ApiModule.forRoot(getApiConfig), - ], - providers: [ - ], - bootstrap: [AppComponent] -}) -export class AppModule { } - diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/browserslist b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/browserslist deleted file mode 100644 index 8e09ab492e26..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/browserslist +++ /dev/null @@ -1,9 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# For IE 9-11 support, please uncomment the last line of the file and adjust as needed -> 0.5% -last 2 versions -Firefox ESR -not dead -# IE 9-11 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/environments/environment.prod.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/environments/environment.prod.ts deleted file mode 100644 index 3612073bc31c..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/environments/environment.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/environments/environment.ts deleted file mode 100644 index 012182efa3b9..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/environments/environment.ts +++ /dev/null @@ -1,15 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false -}; - -/* - * In development mode, to ignore zone related error stack frames such as - * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can - * import the following file, but please comment it out in production mode - * because it will have performance impact when throw error - */ -// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/favicon.ico b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/favicon.ico deleted file mode 100644 index 8081c7ceaf2b..000000000000 Binary files a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/favicon.ico and /dev/null differ diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/index.html b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/index.html deleted file mode 100644 index 0d92535c76f2..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Cli - - - - - - - - - diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/karma.conf.js b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/karma.conf.js deleted file mode 100644 index 4a9730b9b6fc..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/karma.conf.js +++ /dev/null @@ -1,31 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../coverage'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }); -}; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/main.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/main.ts deleted file mode 100644 index 91ec6da5f078..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.log(err)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/polyfills.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/polyfills.ts deleted file mode 100644 index d310405a6817..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/polyfills.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - - -/** Evergreen browsers require these. **/ -// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. -import 'core-js/es7/reflect'; - - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - */ - - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - - /* - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - */ -// (window as any).__Zone_enable_cross_context_check = true; - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/styles.css b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/styles.css deleted file mode 100644 index 90d4ee0072ce..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/styles.css +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test.ts deleted file mode 100644 index 16317897b1c5..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test.ts +++ /dev/null @@ -1,20 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts deleted file mode 100644 index 572aed4b3f1f..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import {HttpClientModule} from '@angular/common/http'; -import { - ApiModule, - Configuration, - ConfigurationParameters, - PetService, - StoreService, - UserService, - Pet, - User, -} from '@swagger/typescript-angular-petstore'; -import {fakePetstoreBackendProviders} from "./fakeBackend"; -import {switchMap} from "rxjs/operators"; - - -describe(`API (functionality)`, () => { - - const getUser: () => User = () => { - const time = Date.now(); - return { - username: `user-${time}`, - } - }; - - const getPet: () => Pet = () => { - const time = Date.now(); - return { - name: `pet-${time}`, - photoUrls: [], - } - }; - - const newPet: Pet = getPet(); - - const newUser: User = getUser(); - - const apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - apiKeys: { api_key: 'foobar' } - }; - - const apiConfig = new Configuration(apiConfigurationParams); - - const getApiConfig = () => { - return apiConfig; - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientModule, - ApiModule.forRoot(getApiConfig) - ], - providers: [ - PetService, - StoreService, - UserService, - ...fakePetstoreBackendProviders, - ] - }); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should add a pet`, async(() => { - const petService = TestBed.get(PetService); - - return petService.addPet(newPet).subscribe( - (result) => { - expect(result.id).toBeGreaterThan(0); - expect(result.name).toBe(newPet.name); - }, - ); - })); - - it(`should get the pet data by id`, async(() => { - const petService = TestBed.get(PetService); - return petService.addPet(newPet).pipe( - switchMap((addedPet: Pet) => petService.getPetById(addedPet.id)) - ).subscribe( - result => { - return expect(result.name).toBe(newPet.name); - }, - ); - })); - - it(`should update the pet name by pet object`, async(() => { - const petService = TestBed.get(PetService); - - - return petService.addPet(newPet).pipe( - switchMap((addedPet: Pet) => petService.updatePet({ - ...addedPet, - name: 'something else' - })) - ).subscribe( - result => expect(result.name).toBe('something else'), - error => fail(`expected a result, not the error: ${error.message}`), - ); - })); - - it(`should delete the pet`, async(() => { - const petService = TestBed.get(PetService); - - return petService.addPet(newPet).pipe( - switchMap((addedPet: Pet) => petService.deletePet(addedPet.id, undefined, 'response')), - ).subscribe( - result => expect(result.status).toEqual(200), - ); - })); - - }); - - describe(`StoreService`, () => { - it(`should be provided`, () => { - const storeService = TestBed.get(StoreService); - expect(storeService).toBeTruthy(); - }); - - it(`should get the inventory`, async(() => { - const storeService = TestBed.get(StoreService); - - return storeService.getInventory().subscribe( - result => expect(result.mega).toBe(42), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - })); - - }); - - describe(`UserService`, () => { - it(`should be provided`, () => { - const userService = TestBed.get(UserService); - expect(userService).toBeTruthy(); - }); - - it(`should create the user`, async(() => { - const userService = TestBed.get(UserService); - - return userService.createUser(newUser, 'response').subscribe( - result => expect(result.status).toEqual(200), - ); - })); - - }); -}); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/basePath.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/basePath.spec.ts deleted file mode 100644 index 18f5bc9f3f6e..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/basePath.spec.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClient } from '@angular/common/http'; -import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; -import { - ApiModule, - PetService, - Pet, -} from '@swagger/typescript-angular-petstore'; -import {BASE_PATH} from "../../../../builds/default/variables"; - -describe(`API (basePath)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule, - ], - providers: [ - PetService, - { provide: BASE_PATH, useValue: '//test'} - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call to the injected basePath //test/pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('//test/pet'); - expect(req.request.method).toEqual('POST'); - req.flush(pet); - })); - - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/configuration.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/configuration.spec.ts deleted file mode 100644 index 120c9d284cb0..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/configuration.spec.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClient } from '@angular/common/http'; -import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; -import { - ApiModule, - Configuration, - ConfigurationParameters, - PetService, - Pet, -} from '@swagger/typescript-angular-petstore'; - -describe(`API (with ConfigurationFactory)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - let apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - basePath: '//test-initial' - }; - - let apiConfig: Configuration = new Configuration(apiConfigurationParams); - - const getApiConfig = () => { - return apiConfig; - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule.forRoot(getApiConfig) - ], - providers: [ - PetService, - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call initially configured basePath //test-initial/pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('//test-initial/pet'); - - expect(req.request.method).toEqual('POST'); - - req.flush(pet); - })); - - - it(`should call updated basePath //test-changed/pet`, async(() => { - apiConfig.basePath = '//test-changed'; - - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('//test-changed/pet'); - - expect(req.request.method).toEqual('POST'); - - req.flush(pet); - })); - }); - -}); - -describe(`API (with ConfigurationFactory and empty basePath)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - let apiConfigurationParams: ConfigurationParameters = { - // add configuration params here - basePath: '' - }; - - let apiConfig: Configuration = new Configuration(apiConfigurationParams); - - const getApiConfig = () => { - return apiConfig; - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule.forRoot(getApiConfig) - ], - providers: [ - PetService, - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call initially configured empty basePath /pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('/pet'); - - expect(req.request.method).toEqual('POST'); - - req.flush(pet); - })); - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/fakeBackend.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/fakeBackend.ts deleted file mode 100644 index 2ea690270ce4..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/fakeBackend.ts +++ /dev/null @@ -1,92 +0,0 @@ -import {Injectable, Provider} from '@angular/core'; -import {Observable, Observer} from 'rxjs'; -import { - HTTP_INTERCEPTORS, - HttpEvent, - HttpEventType, - HttpHandler, - HttpInterceptor, - HttpRequest -} from '@angular/common/http'; -import { TestRequest } from "@angular/common/http/testing"; -import { Pet } from "@swagger/typescript-angular-petstore"; - -@Injectable() -export class FakePetstoreBackendInterceptor implements HttpInterceptor { - private fakePetstoreBackend = new FakePetstoreBackend() - - constructor() { - - } - - intercept(req: HttpRequest, next: HttpHandler): Observable> { - const parsedUrl = new URL(req.url); - if (parsedUrl.pathname.indexOf('/v2/pet') === 0) { - if (req.method === 'GET') { - const pathParts = parsedUrl.pathname.split('/'); - const petId = parseInt(pathParts[pathParts.length-1], 10); - return this.respond(req, this.fakePetstoreBackend.getPet(petId)); - } else if (req.method === 'POST') { - return this.respond(req, this.fakePetstoreBackend.addPet(req.body)); - } else if (req.method === 'PUT') { - return this.respond(req, this.fakePetstoreBackend.updatePet(req.body)); - } else if (req.method === 'DELETE') { - const pathParts = parsedUrl.pathname.split('/'); - const petId = parseInt(pathParts[pathParts.length-1], 10); - this.fakePetstoreBackend.deletePet(petId); - return this.respond(req, {}); - } - } else if (parsedUrl.pathname.indexOf('/v2/store/inventory') === 0) { - if (req.method === 'GET') { - return this.respond(req, {mega: 42}); - } - } else if (parsedUrl.pathname.indexOf('/v2/user') === 0) { - if (req.method === 'POST') { - return this.respond(req, {mega: 42}); - } - } - throw new Error('Http call not implemented in fake backend. ' + req.url); - } - - private respond(request: HttpRequest, response: any): Observable> { - return new Observable((observer: Observer) => { - const testReq = new TestRequest(request, observer); - observer.next({ type: HttpEventType.Sent } as HttpEvent); - testReq.flush(response); - return () => { }; - }); - } -} - -@Injectable() -class FakePetstoreBackend { - private nextId = 1; - private pets: Map = new Map(); - - public getPet(id: number): Pet { - return this.pets.get(String(id)); - } - - public addPet(pet: Pet): Pet { - const id = this.nextId++; - this.pets.set(String(id), { - ...pet, - id - }); - return this.getPet(id); - } - - public updatePet(pet: Pet): Pet { - this.pets.set(String(pet.id), pet); - return pet; - } - - public deletePet(id: number): void { - this.pets.delete(String(id)); - } -} - - -export const fakePetstoreBackendProviders: Provider[] = [ - {provide: HTTP_INTERCEPTORS, useClass: FakePetstoreBackendInterceptor, multi: true}, -]; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/no-configuration.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/no-configuration.spec.ts deleted file mode 100644 index 789e278296c7..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/no-configuration.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { HttpClient } from '@angular/common/http'; -import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; -import { - ApiModule, - PetService, - Pet, -} from '@swagger/typescript-angular-petstore'; - -describe(`API (no configuration)`, () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - const pet: Pet = { - name: `pet`, - photoUrls: [] - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule , - ApiModule, - ], - providers: [ - PetService, - ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.get(HttpClient); - httpTestingController = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - describe(`PetService`, () => { - it(`should be provided`, () => { - const petService = TestBed.get(PetService); - expect(petService).toBeTruthy(); - }); - - it(`should call to the default basePath http://petstore.swagger.io/v2/pet`, async(() => { - const petService = TestBed.get(PetService); - - petService.addPet(pet).subscribe( - result => expect(result).toEqual(pet), - error => fail(`expected a result, not the error: ${error.message}`), - ); - - const req = httpTestingController.expectOne('http://petstore.swagger.io/v2/pet'); - expect(req.request.method).toEqual('POST'); - req.flush(pet); - })); - - }); - -}); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tsconfig.app.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tsconfig.app.json deleted file mode 100644 index 9bc31060c422..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tsconfig.app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "module": "es2015", - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tsconfig.spec.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tsconfig.spec.json deleted file mode 100644 index f98950dbe754..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tsconfig.spec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "module": "commonjs", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tslint.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tslint.json deleted file mode 100644 index 78a62a0db6d7..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tsconfig.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/tsconfig.json deleted file mode 100644 index f307c198c813..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es5", - "typeRoots": [ - "node_modules/@types" - ], - "paths": { - "@swagger/typescript-angular-petstore": ["builds/default"] - }, - "lib": [ - "es2017", - "dom" - ] - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tslint.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/tslint.json deleted file mode 100644 index 3ea984c776ef..000000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tslint.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/pet.service.ts index 8dad43c484ad..ee897013335e 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/store.service.ts index 819801bdccdf..8e07ce669ff6 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/user.service.ts index 1ac75a68c0d1..7440ef86e14c 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/pet.service.ts index 955dc51f0508..e7a21a8ff1f9 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/store.service.ts index 20480749e90e..942714e216e1 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/user.service.ts index b90b53eb44ca..2a3277c5241d 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/pet.service.ts index 955dc51f0508..e7a21a8ff1f9 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/pet.service.ts @@ -85,8 +85,7 @@ export class PetService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/store.service.ts index 20480749e90e..942714e216e1 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/store.service.ts @@ -70,8 +70,7 @@ export class StoreService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/user.service.ts index b90b53eb44ca..2a3277c5241d 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/api/user.service.ts @@ -70,8 +70,7 @@ export class UserService { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } diff --git a/samples/client/petstore/typescript-aurelia/default/package.json b/samples/client/petstore/typescript-aurelia/default/package.json index 74fcdb9b8841..e7fae1cf8c75 100644 --- a/samples/client/petstore/typescript-aurelia/default/package.json +++ b/samples/client/petstore/typescript-aurelia/default/package.json @@ -18,6 +18,6 @@ }, "devDependencies": { "tslint": "^3.15.1", - "typescript": "^2.4 || ^3.0" + "typescript": "^4.0" } } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/package.json b/samples/client/petstore/typescript-axios/builds/es6-target/package.json index 86412c07b3db..52a122b7b41c 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/package.json +++ b/samples/client/petstore/typescript-axios/builds/es6-target/package.json @@ -18,11 +18,11 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.21.4" + "axios": "^0.26.1" }, "devDependencies": { "@types/node": "^12.11.5", - "typescript": "^3.6.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 7d715d7ea75b..84e004fa465c 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -59,10 +59,10 @@ export interface AdditionalPropertiesClass { 'map_with_undeclared_properties_anytype_2'?: object; /** * - * @type {{ [key: string]: object; }} + * @type {{ [key: string]: any; }} * @memberof AdditionalPropertiesClass */ - 'map_with_undeclared_properties_anytype_3'?: { [key: string]: object; }; + 'map_with_undeclared_properties_anytype_3'?: { [key: string]: any; }; /** * an object with no declared properties and no undeclared properties, hence it\'s an empty map. * @type {object} @@ -1706,7 +1706,7 @@ export interface Whale { * @interface Zebra */ export interface Zebra { - [key: string]: object | any; + [key: string]: any; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 62742e15f671..48600fbd0985 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -173,7 +173,7 @@ export interface ArrayTest { * @interface Banana */ export interface Banana { - [key: string]: object | any; + [key: string]: any; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json index 86412c07b3db..52a122b7b41c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json @@ -18,11 +18,11 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.21.4" + "axios": "^0.26.1" }, "devDependencies": { "@types/node": "^12.11.5", - "typescript": "^3.6.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json index 282aba874fce..014e497001ad 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json @@ -9,11 +9,11 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.21.4" + "axios": "^0.26.1" }, "devDependencies": { "@types/node": "^12.11.5", - "typescript": "^3.6.4" + "typescript": "^4.0" } }, "node_modules/@types/node": { @@ -23,17 +23,17 @@ "dev": true }, "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.8" } }, "node_modules/follow-redirects": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", - "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==", + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", "funding": [ { "type": "individual", @@ -50,9 +50,9 @@ } }, "node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -71,22 +71,22 @@ "dev": true }, "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", "requires": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.8" } }, "follow-redirects": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", - "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==" + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" }, "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json index 86412c07b3db..52a122b7b41c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json @@ -18,11 +18,11 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.21.4" + "axios": "^0.26.1" }, "devDependencies": { "@types/node": "^12.11.5", - "typescript": "^3.6.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-axios/tests/default/package-lock.json b/samples/client/petstore/typescript-axios/tests/default/package-lock.json index 42dfae14ef3b..24b2819d42bb 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-axios/tests/default/package-lock.json @@ -1,11 +1,11 @@ { - "name": "typescript-fetch-test", + "name": "typescript-axios-test", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "typescript-fetch-test", + "name": "typescript-axios-test", "version": "1.0.0", "hasInstallScript": true, "license": "ISC", @@ -28,11 +28,11 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.21.4" + "axios": "^0.26.1" }, "devDependencies": { "@types/node": "^12.11.5", - "typescript": "^3.6.4" + "typescript": "^4.0" } }, "../../builds/with-npm-version/node_modules/@types/node": { @@ -1533,7 +1533,6 @@ "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -2744,8 +2743,8 @@ "version": "file:../../builds/with-npm-version", "requires": { "@types/node": "^12.11.5", - "axios": "^0.21.4", - "typescript": "^3.6.4" + "axios": "^0.26.1", + "typescript": "^4.0" }, "dependencies": { "@types/node": { diff --git a/samples/client/petstore/typescript-axios/tests/default/package.json b/samples/client/petstore/typescript-axios/tests/default/package.json index bd6f7784a350..c723eabd6f38 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package.json +++ b/samples/client/petstore/typescript-axios/tests/default/package.json @@ -19,7 +19,7 @@ "mocha": "^8.2.1", "typescript": "^4.1.2" }, - "name": "typescript-fetch-test", + "name": "typescript-axios-test", "version": "1.0.0", "directories": { "test": "test" diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES index 4c31a85fd4ff..69fb8d2039e5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES @@ -8,6 +8,7 @@ apis/UserApi.ts apis/index.ts index.ts models/AdditionalPropertiesClass.ts +models/AllOfWithSingleRef.ts models/Animal.ts models/ArrayOfArrayOfNumberOnly.ts models/ArrayOfNumberOnly.ts @@ -50,6 +51,7 @@ models/OuterObjectWithEnumProperty.ts models/Pet.ts models/ReadOnlyFirst.ts models/Return.ts +models/SingleRefType.ts models/SpecialModelName.ts models/Tag.ts models/User.ts diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts index 760cc8e90428..7393eb31e31c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts @@ -18,6 +18,9 @@ import { Client, ClientFromJSON, ClientToJSON, + EnumClass, + EnumClassFromJSON, + EnumClassToJSON, FileSchemaTestClass, FileSchemaTestClassFromJSON, FileSchemaTestClassToJSON, @@ -105,6 +108,7 @@ export interface TestEnumParametersRequest { enumQueryString?: TestEnumParametersEnumQueryStringEnum; enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum; enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum; + enumQueryModelArray?: Array; enumFormStringArray?: Array; enumFormString?: TestEnumParametersEnumFormStringEnum; } @@ -636,6 +640,10 @@ export class FakeApi extends runtime.BaseAPI { queryParameters['enum_query_double'] = requestParameters.enumQueryDouble; } + if (requestParameters.enumQueryModelArray) { + queryParameters['enum_query_model_array'] = requestParameters.enumQueryModelArray; + } + const headerParameters: runtime.HTTPHeaders = {}; if (requestParameters.enumHeaderStringArray) { @@ -930,69 +938,69 @@ export class FakeApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumHeaderStringArrayEnum { - GreaterThan = '>', - Dollar = '$' -} + * @export + */ +export const TestEnumParametersEnumHeaderStringArrayEnum = { + GreaterThan: '>', + Dollar: '$' +} as const; +export type TestEnumParametersEnumHeaderStringArrayEnum = typeof TestEnumParametersEnumHeaderStringArrayEnum[keyof typeof TestEnumParametersEnumHeaderStringArrayEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumHeaderStringEnum { - Abc = '_abc', - Efg = '-efg', - Xyz = '(xyz)' -} + * @export + */ +export const TestEnumParametersEnumHeaderStringEnum = { + Abc: '_abc', + Efg: '-efg', + Xyz: '(xyz)' +} as const; +export type TestEnumParametersEnumHeaderStringEnum = typeof TestEnumParametersEnumHeaderStringEnum[keyof typeof TestEnumParametersEnumHeaderStringEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumQueryStringArrayEnum { - GreaterThan = '>', - Dollar = '$' -} + * @export + */ +export const TestEnumParametersEnumQueryStringArrayEnum = { + GreaterThan: '>', + Dollar: '$' +} as const; +export type TestEnumParametersEnumQueryStringArrayEnum = typeof TestEnumParametersEnumQueryStringArrayEnum[keyof typeof TestEnumParametersEnumQueryStringArrayEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumQueryStringEnum { - Abc = '_abc', - Efg = '-efg', - Xyz = '(xyz)' -} + * @export + */ +export const TestEnumParametersEnumQueryStringEnum = { + Abc: '_abc', + Efg: '-efg', + Xyz: '(xyz)' +} as const; +export type TestEnumParametersEnumQueryStringEnum = typeof TestEnumParametersEnumQueryStringEnum[keyof typeof TestEnumParametersEnumQueryStringEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumQueryIntegerEnum { - NUMBER_1 = 1, - NUMBER_MINUS_2 = -2 -} + * @export + */ +export const TestEnumParametersEnumQueryIntegerEnum = { + NUMBER_1: 1, + NUMBER_MINUS_2: -2 +} as const; +export type TestEnumParametersEnumQueryIntegerEnum = typeof TestEnumParametersEnumQueryIntegerEnum[keyof typeof TestEnumParametersEnumQueryIntegerEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumQueryDoubleEnum { - NUMBER_1_DOT_1 = 1.1, - NUMBER_MINUS_1_DOT_2 = -1.2 -} + * @export + */ +export const TestEnumParametersEnumQueryDoubleEnum = { + NUMBER_1_DOT_1: 1.1, + NUMBER_MINUS_1_DOT_2: -1.2 +} as const; +export type TestEnumParametersEnumQueryDoubleEnum = typeof TestEnumParametersEnumQueryDoubleEnum[keyof typeof TestEnumParametersEnumQueryDoubleEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumFormStringArrayEnum { - GreaterThan = '>', - Dollar = '$' -} + * @export + */ +export const TestEnumParametersEnumFormStringArrayEnum = { + GreaterThan: '>', + Dollar: '$' +} as const; +export type TestEnumParametersEnumFormStringArrayEnum = typeof TestEnumParametersEnumFormStringArrayEnum[keyof typeof TestEnumParametersEnumFormStringArrayEnum]; /** - * @export - * @enum {string} - */ -export enum TestEnumParametersEnumFormStringEnum { - Abc = '_abc', - Efg = '-efg', - Xyz = '(xyz)' -} + * @export + */ +export const TestEnumParametersEnumFormStringEnum = { + Abc: '_abc', + Efg: '-efg', + Xyz: '(xyz)' +} as const; +export type TestEnumParametersEnumFormStringEnum = typeof TestEnumParametersEnumFormStringEnum[keyof typeof TestEnumParametersEnumFormStringEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts index c9d3f471a2aa..3617f28797be 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts @@ -497,11 +497,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts new file mode 100644 index 000000000000..e10f10e72512 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import { + SingleRefType, + SingleRefTypeFromJSON, + SingleRefTypeFromJSONTyped, + SingleRefTypeToJSON, +} from './SingleRefType'; + +/** + * + * @export + * @interface AllOfWithSingleRef + */ +export interface AllOfWithSingleRef { + /** + * + * @type {string} + * @memberof AllOfWithSingleRef + */ + username?: string; + /** + * + * @type {SingleRefType} + * @memberof AllOfWithSingleRef + */ + singleRefType?: SingleRefType | null; +} + +export function AllOfWithSingleRefFromJSON(json: any): AllOfWithSingleRef { + return AllOfWithSingleRefFromJSONTyped(json, false); +} + +export function AllOfWithSingleRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllOfWithSingleRef { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'username': !exists(json, 'username') ? undefined : json['username'], + 'singleRefType': !exists(json, 'SingleRefType') ? undefined : SingleRefTypeFromJSON(json['SingleRefType']), + }; +} + +export function AllOfWithSingleRefToJSON(value?: AllOfWithSingleRef | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'username': value.username, + 'SingleRefType': SingleRefTypeToJSON(value.singleRefType), + }; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts index 186b145d5e0e..2dbe08d721d0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts @@ -33,21 +33,25 @@ export interface EnumArrays { arrayEnum?: Array; } + /** -* @export -* @enum {string} -*/ -export enum EnumArraysJustSymbolEnum { - GreaterThanOrEqualTo = '>=', - Dollar = '$' -}/** -* @export -* @enum {string} -*/ -export enum EnumArraysArrayEnumEnum { - Fish = 'fish', - Crab = 'crab' -} + * @export + */ +export const EnumArraysJustSymbolEnum = { + GreaterThanOrEqualTo: '>=', + Dollar: '$' +} as const; +export type EnumArraysJustSymbolEnum = typeof EnumArraysJustSymbolEnum[keyof typeof EnumArraysJustSymbolEnum]; + +/** + * @export + */ +export const EnumArraysArrayEnumEnum = { + Fish: 'fish', + Crab: 'crab' +} as const; +export type EnumArraysArrayEnumEnum = typeof EnumArraysArrayEnumEnum[keyof typeof EnumArraysArrayEnumEnum]; + export function EnumArraysFromJSON(json: any): EnumArrays { return EnumArraysFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts index a9543c7e8ec3..c00557690de0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum EnumClass { - Abc = '_abc', - Efg = '-efg', - Xyz = '(xyz)' -} +export const EnumClass = { + Abc: '_abc', + Efg: '-efg', + Xyz: '(xyz)' +} as const; +export type EnumClass = typeof EnumClass[keyof typeof EnumClass]; + export function EnumClassFromJSON(json: any): EnumClass { return EnumClassFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts index 22e369f39864..9791000abb7d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts @@ -94,37 +94,45 @@ export interface EnumTest { outerEnumIntegerDefaultValue?: OuterEnumIntegerDefaultValue; } + /** -* @export -* @enum {string} -*/ -export enum EnumTestEnumStringEnum { - Upper = 'UPPER', - Lower = 'lower', - Empty = '' -}/** -* @export -* @enum {string} -*/ -export enum EnumTestEnumStringRequiredEnum { - Upper = 'UPPER', - Lower = 'lower', - Empty = '' -}/** -* @export -* @enum {string} -*/ -export enum EnumTestEnumIntegerEnum { - NUMBER_1 = 1, - NUMBER_MINUS_1 = -1 -}/** -* @export -* @enum {string} -*/ -export enum EnumTestEnumNumberEnum { - NUMBER_1_DOT_1 = 1.1, - NUMBER_MINUS_1_DOT_2 = -1.2 -} + * @export + */ +export const EnumTestEnumStringEnum = { + Upper: 'UPPER', + Lower: 'lower', + Empty: '' +} as const; +export type EnumTestEnumStringEnum = typeof EnumTestEnumStringEnum[keyof typeof EnumTestEnumStringEnum]; + +/** + * @export + */ +export const EnumTestEnumStringRequiredEnum = { + Upper: 'UPPER', + Lower: 'lower', + Empty: '' +} as const; +export type EnumTestEnumStringRequiredEnum = typeof EnumTestEnumStringRequiredEnum[keyof typeof EnumTestEnumStringRequiredEnum]; + +/** + * @export + */ +export const EnumTestEnumIntegerEnum = { + NUMBER_1: 1, + NUMBER_MINUS_1: -1 +} as const; +export type EnumTestEnumIntegerEnum = typeof EnumTestEnumIntegerEnum[keyof typeof EnumTestEnumIntegerEnum]; + +/** + * @export + */ +export const EnumTestEnumNumberEnum = { + NUMBER_1_DOT_1: 1.1, + NUMBER_MINUS_1_DOT_2: -1.2 +} as const; +export type EnumTestEnumNumberEnum = typeof EnumTestEnumNumberEnum[keyof typeof EnumTestEnumNumberEnum]; + export function EnumTestFromJSON(json: any): EnumTest { return EnumTestFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts index 9375da6e5ef3..c54b2a32f50b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts @@ -45,14 +45,16 @@ export interface MapTest { indirectMap?: { [key: string]: boolean; }; } + /** -* @export -* @enum {string} -*/ -export enum MapTestMapOfEnumStringEnum { - Upper = 'UPPER', - Lower = 'lower' -} + * @export + */ +export const MapTestMapOfEnumStringEnum = { + Upper: 'UPPER', + Lower: 'lower' +} as const; +export type MapTestMapOfEnumStringEnum = typeof MapTestMapOfEnumStringEnum[keyof typeof MapTestMapOfEnumStringEnum]; + export function MapTestFromJSON(json: any): MapTest { return MapTestFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts index e89a0e0482ac..a5d97f21a033 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts index 8ecc66517bc8..4f6998297086 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum OuterEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OuterEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OuterEnum = typeof OuterEnum[keyof typeof OuterEnum]; + export function OuterEnumFromJSON(json: any): OuterEnum { return OuterEnumFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts index abf59c068668..d10e8eeded17 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum OuterEnumDefaultValue { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OuterEnumDefaultValue = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OuterEnumDefaultValue = typeof OuterEnumDefaultValue[keyof typeof OuterEnumDefaultValue]; + export function OuterEnumDefaultValueFromJSON(json: any): OuterEnumDefaultValue { return OuterEnumDefaultValueFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts index c19c51a8d423..cdedced1d2db 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum OuterEnumInteger { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} +export const OuterEnumInteger = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; +export type OuterEnumInteger = typeof OuterEnumInteger[keyof typeof OuterEnumInteger]; + export function OuterEnumIntegerFromJSON(json: any): OuterEnumInteger { return OuterEnumIntegerFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts index 91ea94c993a3..4fc05d435a2c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum OuterEnumIntegerDefaultValue { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} +export const OuterEnumIntegerDefaultValue = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; +export type OuterEnumIntegerDefaultValue = typeof OuterEnumIntegerDefaultValue[keyof typeof OuterEnumIntegerDefaultValue]; + export function OuterEnumIntegerDefaultValueFromJSON(json: any): OuterEnumIntegerDefaultValue { return OuterEnumIntegerDefaultValueFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts index 4b88dc214eb3..c513a3faa1c6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts new file mode 100644 index 000000000000..2b76381c67a7 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SingleRefType = { + Admin: 'admin', + User: 'user' +} as const; +export type SingleRefType = typeof SingleRefType[keyof typeof SingleRefType]; + + +export function SingleRefTypeFromJSON(json: any): SingleRefType { + return SingleRefTypeFromJSONTyped(json, false); +} + +export function SingleRefTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SingleRefType { + return json as SingleRefType; +} + +export function SingleRefTypeToJSON(value?: SingleRefType | null): any { + return value as any; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts index b2f6e6f9b347..aee3141e91d5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts @@ -1,6 +1,7 @@ /* tslint:disable */ /* eslint-disable */ export * from './AdditionalPropertiesClass'; +export * from './AllOfWithSingleRef'; export * from './Animal'; export * from './ArrayOfArrayOfNumberOnly'; export * from './ArrayOfNumberOnly'; @@ -43,6 +44,7 @@ export * from './OuterObjectWithEnumProperty'; export * from './Pet'; export * from './ReadOnlyFirst'; export * from './Return'; +export * from './SingleRefType'; export * from './SpecialModelName'; export * from './Tag'; export * from './User'; diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts index 79873e036539..d79265604937 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts index e4ddf7e853a0..4e906a7152e6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts @@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts index 53163db8bc26..2e4f44f6469f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts index 6a75faae4262..1866bcb149e7 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 95abeaf73777..33a25b22c610 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts index 6706d55addc9..24c69924aaea 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts @@ -196,20 +196,20 @@ export class DefaultApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FakeEnumRequestGetInlineStringEnumEnum { - One = 'one', - Two = 'two', - Three = 'three' -} + * @export + */ +export const FakeEnumRequestGetInlineStringEnumEnum = { + One: 'one', + Two: 'two', + Three: 'three' +} as const; +export type FakeEnumRequestGetInlineStringEnumEnum = typeof FakeEnumRequestGetInlineStringEnumEnum[keyof typeof FakeEnumRequestGetInlineStringEnumEnum]; /** - * @export - * @enum {string} - */ -export enum FakeEnumRequestGetInlineNumberEnumEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3 -} + * @export + */ +export const FakeEnumRequestGetInlineNumberEnumEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; +export type FakeEnumRequestGetInlineNumberEnumEnum = typeof FakeEnumRequestGetInlineNumberEnumEnum[keyof typeof FakeEnumRequestGetInlineNumberEnumEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObjectNullableNumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObjectNullableNumberEnum.ts new file mode 100644 index 000000000000..2a98aa4737b7 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObjectNullableNumberEnum.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +import { + NumberEnum, + NumberEnumFromJSON, + NumberEnumFromJSONTyped, + NumberEnumToJSON, +} from './NumberEnum'; + +/** + * + * @export + * @interface EnumPatternObjectNullableNumberEnum + */ +export interface EnumPatternObjectNullableNumberEnum { +} + +export function EnumPatternObjectNullableNumberEnumFromJSON(json: any): EnumPatternObjectNullableNumberEnum { + return EnumPatternObjectNullableNumberEnumFromJSONTyped(json, false); +} + +export function EnumPatternObjectNullableNumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnumPatternObjectNullableNumberEnum { + return json; +} + +export function EnumPatternObjectNullableNumberEnumToJSON(value?: EnumPatternObjectNullableNumberEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObjectNullableStringEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObjectNullableStringEnum.ts new file mode 100644 index 000000000000..227a053c308d --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObjectNullableStringEnum.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +import { + StringEnum, + StringEnumFromJSON, + StringEnumFromJSONTyped, + StringEnumToJSON, +} from './StringEnum'; + +/** + * + * @export + * @interface EnumPatternObjectNullableStringEnum + */ +export interface EnumPatternObjectNullableStringEnum { +} + +export function EnumPatternObjectNullableStringEnumFromJSON(json: any): EnumPatternObjectNullableStringEnum { + return EnumPatternObjectNullableStringEnumFromJSONTyped(json, false); +} + +export function EnumPatternObjectNullableStringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnumPatternObjectNullableStringEnum { + return json; +} + +export function EnumPatternObjectNullableStringEnumToJSON(value?: EnumPatternObjectNullableStringEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts index f192b042faec..e5539a44d921 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts @@ -30,7 +30,7 @@ export interface InlineObject { * @type {string} * @memberof InlineObject */ - nullableStringEnum?: string | null; + nullableStringEnum?: InlineObjectNullableStringEnumEnum; /** * * @type {number} @@ -42,26 +42,50 @@ export interface InlineObject { * @type {number} * @memberof InlineObject */ - nullableNumberEnum?: number | null; + nullableNumberEnum?: InlineObjectNullableNumberEnumEnum; } + /** -* @export -* @enum {string} -*/ -export enum InlineObjectStringEnumEnum { - One = 'one', - Two = 'two', - Three = 'three' -}/** -* @export -* @enum {string} -*/ -export enum InlineObjectNumberEnumEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3 -} + * @export + */ +export const InlineObjectStringEnumEnum = { + One: 'one', + Two: 'two', + Three: 'three' +} as const; +export type InlineObjectStringEnumEnum = typeof InlineObjectStringEnumEnum[keyof typeof InlineObjectStringEnumEnum]; + +/** + * @export + */ +export const InlineObjectNullableStringEnumEnum = { + One: 'one', + Two: 'two', + Three: 'three' +} as const; +export type InlineObjectNullableStringEnumEnum = typeof InlineObjectNullableStringEnumEnum[keyof typeof InlineObjectNullableStringEnumEnum]; + +/** + * @export + */ +export const InlineObjectNumberEnumEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; +export type InlineObjectNumberEnumEnum = typeof InlineObjectNumberEnumEnum[keyof typeof InlineObjectNumberEnumEnum]; + +/** + * @export + */ +export const InlineObjectNullableNumberEnumEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; +export type InlineObjectNullableNumberEnumEnum = typeof InlineObjectNullableNumberEnumEnum[keyof typeof InlineObjectNullableNumberEnumEnum]; + export function InlineObjectFromJSON(json: any): InlineObject { return InlineObjectFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts index 1d5c1714d16e..1e734794f15d 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts @@ -30,7 +30,7 @@ export interface InlineResponse200 { * @type {string} * @memberof InlineResponse200 */ - nullableStringEnum?: string | null; + nullableStringEnum?: InlineResponse200NullableStringEnumEnum; /** * * @type {number} @@ -42,26 +42,50 @@ export interface InlineResponse200 { * @type {number} * @memberof InlineResponse200 */ - nullableNumberEnum?: number | null; + nullableNumberEnum?: InlineResponse200NullableNumberEnumEnum; } + /** -* @export -* @enum {string} -*/ -export enum InlineResponse200StringEnumEnum { - One = 'one', - Two = 'two', - Three = 'three' -}/** -* @export -* @enum {string} -*/ -export enum InlineResponse200NumberEnumEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3 -} + * @export + */ +export const InlineResponse200StringEnumEnum = { + One: 'one', + Two: 'two', + Three: 'three' +} as const; +export type InlineResponse200StringEnumEnum = typeof InlineResponse200StringEnumEnum[keyof typeof InlineResponse200StringEnumEnum]; + +/** + * @export + */ +export const InlineResponse200NullableStringEnumEnum = { + One: 'one', + Two: 'two', + Three: 'three' +} as const; +export type InlineResponse200NullableStringEnumEnum = typeof InlineResponse200NullableStringEnumEnum[keyof typeof InlineResponse200NullableStringEnumEnum]; + +/** + * @export + */ +export const InlineResponse200NumberEnumEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; +export type InlineResponse200NumberEnumEnum = typeof InlineResponse200NumberEnumEnum[keyof typeof InlineResponse200NumberEnumEnum]; + +/** + * @export + */ +export const InlineResponse200NullableNumberEnumEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; +export type InlineResponse200NullableNumberEnumEnum = typeof InlineResponse200NullableNumberEnumEnum[keyof typeof InlineResponse200NullableNumberEnumEnum]; + export function InlineResponse200FromJSON(json: any): InlineResponse200 { return InlineResponse200FromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200NullableNumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200NullableNumberEnum.ts new file mode 100644 index 000000000000..c45da6673a08 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200NullableNumberEnum.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InlineResponse200NullableNumberEnum + */ +export interface InlineResponse200NullableNumberEnum { +} + +export function InlineResponse200NullableNumberEnumFromJSON(json: any): InlineResponse200NullableNumberEnum { + return InlineResponse200NullableNumberEnumFromJSONTyped(json, false); +} + +export function InlineResponse200NullableNumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse200NullableNumberEnum { + return json; +} + +export function InlineResponse200NullableNumberEnumToJSON(value?: InlineResponse200NullableNumberEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200NullableStringEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200NullableStringEnum.ts new file mode 100644 index 000000000000..4574bad832ac --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200NullableStringEnum.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InlineResponse200NullableStringEnum + */ +export interface InlineResponse200NullableStringEnum { +} + +export function InlineResponse200NullableStringEnumFromJSON(json: any): InlineResponse200NullableStringEnum { + return InlineResponse200NullableStringEnumFromJSONTyped(json, false); +} + +export function InlineResponse200NullableStringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse200NullableStringEnum { + return json; +} + +export function InlineResponse200NullableStringEnumToJSON(value?: InlineResponse200NullableStringEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts index 2ef3b74c7f45..e3d47c556ade 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum NumberEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3 -} +export const NumberEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3 +} as const; +export type NumberEnum = typeof NumberEnum[keyof typeof NumberEnum]; + export function NumberEnumFromJSON(json: any): NumberEnum { return NumberEnumFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts index 8c984c44ba86..074fdce65877 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * * @export - * @enum {string} */ -export enum StringEnum { - One = 'one', - Two = 'two', - Three = 'three' -} +export const StringEnum = { + One: 'one', + Two: 'two', + Three: 'three' +} as const; +export type StringEnum = typeof StringEnum[keyof typeof StringEnum]; + export function StringEnumFromJSON(json: any): StringEnum { return StringEnumFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts index 1f1ca3c30ae5..6a9d79a0bee6 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/FILES index 38feffe8896a..cfa1534a047b 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/FILES @@ -15,4 +15,5 @@ src/models/Tag.ts src/models/User.ts src/models/index.ts src/runtime.ts +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/package.json b/samples/client/petstore/typescript-fetch/builds/es6-target/package.json index 478c94e3f2e2..214831d72d5d 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/package.json +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/package.json @@ -5,12 +5,14 @@ "author": "OpenAPI-Generator", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "devDependencies": { - "typescript": "^2.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" 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 e4ddf7e853a0..4e906a7152e6 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 @@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; 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 53163db8bc26..2e4f44f6469f 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 @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); 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 6a75faae4262..1866bcb149e7 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 @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); 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 95abeaf73777..33a25b22c610 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 @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.esm.json b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.esm.json new file mode 100644 index 000000000000..2c0331cce040 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts index 60f5804b68d7..076480356daa 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts @@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts index 53163db8bc26..2e4f44f6469f 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts index 6a75faae4262..1866bcb149e7 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts index 95abeaf73777..33a25b22c610 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json index 478c94e3f2e2..0cc4daffa4fc 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/package.json @@ -10,7 +10,7 @@ "prepare": "npm run build" }, "devDependencies": { - "typescript": "^2.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" 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 28c305f52e17..1a11d953fc1b 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 @@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; 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 53163db8bc26..2e4f44f6469f 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 @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); 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 6a75faae4262..1866bcb149e7 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 @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); 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 95abeaf73777..33a25b22c610 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 @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/FILES index e0b52bf6e972..c7d07ac052f6 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/FILES @@ -70,4 +70,5 @@ src/models/WarningCodeRecord.ts src/models/index.ts src/runtime.ts src/runtimeSagasAndRecords.ts +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json index 93c65af45dab..4db0ebf98bfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json @@ -13,12 +13,12 @@ "redux-saga": "^1.1.3", "redux-ts-simple": "^3.2.0", "reselect": "^4.0.0", - "typescript": "^3.9.5" + "typescript": "^4.0" } }, "node_modules/@babel/runtime": { "version": "7.12.5", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@babel%2fruntime/-/runtime-7.12.5.tgz", + "resolved": "https://registry.npmjs.org/@babel%2fruntime/-/runtime-7.12.5.tgz", "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", "dev": true, "license": "MIT", @@ -28,7 +28,7 @@ }, "node_modules/@redux-saga/core": { "version": "1.1.3", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fcore/-/core-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fcore/-/core-1.1.3.tgz", "integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==", "dev": true, "license": "MIT", @@ -45,14 +45,14 @@ }, "node_modules/@redux-saga/deferred": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz", "integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==", "dev": true, "license": "MIT" }, "node_modules/@redux-saga/delay-p": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz", "integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==", "dev": true, "license": "MIT", @@ -62,7 +62,7 @@ }, "node_modules/@redux-saga/is": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fis/-/is-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fis/-/is-1.1.2.tgz", "integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==", "dev": true, "license": "MIT", @@ -73,35 +73,35 @@ }, "node_modules/@redux-saga/symbols": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz", "integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==", "dev": true, "license": "MIT" }, "node_modules/@redux-saga/types": { "version": "1.1.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2ftypes/-/types-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2ftypes/-/types-1.1.0.tgz", "integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==", "dev": true, "license": "MIT" }, "node_modules/immutable": { "version": "4.0.0-rc.12", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/immutable/-/immutable-4.0.0-rc.12.tgz", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz", "integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==", "dev": true, "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/js-tokens/-/js-tokens-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true, "license": "MIT" }, "node_modules/loose-envify": { "version": "1.4.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/loose-envify/-/loose-envify-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "license": "MIT", @@ -114,14 +114,14 @@ }, "node_modules/normalizr": { "version": "3.6.1", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/normalizr/-/normalizr-3.6.1.tgz", + "resolved": "https://registry.npmjs.org/normalizr/-/normalizr-3.6.1.tgz", "integrity": "sha512-8iEmqXmPtll8PwbEFrbPoDxVw7MKnNvt3PZzR2Xvq9nggEEOgBlNICPXYzyZ4w4AkHUzCU998mdatER3n2VaMA==", "dev": true, "license": "MIT" }, "node_modules/redux": { "version": "4.0.5", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux/-/redux-4.0.5.tgz", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", "dev": true, "license": "MIT", @@ -132,7 +132,7 @@ }, "node_modules/redux-saga": { "version": "1.1.3", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-saga/-/redux-saga-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.1.3.tgz", "integrity": "sha512-RkSn/z0mwaSa5/xH/hQLo8gNf4tlvT18qXDNvedihLcfzh+jMchDgaariQoehCpgRltEm4zHKJyINEz6aqswTw==", "dev": true, "license": "MIT", @@ -142,28 +142,28 @@ }, "node_modules/redux-ts-simple": { "version": "3.2.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz", "integrity": "sha512-cZGmkNlD+14tNKomgaLWv6giQmgI/c05g09UxbA04lr2TbqHH8/bUQLvJgTzPuGwsZCWQHizkQZt9EI0HLD+pg==", "dev": true, "license": "MIT" }, "node_modules/regenerator-runtime": { "version": "0.13.7", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true, "license": "MIT" }, "node_modules/reselect": { "version": "4.0.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/reselect/-/reselect-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==", "dev": true, "license": "MIT" }, "node_modules/symbol-observable": { "version": "1.2.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/symbol-observable/-/symbol-observable-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", "dev": true, "license": "MIT", @@ -172,11 +172,10 @@ } }, "node_modules/typescript": { - "version": "3.9.7", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -187,7 +186,7 @@ }, "node_modules/typescript-compare": { "version": "0.0.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-compare/-/typescript-compare-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", "dev": true, "license": "MIT", @@ -197,14 +196,14 @@ }, "node_modules/typescript-logic": { "version": "0.0.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-logic/-/typescript-logic-0.0.0.tgz", + "resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz", "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==", "dev": true, "license": "MIT" }, "node_modules/typescript-tuple": { "version": "2.2.1", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-tuple/-/typescript-tuple-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz", "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", "dev": true, "license": "MIT", @@ -216,7 +215,7 @@ "dependencies": { "@babel/runtime": { "version": "7.12.5", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@babel%2fruntime/-/runtime-7.12.5.tgz", + "resolved": "https://registry.npmjs.org/@babel%2fruntime/-/runtime-7.12.5.tgz", "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", "dev": true, "requires": { @@ -225,7 +224,7 @@ }, "@redux-saga/core": { "version": "1.1.3", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fcore/-/core-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fcore/-/core-1.1.3.tgz", "integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==", "dev": true, "requires": { @@ -241,13 +240,13 @@ }, "@redux-saga/deferred": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz", "integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==", "dev": true }, "@redux-saga/delay-p": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz", "integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==", "dev": true, "requires": { @@ -256,7 +255,7 @@ }, "@redux-saga/is": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fis/-/is-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fis/-/is-1.1.2.tgz", "integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==", "dev": true, "requires": { @@ -266,31 +265,31 @@ }, "@redux-saga/symbols": { "version": "1.1.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz", "integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==", "dev": true }, "@redux-saga/types": { "version": "1.1.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2ftypes/-/types-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/@redux-saga%2ftypes/-/types-1.1.0.tgz", "integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==", "dev": true }, "immutable": { "version": "4.0.0-rc.12", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/immutable/-/immutable-4.0.0-rc.12.tgz", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz", "integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==", "dev": true }, "js-tokens": { "version": "4.0.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/js-tokens/-/js-tokens-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "loose-envify": { "version": "1.4.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/loose-envify/-/loose-envify-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { @@ -299,13 +298,13 @@ }, "normalizr": { "version": "3.6.1", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/normalizr/-/normalizr-3.6.1.tgz", + "resolved": "https://registry.npmjs.org/normalizr/-/normalizr-3.6.1.tgz", "integrity": "sha512-8iEmqXmPtll8PwbEFrbPoDxVw7MKnNvt3PZzR2Xvq9nggEEOgBlNICPXYzyZ4w4AkHUzCU998mdatER3n2VaMA==", "dev": true }, "redux": { "version": "4.0.5", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux/-/redux-4.0.5.tgz", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", "dev": true, "requires": { @@ -315,7 +314,7 @@ }, "redux-saga": { "version": "1.1.3", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-saga/-/redux-saga-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.1.3.tgz", "integrity": "sha512-RkSn/z0mwaSa5/xH/hQLo8gNf4tlvT18qXDNvedihLcfzh+jMchDgaariQoehCpgRltEm4zHKJyINEz6aqswTw==", "dev": true, "requires": { @@ -324,37 +323,37 @@ }, "redux-ts-simple": { "version": "3.2.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz", "integrity": "sha512-cZGmkNlD+14tNKomgaLWv6giQmgI/c05g09UxbA04lr2TbqHH8/bUQLvJgTzPuGwsZCWQHizkQZt9EI0HLD+pg==", "dev": true }, "regenerator-runtime": { "version": "0.13.7", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true }, "reselect": { "version": "4.0.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/reselect/-/reselect-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==", "dev": true }, "symbol-observable": { "version": "1.2.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/symbol-observable/-/symbol-observable-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", "dev": true }, "typescript": { - "version": "3.9.7", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true }, "typescript-compare": { "version": "0.0.2", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-compare/-/typescript-compare-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", "dev": true, "requires": { @@ -363,13 +362,13 @@ }, "typescript-logic": { "version": "0.0.0", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-logic/-/typescript-logic-0.0.0.tgz", + "resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz", "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==", "dev": true }, "typescript-tuple": { "version": "2.2.1", - "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-tuple/-/typescript-tuple-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz", "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", "dev": true, "requires": { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package.json b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package.json index 3b5c84b1eeed..1851c8a39285 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package.json +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package.json @@ -5,15 +5,18 @@ "author": "OpenAPI-Generator", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc" }, + "build": "tsc && tsc -p tsconfig.esm.json" + }, "devDependencies": { "immutable": "^4.0.0-rc.12", "normalizr": "^3.6.1", "redux-saga": "^1.1.3", "redux-ts-simple": "^3.2.0", "reselect": "^4.0.0", - "typescript": "^3.9.5" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts index bdc58ac3a1d5..5e132a85f8f5 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts @@ -593,11 +593,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts index f10324a47750..3a5daedd3e57 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * Behavior type of a pet * @export - * @enum {string} */ -export enum BehaviorType { - Voluntary = 'Voluntary', - Involuntary = 'Involuntary', - Overt = 'Overt' -} +export const BehaviorType = { + Voluntary: 'Voluntary', + Involuntary: 'Involuntary', + Overt: 'Overt' +} as const; +export type BehaviorType = typeof BehaviorType[keyof typeof BehaviorType]; + export function BehaviorTypeFromJSON(json: any): BehaviorType { return BehaviorTypeFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts index 0a24b4b493f3..f034ad5bb3f7 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts @@ -12,25 +12,27 @@ * Do not edit the class manually. */ + /** * Status of the deployment request * @export - * @enum {string} */ -export enum DeploymentRequestStatus { - New = 'New', - Prepared = 'Prepared', - Printed = 'Printed', - Tested = 'Tested', - Completed = 'Completed', - Cancelled = 'Cancelled', - Promoted = 'Promoted', - Assigned = 'Assigned', - Ready = 'Ready', - Packaged = 'Packaged', - Pairing = 'Pairing', - Paired = 'Paired' -} +export const DeploymentRequestStatus = { + New: 'New', + Prepared: 'Prepared', + Printed: 'Printed', + Tested: 'Tested', + Completed: 'Completed', + Cancelled: 'Cancelled', + Promoted: 'Promoted', + Assigned: 'Assigned', + Ready: 'Ready', + Packaged: 'Packaged', + Pairing: 'Pairing', + Paired: 'Paired' +} as const; +export type DeploymentRequestStatus = typeof DeploymentRequestStatus[keyof typeof DeploymentRequestStatus]; + export function DeploymentRequestStatusFromJSON(json: any): DeploymentRequestStatus { return DeploymentRequestStatusFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts index 101539269e4c..c5171d088e07 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts @@ -12,31 +12,33 @@ * Do not edit the class manually. */ + /** * Error code returned when an error occurs * @export - * @enum {string} */ -export enum ErrorCode { - VolumeRangeAtLowestValue = 'Volume_Range_At_Lowest_Value', - MusicVolumeBlocksVolumeRangeDecrease = 'Music_Volume_Blocks_Volume_Range_Decrease', - VolumeRangeAtHighestValue = 'Volume_Range_At_Highest_Value', - MaximumVolumeBlocksVolumeRangeIncrease = 'Maximum_Volume_Blocks_Volume_Range_Increase', - MusicVolumeBlocksMaximumVolumeDecrease = 'Music_Volume_Blocks_Maximum_Volume_Decrease', - MaximumVolumeAtLowestValue = 'Maximum_Volume_At_Lowest_Value', - VolumeRangeBlocksMaximumVolumeDecrease = 'Volume_Range_Blocks_Maximum_Volume_Decrease', - MaximumVolumeAtHighestValue = 'Maximum_Volume_At_Highest_Value', - MessageGainBlocksMaximumVolumeIncrease = 'Message_Gain_Blocks_Maximum_Volume_Increase', - MusicVolumeBlocksMaximumVolumeIncrease = 'Music_Volume_Blocks_Maximum_Volume_Increase', - MaximumVolumeBlocksMessageGainDecrease = 'Maximum_Volume_Blocks_Message_Gain_Decrease', - MessageGainAtHighestValue = 'Message_Gain_At_Highest_Value', - MusicVolumeBlocksMessageGain = 'Music_Volume_Blocks_Message_Gain', - MaximumMessageGainLowerThanMinimum = 'Maximum_Message_Gain_Lower_Than_Minimum', - MaximumMessageGainHigherThanMaximum = 'Maximum_Message_Gain_Higher_Than_Maximum', - MaximumMessageGainLowerThanMessageGain = 'Maximum_Message_Gain_Lower_Than_Message_Gain', - MinimumVolumeBlocksMusicVolumeDecrease = 'Minimum_Volume_Blocks_Music_Volume_Decrease', - MaximumVolumeBlocksMusicVolumeIncrease = 'Maximum_Volume_Blocks_Music_Volume_Increase' -} +export const ErrorCode = { + VolumeRangeAtLowestValue: 'Volume_Range_At_Lowest_Value', + MusicVolumeBlocksVolumeRangeDecrease: 'Music_Volume_Blocks_Volume_Range_Decrease', + VolumeRangeAtHighestValue: 'Volume_Range_At_Highest_Value', + MaximumVolumeBlocksVolumeRangeIncrease: 'Maximum_Volume_Blocks_Volume_Range_Increase', + MusicVolumeBlocksMaximumVolumeDecrease: 'Music_Volume_Blocks_Maximum_Volume_Decrease', + MaximumVolumeAtLowestValue: 'Maximum_Volume_At_Lowest_Value', + VolumeRangeBlocksMaximumVolumeDecrease: 'Volume_Range_Blocks_Maximum_Volume_Decrease', + MaximumVolumeAtHighestValue: 'Maximum_Volume_At_Highest_Value', + MessageGainBlocksMaximumVolumeIncrease: 'Message_Gain_Blocks_Maximum_Volume_Increase', + MusicVolumeBlocksMaximumVolumeIncrease: 'Music_Volume_Blocks_Maximum_Volume_Increase', + MaximumVolumeBlocksMessageGainDecrease: 'Maximum_Volume_Blocks_Message_Gain_Decrease', + MessageGainAtHighestValue: 'Message_Gain_At_Highest_Value', + MusicVolumeBlocksMessageGain: 'Music_Volume_Blocks_Message_Gain', + MaximumMessageGainLowerThanMinimum: 'Maximum_Message_Gain_Lower_Than_Minimum', + MaximumMessageGainHigherThanMaximum: 'Maximum_Message_Gain_Higher_Than_Maximum', + MaximumMessageGainLowerThanMessageGain: 'Maximum_Message_Gain_Lower_Than_Message_Gain', + MinimumVolumeBlocksMusicVolumeDecrease: 'Minimum_Volume_Blocks_Music_Volume_Decrease', + MaximumVolumeBlocksMusicVolumeIncrease: 'Maximum_Volume_Blocks_Music_Volume_Increase' +} as const; +export type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode]; + export function ErrorCodeFromJSON(json: any): ErrorCode { return ErrorCodeFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts index 53163db8bc26..2e4f44f6469f 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts index 26e07c36c0f7..e1631e2599d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts @@ -172,15 +172,17 @@ export interface Pet { regions?: Array>; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts index 4b7c05fbd4b9..a531fb00ffa4 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * Type of pet part * @export - * @enum {string} */ -export enum PetPartType { - Curved = 'Curved', - Smooth = 'Smooth', - Long = 'Long' -} +export const PetPartType = { + Curved: 'Curved', + Smooth: 'Smooth', + Long: 'Long' +} as const; +export type PetPartType = typeof PetPartType[keyof typeof PetPartType]; + export function PetPartTypeFromJSON(json: any): PetPartType { return PetPartTypeFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts index 8c84dd4b5564..4a32a911488a 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts @@ -64,35 +64,37 @@ export interface ResponseMeta { errors?: Array; } + /** -* @export -* @enum {string} -*/ -export enum ResponseMetaCodeEnum { - Ok = 'Ok', - GenericException = 'Generic_Exception', - FieldErrorException = 'Field_Error_Exception', - ImageValidationException = 'Image_Validation_Exception', - InvalidContainerCreationWithNoDefaultAssetException = 'Invalid_Container_Creation_With_No_Default_Asset_Exception', - InvalidOverrideModeException = 'Invalid_Override_Mode_Exception', - InvalidTagException = 'Invalid_Tag_Exception', - ItemUseException = 'Item_Use_Exception', - MissingPlatformForSoftwareException = 'Missing_Platform_For_Software_Exception', - MissingSoftwareForPlatformException = 'Missing_Software_For_Platform_Exception', - PlatformNotSupportedException = 'Platform_Not_Supported_Exception', - RefreshDataException = 'Refresh_Data_Exception', - RoleAssignmentException = 'Role_Assignment_Exception', - TaskAlreadyRunningException = 'Task_Already_Running_Exception', - LoggedOutException = 'Logged_Out_Exception', - AuthorizationException = 'Authorization_Exception', - UnauthorizedActionForCurrentUserException = 'Unauthorized_Action_For_Current_User_Exception', - UserAlreadyExistsButIsNotAuthenticatedException = 'User_Already_Exists_But_Is_Not_Authenticated_Exception', - UserAlreadyHasActiveOrClosedGalaxieApiProductException = 'User_Already_Has_Active_Or_Closed_Galaxie_Api_Product_Exception', - UserAlreadyHasMultipleGalaxieApiProductsException = 'User_Already_Has_Multiple_Galaxie_Api_Products_Exception', - RecurlyApiException = 'Recurly_Api_Exception', - RecurlyTransactionErrorException = 'Recurly_Transaction_Error_Exception', - GalaxieApiException = 'Galaxie_Api_Exception' -} + * @export + */ +export const ResponseMetaCodeEnum = { + Ok: 'Ok', + GenericException: 'Generic_Exception', + FieldErrorException: 'Field_Error_Exception', + ImageValidationException: 'Image_Validation_Exception', + InvalidContainerCreationWithNoDefaultAssetException: 'Invalid_Container_Creation_With_No_Default_Asset_Exception', + InvalidOverrideModeException: 'Invalid_Override_Mode_Exception', + InvalidTagException: 'Invalid_Tag_Exception', + ItemUseException: 'Item_Use_Exception', + MissingPlatformForSoftwareException: 'Missing_Platform_For_Software_Exception', + MissingSoftwareForPlatformException: 'Missing_Software_For_Platform_Exception', + PlatformNotSupportedException: 'Platform_Not_Supported_Exception', + RefreshDataException: 'Refresh_Data_Exception', + RoleAssignmentException: 'Role_Assignment_Exception', + TaskAlreadyRunningException: 'Task_Already_Running_Exception', + LoggedOutException: 'Logged_Out_Exception', + AuthorizationException: 'Authorization_Exception', + UnauthorizedActionForCurrentUserException: 'Unauthorized_Action_For_Current_User_Exception', + UserAlreadyExistsButIsNotAuthenticatedException: 'User_Already_Exists_But_Is_Not_Authenticated_Exception', + UserAlreadyHasActiveOrClosedGalaxieApiProductException: 'User_Already_Has_Active_Or_Closed_Galaxie_Api_Product_Exception', + UserAlreadyHasMultipleGalaxieApiProductsException: 'User_Already_Has_Multiple_Galaxie_Api_Products_Exception', + RecurlyApiException: 'Recurly_Api_Exception', + RecurlyTransactionErrorException: 'Recurly_Transaction_Error_Exception', + GalaxieApiException: 'Galaxie_Api_Exception' +} as const; +export type ResponseMetaCodeEnum = typeof ResponseMetaCodeEnum[keyof typeof ResponseMetaCodeEnum]; + export function ResponseMetaFromJSON(json: any): ResponseMeta { return ResponseMetaFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts index f0b6dfe654a0..8b1030e648a3 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts @@ -12,16 +12,18 @@ * Do not edit the class manually. */ + /** * Warning code returned when a potential problem is detected * @export - * @enum {string} */ -export enum WarningCode { - ReduceVolumeRangeToAvoidLargeSteps = 'Reduce_Volume_Range_To_Avoid_Large_Steps', - RaiseAmplifierVolume = 'Raise_Amplifier_Volume', - NoVolumeRangeSpecified = 'No_Volume_Range_Specified' -} +export const WarningCode = { + ReduceVolumeRangeToAvoidLargeSteps: 'Reduce_Volume_Range_To_Avoid_Large_Steps', + RaiseAmplifierVolume: 'Raise_Amplifier_Volume', + NoVolumeRangeSpecified: 'No_Volume_Range_Specified' +} as const; +export type WarningCode = typeof WarningCode[keyof typeof WarningCode]; + export function WarningCodeFromJSON(json: any): WarningCode { return WarningCodeFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts index 239aa11c47f4..33a25b22c610 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -130,71 +208,6 @@ export const COLLECTION_FORMATS = { export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.esm.json b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.esm.json new file mode 100644 index 000000000000..2c0331cce040 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.gitignore b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.gitignore deleted file mode 100644 index 149b57654723..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.npmignore b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.npmignore deleted file mode 100644 index 42061c01a1c7..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.npmignore +++ /dev/null @@ -1 +0,0 @@ -README.md \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/FILES deleted file mode 100644 index 38feffe8896a..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.gitignore -.npmignore -README.md -package.json -src/apis/PetApi.ts -src/apis/StoreApi.ts -src/apis/UserApi.ts -src/apis/index.ts -src/index.ts -src/models/Category.ts -src/models/ModelApiResponse.ts -src/models/Order.ts -src/models/Pet.ts -src/models/Tag.ts -src/models/User.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/README.md b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/README.md deleted file mode 100644 index 8c188be0ead2..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## @openapitools/typescript-fetch-petstore@1.0.0 - -This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: - -Environment -* Node.js -* Webpack -* Browserify - -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) - -### Building - -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build -``` - -### Publishing - -First build the package then run ```npm publish``` - -### Consuming - -navigate to the folder of your consuming project and run one of the following commands. - -_published:_ - -``` -npm install @openapitools/typescript-fetch-petstore@1.0.0 --save -``` - -_unPublished (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE --save diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/package.json b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/package.json deleted file mode 100644 index 232f78295b27..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@openapitools/typescript-fetch-petstore", - "version": "1.0.0", - "description": "OpenAPI client for @openapitools/typescript-fetch-petstore", - "author": "OpenAPI-Generator", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "devDependencies": { - "typescript": "^3.9.5" - }, - "publishConfig": { - "registry": "https://skimdb.npmjs.com/registry" - } -} 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 deleted file mode 100644 index e4ddf7e853a0..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/PetApi.ts +++ /dev/null @@ -1,425 +0,0 @@ -/* 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. - * - * 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. - */ - - -import * as runtime from '../runtime'; -import { - ModelApiResponse, - ModelApiResponseFromJSON, - ModelApiResponseToJSON, - Pet, - PetFromJSON, - PetToJSON, -} from '../models'; - -export interface AddPetRequest { - body: Pet; -} - -export interface DeletePetRequest { - petId: number; - apiKey?: string; -} - -export interface FindPetsByStatusRequest { - status: Array; -} - -export interface FindPetsByTagsRequest { - tags: Array; -} - -export interface GetPetByIdRequest { - petId: number; -} - -export interface UpdatePetRequest { - body: Pet; -} - -export interface UpdatePetWithFormRequest { - petId: number; - name?: string; - status?: string; -} - -export interface UploadFileRequest { - petId: number; - additionalMetadata?: string; - file?: Blob; -} - -/** - * - */ -export class PetApi extends runtime.BaseAPI { - - /** - * Add a new pet to the store - */ - async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addPet.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const response = await this.request({ - path: `/pet`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PetToJSON(requestParameters.body), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Add a new pet to the store - */ - async addPet(requestParameters: AddPetRequest, initOverrides?: RequestInit): Promise { - await this.addPetRaw(requestParameters, initOverrides); - } - - /** - * Deletes a pet - */ - async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling deletePet.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.apiKey !== undefined && requestParameters.apiKey !== null) { - headerParameters['api_key'] = String(requestParameters.apiKey); - } - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Deletes a pet - */ - async deletePet(requestParameters: DeletePetRequest, initOverrides?: RequestInit): Promise { - await this.deletePetRaw(requestParameters, initOverrides); - } - - /** - * Multiple status values can be provided with comma separated strings - * Finds Pets by status - */ - async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit): Promise>> { - if (requestParameters.status === null || requestParameters.status === undefined) { - throw new runtime.RequiredError('status','Required parameter requestParameters.status was null or undefined when calling findPetsByStatus.'); - } - - const queryParameters: any = {}; - - if (requestParameters.status) { - queryParameters['status'] = requestParameters.status.join(runtime.COLLECTION_FORMATS["csv"]); - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const response = await this.request({ - path: `/pet/findByStatus`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON)); - } - - /** - * Multiple status values can be provided with comma separated strings - * Finds Pets by status - */ - async findPetsByStatus(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit): Promise> { - const response = await this.findPetsByStatusRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * Finds Pets by tags - */ - async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit): Promise>> { - if (requestParameters.tags === null || requestParameters.tags === undefined) { - throw new runtime.RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.'); - } - - const queryParameters: any = {}; - - if (requestParameters.tags) { - queryParameters['tags'] = requestParameters.tags.join(runtime.COLLECTION_FORMATS["csv"]); - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const response = await this.request({ - path: `/pet/findByTags`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON)); - } - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * Finds Pets by tags - */ - async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit): Promise> { - const response = await this.findPetsByTagsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns a single pet - * Find pet by ID - */ - async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling getPetById.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } - - const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue)); - } - - /** - * Returns a single pet - * Find pet by ID - */ - async getPetById(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit): Promise { - const response = await this.getPetByIdRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update an existing pet - */ - async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updatePet.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const response = await this.request({ - path: `/pet`, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: PetToJSON(requestParameters.body), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Update an existing pet - */ - async updatePet(requestParameters: UpdatePetRequest, initOverrides?: RequestInit): Promise { - await this.updatePetRaw(requestParameters, initOverrides); - } - - /** - * Updates a pet in the store with form data - */ - async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling updatePetWithForm.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const consumes: runtime.Consume[] = [ - { contentType: 'application/x-www-form-urlencoded' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters.name !== undefined) { - formParams.append('name', requestParameters.name as any); - } - - if (requestParameters.status !== undefined) { - formParams.append('status', requestParameters.status as any); - } - - const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Updates a pet in the store with form data - */ - async updatePetWithForm(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit): Promise { - await this.updatePetWithFormRaw(requestParameters, initOverrides); - } - - /** - * uploads an image - */ - async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling uploadFile.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } - - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters.additionalMetadata !== undefined) { - formParams.append('additionalMetadata', requestParameters.additionalMetadata as any); - } - - if (requestParameters.file !== undefined) { - formParams.append('file', requestParameters.file as any); - } - - const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue)); - } - - /** - * uploads an image - */ - async uploadFile(requestParameters: UploadFileRequest, initOverrides?: RequestInit): Promise { - const response = await this.uploadFileRaw(requestParameters, initOverrides); - return await response.value(); - } - -} - -/** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} 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 deleted file mode 100644 index 86866341712f..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/StoreApi.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* 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. - * - * 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. - */ - - -import * as runtime from '../runtime'; -import { - Order, - OrderFromJSON, - OrderToJSON, -} from '../models'; - -export interface DeleteOrderRequest { - orderId: string; -} - -export interface GetOrderByIdRequest { - orderId: number; -} - -export interface PlaceOrderRequest { - body: Order; -} - -/** - * - */ -export class StoreApi extends runtime.BaseAPI { - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * Delete purchase order by ID - */ - async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling deleteOrder.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * Delete purchase order by ID - */ - async deleteOrder(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit): Promise { - await this.deleteOrderRaw(requestParameters, initOverrides); - } - - /** - * Returns a map of status codes to quantities - * Returns pet inventories by status - */ - async getInventoryRaw(initOverrides?: RequestInit): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } - - const response = await this.request({ - path: `/store/inventory`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Returns a map of status codes to quantities - * Returns pet inventories by status - */ - async getInventory(initOverrides?: RequestInit): Promise<{ [key: string]: number; }> { - const response = await this.getInventoryRaw(initOverrides); - return await response.value(); - } - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * Find purchase order by ID - */ - async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderById.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue)); - } - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * Find purchase order by ID - */ - async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit): Promise { - const response = await this.getOrderByIdRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Place an order for a pet - */ - async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling placeOrder.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/store/order`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OrderToJSON(requestParameters.body), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue)); - } - - /** - * Place an order for a pet - */ - async placeOrder(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit): Promise { - const response = await this.placeOrderRaw(requestParameters, initOverrides); - return await response.value(); - } - -} 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 deleted file mode 100644 index 1523fcfb7e8b..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/UserApi.ts +++ /dev/null @@ -1,322 +0,0 @@ -/* 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. - * - * 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. - */ - - -import * as runtime from '../runtime'; -import { - User, - UserFromJSON, - UserToJSON, -} from '../models'; - -export interface CreateUserRequest { - body: User; -} - -export interface CreateUsersWithArrayInputRequest { - body: Array; -} - -export interface CreateUsersWithListInputRequest { - body: Array; -} - -export interface DeleteUserRequest { - username: string; -} - -export interface GetUserByNameRequest { - username: string; -} - -export interface LoginUserRequest { - username: string; - password: string; -} - -export interface UpdateUserRequest { - username: string; - body: User; -} - -/** - * - */ -export class UserApi extends runtime.BaseAPI { - - /** - * This can only be done by the logged in user. - * Create user - */ - async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUser.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/user`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: UserToJSON(requestParameters.body), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * This can only be done by the logged in user. - * Create user - */ - async createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit): Promise { - await this.createUserRaw(requestParameters, initOverrides); - } - - /** - * Creates list of users with given input array - */ - async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithArrayInput.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/user/createWithArray`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body.map(UserToJSON), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Creates list of users with given input array - */ - async createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit): Promise { - await this.createUsersWithArrayInputRaw(requestParameters, initOverrides); - } - - /** - * Creates list of users with given input array - */ - async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithListInput.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/user/createWithList`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body.map(UserToJSON), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Creates list of users with given input array - */ - async createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit): Promise { - await this.createUsersWithListInputRaw(requestParameters, initOverrides); - } - - /** - * This can only be done by the logged in user. - * Delete user - */ - async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling deleteUser.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * This can only be done by the logged in user. - * Delete user - */ - async deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit): Promise { - await this.deleteUserRaw(requestParameters, initOverrides); - } - - /** - * Get user by user name - */ - async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling getUserByName.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); - } - - /** - * Get user by user name - */ - async getUserByName(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit): Promise { - const response = await this.getUserByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Logs user into the system - */ - async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling loginUser.'); - } - - if (requestParameters.password === null || requestParameters.password === undefined) { - throw new runtime.RequiredError('password','Required parameter requestParameters.password was null or undefined when calling loginUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.username !== undefined) { - queryParameters['username'] = requestParameters.username; - } - - if (requestParameters.password !== undefined) { - queryParameters['password'] = requestParameters.password; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/user/login`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.TextApiResponse(response) as any; - } - - /** - * Logs user into the system - */ - async loginUser(requestParameters: LoginUserRequest, initOverrides?: RequestInit): Promise { - const response = await this.loginUserRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Logs out current logged in user session - */ - async logoutUserRaw(initOverrides?: RequestInit): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/user/logout`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Logs out current logged in user session - */ - async logoutUser(initOverrides?: RequestInit): Promise { - await this.logoutUserRaw(initOverrides); - } - - /** - * This can only be done by the logged in user. - * Updated user - */ - async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling updateUser.'); - } - - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updateUser.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UserToJSON(requestParameters.body), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * This can only be done by the logged in user. - * Updated user - */ - async updateUser(requestParameters: UpdateUserRequest, initOverrides?: RequestInit): Promise { - await this.updateUserRaw(requestParameters, initOverrides); - } - -} diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/index.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/index.ts deleted file mode 100644 index 3b870e5c4aa8..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './PetApi'; -export * from './StoreApi'; -export * from './UserApi'; 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 deleted file mode 100644 index fe0e21ffb8bc..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A category for a pet - * @export - * @interface Category - */ -export interface Category { - /** - * - * @type {number} - * @memberof Category - */ - id?: number; - /** - * - * @type {string} - * @memberof Category - */ - name?: string; -} - -export function CategoryFromJSON(json: any): Category { - return CategoryFromJSONTyped(json, false); -} - -export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Category { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function CategoryToJSON(value?: Category | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - }; -} - 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 deleted file mode 100644 index 6812901c3770..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Describes the result of uploading an image resource - * @export - * @interface ModelApiResponse - */ -export interface ModelApiResponse { - /** - * - * @type {number} - * @memberof ModelApiResponse - */ - code?: number; - /** - * - * @type {string} - * @memberof ModelApiResponse - */ - type?: string; - /** - * - * @type {string} - * @memberof ModelApiResponse - */ - message?: string; -} - -export function ModelApiResponseFromJSON(json: any): ModelApiResponse { - return ModelApiResponseFromJSONTyped(json, false); -} - -export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelApiResponse { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': !exists(json, 'code') ? undefined : json['code'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'type': value.type, - 'message': value.message, - }; -} - 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 deleted file mode 100644 index 53163db8bc26..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * An order for a pets from the pet store - * @export - * @interface Order - */ -export interface Order { - /** - * - * @type {number} - * @memberof Order - */ - id?: number; - /** - * - * @type {number} - * @memberof Order - */ - petId?: number; - /** - * - * @type {number} - * @memberof Order - */ - quantity?: number; - /** - * - * @type {Date} - * @memberof Order - */ - shipDate?: Date; - /** - * Order Status - * @type {string} - * @memberof Order - */ - status?: OrderStatusEnum; - /** - * - * @type {boolean} - * @memberof Order - */ - complete?: boolean; -} - -/** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} - -export function OrderFromJSON(json: any): Order { - return OrderFromJSONTyped(json, false); -} - -export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'petId': !exists(json, 'petId') ? undefined : json['petId'], - 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], - 'shipDate': !exists(json, 'shipDate') ? undefined : (new Date(json['shipDate'])), - 'status': !exists(json, 'status') ? undefined : json['status'], - 'complete': !exists(json, 'complete') ? undefined : json['complete'], - }; -} - -export function OrderToJSON(value?: Order | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'petId': value.petId, - 'quantity': value.quantity, - 'shipDate': value.shipDate === undefined ? undefined : (value.shipDate.toISOString()), - 'status': value.status, - 'complete': value.complete, - }; -} - 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 deleted file mode 100644 index 6a75faae4262..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -import { - Category, - CategoryFromJSON, - CategoryFromJSONTyped, - CategoryToJSON, -} from './Category'; -import { - Tag, - TagFromJSON, - TagFromJSONTyped, - TagToJSON, -} from './Tag'; - -/** - * A pet for sale in the pet store - * @export - * @interface Pet - */ -export interface Pet { - /** - * - * @type {number} - * @memberof Pet - */ - id?: number; - /** - * - * @type {Category} - * @memberof Pet - */ - category?: Category; - /** - * - * @type {string} - * @memberof Pet - */ - name: string; - /** - * - * @type {Array} - * @memberof Pet - */ - photoUrls: Array; - /** - * - * @type {Array} - * @memberof Pet - */ - tags?: Array; - /** - * pet status in the store - * @type {string} - * @memberof Pet - */ - status?: PetStatusEnum; -} - -/** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} - -export function PetFromJSON(json: any): Pet { - return PetFromJSONTyped(json, false); -} - -export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'category': !exists(json, 'category') ? undefined : CategoryFromJSON(json['category']), - 'name': json['name'], - 'photoUrls': json['photoUrls'], - 'tags': !exists(json, 'tags') ? undefined : ((json['tags'] as Array).map(TagFromJSON)), - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function PetToJSON(value?: Pet | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'category': CategoryToJSON(value.category), - 'name': value.name, - 'photoUrls': value.photoUrls, - 'tags': value.tags === undefined ? undefined : ((value.tags as Array).map(TagToJSON)), - 'status': value.status, - }; -} - 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 deleted file mode 100644 index 0c26039df46a..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A tag for a pet - * @export - * @interface Tag - */ -export interface Tag { - /** - * - * @type {number} - * @memberof Tag - */ - id?: number; - /** - * - * @type {string} - * @memberof Tag - */ - name?: string; -} - -export function TagFromJSON(json: any): Tag { - return TagFromJSONTyped(json, false); -} - -export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function TagToJSON(value?: Tag | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - }; -} - 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 deleted file mode 100644 index 89a7de983b01..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A User who is purchasing from the pet store - * @export - * @interface User - */ -export interface User { - /** - * - * @type {number} - * @memberof User - */ - id?: number; - /** - * - * @type {string} - * @memberof User - */ - username?: string; - /** - * - * @type {string} - * @memberof User - */ - firstName?: string; - /** - * - * @type {string} - * @memberof User - */ - lastName?: string; - /** - * - * @type {string} - * @memberof User - */ - email?: string; - /** - * - * @type {string} - * @memberof User - */ - password?: string; - /** - * - * @type {string} - * @memberof User - */ - phone?: string; - /** - * User Status - * @type {number} - * @memberof User - */ - userStatus?: number; -} - -export function UserFromJSON(json: any): User { - return UserFromJSONTyped(json, false); -} - -export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'username': !exists(json, 'username') ? undefined : json['username'], - 'firstName': !exists(json, 'firstName') ? undefined : json['firstName'], - 'lastName': !exists(json, 'lastName') ? undefined : json['lastName'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'password': !exists(json, 'password') ? undefined : json['password'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'userStatus': !exists(json, 'userStatus') ? undefined : json['userStatus'], - }; -} - -export function UserToJSON(value?: User | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'username': value.username, - 'firstName': value.firstName, - 'lastName': value.lastName, - 'email': value.email, - 'password': value.password, - 'phone': value.phone, - 'userStatus': value.userStatus, - }; -} - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/index.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/index.ts deleted file mode 100644 index 9e4859f3b39a..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Category'; -export * from './ModelApiResponse'; -export * from './Order'; -export * from './Pet'; -export * from './Tag'; -export * from './User'; diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/tsconfig.json deleted file mode 100644 index 4567ec19899a..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -} diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts index c102e434f853..0f0bf7077501 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts @@ -553,11 +553,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts index 53163db8bc26..2e4f44f6469f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts index 6a75faae4262..1866bcb149e7 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 95abeaf73777..33a25b22c610 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json index ff53e4530f70..22549c6b3a7c 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json @@ -1,13 +1,35 @@ { "name": "@openapitools/typescript-fetch-petstore", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "@openapitools/typescript-fetch-petstore", + "version": "1.0.0", + "devDependencies": { + "typescript": "^4.0" + } + }, + "node_modules/typescript": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + }, "dependencies": { "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true } } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json index 478c94e3f2e2..0cc4daffa4fc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json @@ -10,7 +10,7 @@ "prepare": "npm run build" }, "devDependencies": { - "typescript": "^2.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" 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 e4ddf7e853a0..4e906a7152e6 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 @@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; 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 53163db8bc26..2e4f44f6469f 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 @@ -57,15 +57,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + export function OrderFromJSON(json: any): Order { return OrderFromJSONTyped(json, false); 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 6a75faae4262..1866bcb149e7 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 @@ -70,15 +70,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + export function PetFromJSON(json: any): Pet { return PetFromJSONTyped(json, false); 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 95abeaf73777..33a25b22c610 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 @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator-ignore similarity index 100% rename from samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator-ignore rename to samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator-ignore diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/FILES new file mode 100644 index 000000000000..336206328ced --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/FILES @@ -0,0 +1,10 @@ +apis/DefaultApi.ts +apis/index.ts +index.ts +models/EnumPatternObject.ts +models/InlineObject.ts +models/InlineResponse200.ts +models/NumberEnum.ts +models/StringEnum.ts +models/index.ts +runtime.ts diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/VERSION similarity index 100% rename from samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION rename to samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/VERSION diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts new file mode 100644 index 000000000000..50e97f6f5d98 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts @@ -0,0 +1,215 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + + +import * as runtime from '../runtime'; +import { + EnumPatternObject, + EnumPatternObjectFromJSON, + EnumPatternObjectToJSON, + InlineObject, + InlineObjectFromJSON, + InlineObjectToJSON, + InlineResponse200, + InlineResponse200FromJSON, + InlineResponse200ToJSON, + NumberEnum, + NumberEnumFromJSON, + NumberEnumToJSON, + StringEnum, + StringEnumFromJSON, + StringEnumToJSON, +} from '../models'; + +export interface FakeEnumRequestGetInlineRequest { + stringEnum?: FakeEnumRequestGetInlineStringEnumEnum; + nullableStringEnum?: string | null; + numberEnum?: FakeEnumRequestGetInlineNumberEnumEnum; + nullableNumberEnum?: number | null; +} + +export interface FakeEnumRequestGetRefRequest { + stringEnum?: StringEnum; + nullableStringEnum?: StringEnum | null; + numberEnum?: NumberEnum; + nullableNumberEnum?: NumberEnum | null; +} + +export interface FakeEnumRequestPostInlineRequest { + inlineObject?: InlineObject; +} + +export interface FakeEnumRequestPostRefRequest { + enumPatternObject?: EnumPatternObject; +} + +/** + * + */ +export class DefaultApi extends runtime.BaseAPI { + + /** + */ + async fakeEnumRequestGetInlineRaw(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + if (requestParameters.stringEnum !== undefined) { + queryParameters['string-enum'] = requestParameters.stringEnum; + } + + if (requestParameters.nullableStringEnum !== undefined) { + queryParameters['nullable-string-enum'] = requestParameters.nullableStringEnum; + } + + if (requestParameters.numberEnum !== undefined) { + queryParameters['number-enum'] = requestParameters.numberEnum; + } + + if (requestParameters.nullableNumberEnum !== undefined) { + queryParameters['nullable-number-enum'] = requestParameters.nullableNumberEnum; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/fake/enum-request-inline`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse200FromJSON(jsonValue)); + } + + /** + */ + async fakeEnumRequestGetInline(requestParameters: FakeEnumRequestGetInlineRequest = {}, initOverrides?: RequestInit): Promise { + const response = await this.fakeEnumRequestGetInlineRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async fakeEnumRequestGetRefRaw(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + if (requestParameters.stringEnum !== undefined) { + queryParameters['string-enum'] = requestParameters.stringEnum; + } + + if (requestParameters.nullableStringEnum !== undefined) { + queryParameters['nullable-string-enum'] = requestParameters.nullableStringEnum; + } + + if (requestParameters.numberEnum !== undefined) { + queryParameters['number-enum'] = requestParameters.numberEnum; + } + + if (requestParameters.nullableNumberEnum !== undefined) { + queryParameters['nullable-number-enum'] = requestParameters.nullableNumberEnum; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/fake/enum-request-ref`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnumPatternObjectFromJSON(jsonValue)); + } + + /** + */ + async fakeEnumRequestGetRef(requestParameters: FakeEnumRequestGetRefRequest = {}, initOverrides?: RequestInit): Promise { + const response = await this.fakeEnumRequestGetRefRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async fakeEnumRequestPostInlineRaw(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/fake/enum-request-inline`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: InlineObjectToJSON(requestParameters.inlineObject), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InlineObjectFromJSON(jsonValue)); + } + + /** + */ + async fakeEnumRequestPostInline(requestParameters: FakeEnumRequestPostInlineRequest = {}, initOverrides?: RequestInit): Promise { + const response = await this.fakeEnumRequestPostInlineRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async fakeEnumRequestPostRefRaw(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/fake/enum-request-ref`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EnumPatternObjectToJSON(requestParameters.enumPatternObject), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnumPatternObjectFromJSON(jsonValue)); + } + + /** + */ + async fakeEnumRequestPostRef(requestParameters: FakeEnumRequestPostRefRequest = {}, initOverrides?: RequestInit): Promise { + const response = await this.fakeEnumRequestPostRefRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + * @enum {string} + */ +export enum FakeEnumRequestGetInlineStringEnumEnum { + One = 'one', + Two = 'two', + Three = 'three' +} +/** + * @export + * @enum {string} + */ +export enum FakeEnumRequestGetInlineNumberEnumEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 +} diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/index.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/index.ts new file mode 100644 index 000000000000..69c44c00fa0d --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/index.ts @@ -0,0 +1,3 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './DefaultApi'; diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/index.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/index.ts similarity index 100% rename from samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/index.ts rename to samples/client/petstore/typescript-fetch/builds/with-string-enums/index.ts diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts new file mode 100644 index 000000000000..463eadb6d552 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +import { + NumberEnum, + NumberEnumFromJSON, + NumberEnumFromJSONTyped, + NumberEnumToJSON, +} from './NumberEnum'; +import { + StringEnum, + StringEnumFromJSON, + StringEnumFromJSONTyped, + StringEnumToJSON, +} from './StringEnum'; + +/** + * + * @export + * @interface EnumPatternObject + */ +export interface EnumPatternObject { + /** + * + * @type {StringEnum} + * @memberof EnumPatternObject + */ + stringEnum?: StringEnum; + /** + * + * @type {StringEnum} + * @memberof EnumPatternObject + */ + nullableStringEnum?: StringEnum | null; + /** + * + * @type {NumberEnum} + * @memberof EnumPatternObject + */ + numberEnum?: NumberEnum; + /** + * + * @type {NumberEnum} + * @memberof EnumPatternObject + */ + nullableNumberEnum?: NumberEnum | null; +} + +export function EnumPatternObjectFromJSON(json: any): EnumPatternObject { + return EnumPatternObjectFromJSONTyped(json, false); +} + +export function EnumPatternObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnumPatternObject { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'stringEnum': !exists(json, 'string-enum') ? undefined : StringEnumFromJSON(json['string-enum']), + 'nullableStringEnum': !exists(json, 'nullable-string-enum') ? undefined : StringEnumFromJSON(json['nullable-string-enum']), + 'numberEnum': !exists(json, 'number-enum') ? undefined : NumberEnumFromJSON(json['number-enum']), + 'nullableNumberEnum': !exists(json, 'nullable-number-enum') ? undefined : NumberEnumFromJSON(json['nullable-number-enum']), + }; +} + +export function EnumPatternObjectToJSON(value?: EnumPatternObject | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'string-enum': StringEnumToJSON(value.stringEnum), + 'nullable-string-enum': StringEnumToJSON(value.nullableStringEnum), + 'number-enum': NumberEnumToJSON(value.numberEnum), + 'nullable-number-enum': NumberEnumToJSON(value.nullableNumberEnum), + }; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObjectNullableNumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObjectNullableNumberEnum.ts new file mode 100644 index 000000000000..2a98aa4737b7 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObjectNullableNumberEnum.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +import { + NumberEnum, + NumberEnumFromJSON, + NumberEnumFromJSONTyped, + NumberEnumToJSON, +} from './NumberEnum'; + +/** + * + * @export + * @interface EnumPatternObjectNullableNumberEnum + */ +export interface EnumPatternObjectNullableNumberEnum { +} + +export function EnumPatternObjectNullableNumberEnumFromJSON(json: any): EnumPatternObjectNullableNumberEnum { + return EnumPatternObjectNullableNumberEnumFromJSONTyped(json, false); +} + +export function EnumPatternObjectNullableNumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnumPatternObjectNullableNumberEnum { + return json; +} + +export function EnumPatternObjectNullableNumberEnumToJSON(value?: EnumPatternObjectNullableNumberEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObjectNullableStringEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObjectNullableStringEnum.ts new file mode 100644 index 000000000000..227a053c308d --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObjectNullableStringEnum.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +import { + StringEnum, + StringEnumFromJSON, + StringEnumFromJSONTyped, + StringEnumToJSON, +} from './StringEnum'; + +/** + * + * @export + * @interface EnumPatternObjectNullableStringEnum + */ +export interface EnumPatternObjectNullableStringEnum { +} + +export function EnumPatternObjectNullableStringEnumFromJSON(json: any): EnumPatternObjectNullableStringEnum { + return EnumPatternObjectNullableStringEnumFromJSONTyped(json, false); +} + +export function EnumPatternObjectNullableStringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnumPatternObjectNullableStringEnum { + return json; +} + +export function EnumPatternObjectNullableStringEnumToJSON(value?: EnumPatternObjectNullableStringEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineObject.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineObject.ts new file mode 100644 index 000000000000..f16140bd2db8 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineObject.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InlineObject + */ +export interface InlineObject { + /** + * + * @type {string} + * @memberof InlineObject + */ + stringEnum?: InlineObjectStringEnumEnum; + /** + * + * @type {string} + * @memberof InlineObject + */ + nullableStringEnum?: InlineObjectNullableStringEnumEnum; + /** + * + * @type {number} + * @memberof InlineObject + */ + numberEnum?: InlineObjectNumberEnumEnum; + /** + * + * @type {number} + * @memberof InlineObject + */ + nullableNumberEnum?: InlineObjectNullableNumberEnumEnum; +} + +/** +* @export +* @enum {string} +*/ +export enum InlineObjectStringEnumEnum { + One = 'one', + Two = 'two', + Three = 'three' +} +/** +* @export +* @enum {string} +*/ +export enum InlineObjectNullableStringEnumEnum { + One = 'one', + Two = 'two', + Three = 'three' +} +/** +* @export +* @enum {string} +*/ +export enum InlineObjectNumberEnumEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 +} +/** +* @export +* @enum {string} +*/ +export enum InlineObjectNullableNumberEnumEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 +} + + +export function InlineObjectFromJSON(json: any): InlineObject { + return InlineObjectFromJSONTyped(json, false); +} + +export function InlineObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineObject { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'stringEnum': !exists(json, 'string-enum') ? undefined : json['string-enum'], + 'nullableStringEnum': !exists(json, 'nullable-string-enum') ? undefined : json['nullable-string-enum'], + 'numberEnum': !exists(json, 'number-enum') ? undefined : json['number-enum'], + 'nullableNumberEnum': !exists(json, 'nullable-number-enum') ? undefined : json['nullable-number-enum'], + }; +} + +export function InlineObjectToJSON(value?: InlineObject | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'string-enum': value.stringEnum, + 'nullable-string-enum': value.nullableStringEnum, + 'number-enum': value.numberEnum, + 'nullable-number-enum': value.nullableNumberEnum, + }; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200.ts new file mode 100644 index 000000000000..229056b93dc3 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InlineResponse200 + */ +export interface InlineResponse200 { + /** + * + * @type {string} + * @memberof InlineResponse200 + */ + stringEnum?: InlineResponse200StringEnumEnum; + /** + * + * @type {string} + * @memberof InlineResponse200 + */ + nullableStringEnum?: InlineResponse200NullableStringEnumEnum; + /** + * + * @type {number} + * @memberof InlineResponse200 + */ + numberEnum?: InlineResponse200NumberEnumEnum; + /** + * + * @type {number} + * @memberof InlineResponse200 + */ + nullableNumberEnum?: InlineResponse200NullableNumberEnumEnum; +} + +/** +* @export +* @enum {string} +*/ +export enum InlineResponse200StringEnumEnum { + One = 'one', + Two = 'two', + Three = 'three' +} +/** +* @export +* @enum {string} +*/ +export enum InlineResponse200NullableStringEnumEnum { + One = 'one', + Two = 'two', + Three = 'three' +} +/** +* @export +* @enum {string} +*/ +export enum InlineResponse200NumberEnumEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 +} +/** +* @export +* @enum {string} +*/ +export enum InlineResponse200NullableNumberEnumEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 +} + + +export function InlineResponse200FromJSON(json: any): InlineResponse200 { + return InlineResponse200FromJSONTyped(json, false); +} + +export function InlineResponse200FromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse200 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'stringEnum': !exists(json, 'string-enum') ? undefined : json['string-enum'], + 'nullableStringEnum': !exists(json, 'nullable-string-enum') ? undefined : json['nullable-string-enum'], + 'numberEnum': !exists(json, 'number-enum') ? undefined : json['number-enum'], + 'nullableNumberEnum': !exists(json, 'nullable-number-enum') ? undefined : json['nullable-number-enum'], + }; +} + +export function InlineResponse200ToJSON(value?: InlineResponse200 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'string-enum': value.stringEnum, + 'nullable-string-enum': value.nullableStringEnum, + 'number-enum': value.numberEnum, + 'nullable-number-enum': value.nullableNumberEnum, + }; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200NullableNumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200NullableNumberEnum.ts new file mode 100644 index 000000000000..c45da6673a08 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200NullableNumberEnum.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InlineResponse200NullableNumberEnum + */ +export interface InlineResponse200NullableNumberEnum { +} + +export function InlineResponse200NullableNumberEnumFromJSON(json: any): InlineResponse200NullableNumberEnum { + return InlineResponse200NullableNumberEnumFromJSONTyped(json, false); +} + +export function InlineResponse200NullableNumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse200NullableNumberEnum { + return json; +} + +export function InlineResponse200NullableNumberEnumToJSON(value?: InlineResponse200NullableNumberEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200NullableStringEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200NullableStringEnum.ts new file mode 100644 index 000000000000..4574bad832ac --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/InlineResponse200NullableStringEnum.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InlineResponse200NullableStringEnum + */ +export interface InlineResponse200NullableStringEnum { +} + +export function InlineResponse200NullableStringEnumFromJSON(json: any): InlineResponse200NullableStringEnum { + return InlineResponse200NullableStringEnumFromJSONTyped(json, false); +} + +export function InlineResponse200NullableStringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse200NullableStringEnum { + return json; +} + +export function InlineResponse200NullableStringEnumToJSON(value?: InlineResponse200NullableStringEnum | null): any { + return value; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts new file mode 100644 index 000000000000..04e7eaa4a68f --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +/** + * + * @export + * @enum {string} + */ +export enum NumberEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 +} + + +export function NumberEnumFromJSON(json: any): NumberEnum { + return NumberEnumFromJSONTyped(json, false); +} + +export function NumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NumberEnum { + return json as NumberEnum; +} + +export function NumberEnumToJSON(value?: NumberEnum | null): any { + return value as any; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts new file mode 100644 index 000000000000..96ce9786594d --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * 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. + */ + +/** + * + * @export + * @enum {string} + */ +export enum StringEnum { + One = 'one', + Two = 'two', + Three = 'three' +} + + +export function StringEnumFromJSON(json: any): StringEnum { + return StringEnumFromJSONTyped(json, false); +} + +export function StringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): StringEnum { + return json as StringEnum; +} + +export function StringEnumToJSON(value?: StringEnum | null): any { + return value as any; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/index.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/index.ts new file mode 100644 index 000000000000..ee4474785e1a --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/index.ts @@ -0,0 +1,7 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './EnumPatternObject'; +export * from './InlineObject'; +export * from './InlineResponse200'; +export * from './NumberEnum'; +export * from './StringEnum'; diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts similarity index 93% rename from samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts rename to samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts index 239aa11c47f4..6a9d79a0bee6 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts @@ -1,8 +1,8 @@ /* 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. + * Enum test + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * @@ -13,7 +13,78 @@ */ -export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -130,71 +208,6 @@ export const COLLECTION_FORMATS = { export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json index 478c94e3f2e2..0cc4daffa4fc 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/package.json @@ -10,7 +10,7 @@ "prepare": "npm run build" }, "devDependencies": { - "typescript": "^2.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts index 42feab97e0a5..93b2157ae9e1 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts @@ -411,11 +411,11 @@ export class PetApi extends runtime.BaseAPI { } /** - * @export - * @enum {string} - */ -export enum FindPetsByStatusStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const FindPetsByStatusStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum]; diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts deleted file mode 100644 index faf9aabb9de1..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A category for a pet - * @export - * @interface Category - */ -export interface Category { - /** - * - * @type {number} - * @memberof Category - */ - id?: number; - /** - * - * @type {string} - * @memberof Category - */ - name?: string; -} - -export function CategoryFromJSON(json: any): Category { - return CategoryFromJSONTyped(json, false); -} - -export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Category { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function CategoryToJSON(value?: Category | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts deleted file mode 100644 index 63fa57adc033..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Describes the result of uploading an image resource - * @export - * @interface ModelApiResponse - */ -export interface ModelApiResponse { - /** - * - * @type {number} - * @memberof ModelApiResponse - */ - code?: number; - /** - * - * @type {string} - * @memberof ModelApiResponse - */ - type?: string; - /** - * - * @type {string} - * @memberof ModelApiResponse - */ - message?: string; -} - -export function ModelApiResponseFromJSON(json: any): ModelApiResponse { - return ModelApiResponseFromJSONTyped(json, false); -} - -export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelApiResponse { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': !exists(json, 'code') ? undefined : json['code'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'type': value.type, - 'message': value.message, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts deleted file mode 100644 index 104c3157f61f..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * An order for a pets from the pet store - * @export - * @interface Order - */ -export interface Order { - /** - * - * @type {number} - * @memberof Order - */ - id?: number; - /** - * - * @type {number} - * @memberof Order - */ - petId?: number; - /** - * - * @type {number} - * @memberof Order - */ - quantity?: number; - /** - * - * @type {Date} - * @memberof Order - */ - shipDate?: Date; - /** - * Order Status - * @type {string} - * @memberof Order - */ - status?: OrderStatusEnum; - /** - * - * @type {boolean} - * @memberof Order - */ - complete?: boolean; -} - -export function OrderFromJSON(json: any): Order { - return OrderFromJSONTyped(json, false); -} - -export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'petId': !exists(json, 'petId') ? undefined : json['petId'], - 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], - 'shipDate': !exists(json, 'shipDate') ? undefined : (new Date(json['shipDate'])), - 'status': !exists(json, 'status') ? undefined : json['status'], - 'complete': !exists(json, 'complete') ? undefined : json['complete'], - }; -} - -export function OrderToJSON(value?: Order | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'petId': value.petId, - 'quantity': value.quantity, - 'shipDate': value.shipDate === undefined ? undefined : (value.shipDate.toISOString()), - 'status': value.status, - 'complete': value.complete, - }; -} - -/** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts deleted file mode 100644 index 7e084c084a98..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -import { - Category, - CategoryFromJSON, - CategoryFromJSONTyped, - CategoryToJSON, - Tag, - TagFromJSON, - TagFromJSONTyped, - TagToJSON, -} from './'; - -/** - * A pet for sale in the pet store - * @export - * @interface Pet - */ -export interface Pet { - /** - * - * @type {number} - * @memberof Pet - */ - id?: number; - /** - * - * @type {Category} - * @memberof Pet - */ - category?: Category; - /** - * - * @type {string} - * @memberof Pet - */ - name: string; - /** - * - * @type {Array} - * @memberof Pet - */ - photoUrls: Array; - /** - * - * @type {Array} - * @memberof Pet - */ - tags?: Array; - /** - * pet status in the store - * @type {string} - * @memberof Pet - */ - status?: PetStatusEnum; -} - -export function PetFromJSON(json: any): Pet { - return PetFromJSONTyped(json, false); -} - -export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'category': !exists(json, 'category') ? undefined : CategoryFromJSON(json['category']), - 'name': json['name'], - 'photoUrls': json['photoUrls'], - 'tags': !exists(json, 'tags') ? undefined : ((json['tags'] as Array).map(TagFromJSON)), - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function PetToJSON(value?: Pet | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'category': CategoryToJSON(value.category), - 'name': value.name, - 'photoUrls': value.photoUrls, - 'tags': value.tags === undefined ? undefined : ((value.tags as Array).map(TagToJSON)), - 'status': value.status, - }; -} - -/** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts deleted file mode 100644 index 8ea5895e79be..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A tag for a pet - * @export - * @interface Tag - */ -export interface Tag { - /** - * - * @type {number} - * @memberof Tag - */ - id?: number; - /** - * - * @type {string} - * @memberof Tag - */ - name?: string; -} - -export function TagFromJSON(json: any): Tag { - return TagFromJSONTyped(json, false); -} - -export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function TagToJSON(value?: Tag | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts deleted file mode 100644 index 841b50d0fa2e..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* 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. - * - * 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. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A User who is purchasing from the pet store - * @export - * @interface User - */ -export interface User { - /** - * - * @type {number} - * @memberof User - */ - id?: number; - /** - * - * @type {string} - * @memberof User - */ - username?: string; - /** - * - * @type {string} - * @memberof User - */ - firstName?: string; - /** - * - * @type {string} - * @memberof User - */ - lastName?: string; - /** - * - * @type {string} - * @memberof User - */ - email?: string; - /** - * - * @type {string} - * @memberof User - */ - password?: string; - /** - * - * @type {string} - * @memberof User - */ - phone?: string; - /** - * User Status - * @type {number} - * @memberof User - */ - userStatus?: number; -} - -export function UserFromJSON(json: any): User { - return UserFromJSONTyped(json, false); -} - -export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'username': !exists(json, 'username') ? undefined : json['username'], - 'firstName': !exists(json, 'firstName') ? undefined : json['firstName'], - 'lastName': !exists(json, 'lastName') ? undefined : json['lastName'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'password': !exists(json, 'password') ? undefined : json['password'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'userStatus': !exists(json, 'userStatus') ? undefined : json['userStatus'], - }; -} - -export function UserToJSON(value?: User | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'username': value.username, - 'firstName': value.firstName, - 'lastName': value.lastName, - 'email': value.email, - 'password': value.password, - 'phone': value.phone, - 'userStatus': value.userStatus, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts index 8eef2399cc20..ab1529f795f4 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts @@ -88,15 +88,17 @@ export interface Order { complete?: boolean; } + /** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} + * @export + */ +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + /** * A pet for sale in the pet store * @export @@ -141,15 +143,17 @@ export interface Pet { status?: PetStatusEnum; } + /** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} + * @export + */ +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; + /** * A tag for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts index 95abeaf73777..85a9f7722ecb 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts @@ -15,6 +15,77 @@ export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob; /** @@ -24,7 +95,7 @@ export class BaseAPI { private middleware: Middleware[]; - constructor(protected configuration = new Configuration()) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } @@ -50,7 +121,7 @@ export class BaseAPI { if (response.status >= 200 && response.status < 300) { return response; } - throw response; + throw new ResponseError(response, 'Response returned an error code'); } private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) { @@ -114,6 +185,13 @@ export class BaseAPI { } }; +export class ResponseError extends Error { + name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { @@ -128,72 +206,7 @@ export const COLLECTION_FORMATS = { pipes: "|", }; -export type FetchAPI = GlobalFetch['fetch']; - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; @@ -215,10 +228,6 @@ export interface RequestOpts { body?: HTTPBody; } -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) @@ -242,12 +251,6 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } -export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); -} export function canConsumeForm(consumes: Consume[]): boolean { for (const consume of consumes) { diff --git a/samples/client/petstore/typescript-fetch/tests/default/package-lock.json b/samples/client/petstore/typescript-fetch/tests/default/package-lock.json index 400cf1276da9..b2049c8b249c 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-fetch/tests/default/package-lock.json @@ -1,14 +1,6636 @@ { "name": "typescript-fetch-test", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "typescript-fetch-test", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@openapitools/typescript-fetch-petstore": "file:../../builds/with-npm-version", + "@swagger/typescript-fetch-petstore": "file:../../builds/with-npm-version", + "chai": "^4.1.0", + "ts-node": "^3.3.0" + }, + "devDependencies": { + "@types/chai": "^4.0.1", + "@types/form-data": "^2.2.1", + "@types/isomorphic-fetch": "0.0.34", + "@types/mocha": "^2.2.41", + "@types/node": "^12.0.14", + "@types/node-fetch": "^2.1.2", + "browserify": "^14.4.0", + "form-data": "^2.3.2", + "mocha": "^3.4.2", + "node-fetch": "^2.2.0", + "ts-loader": "^2.3.0", + "tsify": "^3.0.4", + "typescript": "^4.0", + "typings": "^2.1.1", + "webpack": "^1.13.0" + } + }, + "../../builds/with-npm-version": { + "name": "@openapitools/typescript-fetch-petstore", + "version": "1.0.0", + "devDependencies": { + "typescript": "^4.0" + } + }, + "node_modules/@openapitools/typescript-fetch-petstore": { + "resolved": "../../builds/with-npm-version", + "link": true + }, + "node_modules/@swagger/typescript-fetch-petstore": { + "resolved": "../../builds/with-npm-version", + "link": true + }, + "node_modules/@types/chai": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.6.tgz", + "integrity": "sha512-CBk7KTZt3FhPsEkYioG6kuCIpWISw+YI8o+3op4+NXwTpvAPxE1ES8+PY8zfaK2L98b1z5oq03UHa4VYpeUxnw==", + "dev": true + }, + "node_modules/@types/form-data": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", + "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/isomorphic-fetch": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.34.tgz", + "integrity": "sha1-PDSD5gbAQTeEOOlRRk8A5OYHBtY=", + "dev": true + }, + "node_modules/@types/mocha": { + "version": "2.2.48", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", + "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "12.20.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.47.tgz", + "integrity": "sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg==", + "dev": true + }, + "node_modules/@types/node-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha512-XroxUzLpKuL+CVkQqXlffRkEPi4Gh3Oui/mWyS7ztKiyqVxiU+h3imCW5I2NQmde5jK+3q++36/Q96cyRWsweg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", + "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.0.tgz", + "integrity": "sha512-ZsysjEh+Y3i14f7YXCAKJy99RXbd56wHKYBzN4FlFtICIZyFpYwK6OwNJhcz8A/FMtxoUZkJofH1v9KIfNgWmw==", + "dev": true, + "dependencies": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1", + "xtend": "^4.0.1" + } + }, + "node_modules/acorn-walk": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.0.tgz", + "integrity": "sha512-ugTb7Lq7u4GfWSqqpwE0bGyoBZNMTok/zDBXxfEG0QM50jNlGhIWjRC1pPN7bvV1anhF+bs+/gNcRw+o55Evbg==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", + "dev": true, + "dependencies": { + "extend": "~3.0.0", + "semver": "~5.0.1" + } + }, + "node_modules/agent-base/node_modules/semver": { + "version": "5.0.3", + "resolved": "http://registry.npmjs.org/semver/-/semver-5.0.3.tgz", + "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "dependencies": { + "string-width": "^2.0.0" + } + }, + "node_modules/ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "node_modules/anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "dependencies": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "node_modules/arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "node_modules/array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "node_modules/array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "dependencies": { + "util": "0.10.3" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "dependencies": { + "inherits": "2.0.1" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "engines": { + "node": "*" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "node_modules/async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "node_modules/big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", + "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bluebird": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", + "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==", + "dev": true + }, + "node_modules/bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "node_modules/boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "dependencies": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "dependencies": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "node_modules/browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "dependencies": { + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "JSONStream": "^1.0.3", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + }, + "bin": { + "browser-pack": "bin/cmd.js" + } + }, + "node_modules/browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "dependencies": { + "resolve": "1.1.7" + } + }, + "node_modules/browser-resolve/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "node_modules/browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "node_modules/browserify": { + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", + "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", + "dev": true, + "dependencies": { + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "^5.0.2", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "~1.1.0", + "duplexer2": "~0.1.2", + "events": "~1.1.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "JSONStream": "^1.0.3", + "labeled-stream-splicer": "^2.0.0", + "module-deps": "^4.0.8", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^2.0.0", + "string_decoder": "~1.0.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" + }, + "bin": { + "browserify": "bin/cmd.js" + } + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.0.1", + "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "dependencies": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cached-path-relative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", + "dev": true + }, + "node_modules/camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", + "dev": true, + "dependencies": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "optionalDependencies": { + "fsevents": "^1.0.0" + } + }, + "node_modules/ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "dependencies": { + "restore-cursor": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-truncate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", + "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", + "dev": true, + "dependencies": { + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/cliui/node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "dependencies": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "node_modules/combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "dependencies": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + } + }, + "node_modules/combined-stream": { + "version": "1.0.6", + "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.9.0", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "dependencies": { + "graceful-readlink": ">= 1.0.0" + }, + "engines": { + "node": ">= 0.6.x" + } + }, + "node_modules/component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + } + }, + "node_modules/concat-stream/node_modules/process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.0.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/concat-stream/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "node_modules/configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "dev": true, + "dependencies": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "dependencies": { + "date-now": "^0.1.4" + } + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "node_modules/create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "dependencies": { + "capture-stack-trace": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "node_modules/debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "dev": true, + "dependencies": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + }, + "bin": { + "deps-sort": "bin/cmd.js" + } + }, + "node_modules/des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/detective": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "dev": true, + "dependencies": { + "acorn": "^5.2.1", + "defined": "^1.0.0" + } + }, + "node_modules/detective/node_modules/acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "dev": true, + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "dependencies": { + "is-obj": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "node_modules/elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "dev": true, + "dependencies": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "node_modules/emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/events": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "dependencies": { + "is-posix-bracket": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "dependencies": { + "fill-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "dependencies": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "bundleDependencies": [ + "node-pre-gyp" + ], + "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fsevents/node_modules/abbrev": { + "version": "1.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/ansi-regex": { + "version": "2.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/aproba": { + "version": "1.2.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/are-we-there-yet": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/fsevents/node_modules/balanced-match": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/fsevents/node_modules/chownr": { + "version": "1.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/code-point-at": { + "version": "1.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/console-control-strings": { + "version": "1.1.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/core-util-is": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/fsevents/node_modules/deep-extend": { + "version": "0.5.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/delegates": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/detect-libc": { + "version": "1.0.3", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/fsevents/node_modules/fs-minipass": { + "version": "1.2.5", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^2.2.1" + } + }, + "node_modules/fsevents/node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/gauge": { + "version": "2.7.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "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" + } + }, + "node_modules/fsevents/node_modules/glob": { + "version": "7.1.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/fsevents/node_modules/has-unicode": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/iconv-lite": { + "version": "0.4.21", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/ignore-walk": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minimatch": "^3.0.4" + } + }, + "node_modules/fsevents/node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/fsevents/node_modules/inherits": { + "version": "2.0.3", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/ini": { + "version": "1.3.5", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/fsevents/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/isarray": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/minimatch": { + "version": "3.0.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/fsevents/node_modules/minimist": { + "version": "0.0.8", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/minipass": { + "version": "2.2.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "node_modules/fsevents/node_modules/minizlib": { + "version": "1.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minipass": "^2.2.1" + } + }, + "node_modules/fsevents/node_modules/mkdirp": { + "version": "0.5.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/fsevents/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/needle": { + "version": "2.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 0.10.x" + } + }, + "node_modules/fsevents/node_modules/node-pre-gyp": { + "version": "0.10.0", + "dev": true, + "inBundle": true, + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/fsevents/node_modules/nopt": { + "version": "4.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/fsevents/node_modules/npm-bundled": { + "version": "1.0.3", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/npm-packlist": { + "version": "1.1.10", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "node_modules/fsevents/node_modules/npmlog": { + "version": "4.1.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/fsevents/node_modules/number-is-nan": { + "version": "1.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/once": { + "version": "1.4.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/fsevents/node_modules/os-homedir": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/os-tmpdir": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/osenv": { + "version": "0.1.5", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/fsevents/node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/process-nextick-args": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/rc": { + "version": "1.2.7", + "dev": true, + "inBundle": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "optional": true, + "dependencies": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/fsevents/node_modules/rc/node_modules/minimist": { + "version": "1.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/readable-stream": { + "version": "2.3.6", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/fsevents/node_modules/rimraf": { + "version": "2.6.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "glob": "^7.0.5" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/fsevents/node_modules/safe-buffer": { + "version": "5.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/safer-buffer": { + "version": "2.1.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/sax": { + "version": "1.2.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/semver": { + "version": "5.5.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/fsevents/node_modules/set-blocking": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/signal-exit": { + "version": "3.0.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/string_decoder": { + "version": "1.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/fsevents/node_modules/string-width": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/strip-ansi": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/strip-json-comments": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fsevents/node_modules/tar": { + "version": "4.4.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + }, + "engines": { + "node": ">=4.5" + } + }, + "node_modules/fsevents/node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/fsevents/node_modules/wide-align": { + "version": "1.1.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true, + "dependencies": { + "string-width": "^1.0.2" + } + }, + "node_modules/fsevents/node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/fsevents/node_modules/yallist": { + "version": "3.0.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "optional": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "3.0.0", + "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "dependencies": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "dependencies": { + "is-glob": "^2.0.0" + } + }, + "node_modules/global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "dependencies": { + "ini": "^1.3.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/got": { + "version": "6.7.1", + "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "dependencies": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "node_modules/growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/http-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", + "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", + "dev": true, + "dependencies": { + "agent-base": "2", + "debug": "2", + "extend": "3" + } + }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "node_modules/https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "dev": true, + "dependencies": { + "agent-base": "2", + "debug": "2", + "extend": "3" + } + }, + "node_modules/ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "deprecated": "Please update to ini >=1.3.6 to avoid a prototype pollution issue", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "dependencies": { + "source-map": "~0.5.3" + } + }, + "node_modules/insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "dependencies": { + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "bin": { + "insert-module-globals": "bin/cmd.js" + } + }, + "node_modules/insert-module-globals/node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/interpret": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", + "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", + "dev": true + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true, + "dependencies": { + "is-relative": "^0.2.1", + "is-windows": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "dependencies": { + "ci-info": "^1.5.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "dependencies": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-obj": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "dependencies": { + "path-is-inside": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true, + "dependencies": { + "is-unc-path": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true, + "dependencies": { + "unc-path-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "node_modules/is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "dependencies": { + "jsonify": "~0.0.0" + } + }, + "node_modules/json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "deprecated": "Please use the native JSON object instead of JSON 3", + "dev": true + }, + "node_modules/json5": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jspm-config": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/jspm-config/-/jspm-config-0.3.4.tgz", + "integrity": "sha1-RMJpAuSujs4jZs7cn/FrEKXzkcY=", + "dev": true, + "dependencies": { + "any-promise": "^1.3.0", + "graceful-fs": "^4.1.4", + "make-error-cause": "^1.2.1", + "object.pick": "^1.1.2", + "parse-json": "^2.2.0", + "strip-bom": "^3.0.0", + "thenify": "^3.2.0", + "throat": "^3.0.0", + "xtend": "^4.0.1" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/labeled-stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", + "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "isarray": "^2.0.4", + "stream-splicer": "^2.0.0" + } + }, + "node_modules/labeled-stream-splicer/node_modules/isarray": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", + "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", + "dev": true + }, + "node_modules/latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "dependencies": { + "package-json": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/listify/-/listify-1.0.0.tgz", + "integrity": "sha1-A8p7otFQ1CZ3c/dOV1WNEFPSvuM=", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "dependencies": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/lockfile": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz", + "integrity": "sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==", + "dev": true, + "dependencies": { + "signal-exit": "^3.0.2" + } + }, + "node_modules/lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "dependencies": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "node_modules/lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "node_modules/lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "node_modules/lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "node_modules/lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "node_modules/lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "dependencies": { + "lodash._baseassign": "^3.0.0", + "lodash._basecreate": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" + } + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "node_modules/lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "node_modules/lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "dependencies": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "node_modules/lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "node_modules/log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "dev": true, + "dependencies": { + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==" + }, + "node_modules/make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true, + "dependencies": { + "make-error": "^1.2.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "node_modules/micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/mime-db": { + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "dev": true, + "dependencies": { + "mime-db": "~1.36.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "node_modules/mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "deprecated": "Critical bug fixed in v2.0.1, please upgrade to the latest version.", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp/node_modules/minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "node_modules/mocha": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "dev": true, + "dependencies": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.6.8", + "diff": "3.2.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 0.10.x", + "npm": ">= 1.4.x" + } + }, + "node_modules/mocha/node_modules/diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/module-deps": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "dev": true, + "dependencies": { + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.0", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "JSONStream": "^1.0.3", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.3", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "module-deps": "bin/cmd.js" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/nan": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "dev": true, + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-fetch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.0.tgz", + "integrity": "sha512-OayFWziIxiHY8bCUyLX6sTpDH8Jsbp4FfYd1j1f7vZyfgkcOnAyM4oQR16f8a0s7Gl/viMGRey8eScYk4V4EZA==", + "dev": true, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-libs-browser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", + "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", + "dev": true, + "dependencies": { + "assert": "^1.1.1", + "browserify-zlib": "^0.1.4", + "buffer": "^4.9.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "3.3.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "0.0.1", + "os-browserify": "^0.2.0", + "path-browserify": "0.0.0", + "process": "^0.11.0", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.0.5", + "stream-browserify": "^2.0.1", + "stream-http": "^2.3.1", + "string_decoder": "^0.10.25", + "timers-browserify": "^2.0.2", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + } + }, + "node_modules/node-libs-browser/node_modules/browserify-aes": { + "version": "0.4.0", + "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz", + "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/node-libs-browser/node_modules/browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "dev": true, + "dependencies": { + "pako": "~0.2.0" + } + }, + "node_modules/node-libs-browser/node_modules/buffer": { + "version": "4.9.1", + "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "deprecated": "This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/node-libs-browser/node_modules/crypto-browserify": { + "version": "3.3.0", + "resolved": "http://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz", + "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", + "dev": true, + "dependencies": { + "browserify-aes": "0.4.0", + "pbkdf2-compat": "2.0.1", + "ripemd160": "0.2.0", + "sha.js": "2.2.6" + }, + "engines": { + "node": "*" + } + }, + "node_modules/node-libs-browser/node_modules/https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/os-browserify": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", + "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/ripemd160": { + "version": "0.2.0", + "resolved": "http://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", + "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/sha.js": { + "version": "2.2.6", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", + "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", + "dev": true, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/node-libs-browser/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "node_modules/node-libs-browser/node_modules/timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/node-libs-browser/node_modules/tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "dependencies": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "dependencies": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "node_modules/optimist/node_modules/minimist": { + "version": "0.0.10", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "node_modules/optimist/node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "dependencies": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "node_modules/parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "dependencies": { + "path-platform": "~0.11.15" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.1", + "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "dependencies": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "node_modules/parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "dependencies": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/pbkdf2-compat": { + "version": "2.0.1", + "resolved": "http://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", + "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=", + "dev": true + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/popsicle": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/popsicle/-/popsicle-9.2.0.tgz", + "integrity": "sha512-petRj39w05GvH1WKuGFmzxR9+k+R9E7zX5XWTFee7P/qf88hMuLT7aAO/RsmldpQMtJsWQISkTQlfMRECKlxhw==", + "dev": true, + "dependencies": { + "concat-stream": "^1.4.7", + "form-data": "^2.0.0", + "make-error-cause": "^1.2.1", + "tough-cookie": "^2.0.0" + } + }, + "node_modules/popsicle-proxy-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/popsicle-proxy-agent/-/popsicle-proxy-agent-3.0.0.tgz", + "integrity": "sha1-uRM8VdlFdZq37mG3cRNkYg066tw=", + "deprecated": "Use `agent` option with `popsicle` directly", + "dev": true, + "dependencies": { + "http-proxy-agent": "^1.0.0", + "https-proxy-agent": "^1.0.0" + } + }, + "node_modules/popsicle-retry": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/popsicle-retry/-/popsicle-retry-3.2.1.tgz", + "integrity": "sha1-4G6GZTO0KnoSPrMwy+Y6fOvLoQw=", + "dev": true, + "dependencies": { + "any-promise": "^1.1.0", + "xtend": "^4.0.1" + } + }, + "node_modules/popsicle-rewrite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/popsicle-rewrite/-/popsicle-rewrite-1.0.0.tgz", + "integrity": "sha1-HdTo6pwxgjUfuCD4eTTZkvf7kAc=", + "dev": true + }, + "node_modules/popsicle-status": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/popsicle-status/-/popsicle-status-2.0.1.tgz", + "integrity": "sha1-jdcMT+fGlBCa3XhP/oDqysHnso0=", + "dev": true + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "node_modules/promise-finally": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/promise-finally/-/promise-finally-3.0.0.tgz", + "integrity": "sha1-3dXQ+JVDKxIGzrjaEnUGTRjnqiM=", + "dev": true + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "node_modules/psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/randomatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", + "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "dev": true, + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/randomatic/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/randomatic/node_modules/kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/readdirp/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "dependencies": { + "is-equal-shallow": "^0.1.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "dependencies": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "dependencies": { + "rc": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "node_modules/repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.5" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "dependencies": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "dependencies": { + "glob": "^7.0.5" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "dependencies": { + "semver": "^5.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "deprecated": "Critical bug fixed in v3.0.1, please upgrade to the latest version.", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shasum": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "dependencies": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "dependencies": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "node_modules/signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "node_modules/simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true + }, + "node_modules/slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "dev": true + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "dependencies": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "node_modules/stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-template": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz", + "integrity": "sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y=", + "dev": true + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "dependencies": { + "minimist": "^1.1.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "dependencies": { + "acorn-node": "^1.2.0" + } + }, + "node_modules/tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "dependencies": { + "execa": "^0.7.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/throat": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", + "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "dependencies": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "node_modules/timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "dependencies": { + "process": "~0.11.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/touch": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-1.0.0.tgz", + "integrity": "sha1-RJy+LbrlqMgDjjDXH6D/RklHxN4=", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "touch": "bin/touch.js" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "dependencies": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ts-loader": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-2.3.7.tgz", + "integrity": "sha512-8t3bu2FcEkXb+D4L+Cn8qiK2E2C6Ms4/GQChvz6IMbVurcFHLXrhW4EMtfaol1a1ASQACZGDUGit4NHnX9g7hQ==", + "dev": true, + "dependencies": { + "chalk": "^2.0.1", + "enhanced-resolve": "^3.0.0", + "loader-utils": "^1.0.2", + "semver": "^5.0.1" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/ts-node": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", + "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", + "dependencies": { + "arrify": "^1.0.0", + "chalk": "^2.0.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.0", + "tsconfig": "^6.0.0", + "v8flags": "^3.0.0", + "yn": "^2.0.0" + }, + "bin": { + "_ts-node": "dist/_bin.js", + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/tsconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", + "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", + "dependencies": { + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "node_modules/tsify": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tsify/-/tsify-3.0.4.tgz", + "integrity": "sha512-y75+qgB41YS8HJck+jmSIn395I4qRGtm5ZELzvNh80Llzh8ojPWp47jm0ZoIJesNYVzbqEyLzgYXV9d/calvVg==", + "dev": true, + "dependencies": { + "convert-source-map": "^1.1.0", + "fs.realpath": "^1.0.0", + "object-assign": "^4.1.0", + "semver": "^5.1.0", + "through2": "^2.0.0", + "tsconfig": "^5.0.3" + }, + "engines": { + "node": ">=0.12" + }, + "peerDependencies": { + "browserify": ">= 10.x", + "typescript": ">= 2.x" + } + }, + "node_modules/tsify/node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tsify/node_modules/tsconfig": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", + "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", + "dev": true, + "dependencies": { + "any-promise": "^1.3.0", + "parse-json": "^2.2.0", + "strip-bom": "^2.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "node_modules/typescript": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/typings": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/typings/-/typings-2.1.1.tgz", + "integrity": "sha1-usxp0lWXCkeOCfdsf2iZddU1p4o=", + "deprecated": "Typings is deprecated in favor of NPM @types -- see README for more information", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "bluebird": "^3.1.1", + "chalk": "^1.0.0", + "cli-truncate": "^1.0.0", + "columnify": "^1.5.2", + "elegant-spinner": "^1.0.1", + "has-unicode": "^2.0.1", + "listify": "^1.0.0", + "log-update": "^1.0.2", + "minimist": "^1.2.0", + "promise-finally": "^3.0.0", + "typings-core": "^2.3.3", + "update-notifier": "^2.0.0", + "wordwrap": "^1.0.0", + "xtend": "^4.0.1" + }, + "bin": { + "typings": "dist/bin.js" + } + }, + "node_modules/typings-core": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/typings-core/-/typings-core-2.3.3.tgz", + "integrity": "sha1-CexUzVsR3V8e8vwKsx03ACyita0=", + "dev": true, + "dependencies": { + "array-uniq": "^1.0.2", + "configstore": "^3.0.0", + "debug": "^2.2.0", + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "has": "^1.0.1", + "invariant": "^2.2.0", + "is-absolute": "^0.2.3", + "jspm-config": "^0.3.0", + "listify": "^1.0.0", + "lockfile": "^1.0.1", + "make-error-cause": "^1.2.1", + "mkdirp": "^0.5.1", + "object.pick": "^1.1.1", + "parse-json": "^2.2.0", + "popsicle": "^9.0.0", + "popsicle-proxy-agent": "^3.0.0", + "popsicle-retry": "^3.2.0", + "popsicle-rewrite": "^1.0.0", + "popsicle-status": "^2.0.0", + "promise-finally": "^3.0.0", + "rc": "^1.1.5", + "rimraf": "^2.4.4", + "sort-keys": "^1.0.0", + "string-template": "^1.0.0", + "strip-bom": "^3.0.0", + "thenify": "^3.1.0", + "throat": "^3.0.0", + "touch": "^1.0.0", + "typescript": "^2.1.4", + "xtend": "^4.0.0", + "zip-object": "^0.1.0" + } + }, + "node_modules/typings-core/node_modules/typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/typings/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typings/node_modules/chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typings/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uglify-js": { + "version": "2.7.5", + "resolved": "http://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", + "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", + "dev": true, + "dependencies": { + "async": "~0.2.6", + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uglify-js/node_modules/async": { + "version": "0.2.10", + "resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true + }, + "node_modules/umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true, + "bin": { + "umd": "bin/cli.js" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/undeclared-identifiers": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", + "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", + "dev": true, + "dependencies": { + "acorn-node": "^1.3.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + }, + "bin": { + "undeclared-identifiers": "bin.js" + } + }, + "node_modules/union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value/node_modules/set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "deprecated": "Critical bug fixed in v3.0.1, please upgrade to the latest version.", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "dependencies": { + "crypto-random-string": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "dev": true, + "dependencies": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "dependencies": { + "prepend-http": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/v8flags": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", + "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "dependencies": { + "indexof": "0.0.1" + } + }, + "node_modules/watchpack": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", + "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", + "dev": true, + "dependencies": { + "async": "^0.9.0", + "chokidar": "^1.0.0", + "graceful-fs": "^4.1.2" + } + }, + "node_modules/watchpack/node_modules/async": { + "version": "0.9.2", + "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webpack": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", + "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", + "dev": true, + "dependencies": { + "acorn": "^3.0.0", + "async": "^1.3.0", + "clone": "^1.0.2", + "enhanced-resolve": "~0.9.0", + "interpret": "^0.6.4", + "loader-utils": "^0.2.11", + "memory-fs": "~0.3.0", + "mkdirp": "~0.5.0", + "node-libs-browser": "^0.7.0", + "optimist": "~0.6.0", + "supports-color": "^3.1.0", + "tapable": "~0.1.8", + "uglify-js": "~2.7.3", + "watchpack": "^0.2.1", + "webpack-core": "~0.6.9" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "dev": true, + "dependencies": { + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/webpack-core/node_modules/source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/webpack/node_modules/acorn": { + "version": "3.3.0", + "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack/node_modules/enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.2.0", + "tapable": "^0.1.8" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/webpack/node_modules/enhanced-resolve/node_modules/memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", + "dev": true + }, + "node_modules/webpack/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "dependencies": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + }, + "node_modules/webpack/node_modules/memory-fs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", + "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", + "dev": true, + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "node_modules/webpack/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/webpack/node_modules/tapable": { + "version": "0.1.10", + "resolved": "http://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "dev": true, + "dependencies": { + "string-width": "^2.1.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "node_modules/xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + }, + "node_modules/yargs/node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "engines": { + "node": ">=4" + } + }, + "node_modules/zip-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/zip-object/-/zip-object-0.1.0.tgz", + "integrity": "sha1-waDaBMiMg3dW4khoCgP/kC7D9To=", + "dev": true + } + }, "dependencies": { "@openapitools/typescript-fetch-petstore": { - "version": "file:../../builds/with-npm-version" + "version": "file:../../builds/with-npm-version", + "requires": { + "typescript": "^4.0" + } }, "@swagger/typescript-fetch-petstore": { - "version": "file:../../builds/with-npm-version" + "version": "file:../../builds/with-npm-version", + "requires": { + "typescript": "^4.0" + } }, "@types/chai": { "version": "4.1.6", @@ -38,9 +6660,9 @@ "dev": true }, "@types/node": { - "version": "8.10.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.36.tgz", - "integrity": "sha512-SL6KhfM7PTqiFmbCW3eVNwVBZ+88Mrzbuvn9olPsfv43mbiWaFY+nRcz/TGGku0/lc2FepdMbImdMY1JrQ+zbw==", + "version": "12.20.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.47.tgz", + "integrity": "sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg==", "dev": true }, "@types/node-fetch": { @@ -52,16 +6674,6 @@ "@types/node": "*" } }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -450,9 +7062,9 @@ "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "dev": true, "requires": { - "JSONStream": "^1.0.3", "combine-source-map": "~0.8.0", "defined": "^1.0.0", + "JSONStream": "^1.0.3", "safe-buffer": "^5.1.1", "through2": "^2.0.0", "umd": "^3.0.0" @@ -487,7 +7099,6 @@ "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", "dev": true, "requires": { - "JSONStream": "^1.0.3", "assert": "^1.4.0", "browser-pack": "^6.0.1", "browser-resolve": "^1.11.0", @@ -509,6 +7120,7 @@ "https-browserify": "^1.0.0", "inherits": "~2.0.1", "insert-module-globals": "^7.0.0", + "JSONStream": "^1.0.3", "labeled-stream-splicer": "^2.0.0", "module-deps": "^4.0.8", "os-browserify": "~0.3.0", @@ -1951,24 +8563,24 @@ "dev": true, "optional": true }, - "string-width": { - "version": "1.0.2", + "string_decoder": { + "version": "1.1.1", "bundled": true, "dev": true, "optional": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "safe-buffer": "~5.1.0" } }, - "string_decoder": { - "version": "1.1.1", + "string-width": { + "version": "1.0.2", "bundled": true, "dev": true, "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -2359,11 +8971,11 @@ "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", "dev": true, "requires": { - "JSONStream": "^1.0.3", "acorn-node": "^1.5.2", "combine-source-map": "^0.8.0", "concat-stream": "^1.6.1", "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", "path-is-absolute": "^1.0.1", "process": "~0.11.0", "through2": "^2.0.0", @@ -2691,6 +9303,16 @@ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "jspm-config": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/jspm-config/-/jspm-config-0.3.4.tgz", @@ -3128,7 +9750,6 @@ "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", "dev": true, "requires": { - "JSONStream": "^1.0.3", "browser-resolve": "^1.7.0", "cached-path-relative": "^1.0.0", "concat-stream": "~1.5.0", @@ -3136,6 +9757,7 @@ "detective": "^4.0.0", "duplexer2": "^0.1.2", "inherits": "^2.0.1", + "JSONStream": "^1.0.3", "parents": "^1.0.0", "readable-stream": "^2.0.2", "resolve": "^1.1.3", @@ -4578,6 +11200,15 @@ "readable-stream": "^2.0.2" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-template": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz", @@ -4611,15 +11242,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "3.0.1", "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -4892,9 +11514,9 @@ "dev": true }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true }, "typings": { @@ -4985,6 +11607,14 @@ "typescript": "^2.1.4", "xtend": "^4.0.0", "zip-object": "^0.1.0" + }, + "dependencies": { + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + } } }, "uglify-js": { diff --git a/samples/client/petstore/typescript-fetch/tests/default/package.json b/samples/client/petstore/typescript-fetch/tests/default/package.json index 906804784fe9..f33719a8f421 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/package.json +++ b/samples/client/petstore/typescript-fetch/tests/default/package.json @@ -18,7 +18,7 @@ "@types/form-data": "^2.2.1", "@types/isomorphic-fetch": "0.0.34", "@types/mocha": "^2.2.41", - "@types/node": "^8.0.14", + "@types/node": "^12.0.14", "@types/node-fetch": "^2.1.2", "browserify": "^14.4.0", "form-data": "^2.3.2", @@ -26,7 +26,7 @@ "node-fetch": "^2.2.0", "ts-loader": "^2.3.0", "tsify": "^3.0.4", - "typescript": "^2.4.1", + "typescript": "^4.0", "typings": "^2.1.1", "webpack": "^1.13.0" }, diff --git a/samples/client/petstore/typescript-jquery/npm/package.json b/samples/client/petstore/typescript-jquery/npm/package.json index 7fb297b8633b..c6985184e509 100644 --- a/samples/client/petstore/typescript-jquery/npm/package.json +++ b/samples/client/petstore/typescript-jquery/npm/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@types/jquery": "^3.1", - "typescript": "^2.4" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json index daba3da51b86..6d90d510ad94 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json @@ -46,7 +46,7 @@ "ts-node": "8.3.0", "tsconfig-paths": "3.8.0", "tslint": "5.18.0", - "typescript": "3.5.3", + "typescript": "^4.0", "wait-on": "^3.2.0" }, "jest": { diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index 2bab750c5bab..c35a2b3a0fb5 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -15,13 +15,13 @@ "dependencies": { "bluebird": "^3.5.0", "request": "^2.81.0", - "@types/bluebird": "3.5.33", - "@types/request": "*", "rewire": "^3.0.2" }, "devDependencies": { - "typescript": "^2.4.2", - "@types/node": "8.10.34" + "@types/bluebird": "^3.5.33", + "@types/node": "^12", + "@types/request": "^2.48.8", + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/package.json b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/package.json index 07cc35afb334..4ec80a8583a9 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/package.json @@ -13,7 +13,7 @@ "redux-query": "^3.2.0" }, "devDependencies": { - "typescript": "^3.0" + "typescript": "^4.0" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt b/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt index 3ca0a620f9d5..ab4fdbd49d45 100644 --- a/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt +++ b/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt @@ -2,6 +2,7 @@ package com.my.company.codegen import org.openapitools.codegen.* +import org.openapitools.codegen.model.*; import java.util.* import java.io.File @@ -36,11 +37,11 @@ open class MyclientcodegenGenerator() : DefaultCodegen(), CodegenConfig { * Provides an opportunity to inspect and modify operation data before the code is generated. */ @Suppress("UNCHECKED_CAST") - override fun postProcessOperationsWithModels(objs: Map, allModels: List?): Map { + override fun postProcessOperationsWithModels(objs: OperationsMap, allModels: List?): OperationsMap { val results = super.postProcessOperationsWithModels(objs, allModels) - val ops = results["operations"] as Map - val opList = ops["operation"] as ArrayList + val ops = results.getOperations() + val opList = ops.getOperation() // iterate over the operation and perhaps modify something for (co: CodegenOperation in opList) { @@ -180,4 +181,4 @@ open class MyclientcodegenGenerator() : DefaultCodegen(), CodegenConfig { //TODO: check that this logic is safe to escape quotation mark to avoid code injection return with(input) { replace("\"", "\\\"") } } -} \ No newline at end of file +} diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index 9f3c524b31aa..379443c0dfc5 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -1,6 +1,7 @@ package com.my.company.codegen; import org.openapitools.codegen.*; +import org.openapitools.codegen.model.*; import io.swagger.models.properties.*; import java.util.*; @@ -35,18 +36,17 @@ public String getName() { /** * Provides an opportunity to inspect and modify operation data before the code is generated. */ - @SuppressWarnings("unchecked") @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { // to try debugging your code generator: // set a break point on the next line. // then debug the JUnit test called LaunchGeneratorInDebugger - Map results = super.postProcessOperationsWithModels(objs, allModels); + OperationsMap results = super.postProcessOperationsWithModels(objs, allModels); - Map ops = (Map)results.get("operations"); - ArrayList opList = (ArrayList)ops.get("operation"); + OperationMap ops = results.getOperations(); + List opList = ops.getOperation(); // iterate over the operation and perhaps modify something for(CodegenOperation co : opList){ @@ -195,4 +195,4 @@ public String escapeQuotationMark(String input) { //TODO: check that this logic is safe to escape quotation mark to avoid code injection return input.replace("\"", "\\\""); } -} \ No newline at end of file +} diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle index 60dbc5c1ad09..b9afa56a8543 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle @@ -11,8 +11,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.6.3" - jackson_version = "2.13.0" - jackson_databind_version = "2.13.0" + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2.2" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" jersey_version = "2.35" - junit_version = "4.13.2" + junit_version = "5.8.2" } dependencies { @@ -121,7 +121,12 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() } javadoc { diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt index 3cfb74edc016..f245414c4d59 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt @@ -10,19 +10,18 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "com.google.code.findbugs" % "jsr305" % "3.0.0", - "io.swagger" % "swagger-annotations" % "1.6.3", + "io.swagger" % "swagger-annotations" % "1.6.5", "org.glassfish.jersey.core" % "jersey-client" % "2.35", "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", - "com.fasterxml.jackson.core" % "jackson-core" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.0" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.2" % "compile", "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/docs/UsageApi.md b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/docs/UsageApi.md index 7af13f24d178..ba807310a80a 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/docs/UsageApi.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/docs/UsageApi.md @@ -2,12 +2,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**anyKey**](UsageApi.md#anyKey) | **GET** /any | Use any API key -[**bothKeys**](UsageApi.md#bothKeys) | **GET** /both | Use both API keys -[**keyInHeader**](UsageApi.md#keyInHeader) | **GET** /header | Use API key in header -[**keyInQuery**](UsageApi.md#keyInQuery) | **GET** /query | Use API key in query +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**anyKey**](UsageApi.md#anyKey) | **GET** /any | Use any API key | +| [**bothKeys**](UsageApi.md#bothKeys) | **GET** /both | Use both API keys | +| [**keyInHeader**](UsageApi.md#keyInHeader) | **GET** /header | Use API key in header | +| [**keyInQuery**](UsageApi.md#keyInQuery) | **GET** /query | Use API key in query | diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml index 7871c321c0cb..424d8713c89d 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -102,7 +102,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -325,21 +325,21 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test UTF-8 - 1.6.3 + 1.6.5 2.35 - 2.13.0 - 2.13.0 + 2.13.2 + 2.13.2.2 0.2.2 1.3.5 - 4.13.2 - 2.17.3 + 5.8.2 + 2.21.0 diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/test/java/org/openapitools/client/api/UsageApiTest.java b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/test/java/org/openapitools/client/api/UsageApiTest.java index 4c5fc6feab40..ec7ff2a83af2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/test/java/org/openapitools/client/api/UsageApiTest.java +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/test/java/org/openapitools/client/api/UsageApiTest.java @@ -15,10 +15,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -37,8 +37,7 @@ public class UsageApiTest { * * Use any API key * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void anyKeyTest() throws ApiException { @@ -51,8 +50,7 @@ public void anyKeyTest() throws ApiException { * * Use both API keys * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void bothKeysTest() throws ApiException { @@ -65,8 +63,7 @@ public void bothKeysTest() throws ApiException { * * Use API key in header * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void keyInHeaderTest() throws ApiException { @@ -79,8 +76,7 @@ public void keyInHeaderTest() throws ApiException { * * Use API key in query * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void keyInQueryTest() throws ApiException { diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md b/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md index 72ef1f59d6ca..cf8ca840349f 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md @@ -78,7 +78,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' with x_auth_id_alias.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = usage_api.UsageApi(api_client) - + try: # Use any API key api_response = api_instance.any_key() diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py index 9f3775456e04..7307adb01c07 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py @@ -253,6 +253,10 @@ def any_key( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -284,6 +288,7 @@ def any_key( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.any_key_endpoint.call_with_http_info(**kwargs) def both_keys( @@ -326,6 +331,10 @@ def both_keys( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -357,6 +366,7 @@ def both_keys( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.both_keys_endpoint.call_with_http_info(**kwargs) def key_in_header( @@ -399,6 +409,10 @@ def key_in_header( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -430,6 +444,7 @@ def key_in_header( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.key_in_header_endpoint.call_with_http_info(**kwargs) def key_in_query( @@ -472,6 +487,10 @@ def key_in_query( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -503,5 +522,6 @@ def key_in_query( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.key_in_query_endpoint.call_with_http_info(**kwargs) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py index fbbd2aa4f120..eb7268814fa9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py @@ -132,7 +132,8 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -182,7 +183,8 @@ def __call_api( # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -350,7 +352,8 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -398,6 +401,10 @@ def call_api( :param _check_type: boolean describing if the data back from the server should have its type checked. :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -412,7 +419,7 @@ def call_api( response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -425,7 +432,7 @@ def call_api( collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -597,7 +604,7 @@ def select_header_content_type(self, content_types, method=None, body=None): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -607,24 +614,34 @@ def update_params_for_auth(self, headers, queries, auth_settings, :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -674,7 +691,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -689,7 +707,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -864,4 +883,5 @@ def call_with_http_info(self, **kwargs): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/apis/__init__.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/apis/__init__.py index 8bce252a2ed8..f3c051339da4 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/apis/__init__.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.usage_api import UsageApi +# from x_auth_id_alias.api.usage_api import UsageApi # # or import this package, but before doing it, use: # diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/exceptions.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/exceptions.py index 86d7bb4ba35a..4b85f8d8a4b7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/exceptions.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/exceptions.py @@ -112,7 +112,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py index 38a28ca20897..971302f19995 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py @@ -16,6 +16,7 @@ import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -192,7 +193,7 @@ def __copy__(self): if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ @@ -1399,7 +1400,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -1564,7 +1571,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + if (configuration + or (input_class_simple == dict + and not dict in valid_classes)): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index 39b60ce5a00a..6707026ee78b 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -93,6 +93,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -109,7 +110,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index de03d94f7345..48587852664b 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -133,6 +133,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -150,10 +151,10 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false @inject_format = false @force_ending_format = false diff --git a/samples/openapi3/client/features/dynamic-servers/python/README.md b/samples/openapi3/client/features/dynamic-servers/python/README.md index 7d9ade3fca63..f75ed4a6d011 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/README.md +++ b/samples/openapi3/client/features/dynamic-servers/python/README.md @@ -62,7 +62,7 @@ configuration = dynamic_servers.Configuration( with dynamic_servers.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = usage_api.UsageApi(api_client) - + try: # Use custom server api_response = api_instance.custom_server() diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py index f71f533ceeca..d634bce7b5a7 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py @@ -208,6 +208,10 @@ def custom_server( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -239,6 +243,7 @@ def custom_server( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.custom_server_endpoint.call_with_http_info(**kwargs) def default_server( @@ -281,6 +286,10 @@ def default_server( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -312,5 +321,6 @@ def default_server( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.default_server_endpoint.call_with_http_info(**kwargs) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py index 3aaf2a296f00..61d33ce421c7 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py @@ -132,7 +132,8 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -182,7 +183,8 @@ def __call_api( # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -350,7 +352,8 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -398,6 +401,10 @@ def call_api( :param _check_type: boolean describing if the data back from the server should have its type checked. :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -412,7 +419,7 @@ def call_api( response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -425,7 +432,7 @@ def call_api( collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -597,7 +604,7 @@ def select_header_content_type(self, content_types, method=None, body=None): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -607,24 +614,34 @@ def update_params_for_auth(self, headers, queries, auth_settings, :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -674,7 +691,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -689,7 +707,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -864,4 +883,5 @@ def call_with_http_info(self, **kwargs): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py index 09e1121e370b..21c779b74b34 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.usage_api import UsageApi +# from dynamic_servers.api.usage_api import UsageApi # # or import this package, but before doing it, use: # diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py index a4c8f5d20737..eeb7cd85cf63 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py @@ -112,7 +112,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py index d76884daf889..94e8c1fbe2a9 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py @@ -16,6 +16,7 @@ import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -192,7 +193,7 @@ def __copy__(self): if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ @@ -1399,7 +1400,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -1564,7 +1571,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + if (configuration + or (input_class_simple == dict + and not dict in valid_classes)): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index e961dfec106a..603c962591c5 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -93,6 +93,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false) @@ -108,7 +109,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index fd4209a89ae0..d5d7dacc8edd 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -133,6 +133,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -150,10 +151,10 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false @inject_format = false @force_ending_format = false diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index ebabf150bf47..a6f0150b282f 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -93,6 +93,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false) @@ -108,7 +109,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index 56c3c1a3f8ed..641a0f31e582 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -133,6 +133,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -150,10 +151,10 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false @inject_format = false @force_ending_format = false diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index c72355b506ce..39018a3f9591 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -102,6 +102,7 @@ def self.build_from_hash(attributes) def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index cf7fc57d9bbb..211fc131cfcd 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -98,6 +98,7 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/FILES index ae28fd24bea0..15c25bc0c33c 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/FILES @@ -2,6 +2,7 @@ README.md analysis_options.yaml doc/AdditionalPropertiesClass.md +doc/AllOfWithSingleRef.md doc/Animal.md doc/AnotherFakeApi.md doc/ApiResponse.md @@ -49,6 +50,7 @@ doc/OuterObjectWithEnumProperty.md doc/Pet.md doc/PetApi.md doc/ReadOnlyFirst.md +doc/SingleRefType.md doc/SpecialModelName.md doc/StoreApi.md doc/Tag.md @@ -71,6 +73,7 @@ lib/src/auth/bearer_auth.dart lib/src/auth/oauth.dart lib/src/date_serializer.dart lib/src/model/additional_properties_class.dart +lib/src/model/all_of_with_single_ref.dart lib/src/model/animal.dart lib/src/model/api_response.dart lib/src/model/array_of_array_of_number_only.dart @@ -114,6 +117,7 @@ lib/src/model/outer_enum_integer_default_value.dart lib/src/model/outer_object_with_enum_property.dart lib/src/model/pet.dart lib/src/model/read_only_first.dart +lib/src/model/single_ref_type.dart lib/src/model/special_model_name.dart lib/src/model/tag.dart lib/src/model/user.dart diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md index 52553e236b05..c9853f5643a7 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md @@ -110,6 +110,7 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) + - [AllOfWithSingleRef](doc/AllOfWithSingleRef.md) - [Animal](doc/Animal.md) - [ApiResponse](doc/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) @@ -152,6 +153,7 @@ Class | Method | HTTP request | Description - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) - [Pet](doc/Pet.md) - [ReadOnlyFirst](doc/ReadOnlyFirst.md) + - [SingleRefType](doc/SingleRefType.md) - [SpecialModelName](doc/SpecialModelName.md) - [Tag](doc/Tag.md) - [User](doc/User.md) diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AllOfWithSingleRef.md new file mode 100644 index 000000000000..4c6f3ab2fe11 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AllOfWithSingleRef.md @@ -0,0 +1,16 @@ +# openapi.model.AllOfWithSingleRef + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md index b19c3dd9e27e..4b1e2a2d5b17 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md @@ -568,7 +568,7 @@ void (empty response body) [[Back to top]](#) [[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(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -585,11 +585,12 @@ final BuiltList enumQueryStringArray = ; // BuiltList | Query pa final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) final int enumQueryInteger = 56; // int | Query parameter enum test (double) final double enumQueryDouble = 1.2; // double | Query parameter enum test (double) +final BuiltList enumQueryModelArray = ; // BuiltList | final BuiltList enumFormStringArray = ; // BuiltList | Form parameter enum test (string array) final String enumFormString = enumFormString_example; // String | Form parameter enum test (string) try { - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch on DioError (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); } @@ -605,6 +606,7 @@ Name | Type | Description | Notes **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**BuiltList<ModelEnumClass>**](ModelEnumClass.md)| | [optional] **enumFormStringArray** | [**BuiltList<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/SingleRefType.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/SingleRefType.md new file mode 100644 index 000000000000..0dc93840cd7f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/SingleRefType.md @@ -0,0 +1,14 @@ +# openapi.model.SingleRefType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## 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/dart-dio-next/petstore_client_lib_fake/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/openapi.dart index 5dbf2a6964dc..3490ac160869 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/openapi.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/openapi.dart @@ -18,6 +18,7 @@ export 'package:openapi/src/api/store_api.dart'; export 'package:openapi/src/api/user_api.dart'; export 'package:openapi/src/model/additional_properties_class.dart'; +export 'package:openapi/src/model/all_of_with_single_ref.dart'; export 'package:openapi/src/model/animal.dart'; export 'package:openapi/src/model/api_response.dart'; export 'package:openapi/src/model/array_of_array_of_number_only.dart'; @@ -60,6 +61,7 @@ export 'package:openapi/src/model/outer_enum_integer_default_value.dart'; export 'package:openapi/src/model/outer_object_with_enum_property.dart'; export 'package:openapi/src/model/pet.dart'; export 'package:openapi/src/model/read_only_first.dart'; +export 'package:openapi/src/model/single_ref_type.dart'; export 'package:openapi/src/model/special_model_name.dart'; export 'package:openapi/src/model/tag.dart'; export 'package:openapi/src/model/user.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart index d600aba3181f..37506ff1cfe6 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -14,6 +14,7 @@ import 'package:openapi/src/model/date.dart'; import 'package:openapi/src/model/file_schema_test_class.dart'; import 'package:openapi/src/model/health_check_result.dart'; import 'package:openapi/src/model/model_client.dart'; +import 'package:openapi/src/model/model_enum_class.dart'; import 'package:openapi/src/model/outer_composite.dart'; import 'package:openapi/src/model/outer_object_with_enum_property.dart'; import 'package:openapi/src/model/pet.dart'; @@ -1052,6 +1053,7 @@ class FakeApi { /// * [enumQueryString] - Query parameter enum test (string) /// * [enumQueryInteger] - Query parameter enum test (double) /// * [enumQueryDouble] - Query parameter enum test (double) + /// * [enumQueryModelArray] /// * [enumFormStringArray] - Form parameter enum test (string array) /// * [enumFormString] - Form parameter enum test (string) /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -1070,6 +1072,7 @@ class FakeApi { String? enumQueryString = '-efg', int? enumQueryInteger, double? enumQueryDouble, + BuiltList? enumQueryModelArray, BuiltList? enumFormStringArray, String? enumFormString, CancelToken? cancelToken, @@ -1100,6 +1103,7 @@ class FakeApi { if (enumQueryString != null) r'enum_query_string': encodeQueryParameter(_serializers, enumQueryString, const FullType(String)), if (enumQueryInteger != null) r'enum_query_integer': encodeQueryParameter(_serializers, enumQueryInteger, const FullType(int)), if (enumQueryDouble != null) r'enum_query_double': encodeQueryParameter(_serializers, enumQueryDouble, const FullType(double)), + if (enumQueryModelArray != null) r'enum_query_model_array': encodeCollectionQueryParameter(_serializers, enumQueryModelArray, const FullType(BuiltList, [FullType(ModelEnumClass)]), format: ListFormat.multi,), }; dynamic _bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api_util.dart index 09b9ba88fd94..e301a95d8e36 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api_util.dart @@ -61,7 +61,7 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart new file mode 100644 index 000000000000..3319d53814d8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:openapi/src/model/single_ref_type.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'all_of_with_single_ref.g.dart'; + +/// AllOfWithSingleRef +/// +/// Properties: +/// * [username] +/// * [singleRefType] +abstract class AllOfWithSingleRef implements Built { + @BuiltValueField(wireName: r'username') + String? get username; + + @BuiltValueField(wireName: r'SingleRefType') + SingleRefType? get singleRefType; + + AllOfWithSingleRef._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AllOfWithSingleRefBuilder b) => b; + + factory AllOfWithSingleRef([void updates(AllOfWithSingleRefBuilder b)]) = _$AllOfWithSingleRef; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AllOfWithSingleRefSerializer(); +} + +class _$AllOfWithSingleRefSerializer implements StructuredSerializer { + @override + final Iterable types = const [AllOfWithSingleRef, _$AllOfWithSingleRef]; + + @override + final String wireName = r'AllOfWithSingleRef'; + + @override + Iterable serialize(Serializers serializers, AllOfWithSingleRef object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.username != null) { + result + ..add(r'username') + ..add(serializers.serialize(object.username, + specifiedType: const FullType(String))); + } + if (object.singleRefType != null) { + result + ..add(r'SingleRefType') + ..add(serializers.serialize(object.singleRefType, + specifiedType: const FullType.nullable(SingleRefType))); + } + return result; + } + + @override + AllOfWithSingleRef deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = AllOfWithSingleRefBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'username': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.username = valueDes; + break; + case r'SingleRefType': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(SingleRefType)) as SingleRefType?; + if (valueDes == null) continue; + result.singleRefType = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_arrays.dart index bda9790c1049..2626b354264e 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_arrays.dart @@ -93,6 +93,8 @@ class EnumArraysJustSymbolEnum extends EnumClass { static const EnumArraysJustSymbolEnum greaterThanEqual = _$enumArraysJustSymbolEnum_greaterThanEqual; @BuiltValueEnumConst(wireName: r'$') static const EnumArraysJustSymbolEnum dollar = _$enumArraysJustSymbolEnum_dollar; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const EnumArraysJustSymbolEnum unknownDefaultOpenApi = _$enumArraysJustSymbolEnum_unknownDefaultOpenApi; static Serializer get serializer => _$enumArraysJustSymbolEnumSerializer; @@ -108,6 +110,8 @@ class EnumArraysArrayEnumEnum extends EnumClass { static const EnumArraysArrayEnumEnum fish = _$enumArraysArrayEnumEnum_fish; @BuiltValueEnumConst(wireName: r'crab') static const EnumArraysArrayEnumEnum crab = _$enumArraysArrayEnumEnum_crab; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const EnumArraysArrayEnumEnum unknownDefaultOpenApi = _$enumArraysArrayEnumEnum_unknownDefaultOpenApi; static Serializer get serializer => _$enumArraysArrayEnumEnumSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_test.dart index 7ca76d22fe0f..ff022e646e86 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -194,6 +194,8 @@ class EnumTestEnumStringEnum extends EnumClass { static const EnumTestEnumStringEnum lower = _$enumTestEnumStringEnum_lower; @BuiltValueEnumConst(wireName: r'') static const EnumTestEnumStringEnum empty = _$enumTestEnumStringEnum_empty; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const EnumTestEnumStringEnum unknownDefaultOpenApi = _$enumTestEnumStringEnum_unknownDefaultOpenApi; static Serializer get serializer => _$enumTestEnumStringEnumSerializer; @@ -211,6 +213,8 @@ class EnumTestEnumStringRequiredEnum extends EnumClass { static const EnumTestEnumStringRequiredEnum lower = _$enumTestEnumStringRequiredEnum_lower; @BuiltValueEnumConst(wireName: r'') static const EnumTestEnumStringRequiredEnum empty = _$enumTestEnumStringRequiredEnum_empty; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const EnumTestEnumStringRequiredEnum unknownDefaultOpenApi = _$enumTestEnumStringRequiredEnum_unknownDefaultOpenApi; static Serializer get serializer => _$enumTestEnumStringRequiredEnumSerializer; @@ -226,6 +230,8 @@ class EnumTestEnumIntegerEnum extends EnumClass { static const EnumTestEnumIntegerEnum number1 = _$enumTestEnumIntegerEnum_number1; @BuiltValueEnumConst(wireNumber: -1) static const EnumTestEnumIntegerEnum numberNegative1 = _$enumTestEnumIntegerEnum_numberNegative1; + @BuiltValueEnumConst(wireNumber: 11184809, fallback: true) + static const EnumTestEnumIntegerEnum unknownDefaultOpenApi = _$enumTestEnumIntegerEnum_unknownDefaultOpenApi; static Serializer get serializer => _$enumTestEnumIntegerEnumSerializer; @@ -241,6 +247,8 @@ class EnumTestEnumNumberEnum extends EnumClass { static const EnumTestEnumNumberEnum number1Period1 = _$enumTestEnumNumberEnum_number1Period1; @BuiltValueEnumConst(wireName: r'-1.2') static const EnumTestEnumNumberEnum numberNegative1Period2 = _$enumTestEnumNumberEnum_numberNegative1Period2; + @BuiltValueEnumConst(wireName: r'11184809', fallback: true) + static const EnumTestEnumNumberEnum unknownDefaultOpenApi = _$enumTestEnumNumberEnum_unknownDefaultOpenApi; static Serializer get serializer => _$enumTestEnumNumberEnumSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/map_test.dart index e5ae30f2290f..16df0490e164 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/map_test.dart @@ -122,6 +122,8 @@ class MapTestMapOfEnumStringEnum extends EnumClass { static const MapTestMapOfEnumStringEnum UPPER = _$mapTestMapOfEnumStringEnum_UPPER; @BuiltValueEnumConst(wireName: r'lower') static const MapTestMapOfEnumStringEnum lower = _$mapTestMapOfEnumStringEnum_lower; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const MapTestMapOfEnumStringEnum unknownDefaultOpenApi = _$mapTestMapOfEnumStringEnum_unknownDefaultOpenApi; static Serializer get serializer => _$mapTestMapOfEnumStringEnumSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/model_enum_class.dart index ba6ca8c45dd3..f49be90d2bb3 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/model_enum_class.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/model_enum_class.dart @@ -16,6 +16,8 @@ class ModelEnumClass extends EnumClass { static const ModelEnumClass efg = _$efg; @BuiltValueEnumConst(wireName: r'(xyz)') static const ModelEnumClass leftParenthesisXyzRightParenthesis = _$leftParenthesisXyzRightParenthesis; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const ModelEnumClass unknownDefaultOpenApi = _$unknownDefaultOpenApi; static Serializer get serializer => _$modelEnumClassSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/order.dart index 3f9aed726558..507a1e3a98d4 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/order.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/order.dart @@ -159,6 +159,9 @@ class OrderStatusEnum extends EnumClass { /// Order Status @BuiltValueEnumConst(wireName: r'delivered') static const OrderStatusEnum delivered = _$orderStatusEnum_delivered; + /// Order Status + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const OrderStatusEnum unknownDefaultOpenApi = _$orderStatusEnum_unknownDefaultOpenApi; static Serializer get serializer => _$orderStatusEnumSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum.dart index 6476ca57d462..882219e06cdc 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum.dart @@ -16,6 +16,8 @@ class OuterEnum extends EnumClass { static const OuterEnum approved = _$approved; @BuiltValueEnumConst(wireName: r'delivered') static const OuterEnum delivered = _$delivered; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const OuterEnum unknownDefaultOpenApi = _$unknownDefaultOpenApi; static Serializer get serializer => _$outerEnumSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart index af04c76ed44e..77353c07711a 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart @@ -16,6 +16,8 @@ class OuterEnumDefaultValue extends EnumClass { static const OuterEnumDefaultValue approved = _$approved; @BuiltValueEnumConst(wireName: r'delivered') static const OuterEnumDefaultValue delivered = _$delivered; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const OuterEnumDefaultValue unknownDefaultOpenApi = _$unknownDefaultOpenApi; static Serializer get serializer => _$outerEnumDefaultValueSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart index c3b4b7d8f5d8..9b179131475c 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart @@ -16,6 +16,8 @@ class OuterEnumInteger extends EnumClass { static const OuterEnumInteger number1 = _$number1; @BuiltValueEnumConst(wireNumber: 2) static const OuterEnumInteger number2 = _$number2; + @BuiltValueEnumConst(wireNumber: 11184809, fallback: true) + static const OuterEnumInteger unknownDefaultOpenApi = _$unknownDefaultOpenApi; static Serializer get serializer => _$outerEnumIntegerSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart index cf71a0217650..ded5b2c72318 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart @@ -16,6 +16,8 @@ class OuterEnumIntegerDefaultValue extends EnumClass { static const OuterEnumIntegerDefaultValue number1 = _$number1; @BuiltValueEnumConst(wireNumber: 2) static const OuterEnumIntegerDefaultValue number2 = _$number2; + @BuiltValueEnumConst(wireNumber: 11184809, fallback: true) + static const OuterEnumIntegerDefaultValue unknownDefaultOpenApi = _$unknownDefaultOpenApi; static Serializer get serializer => _$outerEnumIntegerDefaultValueSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/pet.dart index 4aea3f370f99..8ed90d104aa2 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/pet.dart @@ -156,6 +156,9 @@ class PetStatusEnum extends EnumClass { /// pet status in the store @BuiltValueEnumConst(wireName: r'sold') static const PetStatusEnum sold = _$petStatusEnum_sold; + /// pet status in the store + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const PetStatusEnum unknownDefaultOpenApi = _$petStatusEnum_unknownDefaultOpenApi; static Serializer get serializer => _$petStatusEnumSerializer; diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/single_ref_type.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/single_ref_type.dart new file mode 100644 index 000000000000..f1e6aef099e5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/single_ref_type.dart @@ -0,0 +1,35 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'single_ref_type.g.dart'; + +class SingleRefType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'admin') + static const SingleRefType admin = _$admin; + @BuiltValueEnumConst(wireName: r'user') + static const SingleRefType user = _$user; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const SingleRefType unknownDefaultOpenApi = _$unknownDefaultOpenApi; + + static Serializer get serializer => _$singleRefTypeSerializer; + + const SingleRefType._(String name): super(name); + + static BuiltSet get values => _$values; + static SingleRefType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class SingleRefTypeMixin = Object with _$SingleRefTypeMixin; + diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/serializers.dart index 5ee82d7b5019..c1ff1c751f22 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/serializers.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/serializers.dart @@ -13,6 +13,7 @@ import 'package:openapi/src/date_serializer.dart'; import 'package:openapi/src/model/date.dart'; import 'package:openapi/src/model/additional_properties_class.dart'; +import 'package:openapi/src/model/all_of_with_single_ref.dart'; import 'package:openapi/src/model/animal.dart'; import 'package:openapi/src/model/api_response.dart'; import 'package:openapi/src/model/array_of_array_of_number_only.dart'; @@ -55,6 +56,7 @@ import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; import 'package:openapi/src/model/outer_object_with_enum_property.dart'; import 'package:openapi/src/model/pet.dart'; import 'package:openapi/src/model/read_only_first.dart'; +import 'package:openapi/src/model/single_ref_type.dart'; import 'package:openapi/src/model/special_model_name.dart'; import 'package:openapi/src/model/tag.dart'; import 'package:openapi/src/model/user.dart'; @@ -63,6 +65,7 @@ part 'serializers.g.dart'; @SerializersFor([ AdditionalPropertiesClass, + AllOfWithSingleRef, Animal, ApiResponse, ArrayOfArrayOfNumberOnly, @@ -105,6 +108,7 @@ part 'serializers.g.dart'; OuterObjectWithEnumProperty, Pet, ReadOnlyFirst, + SingleRefType, SpecialModelName, Tag, User, @@ -134,6 +138,10 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltMap, [FullType(String), FullType(int)]), () => MapBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(ModelEnumClass)]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, [FullType(String)]), () => ListBuilder(), diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml index b7c55f4b7122..d0fc0e57fb5a 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: dev_dependencies: built_value_generator: '>=8.1.0 <9.0.0' build_runner: any - test: '>=1.16.0 <1.17.0' + test: ^1.16.0 diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart new file mode 100644 index 000000000000..8fdb1603ce35 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for AllOfWithSingleRef +void main() { + final instance = AllOfWithSingleRefBuilder(); + // TODO add properties to the builder and call build() + + group(AllOfWithSingleRef, () { + // String username + test('to test the property `username`', () async { + // TODO + }); + + // AllOfWithSingleRefSingleRefType singleRefType + test('to test the property `singleRefType`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/single_ref_type_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/single_ref_type_test.dart new file mode 100644 index 000000000000..5cd85add393e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/single_ref_type_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for SingleRefType +void main() { + + group(SingleRefType, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.lock b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.lock index fa4f795327d9..b7d37a2a4faf 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.lock +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.lock @@ -7,28 +7,28 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "21.0.0" + version: "22.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.7.2" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.3.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.7.0" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -42,7 +42,7 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.2.1" built_collection: dependency: "direct dev" description: @@ -63,42 +63,42 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" cli_util: dependency: transitive description: name: cli_util url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.5" code_builder: dependency: transitive description: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" coverage: dependency: transitive description: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.3" crypto: dependency: transitive description: @@ -112,7 +112,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.1" dio: dependency: "direct dev" description: @@ -126,7 +126,7 @@ packages: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.1" + version: "6.1.2" fixnum: dependency: transitive description: @@ -140,14 +140,14 @@ packages: name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" glob: dependency: transitive description: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" http_mock_adapter: dependency: "direct dev" description: @@ -161,7 +161,7 @@ packages: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.2.0" http_parser: dependency: transitive description: @@ -175,21 +175,21 @@ packages: name: io url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.3" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" logging: dependency: transitive description: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" matcher: dependency: transitive description: @@ -203,14 +203,14 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" mime: dependency: transitive description: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" mockito: dependency: "direct dev" description: @@ -224,7 +224,7 @@ packages: name: node_preamble url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" openapi: dependency: "direct dev" description: @@ -238,21 +238,21 @@ packages: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.11.1" pool: dependency: transitive description: @@ -266,14 +266,14 @@ packages: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.1" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.1.4" + version: "1.3.0" shelf_packages_handler: dependency: transitive description: @@ -287,7 +287,7 @@ packages: name: shelf_static url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" shelf_web_socket: dependency: transitive description: @@ -301,7 +301,7 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.3" source_map_stack_trace: dependency: transitive description: @@ -322,7 +322,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -392,7 +392,7 @@ packages: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" web_socket_channel: dependency: transitive description: @@ -415,4 +415,4 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.16.0 <3.0.0" diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/fake_api_test.dart index 3d83c5d2935e..24b1ff82d240 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/fake_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/fake_api_test.dart @@ -98,7 +98,7 @@ void main() { (server) => server.reply(200, null), data: { 'enum_form_string': 'formString', - 'enum_form_string_array': Matchers.listParam( + 'enum_form_string_array': Matchers.listParam( ListParam( ['foo', 'bar'], ListFormat.csv, @@ -106,26 +106,84 @@ void main() { ), }, queryParameters: { - 'enum_query_string_array': Matchers.listParam( - ListParam( - ['a', 'b', 'c'], + 'enum_query_string': '-efg', + }, + headers: { + 'enum_header_string': '-efg', + 'content-type': 'application/x-www-form-urlencoded', + }, + ); + + final response = await client.getFakeApi().testEnumParameters( + enumFormString: 'formString', + enumFormStringArray: ListBuilder( + ['foo', 'bar'], + ).build(), + ); + + expect(response.statusCode, 200); + }); + + test('in query parameters', () async { + tester.onGet( + '/fake', + (server) => server.reply(200, null), + queryParameters: { + 'enum_query_string_array': Matchers.listParam( + ListParam( + ['a', 'b', 'c'], ListFormat.multi, ), ), + 'enum_query_model_array': Matchers.listParam( + ListParam( + ['_abc', '-efg'], + ListFormat.multi, + ), + ), + 'enum_query_string': 'foo', + 'enum_query_double': 1.23, + 'enum_query_integer': 42, }, headers: { + 'enum_header_string': '-efg', 'content-type': 'application/x-www-form-urlencoded', }, + data: {}, ); final response = await client.getFakeApi().testEnumParameters( enumQueryStringArray: ListBuilder( ['a', 'b', 'c'], ).build(), - enumFormString: 'formString', - enumFormStringArray: ListBuilder( - ['foo', 'bar'], + enumQueryModelArray: ListBuilder( + [ModelEnumClass.abc, ModelEnumClass.efg], + ).build(), + enumQueryString: 'foo', + enumQueryDouble: 1.23, + enumQueryInteger: 42, + ); + + expect(response.statusCode, 200); + }); + + test('in header parameters', () async { + tester.onGet( + '/fake', + (server) => server.reply(200, null), + headers: { + 'enum_header_string': 'foo', + 'enum_header_string_array': '[a, b, c]', + 'content-type': 'application/x-www-form-urlencoded', + }, + data: {}, + ); + + final response = await client.getFakeApi().testEnumParameters( + enumHeaderStringArray: ListBuilder( + ['a', 'b', 'c'], ).build(), + enumHeaderString: 'foo', ); expect(response.statusCode, 200); diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart index 439dd749a0fc..8cb3d36e76e7 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart @@ -188,9 +188,9 @@ void main() { request: Request( method: RequestMethods.get, queryParameters: { - 'status': Matchers.listParam( - ListParam( - ['available', 'sold'], + 'status': Matchers.listParam( + ListParam( + ['available', 'sold'], ListFormat.csv, ), ), diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore deleted file mode 100644 index 4298cdcbd1a2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -# Files and directories created by pub -.dart_tool/ -.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 - -# Don’t commit files and directories created by other development environments. -# For example, if your development environment creates any of the following files, -# consider putting them in a global ignore file: - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/FILES deleted file mode 100644 index b14eb44e2a0f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/FILES +++ /dev/null @@ -1,29 +0,0 @@ -.gitignore -README.md -analysis_options.yaml -doc/ApiResponse.md -doc/Category.md -doc/Order.md -doc/Pet.md -doc/PetApi.md -doc/StoreApi.md -doc/Tag.md -doc/User.md -doc/UserApi.md -lib/api.dart -lib/api/pet_api.dart -lib/api/store_api.dart -lib/api/user_api.dart -lib/api_util.dart -lib/auth/api_key_auth.dart -lib/auth/auth.dart -lib/auth/basic_auth.dart -lib/auth/oauth.dart -lib/model/api_response.dart -lib/model/category.dart -lib/model/order.dart -lib/model/pet.dart -lib/model/tag.dart -lib/model/user.dart -lib/serializers.dart -pubspec.yaml diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md deleted file mode 100644 index aee38c63bb47..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# 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 package: org.openapitools.codegen.languages.DartDioClientCodegen - -## Requirements - -Dart 2.7.0 or later OR Flutter 1.12 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'; - - -final api = PetApi(); -final pet = Pet(); // Pet | Pet object that needs to be added to the store - -try { - final response = await api.addPet(pet); - print(response); -} 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**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [ApiResponse](doc/ApiResponse.md) - - [Category](doc/Category.md) - - [Order](doc/Order.md) - - [Pet](doc/Pet.md) - - [Tag](doc/Tag.md) - - [User](doc/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/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml deleted file mode 100644 index a611887d3acf..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml +++ /dev/null @@ -1,9 +0,0 @@ -analyzer: - language: - strict-inference: true - strict-raw-types: true - strong-mode: - implicit-dynamic: false - implicit-casts: false - exclude: - - test/*.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/ApiResponse.md deleted file mode 100644 index 7ad5da0f89e4..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/ApiResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.ApiResponse - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **int** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Category.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Category.md deleted file mode 100644 index 98d0b14be7b1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Category.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Category - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Order.md deleted file mode 100644 index bde5ffe51a2c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Order.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Order - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**petId** | **int** | | [optional] -**quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Pet.md deleted file mode 100644 index 3a8dd5b8996b..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Pet.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Pet - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **BuiltList** | | -**tags** | [**BuiltList**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md deleted file mode 100644 index d2db92a01c6c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md +++ /dev/null @@ -1,391 +0,0 @@ -# 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** -> Pet addPet(pet) - -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 pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - var result = api_instance.addPet(pet); - print(result); -} catch (e) { - print('Exception when calling PetApi->addPet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **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) - -# **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 | - **apiKey** | **String**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[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** -> BuiltList 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 = []; // BuiltList | 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** | [**BuiltList**](String.md)| Status values that need to be considered for filter | - -### Return type - -[**BuiltList**](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** -> BuiltList 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 = []; // BuiltList | 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** | [**BuiltList**](String.md)| Tags to filter by | - -### Return type - -[**BuiltList**](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 | - -### 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** -> Pet updatePet(pet) - -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 pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - var result = api_instance.updatePet(pet); - print(result); -} catch (e) { - print('Exception when calling PetApi->updatePet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **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) - -# **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 | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[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 | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **file** | **Uint8List**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md deleted file mode 100644 index 9d71beeb3b94..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md +++ /dev/null @@ -1,188 +0,0 @@ -# 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 | - -### 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** -> BuiltMap 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 - -**BuiltMap** - -### 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 | - -### 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(order) - -Place an order for a pet - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new StoreApi(); -var order = new Order(); // Order | order placed for purchasing the pet - -try { - var result = api_instance.placeOrder(order); - print(result); -} catch (e) { - print('Exception when calling StoreApi->placeOrder: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib/doc/Tag.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Tag.md deleted file mode 100644 index c219f987c19c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/Tag.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Tag - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/User.md deleted file mode 100644 index fa87e64d8595..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/User.md +++ /dev/null @@ -1,22 +0,0 @@ -# openapi.model.User - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **int** | 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/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md deleted file mode 100644 index 623eb15a7043..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md +++ /dev/null @@ -1,383 +0,0 @@ -# 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(user) - -Create user - -This can only be done by the logged in user. - -### 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 UserApi(); -var user = new User(); // User | Created user object - -try { - api_instance.createUser(user); -} catch (e) { - print('Exception when calling UserApi->createUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### 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(user) - -Creates list of users with given input array - - - -### 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 UserApi(); -var user = [new BuiltList()]; // BuiltList | List of user object - -try { - api_instance.createUsersWithArrayInput(user); -} catch (e) { - print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**BuiltList**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### 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(user) - -Creates list of users with given input array - - - -### 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 UserApi(); -var user = [new BuiltList()]; // BuiltList | List of user object - -try { - api_instance.createUsersWithListInput(user); -} catch (e) { - print('Exception when calling UserApi->createUsersWithListInput: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**BuiltList**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### 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(username) - -Delete user - -This can only be done by the logged in user. - -### 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 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 | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### 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 = new 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. | - -### 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 = new 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 | - **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() - -Logs out current logged in user session - - - -### 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 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 - -[api_key](../README.md#api_key) - -### 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, user) - -Updated user - -This can only be done by the logged in user. - -### 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 UserApi(); -var username = username_example; // String | name that need to be deleted -var user = new User(); // User | Updated user object - -try { - api_instance.updateUser(username, user); -} catch (e) { - print('Exception when calling UserApi->updateUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### 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/dart-dio/petstore_client_lib/lib/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart deleted file mode 100644 index cf014e6029f2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -library openapi.api; - -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; -import 'package:openapi/serializers.dart'; -import 'package:openapi/auth/api_key_auth.dart'; -import 'package:openapi/auth/basic_auth.dart'; -import 'package:openapi/auth/oauth.dart'; -import 'package:openapi/api/pet_api.dart'; -import 'package:openapi/api/store_api.dart'; -import 'package:openapi/api/user_api.dart'; - - -final _defaultInterceptors = [ - OAuthInterceptor(), - BasicAuthInterceptor(), - ApiKeyAuthInterceptor(), -]; - -class Openapi { - - static const String basePath = r'http://petstore.swagger.io/v2'; - - final Dio dio; - - final Serializers serializers; - - Openapi({ - Dio dio, - Serializers serializers, - String basePathOverride, - List interceptors, - }) : this.serializers = serializers ?? standardSerializers, - this.dio = dio ?? - Dio(BaseOptions( - baseUrl: basePathOverride ?? basePath, - connectTimeout: 5000, - receiveTimeout: 3000, - )) { - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - } - - void setOAuthToken(String name, String token) { - (this.dio.interceptors.firstWhere((element) => element is OAuthInterceptor, orElse: null) as OAuthInterceptor)?.tokens[name] = token; - } - - void setBasicAuth(String name, String username, String password) { - (this.dio.interceptors.firstWhere((element) => element is BasicAuthInterceptor, orElse: null) as BasicAuthInterceptor)?.authInfo[name] = BasicAuthInfo(username, password); - } - - void setApiKey(String name, String apiKey) { - (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor, orElse: null) as ApiKeyAuthInterceptor)?.apiKeys[name] = apiKey; - } - - - /** - * 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/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart deleted file mode 100644 index 70fc2b2dbe66..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ /dev/null @@ -1,506 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'dart:typed_data'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/api_util.dart'; -import 'package:openapi/model/api_response.dart'; -import 'package:openapi/model/pet.dart'; - -class PetApi { - - final Dio _dio; - - final Serializers _serializers; - - const PetApi(this._dio, this._serializers); - - /// Add a new pet to the store - /// - /// - Future> addPet( - Pet pet, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Pet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Pet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Deletes a pet - /// - /// - Future> deletePet( - int petId, { - String apiKey, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'DELETE', - headers: { - if (apiKey != null) r'api_key': apiKey, - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Finds Pets by status - /// - /// Multiple status values can be provided with comma separated strings - Future>> findPetsByStatus( - BuiltList status, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/findByStatus', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'status': status, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltList, [FullType(Pet)]); - final BuiltList _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltList; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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( - BuiltList tags, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/findByTags', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'tags': tags, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltList, [FullType(Pet)]); - final BuiltList _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltList; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Pet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Pet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update an existing pet - /// - /// - Future> updatePet( - Pet pet, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet', - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Pet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Pet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Updates a pet in the store with form data - /// - /// - Future> updatePetWithForm( - int petId, { - String name, - String status, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - if (name != null) r'name': encodeFormParameter(_serializers, name, const FullType(String)), - if (status != null) r'status': encodeFormParameter(_serializers, status, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// uploads an image - /// - /// - Future> uploadFile( - int petId, { - String additionalMetadata, - Uint8List file, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'multipart/form-data', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), - if (file != null) r'file': MultipartFile.fromBytes(file, filename: r'file'), - }); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ApiResponse); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ApiResponse; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart deleted file mode 100644 index 80b074645c82..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ /dev/null @@ -1,237 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/order.dart'; - -class StoreApi { - - final Dio _dio; - - final Serializers _serializers; - - const 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Returns pet inventories by status - /// - /// Returns a map of status codes to quantities - Future>> getInventory({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/inventory', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltMap, [FullType(String), FullType(int)]); - final BuiltMap _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltMap; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Order); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Order; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Place an order for a pet - /// - /// - Future> placeOrder( - Order order, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/order', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Order); - _bodyData = _serializers.serialize(order, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Order); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Order; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart deleted file mode 100644 index fef22be0b977..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ /dev/null @@ -1,428 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/user.dart'; - -class UserApi { - - final Dio _dio; - - final Serializers _serializers; - - const UserApi(this._dio, this._serializers); - - /// Create user - /// - /// This can only be done by the logged in user. - Future> createUser( - User user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Creates list of users with given input array - /// - /// - Future> createUsersWithArrayInput( - BuiltList user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/createWithArray', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(BuiltList, [FullType(User)]); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Creates list of users with given input array - /// - /// - Future> createUsersWithListInput( - BuiltList user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/createWithList', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(BuiltList, [FullType(User)]); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Delete user - /// - /// This can only be done by the logged in user. - Future> deleteUser( - String username, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Get user by user name - /// - /// - Future> getUserByName( - String username, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(User); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as User; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/login', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'username': username, - r'password': password, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - final String _responseData = _response.data as String; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/logout', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Updated user - /// - /// This can only be done by the logged in user. - Future> updateUser( - String username, - User user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()), - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart deleted file mode 100644 index a6ce78558cf0..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart +++ /dev/null @@ -1,31 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; - -/// Format the given form parameter object into something that Dio can handle. -/// Returns primitive or String. -/// Returns List/Map if the value is BuildList/BuiltMap. -dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { - if (value == null) { - return ''; - } - if (value is String || value is num || value is bool) { - return value; - } - final serialized = serializers.serialize(value, specifiedType: type); - if (serialized is String) { - return serialized; - } - if (value is BuiltList || value is BuiltMap) { - return serialized; - } - return json.encode(serialized); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart deleted file mode 100644 index 2aa45a85802c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,33 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:openapi/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - Map apiKeys = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'apiKey'); - for (final info in authInfo) { - final authName = info['name'] as String; - final authKeyName = info['keyName'] as String; - final authWhere = info['where'] as String; - final apiKey = apiKeys[authName]; - if (apiKey != null) { - if (authWhere == 'query') { - options.queryParameters[authKeyName] = apiKey; - } else { - options.headers[authKeyName] = apiKey; - } - } - } - return super.onRequest(options); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart deleted file mode 100644 index de1ee79ca206..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:dio/dio.dart'; - -abstract class AuthInterceptor extends Interceptor { - /// Get auth information on given route for the given type. - /// Can return an empty list if type is not present on auth data or - /// if route doesn't need authentication. - List> getAuthInfo(RequestOptions route, String type) { - if (route.extra.containsKey('secure')) { - final auth = route.extra['secure'] as List>; - final results = >[]; - for (final info in auth) { - if (info['type'] == type) { - results.add(info); - } - } - return results; - } - return []; - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart deleted file mode 100644 index 37a65cb34d3b..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'dart:convert'; -import 'package:openapi/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); -} - -class BasicAuthInterceptor extends AuthInterceptor { - Map authInfo = {}; - - @override - Future onRequest(RequestOptions options) { - final metadataAuthInfo = getAuthInfo(options, 'basic'); - for (final info in metadataAuthInfo) { - final authName = info['name'] as String; - final basicAuthInfo = authInfo[authName]; - if (basicAuthInfo != null) { - final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}')); - options.headers['Authorization'] = basicAuth; - break; - } - } - - return super.onRequest(options); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart deleted file mode 100644 index 1768dcb69113..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:openapi/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class OAuthInterceptor extends AuthInterceptor { - Map tokens = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'oauth'); - for (final info in authInfo) { - final token = tokens[info['name']]; - if (token != null) { - options.headers['Authorization'] = 'Bearer ${token}'; - break; - } - } - return super.onRequest(options); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart deleted file mode 100644 index d1b4f0f3800c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart +++ /dev/null @@ -1,97 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'code') - int get code; - - @nullable - @BuiltValueField(wireName: r'type') - String get type; - - @nullable - @BuiltValueField(wireName: r'message') - String get message; - - ApiResponse._(); - - static void _initializeBuilder(ApiResponseBuilder b) => b; - - factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ApiResponseSerializer(); -} - -class _$ApiResponseSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ApiResponse, _$ApiResponse]; - @override - final String wireName = r'ApiResponse'; - - @override - Iterable serialize(Serializers serializers, ApiResponse object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.code != null) { - result - ..add(r'code') - ..add(serializers.serialize(object.code, - specifiedType: const FullType(int))); - } - if (object.type != null) { - result - ..add(r'type') - ..add(serializers.serialize(object.type, - specifiedType: const FullType(String))); - } - if (object.message != null) { - result - ..add(r'message') - ..add(serializers.serialize(object.message, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ApiResponse deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ApiResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'code': - result.code = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'type': - result.type = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'message': - result.message = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart deleted file mode 100644 index ddf1cf619b5c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart +++ /dev/null @@ -1,83 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'name') - String get name; - - Category._(); - - static void _initializeBuilder(CategoryBuilder b) => b; - - factory Category([void updates(CategoryBuilder b)]) = _$Category; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CategorySerializer(); -} - -class _$CategorySerializer implements StructuredSerializer { - - @override - final Iterable types = const [Category, _$Category]; - @override - final String wireName = r'Category'; - - @override - Iterable serialize(Serializers serializers, Category object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Category deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CategoryBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart deleted file mode 100644 index a599897e9377..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart +++ /dev/null @@ -1,162 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'petId') - int get petId; - - @nullable - @BuiltValueField(wireName: r'quantity') - int get quantity; - - @nullable - @BuiltValueField(wireName: r'shipDate') - DateTime get shipDate; - - /// Order Status - @nullable - @BuiltValueField(wireName: r'status') - OrderStatusEnum get status; - // enum statusEnum { placed, approved, delivered, }; - - @BuiltValueField(wireName: r'complete') - bool get complete; - - Order._(); - - static void _initializeBuilder(OrderBuilder b) => b - ..complete = false; - - factory Order([void updates(OrderBuilder b)]) = _$Order; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OrderSerializer(); -} - -class _$OrderSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Order, _$Order]; - @override - final String wireName = r'Order'; - - @override - Iterable serialize(Serializers serializers, Order object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.petId != null) { - result - ..add(r'petId') - ..add(serializers.serialize(object.petId, - specifiedType: const FullType(int))); - } - if (object.quantity != null) { - result - ..add(r'quantity') - ..add(serializers.serialize(object.quantity, - specifiedType: const FullType(int))); - } - if (object.shipDate != null) { - result - ..add(r'shipDate') - ..add(serializers.serialize(object.shipDate, - specifiedType: const FullType(DateTime))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(OrderStatusEnum))); - } - if (object.complete != null) { - result - ..add(r'complete') - ..add(serializers.serialize(object.complete, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - Order deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OrderBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'petId': - result.petId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'quantity': - result.quantity = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'shipDate': - result.shipDate = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(OrderStatusEnum)) as OrderStatusEnum; - break; - case r'complete': - result.complete = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - } - } - return result.build(); - } -} - -class OrderStatusEnum extends EnumClass { - - /// Order Status - @BuiltValueEnumConst(wireName: r'placed') - static const OrderStatusEnum placed = _$orderStatusEnum_placed; - /// Order Status - @BuiltValueEnumConst(wireName: r'approved') - static const OrderStatusEnum approved = _$orderStatusEnum_approved; - /// Order Status - @BuiltValueEnumConst(wireName: r'delivered') - static const OrderStatusEnum delivered = _$orderStatusEnum_delivered; - - static Serializer get serializer => _$orderStatusEnumSerializer; - - const OrderStatusEnum._(String name): super(name); - - static BuiltSet get values => _$orderStatusEnumValues; - static OrderStatusEnum valueOf(String name) => _$orderStatusEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart deleted file mode 100644 index e18fe54222c6..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/tag.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/category.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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'category') - Category get category; - - @BuiltValueField(wireName: r'name') - String get name; - - @BuiltValueField(wireName: r'photoUrls') - BuiltList get photoUrls; - - @nullable - @BuiltValueField(wireName: r'tags') - BuiltList get tags; - - /// pet status in the store - @nullable - @BuiltValueField(wireName: r'status') - PetStatusEnum get status; - // enum statusEnum { available, pending, sold, }; - - Pet._(); - - static void _initializeBuilder(PetBuilder b) => b; - - factory Pet([void updates(PetBuilder b)]) = _$Pet; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PetSerializer(); -} - -class _$PetSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Pet, _$Pet]; - @override - final String wireName = r'Pet'; - - @override - Iterable serialize(Serializers serializers, Pet object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.category != null) { - result - ..add(r'category') - ..add(serializers.serialize(object.category, - specifiedType: const FullType(Category))); - } - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'photoUrls') - ..add(serializers.serialize(object.photoUrls, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - if (object.tags != null) { - result - ..add(r'tags') - ..add(serializers.serialize(object.tags, - specifiedType: const FullType(BuiltList, [FullType(Tag)]))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(PetStatusEnum))); - } - return result; - } - - @override - Pet deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PetBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'category': - result.category.replace(serializers.deserialize(value, - specifiedType: const FullType(Category)) as Category); - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'photoUrls': - result.photoUrls.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'tags': - result.tags.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(Tag)])) as BuiltList); - break; - case r'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(PetStatusEnum)) as PetStatusEnum; - break; - } - } - return result.build(); - } -} - -class PetStatusEnum extends EnumClass { - - /// pet status in the store - @BuiltValueEnumConst(wireName: r'available') - static const PetStatusEnum available = _$petStatusEnum_available; - /// pet status in the store - @BuiltValueEnumConst(wireName: r'pending') - static const PetStatusEnum pending = _$petStatusEnum_pending; - /// pet status in the store - @BuiltValueEnumConst(wireName: r'sold') - static const PetStatusEnum sold = _$petStatusEnum_sold; - - static Serializer get serializer => _$petStatusEnumSerializer; - - const PetStatusEnum._(String name): super(name); - - static BuiltSet get values => _$petStatusEnumValues; - static PetStatusEnum valueOf(String name) => _$petStatusEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart deleted file mode 100644 index d612fdd0024e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart +++ /dev/null @@ -1,83 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'name') - String get name; - - Tag._(); - - static void _initializeBuilder(TagBuilder b) => b; - - factory Tag([void updates(TagBuilder b)]) = _$Tag; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TagSerializer(); -} - -class _$TagSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Tag, _$Tag]; - @override - final String wireName = r'Tag'; - - @override - Iterable serialize(Serializers serializers, Tag object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Tag deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = TagBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart deleted file mode 100644 index a13b71072c21..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'username') - String get username; - - @nullable - @BuiltValueField(wireName: r'firstName') - String get firstName; - - @nullable - @BuiltValueField(wireName: r'lastName') - String get lastName; - - @nullable - @BuiltValueField(wireName: r'email') - String get email; - - @nullable - @BuiltValueField(wireName: r'password') - String get password; - - @nullable - @BuiltValueField(wireName: r'phone') - String get phone; - - /// User Status - @nullable - @BuiltValueField(wireName: r'userStatus') - int get userStatus; - - User._(); - - static void _initializeBuilder(UserBuilder b) => b; - - factory User([void updates(UserBuilder b)]) = _$User; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$UserSerializer(); -} - -class _$UserSerializer implements StructuredSerializer { - - @override - final Iterable types = const [User, _$User]; - @override - final String wireName = r'User'; - - @override - Iterable serialize(Serializers serializers, User object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.username != null) { - result - ..add(r'username') - ..add(serializers.serialize(object.username, - specifiedType: const FullType(String))); - } - if (object.firstName != null) { - result - ..add(r'firstName') - ..add(serializers.serialize(object.firstName, - specifiedType: const FullType(String))); - } - if (object.lastName != null) { - result - ..add(r'lastName') - ..add(serializers.serialize(object.lastName, - specifiedType: const FullType(String))); - } - if (object.email != null) { - result - ..add(r'email') - ..add(serializers.serialize(object.email, - specifiedType: const FullType(String))); - } - if (object.password != null) { - result - ..add(r'password') - ..add(serializers.serialize(object.password, - specifiedType: const FullType(String))); - } - if (object.phone != null) { - result - ..add(r'phone') - ..add(serializers.serialize(object.phone, - specifiedType: const FullType(String))); - } - if (object.userStatus != null) { - result - ..add(r'userStatus') - ..add(serializers.serialize(object.userStatus, - specifiedType: const FullType(int))); - } - return result; - } - - @override - User deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = UserBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'username': - result.username = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'firstName': - result.firstName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'lastName': - result.lastName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'email': - result.email = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'password': - result.password = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'phone': - result.phone = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'userStatus': - result.userStatus = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart deleted file mode 100644 index 2a0ebdc9af6d..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart +++ /dev/null @@ -1,50 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -library serializers; - -import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:built_value/serializer.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.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, -]) -Serializers serializers = (_$serializers.toBuilder() - ..addBuilderFactory( - const FullType(BuiltList, [FullType(Pet)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(int)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(User)]), - () => ListBuilder(), - ) - ..add(Iso8601DateTimeSerializer())) - .build(); - -Serializers standardSerializers = - (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml deleted file mode 100644 index 190da84cc448..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - 4.0.0 - org.openapitools - DartDioPetstoreClientLibTests - pom - 1.0.0-SNAPSHOT - DartDio Petstore Client Lib - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - export-dartfmt - pre-install-test - - exec - - - export - - DART_FMT_PATH=/usr/local/bin/dartfmt - - - - - pub-get - pre-integration-test - - exec - - - pub - - get - - - - - pub-run-build-runner - pre-integration-test - - exec - - - pub - - run - build_runner - build - - - - - dartanalyzer - integration-test - - exec - - - dartanalyzer - - --fatal-infos - --options - analysis_options.yaml - . - - - - - pub-test - integration-test - - exec - - - pub - - run - test - - - - - - - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml deleted file mode 100644 index 34a1aa76180f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: openapi -version: 1.0.0 -description: OpenAPI API client -homepage: homepage - -environment: - sdk: '>=2.7.0 <3.0.0' - -dependencies: - dio: '^3.0.9' - built_value: '>=7.1.0 <8.0.0' - built_collection: '>=4.3.2 <5.0.0' - -dev_dependencies: - built_value_generator: '>=7.1.0 <8.0.0' - build_runner: any - test: '>=1.3.0 <1.16.0' diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/api_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/api_response_test.dart deleted file mode 100644 index ae5d7fd6338d..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/api_response_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/api_response.dart'; -import 'package:test/test.dart'; - -// tests for ApiResponse -void main() { - final instance = ApiResponseBuilder(); - // TODO add properties to the builder and call build() - - group(ApiResponse, () { - // int code - test('to test the property `code`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // String message - test('to test the property `message`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/category_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/category_test.dart deleted file mode 100644 index ce6d4e00e28a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/category_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/category.dart'; -import 'package:test/test.dart'; - -// tests for Category -void main() { - final instance = CategoryBuilder(); - // TODO add properties to the builder and call build() - - group(Category, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/order_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/order_test.dart deleted file mode 100644 index 50510dbb3bb9..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/order_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/order.dart'; -import 'package:test/test.dart'; - -// tests for Order -void main() { - final instance = OrderBuilder(); - // TODO add properties to the builder and call build() - - group(Order, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // int petId - test('to test the property `petId`', () async { - // TODO - }); - - // int quantity - test('to test the property `quantity`', () async { - // TODO - }); - - // DateTime shipDate - test('to test the property `shipDate`', () async { - // TODO - }); - - // Order Status - // String status - test('to test the property `status`', () async { - // TODO - }); - - // bool complete (default value: false) - test('to test the property `complete`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/pet_api_test.dart deleted file mode 100644 index 45def8fd584a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/pet_api_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/pet_api.dart'; -import 'package:test/test.dart'; - - -/// tests for PetApi -void main() { - final instance = Openapi().getPetApi(); - - group(PetApi, () { - // Add a new pet to the store - // - //Future addPet(Pet pet) async - test('test addPet', () async { - // TODO - }); - - // Deletes a pet - // - //Future deletePet(int petId, { String apiKey }) async - test('test deletePet', () async { - // TODO - }); - - // Finds Pets by status - // - // Multiple status values can be provided with comma separated strings - // - //Future> findPetsByStatus(BuiltList status) async - test('test findPetsByStatus', () async { - // TODO - }); - - // Finds Pets by tags - // - // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - // - //Future> findPetsByTags(BuiltList tags) async - test('test findPetsByTags', () async { - // TODO - }); - - // Find pet by ID - // - // Returns a single pet - // - //Future getPetById(int petId) async - test('test getPetById', () async { - // TODO - }); - - // Update an existing pet - // - //Future updatePet(Pet pet) async - test('test updatePet', () async { - // TODO - }); - - // Updates a pet in the store with form data - // - //Future updatePetWithForm(int petId, { String name, String status }) async - test('test updatePetWithForm', () async { - // TODO - }); - - // uploads an image - // - //Future uploadFile(int petId, { String additionalMetadata, Uint8List file }) async - test('test uploadFile', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/pet_test.dart deleted file mode 100644 index 289614ec5a02..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/pet_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/pet.dart'; -import 'package:test/test.dart'; - -// tests for Pet -void main() { - final instance = PetBuilder(); - // TODO add properties to the builder and call build() - - group(Pet, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // Category category - test('to test the property `category`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - // BuiltList photoUrls - test('to test the property `photoUrls`', () async { - // TODO - }); - - // BuiltList tags - test('to test the property `tags`', () async { - // TODO - }); - - // pet status in the store - // String status - test('to test the property `status`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/store_api_test.dart deleted file mode 100644 index 334abec90077..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/store_api_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/store_api.dart'; -import 'package:test/test.dart'; - - -/// tests for StoreApi -void main() { - final instance = Openapi().getStoreApi(); - - group(StoreApi, () { - // 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 - test('test deleteOrder', () async { - // TODO - }); - - // Returns pet inventories by status - // - // Returns a map of status codes to quantities - // - //Future> getInventory() async - test('test getInventory', () async { - // TODO - }); - - // 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 - test('test getOrderById', () async { - // TODO - }); - - // Place an order for a pet - // - //Future placeOrder(Order order) async - test('test placeOrder', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/tag_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/tag_test.dart deleted file mode 100644 index 0c8f000ee345..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/tag_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/tag.dart'; -import 'package:test/test.dart'; - -// tests for Tag -void main() { - final instance = TagBuilder(); - // TODO add properties to the builder and call build() - - group(Tag, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/user_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/user_api_test.dart deleted file mode 100644 index 5364711ee036..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/user_api_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/user_api.dart'; -import 'package:test/test.dart'; - - -/// tests for UserApi -void main() { - final instance = Openapi().getUserApi(); - - group(UserApi, () { - // Create user - // - // This can only be done by the logged in user. - // - //Future createUser(User user) async - test('test createUser', () async { - // TODO - }); - - // Creates list of users with given input array - // - //Future createUsersWithArrayInput(BuiltList user) async - test('test createUsersWithArrayInput', () async { - // TODO - }); - - // Creates list of users with given input array - // - //Future createUsersWithListInput(BuiltList user) async - test('test createUsersWithListInput', () async { - // TODO - }); - - // Delete user - // - // This can only be done by the logged in user. - // - //Future deleteUser(String username) async - test('test deleteUser', () async { - // TODO - }); - - // Get user by user name - // - //Future getUserByName(String username) async - test('test getUserByName', () async { - // TODO - }); - - // Logs user into the system - // - //Future loginUser(String username, String password) async - test('test loginUser', () async { - // TODO - }); - - // Logs out current logged in user session - // - //Future logoutUser() async - test('test logoutUser', () async { - // TODO - }); - - // Updated user - // - // This can only be done by the logged in user. - // - //Future updateUser(String username, User user) async - test('test updateUser', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/user_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/user_test.dart deleted file mode 100644 index 2dc6cb1fcaaa..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/test/user_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/user.dart'; -import 'package:test/test.dart'; - -// tests for User -void main() { - final instance = UserBuilder(); - // TODO add properties to the builder and call build() - - group(User, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String username - test('to test the property `username`', () async { - // TODO - }); - - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - - // String lastName - test('to test the property `lastName`', () async { - // TODO - }); - - // String email - test('to test the property `email`', () async { - // TODO - }); - - // String password - test('to test the property `password`', () async { - // TODO - }); - - // String phone - test('to test the property `phone`', () async { - // TODO - }); - - // User Status - // int userStatus - test('to test the property `userStatus`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore deleted file mode 100644 index 4298cdcbd1a2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -# Files and directories created by pub -.dart_tool/ -.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 - -# Don’t commit files and directories created by other development environments. -# For example, if your development environment creates any of the following files, -# consider putting them in a global ignore file: - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES deleted file mode 100644 index 0bc4975ff753..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES +++ /dev/null @@ -1,117 +0,0 @@ -.gitignore -README.md -analysis_options.yaml -doc/AdditionalPropertiesClass.md -doc/Animal.md -doc/AnotherFakeApi.md -doc/ApiResponse.md -doc/ArrayOfArrayOfNumberOnly.md -doc/ArrayOfNumberOnly.md -doc/ArrayTest.md -doc/Capitalization.md -doc/Cat.md -doc/CatAllOf.md -doc/Category.md -doc/ClassModel.md -doc/DefaultApi.md -doc/DeprecatedObject.md -doc/Dog.md -doc/DogAllOf.md -doc/EnumArrays.md -doc/EnumTest.md -doc/FakeApi.md -doc/FakeClassnameTags123Api.md -doc/FileSchemaTestClass.md -doc/Foo.md -doc/FormatTest.md -doc/HasOnlyReadOnly.md -doc/HealthCheckResult.md -doc/InlineResponseDefault.md -doc/MapTest.md -doc/MixedPropertiesAndAdditionalPropertiesClass.md -doc/Model200Response.md -doc/ModelClient.md -doc/ModelEnumClass.md -doc/ModelFile.md -doc/ModelList.md -doc/ModelReturn.md -doc/Name.md -doc/NullableClass.md -doc/NumberOnly.md -doc/ObjectWithDeprecatedFields.md -doc/Order.md -doc/OuterComposite.md -doc/OuterEnum.md -doc/OuterEnumDefaultValue.md -doc/OuterEnumInteger.md -doc/OuterEnumIntegerDefaultValue.md -doc/OuterObjectWithEnumProperty.md -doc/Pet.md -doc/PetApi.md -doc/ReadOnlyFirst.md -doc/SpecialModelName.md -doc/StoreApi.md -doc/Tag.md -doc/User.md -doc/UserApi.md -lib/api.dart -lib/api/another_fake_api.dart -lib/api/default_api.dart -lib/api/fake_api.dart -lib/api/fake_classname_tags123_api.dart -lib/api/pet_api.dart -lib/api/store_api.dart -lib/api/user_api.dart -lib/api_util.dart -lib/auth/api_key_auth.dart -lib/auth/auth.dart -lib/auth/basic_auth.dart -lib/auth/oauth.dart -lib/model/additional_properties_class.dart -lib/model/animal.dart -lib/model/api_response.dart -lib/model/array_of_array_of_number_only.dart -lib/model/array_of_number_only.dart -lib/model/array_test.dart -lib/model/capitalization.dart -lib/model/cat.dart -lib/model/cat_all_of.dart -lib/model/category.dart -lib/model/class_model.dart -lib/model/deprecated_object.dart -lib/model/dog.dart -lib/model/dog_all_of.dart -lib/model/enum_arrays.dart -lib/model/enum_test.dart -lib/model/file_schema_test_class.dart -lib/model/foo.dart -lib/model/format_test.dart -lib/model/has_only_read_only.dart -lib/model/health_check_result.dart -lib/model/inline_response_default.dart -lib/model/map_test.dart -lib/model/mixed_properties_and_additional_properties_class.dart -lib/model/model200_response.dart -lib/model/model_client.dart -lib/model/model_enum_class.dart -lib/model/model_file.dart -lib/model/model_list.dart -lib/model/model_return.dart -lib/model/name.dart -lib/model/nullable_class.dart -lib/model/number_only.dart -lib/model/object_with_deprecated_fields.dart -lib/model/order.dart -lib/model/outer_composite.dart -lib/model/outer_enum.dart -lib/model/outer_enum_default_value.dart -lib/model/outer_enum_integer.dart -lib/model/outer_enum_integer_default_value.dart -lib/model/outer_object_with_enum_property.dart -lib/model/pet.dart -lib/model/read_only_first.dart -lib/model/special_model_name.dart -lib/model/tag.dart -lib/model/user.dart -lib/serializers.dart -pubspec.yaml diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md deleted file mode 100644 index e03bec1228af..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ /dev/null @@ -1,194 +0,0 @@ -# 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: \" \\ - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Build package: org.openapitools.codegen.languages.DartDioClientCodegen - -## Requirements - -Dart 2.7.0 or later OR Flutter 1.12 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'; - - -final api = AnotherFakeApi(); -final modelClient = ModelClient(); // ModelClient | client model - -try { - final response = await api.call123testSpecialTags(modelClient); - print(response); -} catch (e) { - print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**call123testSpecialTags**](doc/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*DefaultApi* | [**fooGet**](doc/DefaultApi.md#fooget) | **GET** /foo | -*FakeApi* | [**fakeHealthGet**](doc/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -*FakeApi* | [**fakeHttpSignatureTest**](doc/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -*FakeApi* | [**fakeOuterBooleanSerialize**](doc/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**fakeOuterCompositeSerialize**](doc/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**fakeOuterNumberSerialize**](doc/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**fakeOuterStringSerialize**](doc/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**fakePropertyEnumIntegerSerialize**](doc/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -*FakeApi* | [**testBodyWithBinary**](doc/FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | -*FakeApi* | [**testBodyWithFileSchema**](doc/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**testBodyWithQueryParams**](doc/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**testClientModel**](doc/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](doc/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEnumParameters**](doc/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**uploadFileWithRequiredFile**](doc/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) - - [Animal](doc/Animal.md) - - [ApiResponse](doc/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md) - - [ArrayTest](doc/ArrayTest.md) - - [Capitalization](doc/Capitalization.md) - - [Cat](doc/Cat.md) - - [CatAllOf](doc/CatAllOf.md) - - [Category](doc/Category.md) - - [ClassModel](doc/ClassModel.md) - - [DeprecatedObject](doc/DeprecatedObject.md) - - [Dog](doc/Dog.md) - - [DogAllOf](doc/DogAllOf.md) - - [EnumArrays](doc/EnumArrays.md) - - [EnumTest](doc/EnumTest.md) - - [FileSchemaTestClass](doc/FileSchemaTestClass.md) - - [Foo](doc/Foo.md) - - [FormatTest](doc/FormatTest.md) - - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md) - - [HealthCheckResult](doc/HealthCheckResult.md) - - [InlineResponseDefault](doc/InlineResponseDefault.md) - - [MapTest](doc/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](doc/Model200Response.md) - - [ModelClient](doc/ModelClient.md) - - [ModelEnumClass](doc/ModelEnumClass.md) - - [ModelFile](doc/ModelFile.md) - - [ModelList](doc/ModelList.md) - - [ModelReturn](doc/ModelReturn.md) - - [Name](doc/Name.md) - - [NullableClass](doc/NullableClass.md) - - [NumberOnly](doc/NumberOnly.md) - - [ObjectWithDeprecatedFields](doc/ObjectWithDeprecatedFields.md) - - [Order](doc/Order.md) - - [OuterComposite](doc/OuterComposite.md) - - [OuterEnum](doc/OuterEnum.md) - - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md) - - [OuterEnumInteger](doc/OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) - - [Pet](doc/Pet.md) - - [ReadOnlyFirst](doc/ReadOnlyFirst.md) - - [SpecialModelName](doc/SpecialModelName.md) - - [Tag](doc/Tag.md) - - [User](doc/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## bearer_test - -- **Type**: HTTP basic authentication - -## http_basic_test - -- **Type**: HTTP basic authentication - -## http_signature_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml deleted file mode 100644 index a611887d3acf..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml +++ /dev/null @@ -1,9 +0,0 @@ -analyzer: - language: - strict-inference: true - strict-raw-types: true - strong-mode: - implicit-dynamic: false - implicit-casts: false - exclude: - - test/*.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AdditionalPropertiesClass.md deleted file mode 100644 index 5443d024fd25..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AdditionalPropertiesClass.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.AdditionalPropertiesClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapProperty** | **BuiltMap** | | [optional] -**mapOfMapProperty** | [**BuiltMap>**](BuiltMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md deleted file mode 100644 index 415b56e9bc2e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Animal - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md deleted file mode 100644 index 100154d9b565..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ /dev/null @@ -1,57 +0,0 @@ -# openapi.api.AnotherFakeApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelClient) - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new AnotherFakeApi(); -var modelClient = new ModelClient(); // ModelClient | client model - -try { - var result = api_instance.call123testSpecialTags(modelClient); - print(result); -} catch (e) { - print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib_fake/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ApiResponse.md deleted file mode 100644 index 7ad5da0f89e4..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ApiResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.ApiResponse - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **int** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index 0a9d69c7e3cb..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ArrayOfArrayOfNumberOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [**BuiltList>**](BuiltList.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md deleted file mode 100644 index 6ffe36730c25..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ArrayOfNumberOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **BuiltList** | | [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/dart-dio/petstore_client_lib_fake/doc/ArrayTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayTest.md deleted file mode 100644 index fc38f8ae52d5..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayTest.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.ArrayTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **BuiltList** | | [optional] -**arrayArrayOfInteger** | [**BuiltList>**](BuiltList.md) | | [optional] -**arrayArrayOfModel** | [**BuiltList>**](BuiltList.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md deleted file mode 100644 index 4a07b4eb820d..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Capitalization - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md deleted file mode 100644 index 6552eea4b435..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.Cat - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] -**declawed** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md deleted file mode 100644 index 36b2ae0e8ab3..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.CatAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Category.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Category.md deleted file mode 100644 index ae6bc52e89d8..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Category.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Category - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **String** | | [default to 'default-name'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ClassModel.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ClassModel.md deleted file mode 100644 index 13ae5d3a4708..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ClassModel.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ClassModel - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**class_** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md deleted file mode 100644 index 29d7690fb6e1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md +++ /dev/null @@ -1,51 +0,0 @@ -# openapi.api.DefaultApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fooGet**](DefaultApi.md#fooget) | **GET** /foo | - - -# **fooGet** -> InlineResponseDefault fooGet() - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new DefaultApi(); - -try { - var result = api_instance.fooGet(); - print(result); -} catch (e) { - print('Exception when calling DefaultApi->fooGet: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponseDefault**](InlineResponseDefault.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/dart-dio/petstore_client_lib_fake/doc/DeprecatedObject.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DeprecatedObject.md deleted file mode 100644 index bf2ef67a26fc..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DeprecatedObject.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.DeprecatedObject - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md deleted file mode 100644 index d36439b767bb..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.Dog - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] -**breed** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md deleted file mode 100644 index 97a7c8fba492..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.DogAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumArrays.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumArrays.md deleted file mode 100644 index 9cc4d727b2a9..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumArrays.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.EnumArrays - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **BuiltList** | | [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/dart-dio/petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md deleted file mode 100644 index 7c24fe2347b4..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# openapi.model.EnumTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **int** | | [optional] -**enumNumber** | **double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md deleted file mode 100644 index e740e1d35cae..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ /dev/null @@ -1,820 +0,0 @@ -# openapi.api.FakeApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -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 -[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -[**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 | -[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -[**testBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | -[**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-parameters | - - -# **fakeHealthGet** -> HealthCheckResult fakeHealthGet() - -Health check endpoint - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); - -try { - var result = api_instance.fakeHealthGet(); - print(result); -} catch (e) { - print('Exception when calling FakeApi->fakeHealthGet: $e\n'); -} -``` - -### 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) - -# **fakeHttpSignatureTest** -> fakeHttpSignatureTest(pet, query1, header1) - -test http signature authentication - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure HTTP basic authorization: http_signature_test -//defaultApiClient.getAuthentication('http_signature_test').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('http_signature_test').password = 'YOUR_PASSWORD'; - -var api_instance = new FakeApi(); -var pet = new Pet(); // Pet | Pet object that needs to be added to the store -var query1 = query1_example; // String | query parameter -var header1 = header1_example; // String | header parameter - -try { - api_instance.fakeHttpSignatureTest(pet, query1, header1); -} catch (e) { - print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - **query1** | **String**| query parameter | [optional] - **header1** | **String**| header parameter | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_signature_test](../README.md#http_signature_test) - -### 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) - -# **fakeOuterBooleanSerialize** -> bool fakeOuterBooleanSerialize(body) - - - -Test serialization of outer boolean types - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var body = new bool(); // bool | Input boolean as post body - -try { - var result = api_instance.fakeOuterBooleanSerialize(body); - print(result); -} catch (e) { - print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outerComposite) - - - -Test serialization of object with outer number type - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body - -try { - var result = api_instance.fakeOuterCompositeSerialize(outerComposite); - print(result); -} catch (e) { - print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[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** -> num fakeOuterNumberSerialize(body) - - - -Test serialization of outer number types - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var body = new num(); // num | Input number as post body - -try { - var result = api_instance.fakeOuterNumberSerialize(body); - print(result); -} catch (e) { - print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **num**| Input number as post body | [optional] - -### Return type - -**num** - -### 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(body) - - - -Test serialization of outer string types - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var body = new String(); // String | Input string as post body - -try { - var result = api_instance.fakeOuterStringSerialize(body); - print(result); -} catch (e) { - print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: 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) - -# **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) - - - -Test serialization of enum (int) properties with examples - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body - -try { - var result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); - print(result); -} catch (e) { - print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | - -### Return type - -[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.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) - -# **testBodyWithBinary** -> testBodyWithBinary(body) - - - -For this test, the body has to be a binary file. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var body = new Uint8List(); // Uint8List | image to upload - -try { - api_instance.testBodyWithBinary(body); -} catch (e) { - print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Uint8List**| image to upload | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: image/png - - **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) - -# **testBodyWithFileSchema** -> testBodyWithFileSchema(fileSchemaTestClass) - - - -For this test, the body for this request must reference a schema named `File`. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | - -try { - api_instance.testBodyWithFileSchema(fileSchemaTestClass); -} catch (e) { - print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[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(query, user) - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var query = query_example; // String | -var user = new User(); // User | - -try { - api_instance.testBodyWithQueryParams(query, user); -} catch (e) { - print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **user** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -> ModelClient testClientModel(modelClient) - -To test \"client\" model - -To test \"client\" model - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var modelClient = new ModelClient(); // ModelClient | client model - -try { - var result = api_instance.testClientModel(modelClient); - print(result); -} catch (e) { - print('Exception when calling FakeApi->testClientModel: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[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(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure HTTP basic authorization: http_basic_test -//defaultApiClient.getAuthentication('http_basic_test').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('http_basic_test').password = 'YOUR_PASSWORD'; - -var api_instance = new FakeApi(); -var number = 8.14; // num | None -var double_ = 1.2; // double | None -var patternWithoutDelimiter = patternWithoutDelimiter_example; // String | None -var byte = BYTE_ARRAY_DATA_HERE; // String | None -var integer = 56; // int | None -var int32 = 56; // int | None -var int64 = 789; // int | None -var float = 3.4; // double | None -var string = string_example; // String | None -var binary = BINARY_DATA_HERE; // Uint8List | None -var date = 2013-10-20; // DateTime | None -var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None -var password = password_example; // String | None -var callback = callback_example; // String | None - -try { - api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); -} catch (e) { - print('Exception when calling FakeApi->testEndpointParameters: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **num**| None | - **double_** | **double**| None | - **patternWithoutDelimiter** | **String**| None | - **byte** | **String**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **int**| None | [optional] - **float** | **double**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **Uint8List**| None | [optional] - **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] - **password** | **String**| None | [optional] - **callback** | **String**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[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(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) - -To test enum parameters - -To test enum parameters - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var enumHeaderStringArray = []; // BuiltList | Header parameter enum test (string array) -var enumHeaderString = enumHeaderString_example; // String | Header parameter enum test (string) -var enumQueryStringArray = []; // BuiltList | Query parameter enum test (string array) -var enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) -var enumQueryInteger = 56; // int | Query parameter enum test (double) -var enumQueryDouble = 1.2; // double | Query parameter enum test (double) -var enumFormStringArray = []; // BuiltList | Form parameter enum test (string array) -var enumFormString = enumFormString_example; // String | Form parameter enum test (string) - -try { - api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (e) { - print('Exception when calling FakeApi->testEnumParameters: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**BuiltList**](String.md)| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg'] - **enumQueryStringArray** | [**BuiltList**](String.md)| Query parameter enum test (string array) | [optional] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**BuiltList**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[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(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure HTTP basic authorization: bearer_test -//defaultApiClient.getAuthentication('bearer_test').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearer_test').password = 'YOUR_PASSWORD'; - -var api_instance = new FakeApi(); -var requiredStringGroup = 56; // int | Required String in group parameters -var requiredBooleanGroup = true; // bool | Required Boolean in group parameters -var requiredInt64Group = 789; // int | Required Integer in group parameters -var stringGroup = 56; // int | String in group parameters -var booleanGroup = true; // bool | Boolean in group parameters -var int64Group = 789; // int | Integer in group parameters - -try { - api_instance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (e) { - print('Exception when calling FakeApi->testGroupParameters: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **int**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **int**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[bearer_test](../README.md#bearer_test) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[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(requestBody) - -test inline additionalProperties - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var requestBody = new BuiltMap(); // BuiltMap | request body - -try { - api_instance.testInlineAdditionalProperties(requestBody); -} catch (e) { - print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**BuiltMap**](String.md)| request body | - -### Return type - -void (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(param, param2) - -test json serialization of form data - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var param = param_example; // String | field1 -var param2 = param2_example; // String | field2 - -try { - api_instance.testJsonFormData(param, param2); -} catch (e) { - print('Exception when calling FakeApi->testJsonFormData: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[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(pipe, ioutil, http, url, context, allowEmpty, language) - - - -To test the collection format in query parameters - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new FakeApi(); -var pipe = []; // BuiltList | -var ioutil = []; // BuiltList | -var http = []; // BuiltList | -var url = []; // BuiltList | -var context = []; // BuiltList | -var allowEmpty = allowEmpty_example; // String | -var language = ; // BuiltMap | - -try { - api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); -} catch (e) { - print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**BuiltList**](String.md)| | - **ioutil** | [**BuiltList**](String.md)| | - **http** | [**BuiltList**](String.md)| | - **url** | [**BuiltList**](String.md)| | - **context** | [**BuiltList**](String.md)| | - **allowEmpty** | **String**| | - **language** | [**BuiltMap**](String.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md deleted file mode 100644 index fe60618817a0..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ /dev/null @@ -1,61 +0,0 @@ -# openapi.api.FakeClassnameTags123Api - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -> ModelClient testClassname(modelClient) - -To test class name in snake case - -To test class name in snake case - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure API key authorization: api_key_query -//defaultApiClient.getAuthentication('api_key_query').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; - -var api_instance = new FakeClassnameTags123Api(); -var modelClient = new ModelClient(); // ModelClient | client model - -try { - var result = api_instance.testClassname(modelClient); - print(result); -} catch (e) { - print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib_fake/doc/FileSchemaTestClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FileSchemaTestClass.md deleted file mode 100644 index 9b7eebcb2bf1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FileSchemaTestClass.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.FileSchemaTestClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**BuiltList**](ModelFile.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Foo.md deleted file mode 100644 index 185b76e3f5b4..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Foo.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.Foo - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [default to 'bar'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md deleted file mode 100644 index 7cac4e3b6be1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# openapi.model.FormatTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **int** | | [optional] -**int32** | **int** | | [optional] -**int64** | **int** | | [optional] -**number** | **num** | | -**float** | **double** | | [optional] -**double_** | **double** | | [optional] -**decimal** | **double** | | [optional] -**string** | **String** | | [optional] -**byte** | **String** | | -**binary** | [**Uint8List**](Uint8List.md) | | [optional] -**date** | [**DateTime**](DateTime.md) | | -**dateTime** | [**DateTime**](DateTime.md) | | [optional] -**uuid** | **String** | | [optional] -**password** | **String** | | -**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] - -[[Back to Model list]](../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/dart-dio/petstore_client_lib_fake/doc/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HasOnlyReadOnly.md deleted file mode 100644 index 32cae937155d..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HasOnlyReadOnly.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.HasOnlyReadOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **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/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md deleted file mode 100644 index 4d6aeb75d965..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.HealthCheckResult - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/InlineResponseDefault.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/InlineResponseDefault.md deleted file mode 100644 index c5e61e1162bf..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/InlineResponseDefault.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.InlineResponseDefault - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MapTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MapTest.md deleted file mode 100644 index 2da739ba8b83..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MapTest.md +++ /dev/null @@ -1,18 +0,0 @@ -# openapi.model.MapTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [**BuiltMap>**](BuiltMap.md) | | [optional] -**mapOfEnumString** | **BuiltMap** | | [optional] -**directMap** | **BuiltMap** | | [optional] -**indirectMap** | **BuiltMap** | | [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/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index f50d97687517..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.MixedPropertiesAndAdditionalPropertiesClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**dateTime** | [**DateTime**](DateTime.md) | | [optional] -**map** | [**BuiltMap**](Animal.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Model200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Model200Response.md deleted file mode 100644 index 5aa3fb97c32e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Model200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Model200Response - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | [optional] -**class_** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelClient.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelClient.md deleted file mode 100644 index f7b922f4a398..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelClient.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelClient - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/dart-dio/petstore_client_lib_fake/doc/ModelEnumClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelEnumClass.md deleted file mode 100644 index ebaafb44c7f7..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelEnumClass.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.ModelEnumClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## 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/dart-dio/petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md deleted file mode 100644 index 4be260e93f6e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelFile - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelList.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelList.md deleted file mode 100644 index 283aa1f6b711..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelList.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelList - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**n123list** | **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/dart-dio/petstore_client_lib_fake/doc/ModelReturn.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelReturn.md deleted file mode 100644 index bc02df7a3692..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelReturn.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelReturn - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return_** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Name.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Name.md deleted file mode 100644 index 25f49ea946b4..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Name.md +++ /dev/null @@ -1,18 +0,0 @@ -# openapi.model.Name - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | -**snakeCase** | **int** | | [optional] -**property** | **String** | | [optional] -**n123number** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NullableClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NullableClass.md deleted file mode 100644 index a9694f846c55..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NullableClass.md +++ /dev/null @@ -1,26 +0,0 @@ -# openapi.model.NullableClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integerProp** | **int** | | [optional] -**numberProp** | **num** | | [optional] -**booleanProp** | **bool** | | [optional] -**stringProp** | **String** | | [optional] -**dateProp** | [**DateTime**](DateTime.md) | | [optional] -**datetimeProp** | [**DateTime**](DateTime.md) | | [optional] -**arrayNullableProp** | [**BuiltList**](JsonObject.md) | | [optional] -**arrayAndItemsNullableProp** | [**BuiltList**](JsonObject.md) | | [optional] -**arrayItemsNullable** | [**BuiltList**](JsonObject.md) | | [optional] -**objectNullableProp** | [**BuiltMap**](JsonObject.md) | | [optional] -**objectAndItemsNullableProp** | [**BuiltMap**](JsonObject.md) | | [optional] -**objectItemsNullable** | [**BuiltMap**](JsonObject.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md deleted file mode 100644 index d8096a3db37a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.NumberOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **num** | | [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/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md deleted file mode 100644 index 9cb5e0083eb7..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md +++ /dev/null @@ -1,18 +0,0 @@ -# openapi.model.ObjectWithDeprecatedFields - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**id** | **num** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] -**bars** | **BuiltList** | | [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/dart-dio/petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md deleted file mode 100644 index bde5ffe51a2c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Order - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**petId** | **int** | | [optional] -**quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterComposite.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterComposite.md deleted file mode 100644 index 04bab7eff5d1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterComposite.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.OuterComposite - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **num** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnum.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnum.md deleted file mode 100644 index af62ad87ab2e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnum.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnum - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## 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/dart-dio/petstore_client_lib_fake/doc/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnumDefaultValue.md deleted file mode 100644 index c1bf8b0dec44..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnumDefaultValue.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnumDefaultValue - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## 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/dart-dio/petstore_client_lib_fake/doc/OuterEnumInteger.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnumInteger.md deleted file mode 100644 index 8c80a9e5c85f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnumInteger.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnumInteger - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## 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/dart-dio/petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md deleted file mode 100644 index eb8b55d70249..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnumIntegerDefaultValue - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## 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/dart-dio/petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md deleted file mode 100644 index eab2ae8f66b4..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.OuterObjectWithEnumProperty - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | | - -[[Back to Model list]](../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/dart-dio/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md deleted file mode 100644 index 3640640df190..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Pet - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **BuiltSet** | | -**tags** | [**BuiltList**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md deleted file mode 100644 index bf21aac358d1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md +++ /dev/null @@ -1,439 +0,0 @@ -# openapi.api.PetApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -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(pet) - -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 pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - api_instance.addPet(pet); -} catch (e) { - print('Exception when calling PetApi->addPet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP 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 | - **apiKey** | **String**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[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** -> BuiltList 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 = []; // BuiltList | 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** | [**BuiltList**](String.md)| Status values that need to be considered for filter | - -### Return type - -[**BuiltList**](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** -> BuiltSet 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 = []; // BuiltSet | 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** | [**BuiltSet**](String.md)| Tags to filter by | - -### Return type - -[**BuiltSet**](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 | - -### 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(pet) - -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 pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - api_instance.updatePet(pet); -} catch (e) { - print('Exception when calling PetApi->updatePet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP 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 | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[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 | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **file** | **Uint8List**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[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(petId, requiredFile, additionalMetadata) - -uploads an image (required) - - - -### 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 requiredFile = BINARY_DATA_HERE; // Uint8List | file to upload -var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server - -try { - var result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - print(result); -} catch (e) { - print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **requiredFile** | **Uint8List**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib_fake/doc/ReadOnlyFirst.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ReadOnlyFirst.md deleted file mode 100644 index 8f612e8ba19f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ReadOnlyFirst.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.ReadOnlyFirst - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**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/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md deleted file mode 100644 index 5fcfa98e0b36..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.SpecialModelName - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md deleted file mode 100644 index 2cc00ccba609..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md +++ /dev/null @@ -1,188 +0,0 @@ -# openapi.api.StoreApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -> deleteOrder(orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```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 | - -### 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** -> BuiltMap 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 - -**BuiltMap** - -### 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 | - -### 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(order) - -Place an order for a pet - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new StoreApi(); -var order = new Order(); // Order | order placed for purchasing the pet - -try { - var result = api_instance.placeOrder(order); - print(result); -} catch (e) { - print('Exception when calling StoreApi->placeOrder: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib_fake/doc/Tag.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Tag.md deleted file mode 100644 index c219f987c19c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Tag.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Tag - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md deleted file mode 100644 index fa87e64d8595..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md +++ /dev/null @@ -1,22 +0,0 @@ -# openapi.model.User - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **int** | 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/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md deleted file mode 100644 index f194f7c33242..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md +++ /dev/null @@ -1,359 +0,0 @@ -# openapi.api.UserApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -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(user) - -Create user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var user = new User(); // User | Created user object - -try { - api_instance.createUser(user); -} catch (e) { - print('Exception when calling UserApi->createUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[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(user) - -Creates list of users with given input array - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var user = [new BuiltList()]; // BuiltList | List of user object - -try { - api_instance.createUsersWithArrayInput(user); -} catch (e) { - print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**BuiltList**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[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(user) - -Creates list of users with given input array - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var user = [new BuiltList()]; // BuiltList | List of user object - -try { - api_instance.createUsersWithListInput(user); -} catch (e) { - print('Exception when calling UserApi->createUsersWithListInput: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**BuiltList**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[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 = new 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 | - -### 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 = new 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. | - -### 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 = new 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 | - **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() - -Logs out current logged in user session - - - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new 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, user) - -Updated user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var username = username_example; // String | name that need to be deleted -var user = new User(); // User | Updated user object - -try { - api_instance.updateUser(username, user); -} catch (e) { - print('Exception when calling UserApi->updateUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[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/dart-dio/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart deleted file mode 100644 index 77fdf955df40..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -library openapi.api; - -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; -import 'package:openapi/serializers.dart'; -import 'package:openapi/auth/api_key_auth.dart'; -import 'package:openapi/auth/basic_auth.dart'; -import 'package:openapi/auth/oauth.dart'; -import 'package:openapi/api/another_fake_api.dart'; -import 'package:openapi/api/default_api.dart'; -import 'package:openapi/api/fake_api.dart'; -import 'package:openapi/api/fake_classname_tags123_api.dart'; -import 'package:openapi/api/pet_api.dart'; -import 'package:openapi/api/store_api.dart'; -import 'package:openapi/api/user_api.dart'; - - -final _defaultInterceptors = [ - OAuthInterceptor(), - BasicAuthInterceptor(), - ApiKeyAuthInterceptor(), -]; - -class Openapi { - - static const String basePath = r'http://petstore.swagger.io:80/v2'; - - final Dio dio; - - final Serializers serializers; - - Openapi({ - Dio dio, - Serializers serializers, - String basePathOverride, - List interceptors, - }) : this.serializers = serializers ?? standardSerializers, - this.dio = dio ?? - Dio(BaseOptions( - baseUrl: basePathOverride ?? basePath, - connectTimeout: 5000, - receiveTimeout: 3000, - )) { - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - } - - void setOAuthToken(String name, String token) { - (this.dio.interceptors.firstWhere((element) => element is OAuthInterceptor, orElse: null) as OAuthInterceptor)?.tokens[name] = token; - } - - void setBasicAuth(String name, String username, String password) { - (this.dio.interceptors.firstWhere((element) => element is BasicAuthInterceptor, orElse: null) as BasicAuthInterceptor)?.authInfo[name] = BasicAuthInfo(username, password); - } - - void setApiKey(String name, String apiKey) { - (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor, orElse: null) as ApiKeyAuthInterceptor)?.apiKeys[name] = apiKey; - } - - - /** - * Get AnotherFakeApi instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - AnotherFakeApi getAnotherFakeApi() { - return AnotherFakeApi(dio, serializers); - } - - - /** - * Get DefaultApi instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - DefaultApi getDefaultApi() { - return DefaultApi(dio, serializers); - } - - - /** - * Get FakeApi instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - FakeApi getFakeApi() { - return FakeApi(dio, serializers); - } - - - /** - * Get FakeClassnameTags123Api instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - FakeClassnameTags123Api getFakeClassnameTags123Api() { - return FakeClassnameTags123Api(dio, serializers); - } - - - /** - * 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/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart deleted file mode 100644 index cabc80b7798b..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:openapi/model/model_client.dart'; - -class AnotherFakeApi { - - final Dio _dio; - - final Serializers _serializers; - - const AnotherFakeApi(this._dio, this._serializers); - - /// To test special tags - /// - /// To test special tags and operation ID starting with number - Future> call123testSpecialTags( - ModelClient modelClient, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/another-fake/dummy', - method: 'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ModelClient); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ModelClient; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart deleted file mode 100644 index 51dd7ea125ee..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart +++ /dev/null @@ -1,76 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:openapi/model/inline_response_default.dart'; - -class DefaultApi { - - final Dio _dio; - - final Serializers _serializers; - - const DefaultApi(this._dio, this._serializers); - - /// - /// - /// - Future> fooGet({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/foo', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(InlineResponseDefault); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as InlineResponseDefault; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart deleted file mode 100644 index 6df5299a4779..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart +++ /dev/null @@ -1,941 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'dart:typed_data'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/api_util.dart'; -import 'package:openapi/model/file_schema_test_class.dart'; -import 'package:openapi/model/health_check_result.dart'; -import 'package:openapi/model/model_client.dart'; -import 'package:openapi/model/outer_composite.dart'; -import 'package:openapi/model/outer_object_with_enum_property.dart'; -import 'package:openapi/model/pet.dart'; -import 'package:openapi/model/user.dart'; - -class FakeApi { - - final Dio _dio; - - final Serializers _serializers; - - const FakeApi(this._dio, this._serializers); - - /// Health check endpoint - /// - /// - Future> fakeHealthGet({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/health', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(HealthCheckResult); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as HealthCheckResult; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// test http signature authentication - /// - /// - Future> fakeHttpSignatureTest( - Pet pet, { - String query1, - String header1, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/http-signature-test', - method: 'GET', - headers: { - if (header1 != null) r'header_1': header1, - ...?headers, - }, - queryParameters: { - if (query1 != null) r'query_1': query1, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'name': 'http_signature_test', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// - /// - /// Test serialization of outer boolean types - Future> fakeOuterBooleanSerialize({ - bool body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/outer/boolean', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = body; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - final bool _responseData = _response.data as bool; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// - /// - /// Test serialization of object with outer number type - Future> fakeOuterCompositeSerialize({ - OuterComposite outerComposite, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/outer/composite', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(OuterComposite); - _bodyData = _serializers.serialize(outerComposite, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OuterComposite); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OuterComposite; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// - /// - /// Test serialization of outer number types - Future> fakeOuterNumberSerialize({ - num body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/outer/number', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = body; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - final num _responseData = _response.data as num; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// - /// - /// Test serialization of outer string types - Future> fakeOuterStringSerialize({ - String body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/outer/string', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = body; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - final String _responseData = _response.data as String; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// - /// - /// Test serialization of enum (int) properties with examples - Future> fakePropertyEnumIntegerSerialize( - OuterObjectWithEnumProperty outerObjectWithEnumProperty, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/property/enum-int', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(OuterObjectWithEnumProperty); - _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OuterObjectWithEnumProperty); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OuterObjectWithEnumProperty; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// - /// - /// For this test, the body has to be a binary file. - Future> testBodyWithBinary( - Uint8List body, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/body-with-binary', - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'image/png', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = body; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// - /// - /// For this test, the body for this request must reference a schema named `File`. - Future> testBodyWithFileSchema( - FileSchemaTestClass fileSchemaTestClass, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/body-with-file-schema', - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(FileSchemaTestClass); - _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// - /// - /// - Future> testBodyWithQueryParams( - String query, - User user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/body-with-query-params', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'query': query, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// To test \"client\" model - /// - /// To test \"client\" model - Future> testClientModel( - ModelClient modelClient, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake', - method: 'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ModelClient); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ModelClient; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - Future> testEndpointParameters( - num number, - double double_, - String patternWithoutDelimiter, - String byte, { - int integer, - int int32, - int int64, - double float, - String string, - Uint8List binary, - DateTime date, - DateTime dateTime, - String password, - String callback, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'name': 'http_basic_test', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - if (integer != null) r'integer': encodeFormParameter(_serializers, integer, const FullType(int)), - if (int32 != null) r'int32': encodeFormParameter(_serializers, int32, const FullType(int)), - if (int64 != null) r'int64': encodeFormParameter(_serializers, int64, const FullType(int)), - r'number': encodeFormParameter(_serializers, number, const FullType(num)), - if (float != null) r'float': encodeFormParameter(_serializers, float, const FullType(double)), - r'double': encodeFormParameter(_serializers, double_, const FullType(double)), - if (string != null) r'string': encodeFormParameter(_serializers, string, const FullType(String)), - r'pattern_without_delimiter': encodeFormParameter(_serializers, patternWithoutDelimiter, const FullType(String)), - r'byte': encodeFormParameter(_serializers, byte, const FullType(String)), - if (binary != null) r'binary': MultipartFile.fromBytes(binary, filename: r'binary'), - if (date != null) r'date': encodeFormParameter(_serializers, date, const FullType(DateTime)), - if (dateTime != null) r'dateTime': encodeFormParameter(_serializers, dateTime, const FullType(DateTime)), - if (password != null) r'password': encodeFormParameter(_serializers, password, const FullType(String)), - if (callback != null) r'callback': encodeFormParameter(_serializers, callback, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// To test enum parameters - /// - /// To test enum parameters - Future> testEnumParameters({ - BuiltList enumHeaderStringArray, - String enumHeaderString, - BuiltList enumQueryStringArray, - String enumQueryString, - int enumQueryInteger, - double enumQueryDouble, - BuiltList enumFormStringArray, - String enumFormString, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake', - method: 'GET', - headers: { - if (enumHeaderStringArray != null) r'enum_header_string_array': enumHeaderStringArray, - if (enumHeaderString != null) r'enum_header_string': enumHeaderString, - ...?headers, - }, - queryParameters: { - if (enumQueryStringArray != null) r'enum_query_string_array': enumQueryStringArray, - if (enumQueryString != null) r'enum_query_string': enumQueryString, - if (enumQueryInteger != null) r'enum_query_integer': enumQueryInteger, - if (enumQueryDouble != null) r'enum_query_double': enumQueryDouble, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - if (enumFormStringArray != null) r'enum_form_string_array': encodeFormParameter(_serializers, enumFormStringArray, const FullType(BuiltList, [FullType(String)])), - if (enumFormString != null) r'enum_form_string': encodeFormParameter(_serializers, enumFormString, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Fake endpoint to test group parameters (optional) - /// - /// Fake endpoint to test group parameters (optional) - Future> testGroupParameters( - int requiredStringGroup, - bool requiredBooleanGroup, - int requiredInt64Group, { - int stringGroup, - bool booleanGroup, - int int64Group, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake', - method: 'DELETE', - headers: { - r'required_boolean_group': requiredBooleanGroup, - if (booleanGroup != null) r'boolean_group': booleanGroup, - ...?headers, - }, - queryParameters: { - r'required_string_group': requiredStringGroup, - r'required_int64_group': requiredInt64Group, - if (stringGroup != null) r'string_group': stringGroup, - if (int64Group != null) r'int64_group': int64Group, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'name': 'bearer_test', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// test inline additionalProperties - /// - /// - Future> testInlineAdditionalProperties( - BuiltMap requestBody, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/inline-additionalProperties', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(BuiltMap, [FullType(String), FullType(String)]); - _bodyData = _serializers.serialize(requestBody, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// test json serialization of form data - /// - /// - Future> testJsonFormData( - String param, - String param2, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/jsonFormData', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - r'param': encodeFormParameter(_serializers, param, const FullType(String)), - r'param2': encodeFormParameter(_serializers, param2, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// - /// - /// To test the collection format in query parameters - Future> testQueryParameterCollectionFormat( - BuiltList pipe, - BuiltList ioutil, - BuiltList http, - BuiltList url, - BuiltList context, - String allowEmpty, { - BuiltMap language, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/test-query-parameters', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'pipe': pipe, - r'ioutil': ioutil, - r'http': http, - r'url': url, - r'context': context, - if (language != null) r'language': language, - r'allowEmpty': allowEmpty, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart deleted file mode 100644 index 54c40f0e3437..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ /dev/null @@ -1,87 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:openapi/model/model_client.dart'; - -class FakeClassnameTags123Api { - - final Dio _dio; - - final Serializers _serializers; - - const FakeClassnameTags123Api(this._dio, this._serializers); - - /// To test class name in snake case - /// - /// To test class name in snake case - Future> testClassname( - ModelClient modelClient, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake_classname_test', - method: 'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key_query', - 'keyName': 'api_key_query', - 'where': 'query', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ModelClient); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ModelClient; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart deleted file mode 100644 index 9cc7beeb57ed..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ /dev/null @@ -1,543 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'dart:typed_data'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/api_util.dart'; -import 'package:openapi/model/api_response.dart'; -import 'package:openapi/model/pet.dart'; - -class PetApi { - - final Dio _dio; - - final Serializers _serializers; - - const PetApi(this._dio, this._serializers); - - /// Add a new pet to the store - /// - /// - Future> addPet( - Pet pet, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Deletes a pet - /// - /// - Future> deletePet( - int petId, { - String apiKey, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'DELETE', - headers: { - if (apiKey != null) r'api_key': apiKey, - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Finds Pets by status - /// - /// Multiple status values can be provided with comma separated strings - Future>> findPetsByStatus( - BuiltList status, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/findByStatus', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'status': status, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltList, [FullType(Pet)]); - final BuiltList _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltList; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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( - BuiltSet tags, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/findByTags', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'tags': tags, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltSet, [FullType(Pet)]); - final BuiltSet _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltSet; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Pet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Pet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update an existing pet - /// - /// - Future> updatePet( - Pet pet, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet', - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Updates a pet in the store with form data - /// - /// - Future> updatePetWithForm( - int petId, { - String name, - String status, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - if (name != null) r'name': encodeFormParameter(_serializers, name, const FullType(String)), - if (status != null) r'status': encodeFormParameter(_serializers, status, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// uploads an image - /// - /// - Future> uploadFile( - int petId, { - String additionalMetadata, - Uint8List file, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'multipart/form-data', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), - if (file != null) r'file': MultipartFile.fromBytes(file, filename: r'file'), - }); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ApiResponse); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ApiResponse; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// uploads an image (required) - /// - /// - Future> uploadFileWithRequiredFile( - int petId, - Uint8List requiredFile, { - String additionalMetadata, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()), - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'multipart/form-data', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), - r'requiredFile': MultipartFile.fromBytes(requiredFile, filename: r'requiredFile'), - }); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ApiResponse); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ApiResponse; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart deleted file mode 100644 index 14fa8b601219..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ /dev/null @@ -1,237 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/order.dart'; - -class StoreApi { - - final Dio _dio; - - final Serializers _serializers; - - const 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Returns pet inventories by status - /// - /// Returns a map of status codes to quantities - Future>> getInventory({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/inventory', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltMap, [FullType(String), FullType(int)]); - final BuiltMap _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltMap; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Order); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Order; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Place an order for a pet - /// - /// - Future> placeOrder( - Order order, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/store/order', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(Order); - _bodyData = _serializers.serialize(order, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Order); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Order; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart deleted file mode 100644 index 86032dba94ae..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart +++ /dev/null @@ -1,386 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/user.dart'; - -class UserApi { - - final Dio _dio; - - final Serializers _serializers; - - const UserApi(this._dio, this._serializers); - - /// Create user - /// - /// This can only be done by the logged in user. - Future> createUser( - User user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Creates list of users with given input array - /// - /// - Future> createUsersWithArrayInput( - BuiltList user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/createWithArray', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(BuiltList, [FullType(User)]); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Creates list of users with given input array - /// - /// - Future> createUsersWithListInput( - BuiltList user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/createWithList', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(BuiltList, [FullType(User)]); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Delete user - /// - /// This can only be done by the logged in user. - Future> deleteUser( - String username, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Get user by user name - /// - /// - Future> getUserByName( - String username, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(User); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as User; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/login', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'username': username, - r'password': password, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - final String _responseData = _response.data as String; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - 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, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/logout', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Updated user - /// - /// This can only be done by the logged in user. - Future> updateUser( - String username, - User user, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()), - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart deleted file mode 100644 index a6ce78558cf0..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart +++ /dev/null @@ -1,31 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; - -/// Format the given form parameter object into something that Dio can handle. -/// Returns primitive or String. -/// Returns List/Map if the value is BuildList/BuiltMap. -dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { - if (value == null) { - return ''; - } - if (value is String || value is num || value is bool) { - return value; - } - final serialized = serializers.serialize(value, specifiedType: type); - if (serialized is String) { - return serialized; - } - if (value is BuiltList || value is BuiltMap) { - return serialized; - } - return json.encode(serialized); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart deleted file mode 100644 index 2aa45a85802c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,33 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:openapi/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - Map apiKeys = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'apiKey'); - for (final info in authInfo) { - final authName = info['name'] as String; - final authKeyName = info['keyName'] as String; - final authWhere = info['where'] as String; - final apiKey = apiKeys[authName]; - if (apiKey != null) { - if (authWhere == 'query') { - options.queryParameters[authKeyName] = apiKey; - } else { - options.headers[authKeyName] = apiKey; - } - } - } - return super.onRequest(options); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart deleted file mode 100644 index de1ee79ca206..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:dio/dio.dart'; - -abstract class AuthInterceptor extends Interceptor { - /// Get auth information on given route for the given type. - /// Can return an empty list if type is not present on auth data or - /// if route doesn't need authentication. - List> getAuthInfo(RequestOptions route, String type) { - if (route.extra.containsKey('secure')) { - final auth = route.extra['secure'] as List>; - final results = >[]; - for (final info in auth) { - if (info['type'] == type) { - results.add(info); - } - } - return results; - } - return []; - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart deleted file mode 100644 index 37a65cb34d3b..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'dart:convert'; -import 'package:openapi/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); -} - -class BasicAuthInterceptor extends AuthInterceptor { - Map authInfo = {}; - - @override - Future onRequest(RequestOptions options) { - final metadataAuthInfo = getAuthInfo(options, 'basic'); - for (final info in metadataAuthInfo) { - final authName = info['name'] as String; - final basicAuthInfo = authInfo[authName]; - if (basicAuthInfo != null) { - final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}')); - options.headers['Authorization'] = basicAuth; - break; - } - } - - return super.onRequest(options); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart deleted file mode 100644 index 1768dcb69113..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:openapi/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class OAuthInterceptor extends AuthInterceptor { - Map tokens = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'oauth'); - for (final info in authInfo) { - final token = tokens[info['name']]; - if (token != null) { - options.headers['Authorization'] = 'Bearer ${token}'; - break; - } - } - return super.onRequest(options); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart deleted file mode 100644 index c453e37f1715..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart +++ /dev/null @@ -1,84 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'additional_properties_class.g.dart'; - -abstract class AdditionalPropertiesClass implements Built { - - @nullable - @BuiltValueField(wireName: r'map_property') - BuiltMap get mapProperty; - - @nullable - @BuiltValueField(wireName: r'map_of_map_property') - BuiltMap> get mapOfMapProperty; - - AdditionalPropertiesClass._(); - - static void _initializeBuilder(AdditionalPropertiesClassBuilder b) => b; - - factory AdditionalPropertiesClass([void updates(AdditionalPropertiesClassBuilder b)]) = _$AdditionalPropertiesClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AdditionalPropertiesClassSerializer(); -} - -class _$AdditionalPropertiesClassSerializer implements StructuredSerializer { - - @override - final Iterable types = const [AdditionalPropertiesClass, _$AdditionalPropertiesClass]; - @override - final String wireName = r'AdditionalPropertiesClass'; - - @override - Iterable serialize(Serializers serializers, AdditionalPropertiesClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.mapProperty != null) { - result - ..add(r'map_property') - ..add(serializers.serialize(object.mapProperty, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]))); - } - if (object.mapOfMapProperty != null) { - result - ..add(r'map_of_map_property') - ..add(serializers.serialize(object.mapOfMapProperty, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]))); - } - return result; - } - - @override - AdditionalPropertiesClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = AdditionalPropertiesClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'map_property': - result.mapProperty.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)])) as BuiltMap); - break; - case r'map_of_map_property': - result.mapOfMapProperty.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])])) as BuiltMap>); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart deleted file mode 100644 index 430cb7337817..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'animal.g.dart'; - -abstract class Animal implements Built { - - @BuiltValueField(wireName: r'className') - String get className; - - @BuiltValueField(wireName: r'color') - String get color; - - Animal._(); - - static void _initializeBuilder(AnimalBuilder b) => b - ..color = 'red'; - - factory Animal([void updates(AnimalBuilder b)]) = _$Animal; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AnimalSerializer(); -} - -class _$AnimalSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Animal, _$Animal]; - @override - final String wireName = r'Animal'; - - @override - Iterable serialize(Serializers serializers, Animal object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'className') - ..add(serializers.serialize(object.className, - specifiedType: const FullType(String))); - if (object.color != null) { - result - ..add(r'color') - ..add(serializers.serialize(object.color, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Animal deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = AnimalBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'className': - result.className = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'color': - result.color = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart deleted file mode 100644 index d1b4f0f3800c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart +++ /dev/null @@ -1,97 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'code') - int get code; - - @nullable - @BuiltValueField(wireName: r'type') - String get type; - - @nullable - @BuiltValueField(wireName: r'message') - String get message; - - ApiResponse._(); - - static void _initializeBuilder(ApiResponseBuilder b) => b; - - factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ApiResponseSerializer(); -} - -class _$ApiResponseSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ApiResponse, _$ApiResponse]; - @override - final String wireName = r'ApiResponse'; - - @override - Iterable serialize(Serializers serializers, ApiResponse object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.code != null) { - result - ..add(r'code') - ..add(serializers.serialize(object.code, - specifiedType: const FullType(int))); - } - if (object.type != null) { - result - ..add(r'type') - ..add(serializers.serialize(object.type, - specifiedType: const FullType(String))); - } - if (object.message != null) { - result - ..add(r'message') - ..add(serializers.serialize(object.message, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ApiResponse deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ApiResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'code': - result.code = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'type': - result.type = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'message': - result.message = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart deleted file mode 100644 index f0556a89a943..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'array_of_array_of_number_only.g.dart'; - -abstract class ArrayOfArrayOfNumberOnly implements Built { - - @nullable - @BuiltValueField(wireName: r'ArrayArrayNumber') - BuiltList> get arrayArrayNumber; - - ArrayOfArrayOfNumberOnly._(); - - static void _initializeBuilder(ArrayOfArrayOfNumberOnlyBuilder b) => b; - - factory ArrayOfArrayOfNumberOnly([void updates(ArrayOfArrayOfNumberOnlyBuilder b)]) = _$ArrayOfArrayOfNumberOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ArrayOfArrayOfNumberOnlySerializer(); -} - -class _$ArrayOfArrayOfNumberOnlySerializer implements StructuredSerializer { - - @override - final Iterable types = const [ArrayOfArrayOfNumberOnly, _$ArrayOfArrayOfNumberOnly]; - @override - final String wireName = r'ArrayOfArrayOfNumberOnly'; - - @override - Iterable serialize(Serializers serializers, ArrayOfArrayOfNumberOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.arrayArrayNumber != null) { - result - ..add(r'ArrayArrayNumber') - ..add(serializers.serialize(object.arrayArrayNumber, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(num)])]))); - } - return result; - } - - @override - ArrayOfArrayOfNumberOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ArrayOfArrayOfNumberOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'ArrayArrayNumber': - result.arrayArrayNumber.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(num)])])) as BuiltList>); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart deleted file mode 100644 index c8d5e3bff199..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'array_of_number_only.g.dart'; - -abstract class ArrayOfNumberOnly implements Built { - - @nullable - @BuiltValueField(wireName: r'ArrayNumber') - BuiltList get arrayNumber; - - ArrayOfNumberOnly._(); - - static void _initializeBuilder(ArrayOfNumberOnlyBuilder b) => b; - - factory ArrayOfNumberOnly([void updates(ArrayOfNumberOnlyBuilder b)]) = _$ArrayOfNumberOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ArrayOfNumberOnlySerializer(); -} - -class _$ArrayOfNumberOnlySerializer implements StructuredSerializer { - - @override - final Iterable types = const [ArrayOfNumberOnly, _$ArrayOfNumberOnly]; - @override - final String wireName = r'ArrayOfNumberOnly'; - - @override - Iterable serialize(Serializers serializers, ArrayOfNumberOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.arrayNumber != null) { - result - ..add(r'ArrayNumber') - ..add(serializers.serialize(object.arrayNumber, - specifiedType: const FullType(BuiltList, [FullType(num)]))); - } - return result; - } - - @override - ArrayOfNumberOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ArrayOfNumberOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'ArrayNumber': - result.arrayNumber.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(num)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart deleted file mode 100644 index 1864d716857f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/read_only_first.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'array_test.g.dart'; - -abstract class ArrayTest implements Built { - - @nullable - @BuiltValueField(wireName: r'array_of_string') - BuiltList get arrayOfString; - - @nullable - @BuiltValueField(wireName: r'array_array_of_integer') - BuiltList> get arrayArrayOfInteger; - - @nullable - @BuiltValueField(wireName: r'array_array_of_model') - BuiltList> get arrayArrayOfModel; - - ArrayTest._(); - - static void _initializeBuilder(ArrayTestBuilder b) => b; - - factory ArrayTest([void updates(ArrayTestBuilder b)]) = _$ArrayTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ArrayTestSerializer(); -} - -class _$ArrayTestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ArrayTest, _$ArrayTest]; - @override - final String wireName = r'ArrayTest'; - - @override - Iterable serialize(Serializers serializers, ArrayTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.arrayOfString != null) { - result - ..add(r'array_of_string') - ..add(serializers.serialize(object.arrayOfString, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.arrayArrayOfInteger != null) { - result - ..add(r'array_array_of_integer') - ..add(serializers.serialize(object.arrayArrayOfInteger, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(int)])]))); - } - if (object.arrayArrayOfModel != null) { - result - ..add(r'array_array_of_model') - ..add(serializers.serialize(object.arrayArrayOfModel, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])]))); - } - return result; - } - - @override - ArrayTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ArrayTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'array_of_string': - result.arrayOfString.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'array_array_of_integer': - result.arrayArrayOfInteger.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(int)])])) as BuiltList>); - break; - case r'array_array_of_model': - result.arrayArrayOfModel.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])])) as BuiltList>); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart deleted file mode 100644 index 2246c3680d39..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'capitalization.g.dart'; - -abstract class Capitalization implements Built { - - @nullable - @BuiltValueField(wireName: r'smallCamel') - String get smallCamel; - - @nullable - @BuiltValueField(wireName: r'CapitalCamel') - String get capitalCamel; - - @nullable - @BuiltValueField(wireName: r'small_Snake') - String get smallSnake; - - @nullable - @BuiltValueField(wireName: r'Capital_Snake') - String get capitalSnake; - - @nullable - @BuiltValueField(wireName: r'SCA_ETH_Flow_Points') - String get sCAETHFlowPoints; - - /// Name of the pet - @nullable - @BuiltValueField(wireName: r'ATT_NAME') - String get ATT_NAME; - - Capitalization._(); - - static void _initializeBuilder(CapitalizationBuilder b) => b; - - factory Capitalization([void updates(CapitalizationBuilder b)]) = _$Capitalization; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CapitalizationSerializer(); -} - -class _$CapitalizationSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Capitalization, _$Capitalization]; - @override - final String wireName = r'Capitalization'; - - @override - Iterable serialize(Serializers serializers, Capitalization object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.smallCamel != null) { - result - ..add(r'smallCamel') - ..add(serializers.serialize(object.smallCamel, - specifiedType: const FullType(String))); - } - if (object.capitalCamel != null) { - result - ..add(r'CapitalCamel') - ..add(serializers.serialize(object.capitalCamel, - specifiedType: const FullType(String))); - } - if (object.smallSnake != null) { - result - ..add(r'small_Snake') - ..add(serializers.serialize(object.smallSnake, - specifiedType: const FullType(String))); - } - if (object.capitalSnake != null) { - result - ..add(r'Capital_Snake') - ..add(serializers.serialize(object.capitalSnake, - specifiedType: const FullType(String))); - } - if (object.sCAETHFlowPoints != null) { - result - ..add(r'SCA_ETH_Flow_Points') - ..add(serializers.serialize(object.sCAETHFlowPoints, - specifiedType: const FullType(String))); - } - if (object.ATT_NAME != null) { - result - ..add(r'ATT_NAME') - ..add(serializers.serialize(object.ATT_NAME, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Capitalization deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CapitalizationBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'smallCamel': - result.smallCamel = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'CapitalCamel': - result.capitalCamel = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'small_Snake': - result.smallSnake = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Capital_Snake': - result.capitalSnake = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'SCA_ETH_Flow_Points': - result.sCAETHFlowPoints = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'ATT_NAME': - result.ATT_NAME = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart deleted file mode 100644 index b2a9054c96ad..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/animal.dart'; -import 'package:openapi/model/cat_all_of.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'cat.g.dart'; - -abstract class Cat implements Built { - - @BuiltValueField(wireName: r'className') - String get className; - - @BuiltValueField(wireName: r'color') - String get color; - - @nullable - @BuiltValueField(wireName: r'declawed') - bool get declawed; - - Cat._(); - - static void _initializeBuilder(CatBuilder b) => b - ..color = 'red'; - - factory Cat([void updates(CatBuilder b)]) = _$Cat; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CatSerializer(); -} - -class _$CatSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Cat, _$Cat]; - @override - final String wireName = r'Cat'; - - @override - Iterable serialize(Serializers serializers, Cat object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'className') - ..add(serializers.serialize(object.className, - specifiedType: const FullType(String))); - if (object.color != null) { - result - ..add(r'color') - ..add(serializers.serialize(object.color, - specifiedType: const FullType(String))); - } - if (object.declawed != null) { - result - ..add(r'declawed') - ..add(serializers.serialize(object.declawed, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - Cat deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CatBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'className': - result.className = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'color': - result.color = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'declawed': - result.declawed = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart deleted file mode 100644 index e598798902e8..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'cat_all_of.g.dart'; - -abstract class CatAllOf implements Built { - - @nullable - @BuiltValueField(wireName: r'declawed') - bool get declawed; - - CatAllOf._(); - - static void _initializeBuilder(CatAllOfBuilder b) => b; - - factory CatAllOf([void updates(CatAllOfBuilder b)]) = _$CatAllOf; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CatAllOfSerializer(); -} - -class _$CatAllOfSerializer implements StructuredSerializer { - - @override - final Iterable types = const [CatAllOf, _$CatAllOf]; - @override - final String wireName = r'CatAllOf'; - - @override - Iterable serialize(Serializers serializers, CatAllOf object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.declawed != null) { - result - ..add(r'declawed') - ..add(serializers.serialize(object.declawed, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - CatAllOf deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CatAllOfBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'declawed': - result.declawed = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart deleted file mode 100644 index dbdb7fcecd66..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart +++ /dev/null @@ -1,81 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'id') - int get id; - - @BuiltValueField(wireName: r'name') - String get name; - - Category._(); - - static void _initializeBuilder(CategoryBuilder b) => b - ..name = 'default-name'; - - factory Category([void updates(CategoryBuilder b)]) = _$Category; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CategorySerializer(); -} - -class _$CategorySerializer implements StructuredSerializer { - - @override - final Iterable types = const [Category, _$Category]; - @override - final String wireName = r'Category'; - - @override - Iterable serialize(Serializers serializers, Category object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - return result; - } - - @override - Category deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CategoryBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart deleted file mode 100644 index 8cafc4a45f73..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'class_model.g.dart'; - -abstract class ClassModel implements Built { - - @nullable - @BuiltValueField(wireName: r'_class') - String get class_; - - ClassModel._(); - - static void _initializeBuilder(ClassModelBuilder b) => b; - - factory ClassModel([void updates(ClassModelBuilder b)]) = _$ClassModel; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ClassModelSerializer(); -} - -class _$ClassModelSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ClassModel, _$ClassModel]; - @override - final String wireName = r'ClassModel'; - - @override - Iterable serialize(Serializers serializers, ClassModel object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.class_ != null) { - result - ..add(r'_class') - ..add(serializers.serialize(object.class_, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ClassModel deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ClassModelBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'_class': - result.class_ = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/deprecated_object.dart deleted file mode 100644 index d79f33362b16..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/deprecated_object.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'deprecated_object.g.dart'; - -abstract class DeprecatedObject implements Built { - - @nullable - @BuiltValueField(wireName: r'name') - String get name; - - DeprecatedObject._(); - - static void _initializeBuilder(DeprecatedObjectBuilder b) => b; - - factory DeprecatedObject([void updates(DeprecatedObjectBuilder b)]) = _$DeprecatedObject; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DeprecatedObjectSerializer(); -} - -class _$DeprecatedObjectSerializer implements StructuredSerializer { - - @override - final Iterable types = const [DeprecatedObject, _$DeprecatedObject]; - @override - final String wireName = r'DeprecatedObject'; - - @override - Iterable serialize(Serializers serializers, DeprecatedObject object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - return result; - } - - @override - DeprecatedObject deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = DeprecatedObjectBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart deleted file mode 100644 index d60aadcf4b6f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/animal.dart'; -import 'package:openapi/model/dog_all_of.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'dog.g.dart'; - -abstract class Dog implements Built { - - @BuiltValueField(wireName: r'className') - String get className; - - @BuiltValueField(wireName: r'color') - String get color; - - @nullable - @BuiltValueField(wireName: r'breed') - String get breed; - - Dog._(); - - static void _initializeBuilder(DogBuilder b) => b - ..color = 'red'; - - factory Dog([void updates(DogBuilder b)]) = _$Dog; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DogSerializer(); -} - -class _$DogSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Dog, _$Dog]; - @override - final String wireName = r'Dog'; - - @override - Iterable serialize(Serializers serializers, Dog object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'className') - ..add(serializers.serialize(object.className, - specifiedType: const FullType(String))); - if (object.color != null) { - result - ..add(r'color') - ..add(serializers.serialize(object.color, - specifiedType: const FullType(String))); - } - if (object.breed != null) { - result - ..add(r'breed') - ..add(serializers.serialize(object.breed, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Dog deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = DogBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'className': - result.className = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'color': - result.color = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'breed': - result.breed = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart deleted file mode 100644 index df916db1a16c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'dog_all_of.g.dart'; - -abstract class DogAllOf implements Built { - - @nullable - @BuiltValueField(wireName: r'breed') - String get breed; - - DogAllOf._(); - - static void _initializeBuilder(DogAllOfBuilder b) => b; - - factory DogAllOf([void updates(DogAllOfBuilder b)]) = _$DogAllOf; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DogAllOfSerializer(); -} - -class _$DogAllOfSerializer implements StructuredSerializer { - - @override - final Iterable types = const [DogAllOf, _$DogAllOf]; - @override - final String wireName = r'DogAllOf'; - - @override - Iterable serialize(Serializers serializers, DogAllOf object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.breed != null) { - result - ..add(r'breed') - ..add(serializers.serialize(object.breed, - specifiedType: const FullType(String))); - } - return result; - } - - @override - DogAllOf deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = DogAllOfBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'breed': - result.breed = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart deleted file mode 100644 index 3a5fb62af15b..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'enum_arrays.g.dart'; - -abstract class EnumArrays implements Built { - - @nullable - @BuiltValueField(wireName: r'just_symbol') - EnumArraysJustSymbolEnum get justSymbol; - // enum justSymbolEnum { >=, $, }; - - @nullable - @BuiltValueField(wireName: r'array_enum') - BuiltList get arrayEnum; - // enum arrayEnumEnum { fish, crab, }; - - EnumArrays._(); - - static void _initializeBuilder(EnumArraysBuilder b) => b; - - factory EnumArrays([void updates(EnumArraysBuilder b)]) = _$EnumArrays; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$EnumArraysSerializer(); -} - -class _$EnumArraysSerializer implements StructuredSerializer { - - @override - final Iterable types = const [EnumArrays, _$EnumArrays]; - @override - final String wireName = r'EnumArrays'; - - @override - Iterable serialize(Serializers serializers, EnumArrays object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.justSymbol != null) { - result - ..add(r'just_symbol') - ..add(serializers.serialize(object.justSymbol, - specifiedType: const FullType(EnumArraysJustSymbolEnum))); - } - if (object.arrayEnum != null) { - result - ..add(r'array_enum') - ..add(serializers.serialize(object.arrayEnum, - specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)]))); - } - return result; - } - - @override - EnumArrays deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = EnumArraysBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'just_symbol': - result.justSymbol = serializers.deserialize(value, - specifiedType: const FullType(EnumArraysJustSymbolEnum)) as EnumArraysJustSymbolEnum; - break; - case r'array_enum': - result.arrayEnum.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)])) as BuiltList); - break; - } - } - return result.build(); - } -} - -class EnumArraysJustSymbolEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'>=') - static const EnumArraysJustSymbolEnum greaterThanEqual = _$enumArraysJustSymbolEnum_greaterThanEqual; - @BuiltValueEnumConst(wireName: r'\$') - static const EnumArraysJustSymbolEnum dollar = _$enumArraysJustSymbolEnum_dollar; - - static Serializer get serializer => _$enumArraysJustSymbolEnumSerializer; - - const EnumArraysJustSymbolEnum._(String name): super(name); - - static BuiltSet get values => _$enumArraysJustSymbolEnumValues; - static EnumArraysJustSymbolEnum valueOf(String name) => _$enumArraysJustSymbolEnumValueOf(name); -} - -class EnumArraysArrayEnumEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'fish') - static const EnumArraysArrayEnumEnum fish = _$enumArraysArrayEnumEnum_fish; - @BuiltValueEnumConst(wireName: r'crab') - static const EnumArraysArrayEnumEnum crab = _$enumArraysArrayEnumEnum_crab; - - static Serializer get serializer => _$enumArraysArrayEnumEnumSerializer; - - const EnumArraysArrayEnumEnum._(String name): super(name); - - static BuiltSet get values => _$enumArraysArrayEnumEnumValues; - static EnumArraysArrayEnumEnum valueOf(String name) => _$enumArraysArrayEnumEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart deleted file mode 100644 index 4df59b2cc374..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart +++ /dev/null @@ -1,241 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_enum_integer_default_value.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/outer_enum_default_value.dart'; -import 'package:openapi/model/outer_enum.dart'; -import 'package:openapi/model/outer_enum_integer.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'enum_test.g.dart'; - -abstract class EnumTest implements Built { - - @nullable - @BuiltValueField(wireName: r'enum_string') - EnumTestEnumStringEnum get enumString; - // enum enumStringEnum { UPPER, lower, , }; - - @BuiltValueField(wireName: r'enum_string_required') - EnumTestEnumStringRequiredEnum get enumStringRequired; - // enum enumStringRequiredEnum { UPPER, lower, , }; - - @nullable - @BuiltValueField(wireName: r'enum_integer') - EnumTestEnumIntegerEnum get enumInteger; - // enum enumIntegerEnum { 1, -1, }; - - @nullable - @BuiltValueField(wireName: r'enum_number') - EnumTestEnumNumberEnum get enumNumber; - // enum enumNumberEnum { 1.1, -1.2, }; - - @nullable - @BuiltValueField(wireName: r'outerEnum') - OuterEnum get outerEnum; - // enum outerEnumEnum { placed, approved, delivered, }; - - @nullable - @BuiltValueField(wireName: r'outerEnumInteger') - OuterEnumInteger get outerEnumInteger; - // enum outerEnumIntegerEnum { 0, 1, 2, }; - - @nullable - @BuiltValueField(wireName: r'outerEnumDefaultValue') - OuterEnumDefaultValue get outerEnumDefaultValue; - // enum outerEnumDefaultValueEnum { placed, approved, delivered, }; - - @nullable - @BuiltValueField(wireName: r'outerEnumIntegerDefaultValue') - OuterEnumIntegerDefaultValue get outerEnumIntegerDefaultValue; - // enum outerEnumIntegerDefaultValueEnum { 0, 1, 2, }; - - EnumTest._(); - - static void _initializeBuilder(EnumTestBuilder b) => b; - - factory EnumTest([void updates(EnumTestBuilder b)]) = _$EnumTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$EnumTestSerializer(); -} - -class _$EnumTestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [EnumTest, _$EnumTest]; - @override - final String wireName = r'EnumTest'; - - @override - Iterable serialize(Serializers serializers, EnumTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.enumString != null) { - result - ..add(r'enum_string') - ..add(serializers.serialize(object.enumString, - specifiedType: const FullType(EnumTestEnumStringEnum))); - } - result - ..add(r'enum_string_required') - ..add(serializers.serialize(object.enumStringRequired, - specifiedType: const FullType(EnumTestEnumStringRequiredEnum))); - if (object.enumInteger != null) { - result - ..add(r'enum_integer') - ..add(serializers.serialize(object.enumInteger, - specifiedType: const FullType(EnumTestEnumIntegerEnum))); - } - if (object.enumNumber != null) { - result - ..add(r'enum_number') - ..add(serializers.serialize(object.enumNumber, - specifiedType: const FullType(EnumTestEnumNumberEnum))); - } - if (object.outerEnum != null) { - result - ..add(r'outerEnum') - ..add(serializers.serialize(object.outerEnum, - specifiedType: const FullType(OuterEnum))); - } - if (object.outerEnumInteger != null) { - result - ..add(r'outerEnumInteger') - ..add(serializers.serialize(object.outerEnumInteger, - specifiedType: const FullType(OuterEnumInteger))); - } - if (object.outerEnumDefaultValue != null) { - result - ..add(r'outerEnumDefaultValue') - ..add(serializers.serialize(object.outerEnumDefaultValue, - specifiedType: const FullType(OuterEnumDefaultValue))); - } - if (object.outerEnumIntegerDefaultValue != null) { - result - ..add(r'outerEnumIntegerDefaultValue') - ..add(serializers.serialize(object.outerEnumIntegerDefaultValue, - specifiedType: const FullType(OuterEnumIntegerDefaultValue))); - } - return result; - } - - @override - EnumTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = EnumTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'enum_string': - result.enumString = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumStringEnum)) as EnumTestEnumStringEnum; - break; - case r'enum_string_required': - result.enumStringRequired = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumStringRequiredEnum)) as EnumTestEnumStringRequiredEnum; - break; - case r'enum_integer': - result.enumInteger = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumIntegerEnum)) as EnumTestEnumIntegerEnum; - break; - case r'enum_number': - result.enumNumber = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumNumberEnum)) as EnumTestEnumNumberEnum; - break; - case r'outerEnum': - result.outerEnum = serializers.deserialize(value, - specifiedType: const FullType(OuterEnum)) as OuterEnum; - break; - case r'outerEnumInteger': - result.outerEnumInteger = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumInteger)) as OuterEnumInteger; - break; - case r'outerEnumDefaultValue': - result.outerEnumDefaultValue = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumDefaultValue)) as OuterEnumDefaultValue; - break; - case r'outerEnumIntegerDefaultValue': - result.outerEnumIntegerDefaultValue = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumIntegerDefaultValue)) as OuterEnumIntegerDefaultValue; - break; - } - } - return result.build(); - } -} - -class EnumTestEnumStringEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringEnum UPPER = _$enumTestEnumStringEnum_UPPER; - @BuiltValueEnumConst(wireName: r'lower') - static const EnumTestEnumStringEnum lower = _$enumTestEnumStringEnum_lower; - @BuiltValueEnumConst(wireName: r'') - static const EnumTestEnumStringEnum empty = _$enumTestEnumStringEnum_empty; - - static Serializer get serializer => _$enumTestEnumStringEnumSerializer; - - const EnumTestEnumStringEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumStringEnumValues; - static EnumTestEnumStringEnum valueOf(String name) => _$enumTestEnumStringEnumValueOf(name); -} - -class EnumTestEnumStringRequiredEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringRequiredEnum UPPER = _$enumTestEnumStringRequiredEnum_UPPER; - @BuiltValueEnumConst(wireName: r'lower') - static const EnumTestEnumStringRequiredEnum lower = _$enumTestEnumStringRequiredEnum_lower; - @BuiltValueEnumConst(wireName: r'') - static const EnumTestEnumStringRequiredEnum empty = _$enumTestEnumStringRequiredEnum_empty; - - static Serializer get serializer => _$enumTestEnumStringRequiredEnumSerializer; - - const EnumTestEnumStringRequiredEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumStringRequiredEnumValues; - static EnumTestEnumStringRequiredEnum valueOf(String name) => _$enumTestEnumStringRequiredEnumValueOf(name); -} - -class EnumTestEnumIntegerEnum extends EnumClass { - - @BuiltValueEnumConst(wireNumber: 1) - static const EnumTestEnumIntegerEnum number1 = _$enumTestEnumIntegerEnum_number1; - @BuiltValueEnumConst(wireNumber: -1) - static const EnumTestEnumIntegerEnum numberNegative1 = _$enumTestEnumIntegerEnum_numberNegative1; - - static Serializer get serializer => _$enumTestEnumIntegerEnumSerializer; - - const EnumTestEnumIntegerEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumIntegerEnumValues; - static EnumTestEnumIntegerEnum valueOf(String name) => _$enumTestEnumIntegerEnumValueOf(name); -} - -class EnumTestEnumNumberEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'1.1') - static const EnumTestEnumNumberEnum number1Period1 = _$enumTestEnumNumberEnum_number1Period1; - @BuiltValueEnumConst(wireName: r'-1.2') - static const EnumTestEnumNumberEnum numberNegative1Period2 = _$enumTestEnumNumberEnum_numberNegative1Period2; - - static Serializer get serializer => _$enumTestEnumNumberEnumSerializer; - - const EnumTestEnumNumberEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumNumberEnumValues; - static EnumTestEnumNumberEnum valueOf(String name) => _$enumTestEnumNumberEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart deleted file mode 100644 index 82e4640a8a51..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model_file.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'file_schema_test_class.g.dart'; - -abstract class FileSchemaTestClass implements Built { - - @nullable - @BuiltValueField(wireName: r'file') - ModelFile get file; - - @nullable - @BuiltValueField(wireName: r'files') - BuiltList get files; - - FileSchemaTestClass._(); - - static void _initializeBuilder(FileSchemaTestClassBuilder b) => b; - - factory FileSchemaTestClass([void updates(FileSchemaTestClassBuilder b)]) = _$FileSchemaTestClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FileSchemaTestClassSerializer(); -} - -class _$FileSchemaTestClassSerializer implements StructuredSerializer { - - @override - final Iterable types = const [FileSchemaTestClass, _$FileSchemaTestClass]; - @override - final String wireName = r'FileSchemaTestClass'; - - @override - Iterable serialize(Serializers serializers, FileSchemaTestClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.file != null) { - result - ..add(r'file') - ..add(serializers.serialize(object.file, - specifiedType: const FullType(ModelFile))); - } - if (object.files != null) { - result - ..add(r'files') - ..add(serializers.serialize(object.files, - specifiedType: const FullType(BuiltList, [FullType(ModelFile)]))); - } - return result; - } - - @override - FileSchemaTestClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FileSchemaTestClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'file': - result.file.replace(serializers.deserialize(value, - specifiedType: const FullType(ModelFile)) as ModelFile); - break; - case r'files': - result.files.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(ModelFile)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart deleted file mode 100644 index 94e50e4b7c35..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'foo.g.dart'; - -abstract class Foo implements Built { - - @BuiltValueField(wireName: r'bar') - String get bar; - - Foo._(); - - static void _initializeBuilder(FooBuilder b) => b - ..bar = 'bar'; - - factory Foo([void updates(FooBuilder b)]) = _$Foo; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FooSerializer(); -} - -class _$FooSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Foo, _$Foo]; - @override - final String wireName = r'Foo'; - - @override - Iterable serialize(Serializers serializers, Foo object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.bar != null) { - result - ..add(r'bar') - ..add(serializers.serialize(object.bar, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Foo deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FooBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'bar': - result.bar = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart deleted file mode 100644 index af7489ec1a23..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart +++ /dev/null @@ -1,270 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:typed_data'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'format_test.g.dart'; - -abstract class FormatTest implements Built { - - @nullable - @BuiltValueField(wireName: r'integer') - int get integer; - - @nullable - @BuiltValueField(wireName: r'int32') - int get int32; - - @nullable - @BuiltValueField(wireName: r'int64') - int get int64; - - @BuiltValueField(wireName: r'number') - num get number; - - @nullable - @BuiltValueField(wireName: r'float') - double get float; - - @nullable - @BuiltValueField(wireName: r'double') - double get double_; - - @nullable - @BuiltValueField(wireName: r'decimal') - double get decimal; - - @nullable - @BuiltValueField(wireName: r'string') - String get string; - - @BuiltValueField(wireName: r'byte') - String get byte; - - @nullable - @BuiltValueField(wireName: r'binary') - Uint8List get binary; - - @BuiltValueField(wireName: r'date') - DateTime get date; - - @nullable - @BuiltValueField(wireName: r'dateTime') - DateTime get dateTime; - - @nullable - @BuiltValueField(wireName: r'uuid') - String get uuid; - - @BuiltValueField(wireName: r'password') - String get password; - - /// A string that is a 10 digit number. Can have leading zeros. - @nullable - @BuiltValueField(wireName: r'pattern_with_digits') - String get patternWithDigits; - - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - @nullable - @BuiltValueField(wireName: r'pattern_with_digits_and_delimiter') - String get patternWithDigitsAndDelimiter; - - FormatTest._(); - - static void _initializeBuilder(FormatTestBuilder b) => b; - - factory FormatTest([void updates(FormatTestBuilder b)]) = _$FormatTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FormatTestSerializer(); -} - -class _$FormatTestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [FormatTest, _$FormatTest]; - @override - final String wireName = r'FormatTest'; - - @override - Iterable serialize(Serializers serializers, FormatTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.integer != null) { - result - ..add(r'integer') - ..add(serializers.serialize(object.integer, - specifiedType: const FullType(int))); - } - if (object.int32 != null) { - result - ..add(r'int32') - ..add(serializers.serialize(object.int32, - specifiedType: const FullType(int))); - } - if (object.int64 != null) { - result - ..add(r'int64') - ..add(serializers.serialize(object.int64, - specifiedType: const FullType(int))); - } - result - ..add(r'number') - ..add(serializers.serialize(object.number, - specifiedType: const FullType(num))); - if (object.float != null) { - result - ..add(r'float') - ..add(serializers.serialize(object.float, - specifiedType: const FullType(double))); - } - if (object.double_ != null) { - result - ..add(r'double') - ..add(serializers.serialize(object.double_, - specifiedType: const FullType(double))); - } - if (object.decimal != null) { - result - ..add(r'decimal') - ..add(serializers.serialize(object.decimal, - specifiedType: const FullType(double))); - } - if (object.string != null) { - result - ..add(r'string') - ..add(serializers.serialize(object.string, - specifiedType: const FullType(String))); - } - result - ..add(r'byte') - ..add(serializers.serialize(object.byte, - specifiedType: const FullType(String))); - if (object.binary != null) { - result - ..add(r'binary') - ..add(serializers.serialize(object.binary, - specifiedType: const FullType(Uint8List))); - } - result - ..add(r'date') - ..add(serializers.serialize(object.date, - specifiedType: const FullType(DateTime))); - if (object.dateTime != null) { - result - ..add(r'dateTime') - ..add(serializers.serialize(object.dateTime, - specifiedType: const FullType(DateTime))); - } - if (object.uuid != null) { - result - ..add(r'uuid') - ..add(serializers.serialize(object.uuid, - specifiedType: const FullType(String))); - } - result - ..add(r'password') - ..add(serializers.serialize(object.password, - specifiedType: const FullType(String))); - if (object.patternWithDigits != null) { - result - ..add(r'pattern_with_digits') - ..add(serializers.serialize(object.patternWithDigits, - specifiedType: const FullType(String))); - } - if (object.patternWithDigitsAndDelimiter != null) { - result - ..add(r'pattern_with_digits_and_delimiter') - ..add(serializers.serialize(object.patternWithDigitsAndDelimiter, - specifiedType: const FullType(String))); - } - return result; - } - - @override - FormatTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FormatTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'integer': - result.integer = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'int32': - result.int32 = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'int64': - result.int64 = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'number': - result.number = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - break; - case r'float': - result.float = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; - break; - case r'double': - result.double_ = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; - break; - case r'decimal': - result.decimal = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; - break; - case r'string': - result.string = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'byte': - result.byte = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'binary': - result.binary = serializers.deserialize(value, - specifiedType: const FullType(Uint8List)) as Uint8List; - break; - case r'date': - result.date = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'dateTime': - result.dateTime = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'uuid': - result.uuid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'password': - result.password = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'pattern_with_digits': - result.patternWithDigits = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'pattern_with_digits_and_delimiter': - result.patternWithDigitsAndDelimiter = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart deleted file mode 100644 index f4a3a891a4e2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart +++ /dev/null @@ -1,83 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'has_only_read_only.g.dart'; - -abstract class HasOnlyReadOnly implements Built { - - @nullable - @BuiltValueField(wireName: r'bar') - String get bar; - - @nullable - @BuiltValueField(wireName: r'foo') - String get foo; - - HasOnlyReadOnly._(); - - static void _initializeBuilder(HasOnlyReadOnlyBuilder b) => b; - - factory HasOnlyReadOnly([void updates(HasOnlyReadOnlyBuilder b)]) = _$HasOnlyReadOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$HasOnlyReadOnlySerializer(); -} - -class _$HasOnlyReadOnlySerializer implements StructuredSerializer { - - @override - final Iterable types = const [HasOnlyReadOnly, _$HasOnlyReadOnly]; - @override - final String wireName = r'HasOnlyReadOnly'; - - @override - Iterable serialize(Serializers serializers, HasOnlyReadOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.bar != null) { - result - ..add(r'bar') - ..add(serializers.serialize(object.bar, - specifiedType: const FullType(String))); - } - if (object.foo != null) { - result - ..add(r'foo') - ..add(serializers.serialize(object.foo, - specifiedType: const FullType(String))); - } - return result; - } - - @override - HasOnlyReadOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = HasOnlyReadOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'bar': - result.bar = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'foo': - result.foo = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart deleted file mode 100644 index a8cf19f4a8ec..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'health_check_result.g.dart'; - -abstract class HealthCheckResult implements Built { - - @nullable - @BuiltValueField(wireName: r'NullableMessage') - String get nullableMessage; - - HealthCheckResult._(); - - static void _initializeBuilder(HealthCheckResultBuilder b) => b; - - factory HealthCheckResult([void updates(HealthCheckResultBuilder b)]) = _$HealthCheckResult; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$HealthCheckResultSerializer(); -} - -class _$HealthCheckResultSerializer implements StructuredSerializer { - - @override - final Iterable types = const [HealthCheckResult, _$HealthCheckResult]; - @override - final String wireName = r'HealthCheckResult'; - - @override - Iterable serialize(Serializers serializers, HealthCheckResult object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.nullableMessage != null) { - result - ..add(r'NullableMessage') - ..add(serializers.serialize(object.nullableMessage, - specifiedType: const FullType(String))); - } - return result; - } - - @override - HealthCheckResult deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = HealthCheckResultBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'NullableMessage': - result.nullableMessage = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart deleted file mode 100644 index 87169882e4b7..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/foo.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'inline_response_default.g.dart'; - -abstract class InlineResponseDefault implements Built { - - @nullable - @BuiltValueField(wireName: r'string') - Foo get string; - - InlineResponseDefault._(); - - static void _initializeBuilder(InlineResponseDefaultBuilder b) => b; - - factory InlineResponseDefault([void updates(InlineResponseDefaultBuilder b)]) = _$InlineResponseDefault; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$InlineResponseDefaultSerializer(); -} - -class _$InlineResponseDefaultSerializer implements StructuredSerializer { - - @override - final Iterable types = const [InlineResponseDefault, _$InlineResponseDefault]; - @override - final String wireName = r'InlineResponseDefault'; - - @override - Iterable serialize(Serializers serializers, InlineResponseDefault object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.string != null) { - result - ..add(r'string') - ..add(serializers.serialize(object.string, - specifiedType: const FullType(Foo))); - } - return result; - } - - @override - InlineResponseDefault deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = InlineResponseDefaultBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'string': - result.string.replace(serializers.deserialize(value, - specifiedType: const FullType(Foo)) as Foo); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart deleted file mode 100644 index d29919e2f673..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'map_test.g.dart'; - -abstract class MapTest implements Built { - - @nullable - @BuiltValueField(wireName: r'map_map_of_string') - BuiltMap> get mapMapOfString; - - @nullable - @BuiltValueField(wireName: r'map_of_enum_string') - BuiltMap get mapOfEnumString; - // enum mapOfEnumStringEnum { UPPER, lower, }; - - @nullable - @BuiltValueField(wireName: r'direct_map') - BuiltMap get directMap; - - @nullable - @BuiltValueField(wireName: r'indirect_map') - BuiltMap get indirectMap; - - MapTest._(); - - static void _initializeBuilder(MapTestBuilder b) => b; - - factory MapTest([void updates(MapTestBuilder b)]) = _$MapTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$MapTestSerializer(); -} - -class _$MapTestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [MapTest, _$MapTest]; - @override - final String wireName = r'MapTest'; - - @override - Iterable serialize(Serializers serializers, MapTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.mapMapOfString != null) { - result - ..add(r'map_map_of_string') - ..add(serializers.serialize(object.mapMapOfString, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]))); - } - if (object.mapOfEnumString != null) { - result - ..add(r'map_of_enum_string') - ..add(serializers.serialize(object.mapOfEnumString, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)]))); - } - if (object.directMap != null) { - result - ..add(r'direct_map') - ..add(serializers.serialize(object.directMap, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]))); - } - if (object.indirectMap != null) { - result - ..add(r'indirect_map') - ..add(serializers.serialize(object.indirectMap, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]))); - } - return result; - } - - @override - MapTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = MapTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'map_map_of_string': - result.mapMapOfString.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])])) as BuiltMap>); - break; - case r'map_of_enum_string': - result.mapOfEnumString.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)])) as BuiltMap); - break; - case r'direct_map': - result.directMap.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)])) as BuiltMap); - break; - case r'indirect_map': - result.indirectMap.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)])) as BuiltMap); - break; - } - } - return result.build(); - } -} - -class MapTestMapOfEnumStringEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'UPPER') - static const MapTestMapOfEnumStringEnum UPPER = _$mapTestMapOfEnumStringEnum_UPPER; - @BuiltValueEnumConst(wireName: r'lower') - static const MapTestMapOfEnumStringEnum lower = _$mapTestMapOfEnumStringEnum_lower; - - static Serializer get serializer => _$mapTestMapOfEnumStringEnumSerializer; - - const MapTestMapOfEnumStringEnum._(String name): super(name); - - static BuiltSet get values => _$mapTestMapOfEnumStringEnumValues; - static MapTestMapOfEnumStringEnum valueOf(String name) => _$mapTestMapOfEnumStringEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart deleted file mode 100644 index d274efde27b2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/animal.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'mixed_properties_and_additional_properties_class.g.dart'; - -abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built { - - @nullable - @BuiltValueField(wireName: r'uuid') - String get uuid; - - @nullable - @BuiltValueField(wireName: r'dateTime') - DateTime get dateTime; - - @nullable - @BuiltValueField(wireName: r'map') - BuiltMap get map; - - MixedPropertiesAndAdditionalPropertiesClass._(); - - static void _initializeBuilder(MixedPropertiesAndAdditionalPropertiesClassBuilder b) => b; - - factory MixedPropertiesAndAdditionalPropertiesClass([void updates(MixedPropertiesAndAdditionalPropertiesClassBuilder b)]) = _$MixedPropertiesAndAdditionalPropertiesClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$MixedPropertiesAndAdditionalPropertiesClassSerializer(); -} - -class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements StructuredSerializer { - - @override - final Iterable types = const [MixedPropertiesAndAdditionalPropertiesClass, _$MixedPropertiesAndAdditionalPropertiesClass]; - @override - final String wireName = r'MixedPropertiesAndAdditionalPropertiesClass'; - - @override - Iterable serialize(Serializers serializers, MixedPropertiesAndAdditionalPropertiesClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.uuid != null) { - result - ..add(r'uuid') - ..add(serializers.serialize(object.uuid, - specifiedType: const FullType(String))); - } - if (object.dateTime != null) { - result - ..add(r'dateTime') - ..add(serializers.serialize(object.dateTime, - specifiedType: const FullType(DateTime))); - } - if (object.map != null) { - result - ..add(r'map') - ..add(serializers.serialize(object.map, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)]))); - } - return result; - } - - @override - MixedPropertiesAndAdditionalPropertiesClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = MixedPropertiesAndAdditionalPropertiesClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'uuid': - result.uuid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'dateTime': - result.dateTime = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'map': - result.map.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)])) as BuiltMap); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart deleted file mode 100644 index 4ce2e0cc14af..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart +++ /dev/null @@ -1,83 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model200_response.g.dart'; - -abstract class Model200Response implements Built { - - @nullable - @BuiltValueField(wireName: r'name') - int get name; - - @nullable - @BuiltValueField(wireName: r'class') - String get class_; - - Model200Response._(); - - static void _initializeBuilder(Model200ResponseBuilder b) => b; - - factory Model200Response([void updates(Model200ResponseBuilder b)]) = _$Model200Response; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$Model200ResponseSerializer(); -} - -class _$Model200ResponseSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Model200Response, _$Model200Response]; - @override - final String wireName = r'Model200Response'; - - @override - Iterable serialize(Serializers serializers, Model200Response object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(int))); - } - if (object.class_ != null) { - result - ..add(r'class') - ..add(serializers.serialize(object.class_, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Model200Response deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = Model200ResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'class': - result.class_ = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart deleted file mode 100644 index c36f247ef4fc..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_client.g.dart'; - -abstract class ModelClient implements Built { - - @nullable - @BuiltValueField(wireName: r'client') - String get client; - - ModelClient._(); - - static void _initializeBuilder(ModelClientBuilder b) => b; - - factory ModelClient([void updates(ModelClientBuilder b)]) = _$ModelClient; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelClientSerializer(); -} - -class _$ModelClientSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ModelClient, _$ModelClient]; - @override - final String wireName = r'ModelClient'; - - @override - Iterable serialize(Serializers serializers, ModelClient object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.client != null) { - result - ..add(r'client') - ..add(serializers.serialize(object.client, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ModelClient deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelClientBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'client': - result.client = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart deleted file mode 100644 index 6132f53b6f75..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_enum_class.g.dart'; - -class ModelEnumClass extends EnumClass { - - @BuiltValueEnumConst(wireName: r'_abc') - static const ModelEnumClass abc = _$abc; - @BuiltValueEnumConst(wireName: r'-efg') - static const ModelEnumClass efg = _$efg; - @BuiltValueEnumConst(wireName: r'(xyz)') - static const ModelEnumClass leftParenthesisXyzRightParenthesis = _$leftParenthesisXyzRightParenthesis; - - static Serializer get serializer => _$modelEnumClassSerializer; - - const ModelEnumClass._(String name): super(name); - - static BuiltSet get values => _$values; - static ModelEnumClass valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class ModelEnumClassMixin = Object with _$ModelEnumClassMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart deleted file mode 100644 index b669a874c09e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_file.g.dart'; - -abstract class ModelFile implements Built { - - /// Test capitalization - @nullable - @BuiltValueField(wireName: r'sourceURI') - String get sourceURI; - - ModelFile._(); - - static void _initializeBuilder(ModelFileBuilder b) => b; - - factory ModelFile([void updates(ModelFileBuilder b)]) = _$ModelFile; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelFileSerializer(); -} - -class _$ModelFileSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ModelFile, _$ModelFile]; - @override - final String wireName = r'ModelFile'; - - @override - Iterable serialize(Serializers serializers, ModelFile object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.sourceURI != null) { - result - ..add(r'sourceURI') - ..add(serializers.serialize(object.sourceURI, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ModelFile deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelFileBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'sourceURI': - result.sourceURI = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart deleted file mode 100644 index 5d63c3f645e1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_list.g.dart'; - -abstract class ModelList implements Built { - - @nullable - @BuiltValueField(wireName: r'123-list') - String get n123list; - - ModelList._(); - - static void _initializeBuilder(ModelListBuilder b) => b; - - factory ModelList([void updates(ModelListBuilder b)]) = _$ModelList; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelListSerializer(); -} - -class _$ModelListSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ModelList, _$ModelList]; - @override - final String wireName = r'ModelList'; - - @override - Iterable serialize(Serializers serializers, ModelList object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.n123list != null) { - result - ..add(r'123-list') - ..add(serializers.serialize(object.n123list, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ModelList deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelListBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'123-list': - result.n123list = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart deleted file mode 100644 index 0e95cbe483bb..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_return.g.dart'; - -abstract class ModelReturn implements Built { - - @nullable - @BuiltValueField(wireName: r'return') - int get return_; - - ModelReturn._(); - - static void _initializeBuilder(ModelReturnBuilder b) => b; - - factory ModelReturn([void updates(ModelReturnBuilder b)]) = _$ModelReturn; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelReturnSerializer(); -} - -class _$ModelReturnSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ModelReturn, _$ModelReturn]; - @override - final String wireName = r'ModelReturn'; - - @override - Iterable serialize(Serializers serializers, ModelReturn object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.return_ != null) { - result - ..add(r'return') - ..add(serializers.serialize(object.return_, - specifiedType: const FullType(int))); - } - return result; - } - - @override - ModelReturn deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelReturnBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'return': - result.return_ = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart deleted file mode 100644 index 5853837b0d51..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'name.g.dart'; - -abstract class Name implements Built { - - @BuiltValueField(wireName: r'name') - int get name; - - @nullable - @BuiltValueField(wireName: r'snake_case') - int get snakeCase; - - @nullable - @BuiltValueField(wireName: r'property') - String get property; - - @nullable - @BuiltValueField(wireName: r'123Number') - int get n123number; - - Name._(); - - static void _initializeBuilder(NameBuilder b) => b; - - factory Name([void updates(NameBuilder b)]) = _$Name; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$NameSerializer(); -} - -class _$NameSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Name, _$Name]; - @override - final String wireName = r'Name'; - - @override - Iterable serialize(Serializers serializers, Name object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(int))); - if (object.snakeCase != null) { - result - ..add(r'snake_case') - ..add(serializers.serialize(object.snakeCase, - specifiedType: const FullType(int))); - } - if (object.property != null) { - result - ..add(r'property') - ..add(serializers.serialize(object.property, - specifiedType: const FullType(String))); - } - if (object.n123number != null) { - result - ..add(r'123Number') - ..add(serializers.serialize(object.n123number, - specifiedType: const FullType(int))); - } - return result; - } - - @override - Name deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NameBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'snake_case': - result.snakeCase = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'property': - result.property = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'123Number': - result.n123number = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart deleted file mode 100644 index 3da254d297c1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart +++ /dev/null @@ -1,225 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'nullable_class.g.dart'; - -abstract class NullableClass implements Built { - - @nullable - @BuiltValueField(wireName: r'integer_prop') - int get integerProp; - - @nullable - @BuiltValueField(wireName: r'number_prop') - num get numberProp; - - @nullable - @BuiltValueField(wireName: r'boolean_prop') - bool get booleanProp; - - @nullable - @BuiltValueField(wireName: r'string_prop') - String get stringProp; - - @nullable - @BuiltValueField(wireName: r'date_prop') - DateTime get dateProp; - - @nullable - @BuiltValueField(wireName: r'datetime_prop') - DateTime get datetimeProp; - - @nullable - @BuiltValueField(wireName: r'array_nullable_prop') - BuiltList get arrayNullableProp; - - @nullable - @BuiltValueField(wireName: r'array_and_items_nullable_prop') - BuiltList get arrayAndItemsNullableProp; - - @nullable - @BuiltValueField(wireName: r'array_items_nullable') - BuiltList get arrayItemsNullable; - - @nullable - @BuiltValueField(wireName: r'object_nullable_prop') - BuiltMap get objectNullableProp; - - @nullable - @BuiltValueField(wireName: r'object_and_items_nullable_prop') - BuiltMap get objectAndItemsNullableProp; - - @nullable - @BuiltValueField(wireName: r'object_items_nullable') - BuiltMap get objectItemsNullable; - - NullableClass._(); - - static void _initializeBuilder(NullableClassBuilder b) => b; - - factory NullableClass([void updates(NullableClassBuilder b)]) = _$NullableClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$NullableClassSerializer(); -} - -class _$NullableClassSerializer implements StructuredSerializer { - - @override - final Iterable types = const [NullableClass, _$NullableClass]; - @override - final String wireName = r'NullableClass'; - - @override - Iterable serialize(Serializers serializers, NullableClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.integerProp != null) { - result - ..add(r'integer_prop') - ..add(serializers.serialize(object.integerProp, - specifiedType: const FullType(int))); - } - if (object.numberProp != null) { - result - ..add(r'number_prop') - ..add(serializers.serialize(object.numberProp, - specifiedType: const FullType(num))); - } - if (object.booleanProp != null) { - result - ..add(r'boolean_prop') - ..add(serializers.serialize(object.booleanProp, - specifiedType: const FullType(bool))); - } - if (object.stringProp != null) { - result - ..add(r'string_prop') - ..add(serializers.serialize(object.stringProp, - specifiedType: const FullType(String))); - } - if (object.dateProp != null) { - result - ..add(r'date_prop') - ..add(serializers.serialize(object.dateProp, - specifiedType: const FullType(DateTime))); - } - if (object.datetimeProp != null) { - result - ..add(r'datetime_prop') - ..add(serializers.serialize(object.datetimeProp, - specifiedType: const FullType(DateTime))); - } - if (object.arrayNullableProp != null) { - result - ..add(r'array_nullable_prop') - ..add(serializers.serialize(object.arrayNullableProp, - specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))); - } - if (object.arrayAndItemsNullableProp != null) { - result - ..add(r'array_and_items_nullable_prop') - ..add(serializers.serialize(object.arrayAndItemsNullableProp, - specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))); - } - if (object.arrayItemsNullable != null) { - result - ..add(r'array_items_nullable') - ..add(serializers.serialize(object.arrayItemsNullable, - specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))); - } - if (object.objectNullableProp != null) { - result - ..add(r'object_nullable_prop') - ..add(serializers.serialize(object.objectNullableProp, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]))); - } - if (object.objectAndItemsNullableProp != null) { - result - ..add(r'object_and_items_nullable_prop') - ..add(serializers.serialize(object.objectAndItemsNullableProp, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]))); - } - if (object.objectItemsNullable != null) { - result - ..add(r'object_items_nullable') - ..add(serializers.serialize(object.objectItemsNullable, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]))); - } - return result; - } - - @override - NullableClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NullableClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'integer_prop': - result.integerProp = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'number_prop': - result.numberProp = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - break; - case r'boolean_prop': - result.booleanProp = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'string_prop': - result.stringProp = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'date_prop': - result.dateProp = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'datetime_prop': - result.datetimeProp = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'array_nullable_prop': - result.arrayNullableProp.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(JsonObject)])) as BuiltList); - break; - case r'array_and_items_nullable_prop': - result.arrayAndItemsNullableProp.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(JsonObject)])) as BuiltList); - break; - case r'array_items_nullable': - result.arrayItemsNullable.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(JsonObject)])) as BuiltList); - break; - case r'object_nullable_prop': - result.objectNullableProp.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)])) as BuiltMap); - break; - case r'object_and_items_nullable_prop': - result.objectAndItemsNullableProp.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)])) as BuiltMap); - break; - case r'object_items_nullable': - result.objectItemsNullable.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)])) as BuiltMap); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart deleted file mode 100644 index 9f614e876c9b..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'number_only.g.dart'; - -abstract class NumberOnly implements Built { - - @nullable - @BuiltValueField(wireName: r'JustNumber') - num get justNumber; - - NumberOnly._(); - - static void _initializeBuilder(NumberOnlyBuilder b) => b; - - factory NumberOnly([void updates(NumberOnlyBuilder b)]) = _$NumberOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$NumberOnlySerializer(); -} - -class _$NumberOnlySerializer implements StructuredSerializer { - - @override - final Iterable types = const [NumberOnly, _$NumberOnly]; - @override - final String wireName = r'NumberOnly'; - - @override - Iterable serialize(Serializers serializers, NumberOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.justNumber != null) { - result - ..add(r'JustNumber') - ..add(serializers.serialize(object.justNumber, - specifiedType: const FullType(num))); - } - return result; - } - - @override - NumberOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NumberOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'JustNumber': - result.justNumber = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart deleted file mode 100644 index fd5b750c9bb6..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart +++ /dev/null @@ -1,113 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/deprecated_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'object_with_deprecated_fields.g.dart'; - -abstract class ObjectWithDeprecatedFields implements Built { - - @nullable - @BuiltValueField(wireName: r'uuid') - String get uuid; - - @nullable - @BuiltValueField(wireName: r'id') - num get id; - - @nullable - @BuiltValueField(wireName: r'deprecatedRef') - DeprecatedObject get deprecatedRef; - - @nullable - @BuiltValueField(wireName: r'bars') - BuiltList get bars; - - ObjectWithDeprecatedFields._(); - - static void _initializeBuilder(ObjectWithDeprecatedFieldsBuilder b) => b; - - factory ObjectWithDeprecatedFields([void updates(ObjectWithDeprecatedFieldsBuilder b)]) = _$ObjectWithDeprecatedFields; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ObjectWithDeprecatedFieldsSerializer(); -} - -class _$ObjectWithDeprecatedFieldsSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ObjectWithDeprecatedFields, _$ObjectWithDeprecatedFields]; - @override - final String wireName = r'ObjectWithDeprecatedFields'; - - @override - Iterable serialize(Serializers serializers, ObjectWithDeprecatedFields object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.uuid != null) { - result - ..add(r'uuid') - ..add(serializers.serialize(object.uuid, - specifiedType: const FullType(String))); - } - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(num))); - } - if (object.deprecatedRef != null) { - result - ..add(r'deprecatedRef') - ..add(serializers.serialize(object.deprecatedRef, - specifiedType: const FullType(DeprecatedObject))); - } - if (object.bars != null) { - result - ..add(r'bars') - ..add(serializers.serialize(object.bars, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - return result; - } - - @override - ObjectWithDeprecatedFields deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ObjectWithDeprecatedFieldsBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'uuid': - result.uuid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - break; - case r'deprecatedRef': - result.deprecatedRef.replace(serializers.deserialize(value, - specifiedType: const FullType(DeprecatedObject)) as DeprecatedObject); - break; - case r'bars': - result.bars.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart deleted file mode 100644 index a599897e9377..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart +++ /dev/null @@ -1,162 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'petId') - int get petId; - - @nullable - @BuiltValueField(wireName: r'quantity') - int get quantity; - - @nullable - @BuiltValueField(wireName: r'shipDate') - DateTime get shipDate; - - /// Order Status - @nullable - @BuiltValueField(wireName: r'status') - OrderStatusEnum get status; - // enum statusEnum { placed, approved, delivered, }; - - @BuiltValueField(wireName: r'complete') - bool get complete; - - Order._(); - - static void _initializeBuilder(OrderBuilder b) => b - ..complete = false; - - factory Order([void updates(OrderBuilder b)]) = _$Order; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OrderSerializer(); -} - -class _$OrderSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Order, _$Order]; - @override - final String wireName = r'Order'; - - @override - Iterable serialize(Serializers serializers, Order object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.petId != null) { - result - ..add(r'petId') - ..add(serializers.serialize(object.petId, - specifiedType: const FullType(int))); - } - if (object.quantity != null) { - result - ..add(r'quantity') - ..add(serializers.serialize(object.quantity, - specifiedType: const FullType(int))); - } - if (object.shipDate != null) { - result - ..add(r'shipDate') - ..add(serializers.serialize(object.shipDate, - specifiedType: const FullType(DateTime))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(OrderStatusEnum))); - } - if (object.complete != null) { - result - ..add(r'complete') - ..add(serializers.serialize(object.complete, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - Order deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OrderBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'petId': - result.petId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'quantity': - result.quantity = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'shipDate': - result.shipDate = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(OrderStatusEnum)) as OrderStatusEnum; - break; - case r'complete': - result.complete = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - } - } - return result.build(); - } -} - -class OrderStatusEnum extends EnumClass { - - /// Order Status - @BuiltValueEnumConst(wireName: r'placed') - static const OrderStatusEnum placed = _$orderStatusEnum_placed; - /// Order Status - @BuiltValueEnumConst(wireName: r'approved') - static const OrderStatusEnum approved = _$orderStatusEnum_approved; - /// Order Status - @BuiltValueEnumConst(wireName: r'delivered') - static const OrderStatusEnum delivered = _$orderStatusEnum_delivered; - - static Serializer get serializer => _$orderStatusEnumSerializer; - - const OrderStatusEnum._(String name): super(name); - - static BuiltSet get values => _$orderStatusEnumValues; - static OrderStatusEnum valueOf(String name) => _$orderStatusEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart deleted file mode 100644 index 4e5b0be1b021..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart +++ /dev/null @@ -1,97 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_composite.g.dart'; - -abstract class OuterComposite implements Built { - - @nullable - @BuiltValueField(wireName: r'my_number') - num get myNumber; - - @nullable - @BuiltValueField(wireName: r'my_string') - String get myString; - - @nullable - @BuiltValueField(wireName: r'my_boolean') - bool get myBoolean; - - OuterComposite._(); - - static void _initializeBuilder(OuterCompositeBuilder b) => b; - - factory OuterComposite([void updates(OuterCompositeBuilder b)]) = _$OuterComposite; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OuterCompositeSerializer(); -} - -class _$OuterCompositeSerializer implements StructuredSerializer { - - @override - final Iterable types = const [OuterComposite, _$OuterComposite]; - @override - final String wireName = r'OuterComposite'; - - @override - Iterable serialize(Serializers serializers, OuterComposite object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.myNumber != null) { - result - ..add(r'my_number') - ..add(serializers.serialize(object.myNumber, - specifiedType: const FullType(num))); - } - if (object.myString != null) { - result - ..add(r'my_string') - ..add(serializers.serialize(object.myString, - specifiedType: const FullType(String))); - } - if (object.myBoolean != null) { - result - ..add(r'my_boolean') - ..add(serializers.serialize(object.myBoolean, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - OuterComposite deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OuterCompositeBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'my_number': - result.myNumber = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - break; - case r'my_string': - result.myString = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'my_boolean': - result.myBoolean = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart deleted file mode 100644 index b41a89718498..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum.g.dart'; - -class OuterEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'placed') - static const OuterEnum placed = _$placed; - @BuiltValueEnumConst(wireName: r'approved') - static const OuterEnum approved = _$approved; - @BuiltValueEnumConst(wireName: r'delivered') - static const OuterEnum delivered = _$delivered; - - static Serializer get serializer => _$outerEnumSerializer; - - const OuterEnum._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnum valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumMixin = Object with _$OuterEnumMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart deleted file mode 100644 index d85036bb39c7..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum_default_value.g.dart'; - -class OuterEnumDefaultValue extends EnumClass { - - @BuiltValueEnumConst(wireName: r'placed') - static const OuterEnumDefaultValue placed = _$placed; - @BuiltValueEnumConst(wireName: r'approved') - static const OuterEnumDefaultValue approved = _$approved; - @BuiltValueEnumConst(wireName: r'delivered') - static const OuterEnumDefaultValue delivered = _$delivered; - - static Serializer get serializer => _$outerEnumDefaultValueSerializer; - - const OuterEnumDefaultValue._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnumDefaultValue valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumDefaultValueMixin = Object with _$OuterEnumDefaultValueMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart deleted file mode 100644 index bdf6bb24c058..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum_integer.g.dart'; - -class OuterEnumInteger extends EnumClass { - - @BuiltValueEnumConst(wireNumber: 0) - static const OuterEnumInteger number0 = _$number0; - @BuiltValueEnumConst(wireNumber: 1) - static const OuterEnumInteger number1 = _$number1; - @BuiltValueEnumConst(wireNumber: 2) - static const OuterEnumInteger number2 = _$number2; - - static Serializer get serializer => _$outerEnumIntegerSerializer; - - const OuterEnumInteger._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnumInteger valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumIntegerMixin = Object with _$OuterEnumIntegerMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart deleted file mode 100644 index 0649d9a5e749..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum_integer_default_value.g.dart'; - -class OuterEnumIntegerDefaultValue extends EnumClass { - - @BuiltValueEnumConst(wireNumber: 0) - static const OuterEnumIntegerDefaultValue number0 = _$number0; - @BuiltValueEnumConst(wireNumber: 1) - static const OuterEnumIntegerDefaultValue number1 = _$number1; - @BuiltValueEnumConst(wireNumber: 2) - static const OuterEnumIntegerDefaultValue number2 = _$number2; - - static Serializer get serializer => _$outerEnumIntegerDefaultValueSerializer; - - const OuterEnumIntegerDefaultValue._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnumIntegerDefaultValue valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumIntegerDefaultValueMixin = Object with _$OuterEnumIntegerDefaultValueMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart deleted file mode 100644 index caf3ce86097c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart +++ /dev/null @@ -1,68 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_enum_integer.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_object_with_enum_property.g.dart'; - -abstract class OuterObjectWithEnumProperty implements Built { - - @BuiltValueField(wireName: r'value') - OuterEnumInteger get value; - // enum valueEnum { 0, 1, 2, }; - - OuterObjectWithEnumProperty._(); - - static void _initializeBuilder(OuterObjectWithEnumPropertyBuilder b) => b; - - factory OuterObjectWithEnumProperty([void updates(OuterObjectWithEnumPropertyBuilder b)]) = _$OuterObjectWithEnumProperty; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OuterObjectWithEnumPropertySerializer(); -} - -class _$OuterObjectWithEnumPropertySerializer implements StructuredSerializer { - - @override - final Iterable types = const [OuterObjectWithEnumProperty, _$OuterObjectWithEnumProperty]; - @override - final String wireName = r'OuterObjectWithEnumProperty'; - - @override - Iterable serialize(Serializers serializers, OuterObjectWithEnumProperty object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'value') - ..add(serializers.serialize(object.value, - specifiedType: const FullType(OuterEnumInteger))); - return result; - } - - @override - OuterObjectWithEnumProperty deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OuterObjectWithEnumPropertyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'value': - result.value = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumInteger)) as OuterEnumInteger; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart deleted file mode 100644 index 89b4fed03b57..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/tag.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/model/category.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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'category') - Category get category; - - @BuiltValueField(wireName: r'name') - String get name; - - @BuiltValueField(wireName: r'photoUrls') - BuiltSet get photoUrls; - - @nullable - @BuiltValueField(wireName: r'tags') - BuiltList get tags; - - /// pet status in the store - @nullable - @BuiltValueField(wireName: r'status') - PetStatusEnum get status; - // enum statusEnum { available, pending, sold, }; - - Pet._(); - - static void _initializeBuilder(PetBuilder b) => b; - - factory Pet([void updates(PetBuilder b)]) = _$Pet; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PetSerializer(); -} - -class _$PetSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Pet, _$Pet]; - @override - final String wireName = r'Pet'; - - @override - Iterable serialize(Serializers serializers, Pet object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.category != null) { - result - ..add(r'category') - ..add(serializers.serialize(object.category, - specifiedType: const FullType(Category))); - } - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'photoUrls') - ..add(serializers.serialize(object.photoUrls, - specifiedType: const FullType(BuiltSet, [FullType(String)]))); - if (object.tags != null) { - result - ..add(r'tags') - ..add(serializers.serialize(object.tags, - specifiedType: const FullType(BuiltList, [FullType(Tag)]))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(PetStatusEnum))); - } - return result; - } - - @override - Pet deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PetBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'category': - result.category.replace(serializers.deserialize(value, - specifiedType: const FullType(Category)) as Category); - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'photoUrls': - result.photoUrls.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltSet, [FullType(String)])) as BuiltSet); - break; - case r'tags': - result.tags.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(Tag)])) as BuiltList); - break; - case r'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(PetStatusEnum)) as PetStatusEnum; - break; - } - } - return result.build(); - } -} - -class PetStatusEnum extends EnumClass { - - /// pet status in the store - @BuiltValueEnumConst(wireName: r'available') - static const PetStatusEnum available = _$petStatusEnum_available; - /// pet status in the store - @BuiltValueEnumConst(wireName: r'pending') - static const PetStatusEnum pending = _$petStatusEnum_pending; - /// pet status in the store - @BuiltValueEnumConst(wireName: r'sold') - static const PetStatusEnum sold = _$petStatusEnum_sold; - - static Serializer get serializer => _$petStatusEnumSerializer; - - const PetStatusEnum._(String name): super(name); - - static BuiltSet get values => _$petStatusEnumValues; - static PetStatusEnum valueOf(String name) => _$petStatusEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart deleted file mode 100644 index cdb1a857096c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart +++ /dev/null @@ -1,83 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'read_only_first.g.dart'; - -abstract class ReadOnlyFirst implements Built { - - @nullable - @BuiltValueField(wireName: r'bar') - String get bar; - - @nullable - @BuiltValueField(wireName: r'baz') - String get baz; - - ReadOnlyFirst._(); - - static void _initializeBuilder(ReadOnlyFirstBuilder b) => b; - - factory ReadOnlyFirst([void updates(ReadOnlyFirstBuilder b)]) = _$ReadOnlyFirst; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ReadOnlyFirstSerializer(); -} - -class _$ReadOnlyFirstSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ReadOnlyFirst, _$ReadOnlyFirst]; - @override - final String wireName = r'ReadOnlyFirst'; - - @override - Iterable serialize(Serializers serializers, ReadOnlyFirst object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.bar != null) { - result - ..add(r'bar') - ..add(serializers.serialize(object.bar, - specifiedType: const FullType(String))); - } - if (object.baz != null) { - result - ..add(r'baz') - ..add(serializers.serialize(object.baz, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ReadOnlyFirst deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ReadOnlyFirstBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'bar': - result.bar = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'baz': - result.baz = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart deleted file mode 100644 index aa7ee3825a21..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart +++ /dev/null @@ -1,69 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'special_model_name.g.dart'; - -abstract class SpecialModelName implements Built { - - @nullable - @BuiltValueField(wireName: r'$special[property.name]') - int get dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; - - SpecialModelName._(); - - static void _initializeBuilder(SpecialModelNameBuilder b) => b; - - factory SpecialModelName([void updates(SpecialModelNameBuilder b)]) = _$SpecialModelName; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$SpecialModelNameSerializer(); -} - -class _$SpecialModelNameSerializer implements StructuredSerializer { - - @override - final Iterable types = const [SpecialModelName, _$SpecialModelName]; - @override - final String wireName = r'SpecialModelName'; - - @override - Iterable serialize(Serializers serializers, SpecialModelName object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { - result - ..add(r'$special[property.name]') - ..add(serializers.serialize(object.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, - specifiedType: const FullType(int))); - } - return result; - } - - @override - SpecialModelName deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = SpecialModelNameBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'$special[property.name]': - result.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart deleted file mode 100644 index d612fdd0024e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart +++ /dev/null @@ -1,83 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'name') - String get name; - - Tag._(); - - static void _initializeBuilder(TagBuilder b) => b; - - factory Tag([void updates(TagBuilder b)]) = _$Tag; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TagSerializer(); -} - -class _$TagSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Tag, _$Tag]; - @override - final String wireName = r'Tag'; - - @override - Iterable serialize(Serializers serializers, Tag object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Tag deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = TagBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart deleted file mode 100644 index a13b71072c21..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -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: r'id') - int get id; - - @nullable - @BuiltValueField(wireName: r'username') - String get username; - - @nullable - @BuiltValueField(wireName: r'firstName') - String get firstName; - - @nullable - @BuiltValueField(wireName: r'lastName') - String get lastName; - - @nullable - @BuiltValueField(wireName: r'email') - String get email; - - @nullable - @BuiltValueField(wireName: r'password') - String get password; - - @nullable - @BuiltValueField(wireName: r'phone') - String get phone; - - /// User Status - @nullable - @BuiltValueField(wireName: r'userStatus') - int get userStatus; - - User._(); - - static void _initializeBuilder(UserBuilder b) => b; - - factory User([void updates(UserBuilder b)]) = _$User; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$UserSerializer(); -} - -class _$UserSerializer implements StructuredSerializer { - - @override - final Iterable types = const [User, _$User]; - @override - final String wireName = r'User'; - - @override - Iterable serialize(Serializers serializers, User object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.username != null) { - result - ..add(r'username') - ..add(serializers.serialize(object.username, - specifiedType: const FullType(String))); - } - if (object.firstName != null) { - result - ..add(r'firstName') - ..add(serializers.serialize(object.firstName, - specifiedType: const FullType(String))); - } - if (object.lastName != null) { - result - ..add(r'lastName') - ..add(serializers.serialize(object.lastName, - specifiedType: const FullType(String))); - } - if (object.email != null) { - result - ..add(r'email') - ..add(serializers.serialize(object.email, - specifiedType: const FullType(String))); - } - if (object.password != null) { - result - ..add(r'password') - ..add(serializers.serialize(object.password, - specifiedType: const FullType(String))); - } - if (object.phone != null) { - result - ..add(r'phone') - ..add(serializers.serialize(object.phone, - specifiedType: const FullType(String))); - } - if (object.userStatus != null) { - result - ..add(r'userStatus') - ..add(serializers.serialize(object.userStatus, - specifiedType: const FullType(int))); - } - return result; - } - - @override - User deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = UserBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'username': - result.username = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'firstName': - result.firstName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'lastName': - result.lastName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'email': - result.email = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'password': - result.password = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'phone': - result.phone = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'userStatus': - result.userStatus = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart deleted file mode 100644 index f0dc864e2e23..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart +++ /dev/null @@ -1,138 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -library serializers; - -import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:built_value/serializer.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/standard_json_plugin.dart'; - -import 'package:openapi/model/additional_properties_class.dart'; -import 'package:openapi/model/animal.dart'; -import 'package:openapi/model/api_response.dart'; -import 'package:openapi/model/array_of_array_of_number_only.dart'; -import 'package:openapi/model/array_of_number_only.dart'; -import 'package:openapi/model/array_test.dart'; -import 'package:openapi/model/capitalization.dart'; -import 'package:openapi/model/cat.dart'; -import 'package:openapi/model/cat_all_of.dart'; -import 'package:openapi/model/category.dart'; -import 'package:openapi/model/class_model.dart'; -import 'package:openapi/model/deprecated_object.dart'; -import 'package:openapi/model/dog.dart'; -import 'package:openapi/model/dog_all_of.dart'; -import 'package:openapi/model/enum_arrays.dart'; -import 'package:openapi/model/enum_test.dart'; -import 'package:openapi/model/file_schema_test_class.dart'; -import 'package:openapi/model/foo.dart'; -import 'package:openapi/model/format_test.dart'; -import 'package:openapi/model/has_only_read_only.dart'; -import 'package:openapi/model/health_check_result.dart'; -import 'package:openapi/model/inline_response_default.dart'; -import 'package:openapi/model/map_test.dart'; -import 'package:openapi/model/mixed_properties_and_additional_properties_class.dart'; -import 'package:openapi/model/model200_response.dart'; -import 'package:openapi/model/model_client.dart'; -import 'package:openapi/model/model_enum_class.dart'; -import 'package:openapi/model/model_file.dart'; -import 'package:openapi/model/model_list.dart'; -import 'package:openapi/model/model_return.dart'; -import 'package:openapi/model/name.dart'; -import 'package:openapi/model/nullable_class.dart'; -import 'package:openapi/model/number_only.dart'; -import 'package:openapi/model/object_with_deprecated_fields.dart'; -import 'package:openapi/model/order.dart'; -import 'package:openapi/model/outer_composite.dart'; -import 'package:openapi/model/outer_enum.dart'; -import 'package:openapi/model/outer_enum_default_value.dart'; -import 'package:openapi/model/outer_enum_integer.dart'; -import 'package:openapi/model/outer_enum_integer_default_value.dart'; -import 'package:openapi/model/outer_object_with_enum_property.dart'; -import 'package:openapi/model/pet.dart'; -import 'package:openapi/model/read_only_first.dart'; -import 'package:openapi/model/special_model_name.dart'; -import 'package:openapi/model/tag.dart'; -import 'package:openapi/model/user.dart'; - -part 'serializers.g.dart'; - -@SerializersFor(const [ - AdditionalPropertiesClass, - Animal, - ApiResponse, - ArrayOfArrayOfNumberOnly, - ArrayOfNumberOnly, - ArrayTest, - Capitalization, - Cat, - CatAllOf, - Category, - ClassModel, - DeprecatedObject, - Dog, - DogAllOf, - EnumArrays, - EnumTest, - FileSchemaTestClass, - Foo, - FormatTest, - HasOnlyReadOnly, - HealthCheckResult, - InlineResponseDefault, - MapTest, - MixedPropertiesAndAdditionalPropertiesClass, - Model200Response, - ModelClient, - ModelEnumClass, - ModelFile, - ModelList, - ModelReturn, - Name, - NullableClass, - NumberOnly, - ObjectWithDeprecatedFields, - Order, - OuterComposite, - OuterEnum, - OuterEnumDefaultValue, - OuterEnumInteger, - OuterEnumIntegerDefaultValue, - OuterObjectWithEnumProperty, - Pet, - ReadOnlyFirst, - SpecialModelName, - Tag, - User, -]) -Serializers serializers = (_$serializers.toBuilder() - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(String)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltSet, [FullType(Pet)]), - () => SetBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(Pet)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(int)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(User)]), - () => ListBuilder(), - ) - ..add(Iso8601DateTimeSerializer())) - .build(); - -Serializers standardSerializers = - (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml deleted file mode 100644 index 697b497ef4be..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - 4.0.0 - org.openapitools - DartDioPetstoreClientLibFakeTests - pom - 1.0.0-SNAPSHOT - DartDio Petstore Client Lib Fake - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - export-dartfmt - pre-install-test - - exec - - - export - - DART_FMT_PATH=/usr/local/bin/dartfmt - - - - - pub-get - pre-integration-test - - exec - - - pub - - get - - - - - pub-run-build-runner - pre-integration-test - - exec - - - pub - - run - build_runner - build - - - - - dartanalyzer - integration-test - - exec - - - dartanalyzer - - --fatal-infos - --options - analysis_options.yaml - . - - - - - pub-test - integration-test - - exec - - - pub - - run - test - - - - - tests-pub-get - pre-integration-test - - exec - - - ../petstore_client_lib_fake_tests - pub - - get - - - - - tests-dartanalyzer - integration-test - - exec - - - ../petstore_client_lib_fake_tests - dartanalyzer - - --fatal-infos - --options - analysis_options.yaml - . - - - - - tests-pub-test - integration-test - - exec - - - ../petstore_client_lib_fake_tests - pub - - run - test - - - - - - - - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml deleted file mode 100644 index 34a1aa76180f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: openapi -version: 1.0.0 -description: OpenAPI API client -homepage: homepage - -environment: - sdk: '>=2.7.0 <3.0.0' - -dependencies: - dio: '^3.0.9' - built_value: '>=7.1.0 <8.0.0' - built_collection: '>=4.3.2 <5.0.0' - -dev_dependencies: - built_value_generator: '>=7.1.0 <8.0.0' - build_runner: any - test: '>=1.3.0 <1.16.0' diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/additional_properties_class_test.dart deleted file mode 100644 index 6a6a87f3b99f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/additional_properties_class_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/additional_properties_class.dart'; -import 'package:test/test.dart'; - -// tests for AdditionalPropertiesClass -void main() { - final instance = AdditionalPropertiesClassBuilder(); - // TODO add properties to the builder and call build() - - group(AdditionalPropertiesClass, () { - // BuiltMap mapProperty - test('to test the property `mapProperty`', () async { - // TODO - }); - - // BuiltMap> mapOfMapProperty - test('to test the property `mapOfMapProperty`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/animal_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/animal_test.dart deleted file mode 100644 index d6a09d90bf63..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/animal_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/animal.dart'; -import 'package:test/test.dart'; - -// tests for Animal -void main() { - final instance = AnimalBuilder(); - // TODO add properties to the builder and call build() - - group(Animal, () { - // String className - test('to test the property `className`', () async { - // TODO - }); - - // String color (default value: 'red') - test('to test the property `color`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/another_fake_api_test.dart deleted file mode 100644 index aa3807e48ebe..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/another_fake_api_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/another_fake_api.dart'; -import 'package:test/test.dart'; - - -/// tests for AnotherFakeApi -void main() { - final instance = Openapi().getAnotherFakeApi(); - - group(AnotherFakeApi, () { - // To test special tags - // - // To test special tags and operation ID starting with number - // - //Future call123testSpecialTags(ModelClient modelClient) async - test('test call123testSpecialTags', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/api_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/api_response_test.dart deleted file mode 100644 index ae5d7fd6338d..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/api_response_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/api_response.dart'; -import 'package:test/test.dart'; - -// tests for ApiResponse -void main() { - final instance = ApiResponseBuilder(); - // TODO add properties to the builder and call build() - - group(ApiResponse, () { - // int code - test('to test the property `code`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // String message - test('to test the property `message`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart deleted file mode 100644 index ffa253c29e45..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/array_of_array_of_number_only.dart'; -import 'package:test/test.dart'; - -// tests for ArrayOfArrayOfNumberOnly -void main() { - final instance = ArrayOfArrayOfNumberOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(ArrayOfArrayOfNumberOnly, () { - // BuiltList> arrayArrayNumber - test('to test the property `arrayArrayNumber`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_of_number_only_test.dart deleted file mode 100644 index a73014e2256a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_of_number_only_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/array_of_number_only.dart'; -import 'package:test/test.dart'; - -// tests for ArrayOfNumberOnly -void main() { - final instance = ArrayOfNumberOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(ArrayOfNumberOnly, () { - // BuiltList arrayNumber - test('to test the property `arrayNumber`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_test_test.dart deleted file mode 100644 index 568732aae67a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/array_test_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/array_test.dart'; -import 'package:test/test.dart'; - -// tests for ArrayTest -void main() { - final instance = ArrayTestBuilder(); - // TODO add properties to the builder and call build() - - group(ArrayTest, () { - // BuiltList arrayOfString - test('to test the property `arrayOfString`', () async { - // TODO - }); - - // BuiltList> arrayArrayOfInteger - test('to test the property `arrayArrayOfInteger`', () async { - // TODO - }); - - // BuiltList> arrayArrayOfModel - test('to test the property `arrayArrayOfModel`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/capitalization_test.dart deleted file mode 100644 index ad333efc7111..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/capitalization_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/capitalization.dart'; -import 'package:test/test.dart'; - -// tests for Capitalization -void main() { - final instance = CapitalizationBuilder(); - // TODO add properties to the builder and call build() - - group(Capitalization, () { - // String smallCamel - test('to test the property `smallCamel`', () async { - // TODO - }); - - // String capitalCamel - test('to test the property `capitalCamel`', () async { - // TODO - }); - - // String smallSnake - test('to test the property `smallSnake`', () async { - // TODO - }); - - // String capitalSnake - test('to test the property `capitalSnake`', () async { - // TODO - }); - - // String sCAETHFlowPoints - test('to test the property `sCAETHFlowPoints`', () async { - // TODO - }); - - // Name of the pet - // String ATT_NAME - test('to test the property `ATT_NAME`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_all_of_test.dart deleted file mode 100644 index adba106a6f50..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_all_of_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/cat_all_of.dart'; -import 'package:test/test.dart'; - -// tests for CatAllOf -void main() { - final instance = CatAllOfBuilder(); - // TODO add properties to the builder and call build() - - group(CatAllOf, () { - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_test.dart deleted file mode 100644 index 2277fa1e6913..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/cat.dart'; -import 'package:test/test.dart'; - -// tests for Cat -void main() { - final instance = CatBuilder(); - // TODO add properties to the builder and call build() - - group(Cat, () { - // String className - test('to test the property `className`', () async { - // TODO - }); - - // String color (default value: 'red') - test('to test the property `color`', () async { - // TODO - }); - - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/category_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/category_test.dart deleted file mode 100644 index 564b01af6584..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/category_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/category.dart'; -import 'package:test/test.dart'; - -// tests for Category -void main() { - final instance = CategoryBuilder(); - // TODO add properties to the builder and call build() - - group(Category, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String name (default value: 'default-name') - test('to test the property `name`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/class_model_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/class_model_test.dart deleted file mode 100644 index 2dde545888c2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/class_model_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/class_model.dart'; -import 'package:test/test.dart'; - -// tests for ClassModel -void main() { - final instance = ClassModelBuilder(); - // TODO add properties to the builder and call build() - - group(ClassModel, () { - // String class_ - test('to test the property `class_`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/default_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/default_api_test.dart deleted file mode 100644 index 284f46eb7c08..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/default_api_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/default_api.dart'; -import 'package:test/test.dart'; - - -/// tests for DefaultApi -void main() { - final instance = Openapi().getDefaultApi(); - - group(DefaultApi, () { - //Future fooGet() async - test('test fooGet', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/deprecated_object_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/deprecated_object_test.dart deleted file mode 100644 index 493f09ebbf51..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/deprecated_object_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/deprecated_object.dart'; -import 'package:test/test.dart'; - -// tests for DeprecatedObject -void main() { - final instance = DeprecatedObjectBuilder(); - // TODO add properties to the builder and call build() - - group(DeprecatedObject, () { - // String name - test('to test the property `name`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_all_of_test.dart deleted file mode 100644 index 908c9a4f8ac8..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_all_of_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/dog_all_of.dart'; -import 'package:test/test.dart'; - -// tests for DogAllOf -void main() { - final instance = DogAllOfBuilder(); - // TODO add properties to the builder and call build() - - group(DogAllOf, () { - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_test.dart deleted file mode 100644 index 92c3c74fcd83..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/dog.dart'; -import 'package:test/test.dart'; - -// tests for Dog -void main() { - final instance = DogBuilder(); - // TODO add properties to the builder and call build() - - group(Dog, () { - // String className - test('to test the property `className`', () async { - // TODO - }); - - // String color (default value: 'red') - test('to test the property `color`', () async { - // TODO - }); - - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/enum_arrays_test.dart deleted file mode 100644 index e960a75c7c7c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/enum_arrays_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/enum_arrays.dart'; -import 'package:test/test.dart'; - -// tests for EnumArrays -void main() { - final instance = EnumArraysBuilder(); - // TODO add properties to the builder and call build() - - group(EnumArrays, () { - // String justSymbol - test('to test the property `justSymbol`', () async { - // TODO - }); - - // BuiltList arrayEnum - test('to test the property `arrayEnum`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/enum_test_test.dart deleted file mode 100644 index b7492a17198f..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/enum_test_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/enum_test.dart'; -import 'package:test/test.dart'; - -// tests for EnumTest -void main() { - final instance = EnumTestBuilder(); - // TODO add properties to the builder and call build() - - group(EnumTest, () { - // String enumString - test('to test the property `enumString`', () async { - // TODO - }); - - // String enumStringRequired - test('to test the property `enumStringRequired`', () async { - // TODO - }); - - // int enumInteger - test('to test the property `enumInteger`', () async { - // TODO - }); - - // double enumNumber - test('to test the property `enumNumber`', () async { - // TODO - }); - - // OuterEnum outerEnum - test('to test the property `outerEnum`', () async { - // TODO - }); - - // OuterEnumInteger outerEnumInteger - test('to test the property `outerEnumInteger`', () async { - // TODO - }); - - // OuterEnumDefaultValue outerEnumDefaultValue - test('to test the property `outerEnumDefaultValue`', () async { - // TODO - }); - - // OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue - test('to test the property `outerEnumIntegerDefaultValue`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/fake_api_test.dart deleted file mode 100644 index f66e490379d9..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/fake_api_test.dart +++ /dev/null @@ -1,137 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/fake_api.dart'; -import 'package:test/test.dart'; - - -/// tests for FakeApi -void main() { - final instance = Openapi().getFakeApi(); - - group(FakeApi, () { - // Health check endpoint - // - //Future fakeHealthGet() async - test('test fakeHealthGet', () async { - // TODO - }); - - // test http signature authentication - // - //Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async - test('test fakeHttpSignatureTest', () async { - // TODO - }); - - // Test serialization of outer boolean types - // - //Future fakeOuterBooleanSerialize({ bool body }) async - test('test fakeOuterBooleanSerialize', () async { - // TODO - }); - - // Test serialization of object with outer number type - // - //Future fakeOuterCompositeSerialize({ OuterComposite outerComposite }) async - test('test fakeOuterCompositeSerialize', () async { - // TODO - }); - - // Test serialization of outer number types - // - //Future fakeOuterNumberSerialize({ num body }) async - test('test fakeOuterNumberSerialize', () async { - // TODO - }); - - // Test serialization of outer string types - // - //Future fakeOuterStringSerialize({ String body }) async - test('test fakeOuterStringSerialize', () async { - // TODO - }); - - // Test serialization of enum (int) properties with examples - // - //Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) async - test('test fakePropertyEnumIntegerSerialize', () async { - // TODO - }); - - // For this test, the body for this request much reference a schema named `File`. - // - //Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) async - test('test testBodyWithFileSchema', () async { - // TODO - }); - - //Future testBodyWithQueryParams(String query, User user) async - test('test testBodyWithQueryParams', () async { - // TODO - }); - - // To test \"client\" model - // - // To test \"client\" model - // - //Future testClientModel(ModelClient modelClient) async - test('test testClientModel', () async { - // TODO - }); - - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - // - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - // - //Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, Uint8List binary, DateTime date, DateTime dateTime, String password, String callback }) async - test('test testEndpointParameters', () async { - // TODO - }); - - // To test enum parameters - // - // To test enum parameters - // - //Future testEnumParameters({ BuiltList enumHeaderStringArray, String enumHeaderString, BuiltList enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, BuiltList enumFormStringArray, String enumFormString }) async - test('test testEnumParameters', () async { - // TODO - }); - - // Fake endpoint to test group parameters (optional) - // - // Fake endpoint to test group parameters (optional) - // - //Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async - test('test testGroupParameters', () async { - // TODO - }); - - // test inline additionalProperties - // - //Future testInlineAdditionalProperties(BuiltMap requestBody) async - test('test testInlineAdditionalProperties', () async { - // TODO - }); - - // test json serialization of form data - // - //Future testJsonFormData(String param, String param2) async - test('test testJsonFormData', () async { - // TODO - }); - - // To test the collection format in query parameters - // - //Future testQueryParameterCollectionFormat(BuiltList pipe, BuiltList ioutil, BuiltList http, BuiltList url, BuiltList context) async - test('test testQueryParameterCollectionFormat', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart deleted file mode 100644 index 4dccc245c3f0..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/fake_classname_tags123_api.dart'; -import 'package:test/test.dart'; - - -/// tests for FakeClassnameTags123Api -void main() { - final instance = Openapi().getFakeClassnameTags123Api(); - - group(FakeClassnameTags123Api, () { - // To test class name in snake case - // - // To test class name in snake case - // - //Future testClassname(ModelClient modelClient) async - test('test testClassname', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/file_schema_test_class_test.dart deleted file mode 100644 index a68e4f164534..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/file_schema_test_class_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/file_schema_test_class.dart'; -import 'package:test/test.dart'; - -// tests for FileSchemaTestClass -void main() { - final instance = FileSchemaTestClassBuilder(); - // TODO add properties to the builder and call build() - - group(FileSchemaTestClass, () { - // ModelFile file - test('to test the property `file`', () async { - // TODO - }); - - // BuiltList files - test('to test the property `files`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/foo_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/foo_test.dart deleted file mode 100644 index 123f57510bc7..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/foo_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/foo.dart'; -import 'package:test/test.dart'; - -// tests for Foo -void main() { - final instance = FooBuilder(); - // TODO add properties to the builder and call build() - - group(Foo, () { - // String bar (default value: 'bar') - test('to test the property `bar`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/format_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/format_test_test.dart deleted file mode 100644 index 83fd61a650c3..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/format_test_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/format_test.dart'; -import 'package:test/test.dart'; - -// tests for FormatTest -void main() { - final instance = FormatTestBuilder(); - // TODO add properties to the builder and call build() - - group(FormatTest, () { - // int integer - test('to test the property `integer`', () async { - // TODO - }); - - // int int32 - test('to test the property `int32`', () async { - // TODO - }); - - // int int64 - test('to test the property `int64`', () async { - // TODO - }); - - // num number - test('to test the property `number`', () async { - // TODO - }); - - // double float - test('to test the property `float`', () async { - // TODO - }); - - // double double_ - test('to test the property `double_`', () async { - // TODO - }); - - // double decimal - test('to test the property `decimal`', () async { - // TODO - }); - - // String string - test('to test the property `string`', () async { - // TODO - }); - - // String byte - test('to test the property `byte`', () async { - // TODO - }); - - // Uint8List binary - test('to test the property `binary`', () async { - // TODO - }); - - // DateTime date - test('to test the property `date`', () async { - // TODO - }); - - // DateTime dateTime - test('to test the property `dateTime`', () async { - // TODO - }); - - // String uuid - test('to test the property `uuid`', () async { - // TODO - }); - - // String password - test('to test the property `password`', () async { - // TODO - }); - - // A string that is a 10 digit number. Can have leading zeros. - // String patternWithDigits - test('to test the property `patternWithDigits`', () async { - // TODO - }); - - // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - // String patternWithDigitsAndDelimiter - test('to test the property `patternWithDigitsAndDelimiter`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/has_only_read_only_test.dart deleted file mode 100644 index eaec2e5edcce..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/has_only_read_only_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/has_only_read_only.dart'; -import 'package:test/test.dart'; - -// tests for HasOnlyReadOnly -void main() { - final instance = HasOnlyReadOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(HasOnlyReadOnly, () { - // String bar - test('to test the property `bar`', () async { - // TODO - }); - - // String foo - test('to test the property `foo`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/health_check_result_test.dart deleted file mode 100644 index f31c3731cffe..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/health_check_result_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/health_check_result.dart'; -import 'package:test/test.dart'; - -// tests for HealthCheckResult -void main() { - final instance = HealthCheckResultBuilder(); - // TODO add properties to the builder and call build() - - group(HealthCheckResult, () { - // String nullableMessage - test('to test the property `nullableMessage`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/inline_response_default_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/inline_response_default_test.dart deleted file mode 100644 index 4ff20e8b38c2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/inline_response_default_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/inline_response_default.dart'; -import 'package:test/test.dart'; - -// tests for InlineResponseDefault -void main() { - final instance = InlineResponseDefaultBuilder(); - // TODO add properties to the builder and call build() - - group(InlineResponseDefault, () { - // Foo string - test('to test the property `string`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/map_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/map_test_test.dart deleted file mode 100644 index 8b75ff70c868..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/map_test_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/map_test.dart'; -import 'package:test/test.dart'; - -// tests for MapTest -void main() { - final instance = MapTestBuilder(); - // TODO add properties to the builder and call build() - - group(MapTest, () { - // BuiltMap> mapMapOfString - test('to test the property `mapMapOfString`', () async { - // TODO - }); - - // BuiltMap mapOfEnumString - test('to test the property `mapOfEnumString`', () async { - // TODO - }); - - // BuiltMap directMap - test('to test the property `directMap`', () async { - // TODO - }); - - // BuiltMap indirectMap - test('to test the property `indirectMap`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart deleted file mode 100644 index 008d44fa964c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/mixed_properties_and_additional_properties_class.dart'; -import 'package:test/test.dart'; - -// tests for MixedPropertiesAndAdditionalPropertiesClass -void main() { - final instance = MixedPropertiesAndAdditionalPropertiesClassBuilder(); - // TODO add properties to the builder and call build() - - group(MixedPropertiesAndAdditionalPropertiesClass, () { - // String uuid - test('to test the property `uuid`', () async { - // TODO - }); - - // DateTime dateTime - test('to test the property `dateTime`', () async { - // TODO - }); - - // BuiltMap map - test('to test the property `map`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model200_response_test.dart deleted file mode 100644 index 9efc9d257d74..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model200_response_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model200_response.dart'; -import 'package:test/test.dart'; - -// tests for Model200Response -void main() { - final instance = Model200ResponseBuilder(); - // TODO add properties to the builder and call build() - - group(Model200Response, () { - // int name - test('to test the property `name`', () async { - // TODO - }); - - // String class_ - test('to test the property `class_`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_client_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_client_test.dart deleted file mode 100644 index e48475d3d568..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_client_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model_client.dart'; -import 'package:test/test.dart'; - -// tests for ModelClient -void main() { - final instance = ModelClientBuilder(); - // TODO add properties to the builder and call build() - - group(ModelClient, () { - // String client - test('to test the property `client`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_enum_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_enum_class_test.dart deleted file mode 100644 index 7fccbb9b392a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_enum_class_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model_enum_class.dart'; -import 'package:test/test.dart'; - -// tests for ModelEnumClass -void main() { - - group(ModelEnumClass, () { - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_file_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_file_test.dart deleted file mode 100644 index d09c4a0c054c..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_file_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model_file.dart'; -import 'package:test/test.dart'; - -// tests for ModelFile -void main() { - final instance = ModelFileBuilder(); - // TODO add properties to the builder and call build() - - group(ModelFile, () { - // Test capitalization - // String sourceURI - test('to test the property `sourceURI`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_list_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_list_test.dart deleted file mode 100644 index 287b3e0e3cda..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_list_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model_list.dart'; -import 'package:test/test.dart'; - -// tests for ModelList -void main() { - final instance = ModelListBuilder(); - // TODO add properties to the builder and call build() - - group(ModelList, () { - // String n123list - test('to test the property `n123list`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_return_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_return_test.dart deleted file mode 100644 index 1468e8737b6d..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/model_return_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/model_return.dart'; -import 'package:test/test.dart'; - -// tests for ModelReturn -void main() { - final instance = ModelReturnBuilder(); - // TODO add properties to the builder and call build() - - group(ModelReturn, () { - // int return_ - test('to test the property `return_`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/name_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/name_test.dart deleted file mode 100644 index 5abbc1ba7ca8..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/name_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/name.dart'; -import 'package:test/test.dart'; - -// tests for Name -void main() { - final instance = NameBuilder(); - // TODO add properties to the builder and call build() - - group(Name, () { - // int name - test('to test the property `name`', () async { - // TODO - }); - - // int snakeCase - test('to test the property `snakeCase`', () async { - // TODO - }); - - // String property - test('to test the property `property`', () async { - // TODO - }); - - // int n123number - test('to test the property `n123number`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/nullable_class_test.dart deleted file mode 100644 index 17a2ce661154..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/nullable_class_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/nullable_class.dart'; -import 'package:test/test.dart'; - -// tests for NullableClass -void main() { - final instance = NullableClassBuilder(); - // TODO add properties to the builder and call build() - - group(NullableClass, () { - // int integerProp - test('to test the property `integerProp`', () async { - // TODO - }); - - // num numberProp - test('to test the property `numberProp`', () async { - // TODO - }); - - // bool booleanProp - test('to test the property `booleanProp`', () async { - // TODO - }); - - // String stringProp - test('to test the property `stringProp`', () async { - // TODO - }); - - // DateTime dateProp - test('to test the property `dateProp`', () async { - // TODO - }); - - // DateTime datetimeProp - test('to test the property `datetimeProp`', () async { - // TODO - }); - - // BuiltList arrayNullableProp - test('to test the property `arrayNullableProp`', () async { - // TODO - }); - - // BuiltList arrayAndItemsNullableProp - test('to test the property `arrayAndItemsNullableProp`', () async { - // TODO - }); - - // BuiltList arrayItemsNullable - test('to test the property `arrayItemsNullable`', () async { - // TODO - }); - - // BuiltMap objectNullableProp - test('to test the property `objectNullableProp`', () async { - // TODO - }); - - // BuiltMap objectAndItemsNullableProp - test('to test the property `objectAndItemsNullableProp`', () async { - // TODO - }); - - // BuiltMap objectItemsNullable - test('to test the property `objectItemsNullable`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/number_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/number_only_test.dart deleted file mode 100644 index 70b268d4d5e1..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/number_only_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/number_only.dart'; -import 'package:test/test.dart'; - -// tests for NumberOnly -void main() { - final instance = NumberOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(NumberOnly, () { - // num justNumber - test('to test the property `justNumber`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart deleted file mode 100644 index adb958570a73..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/object_with_deprecated_fields.dart'; -import 'package:test/test.dart'; - -// tests for ObjectWithDeprecatedFields -void main() { - final instance = ObjectWithDeprecatedFieldsBuilder(); - // TODO add properties to the builder and call build() - - group(ObjectWithDeprecatedFields, () { - // String uuid - test('to test the property `uuid`', () async { - // TODO - }); - - // num id - test('to test the property `id`', () async { - // TODO - }); - - // DeprecatedObject deprecatedRef - test('to test the property `deprecatedRef`', () async { - // TODO - }); - - // BuiltList bars - test('to test the property `bars`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/order_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/order_test.dart deleted file mode 100644 index 50510dbb3bb9..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/order_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/order.dart'; -import 'package:test/test.dart'; - -// tests for Order -void main() { - final instance = OrderBuilder(); - // TODO add properties to the builder and call build() - - group(Order, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // int petId - test('to test the property `petId`', () async { - // TODO - }); - - // int quantity - test('to test the property `quantity`', () async { - // TODO - }); - - // DateTime shipDate - test('to test the property `shipDate`', () async { - // TODO - }); - - // Order Status - // String status - test('to test the property `status`', () async { - // TODO - }); - - // bool complete (default value: false) - test('to test the property `complete`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_composite_test.dart deleted file mode 100644 index 85c1fa294e49..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_composite_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_composite.dart'; -import 'package:test/test.dart'; - -// tests for OuterComposite -void main() { - final instance = OuterCompositeBuilder(); - // TODO add properties to the builder and call build() - - group(OuterComposite, () { - // num myNumber - test('to test the property `myNumber`', () async { - // TODO - }); - - // String myString - test('to test the property `myString`', () async { - // TODO - }); - - // bool myBoolean - test('to test the property `myBoolean`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_default_value_test.dart deleted file mode 100644 index 014549547ea9..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_default_value_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_enum_default_value.dart'; -import 'package:test/test.dart'; - -// tests for OuterEnumDefaultValue -void main() { - - group(OuterEnumDefaultValue, () { - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart deleted file mode 100644 index a398c958a516..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_enum_integer_default_value.dart'; -import 'package:test/test.dart'; - -// tests for OuterEnumIntegerDefaultValue -void main() { - - group(OuterEnumIntegerDefaultValue, () { - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_integer_test.dart deleted file mode 100644 index a2efa3512fcc..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_integer_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_enum_integer.dart'; -import 'package:test/test.dart'; - -// tests for OuterEnumInteger -void main() { - - group(OuterEnumInteger, () { - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_test.dart deleted file mode 100644 index 6d3df5069b74..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_enum_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_enum.dart'; -import 'package:test/test.dart'; - -// tests for OuterEnum -void main() { - - group(OuterEnum, () { - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart deleted file mode 100644 index 6dced04ae6d6..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/outer_object_with_enum_property.dart'; -import 'package:test/test.dart'; - -// tests for OuterObjectWithEnumProperty -void main() { - final instance = OuterObjectWithEnumPropertyBuilder(); - // TODO add properties to the builder and call build() - - group(OuterObjectWithEnumProperty, () { - // OuterEnumInteger value - test('to test the property `value`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart deleted file mode 100644 index a24f5fead135..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/pet_api.dart'; -import 'package:test/test.dart'; - - -/// tests for PetApi -void main() { - final instance = Openapi().getPetApi(); - - group(PetApi, () { - // Add a new pet to the store - // - //Future addPet(Pet pet) async - test('test addPet', () async { - // TODO - }); - - // Deletes a pet - // - //Future deletePet(int petId, { String apiKey }) async - test('test deletePet', () async { - // TODO - }); - - // Finds Pets by status - // - // Multiple status values can be provided with comma separated strings - // - //Future> findPetsByStatus(BuiltList status) async - test('test findPetsByStatus', () async { - // TODO - }); - - // Finds Pets by tags - // - // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - // - //Future> findPetsByTags(BuiltSet tags) async - test('test findPetsByTags', () async { - // TODO - }); - - // Find pet by ID - // - // Returns a single pet - // - //Future getPetById(int petId) async - test('test getPetById', () async { - // TODO - }); - - // Update an existing pet - // - //Future updatePet(Pet pet) async - test('test updatePet', () async { - // TODO - }); - - // Updates a pet in the store with form data - // - //Future updatePetWithForm(int petId, { String name, String status }) async - test('test updatePetWithForm', () async { - // TODO - }); - - // uploads an image - // - //Future uploadFile(int petId, { String additionalMetadata, Uint8List file }) async - test('test uploadFile', () async { - // TODO - }); - - // uploads an image (required) - // - //Future uploadFileWithRequiredFile(int petId, Uint8List requiredFile, { String additionalMetadata }) async - test('test uploadFileWithRequiredFile', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart deleted file mode 100644 index 3cb55a300d20..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/pet.dart'; -import 'package:test/test.dart'; - -// tests for Pet -void main() { - final instance = PetBuilder(); - // TODO add properties to the builder and call build() - - group(Pet, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // Category category - test('to test the property `category`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - // BuiltSet photoUrls - test('to test the property `photoUrls`', () async { - // TODO - }); - - // BuiltList tags - test('to test the property `tags`', () async { - // TODO - }); - - // pet status in the store - // String status - test('to test the property `status`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/read_only_first_test.dart deleted file mode 100644 index f4c2db53d24e..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/read_only_first_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/read_only_first.dart'; -import 'package:test/test.dart'; - -// tests for ReadOnlyFirst -void main() { - final instance = ReadOnlyFirstBuilder(); - // TODO add properties to the builder and call build() - - group(ReadOnlyFirst, () { - // String bar - test('to test the property `bar`', () async { - // TODO - }); - - // String baz - test('to test the property `baz`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/special_model_name_test.dart deleted file mode 100644 index fdfdd9dac9b2..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/special_model_name_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/special_model_name.dart'; -import 'package:test/test.dart'; - -// tests for SpecialModelName -void main() { - final instance = SpecialModelNameBuilder(); - // TODO add properties to the builder and call build() - - group(SpecialModelName, () { - // int dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket - test('to test the property `dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart deleted file mode 100644 index 334abec90077..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/store_api.dart'; -import 'package:test/test.dart'; - - -/// tests for StoreApi -void main() { - final instance = Openapi().getStoreApi(); - - group(StoreApi, () { - // 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 - test('test deleteOrder', () async { - // TODO - }); - - // Returns pet inventories by status - // - // Returns a map of status codes to quantities - // - //Future> getInventory() async - test('test getInventory', () async { - // TODO - }); - - // 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 - test('test getOrderById', () async { - // TODO - }); - - // Place an order for a pet - // - //Future placeOrder(Order order) async - test('test placeOrder', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/tag_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/tag_test.dart deleted file mode 100644 index 0c8f000ee345..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/tag_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/tag.dart'; -import 'package:test/test.dart'; - -// tests for Tag -void main() { - final instance = TagBuilder(); - // TODO add properties to the builder and call build() - - group(Tag, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/user_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/user_api_test.dart deleted file mode 100644 index 5364711ee036..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/user_api_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/api.dart'; -import 'package:openapi/api/user_api.dart'; -import 'package:test/test.dart'; - - -/// tests for UserApi -void main() { - final instance = Openapi().getUserApi(); - - group(UserApi, () { - // Create user - // - // This can only be done by the logged in user. - // - //Future createUser(User user) async - test('test createUser', () async { - // TODO - }); - - // Creates list of users with given input array - // - //Future createUsersWithArrayInput(BuiltList user) async - test('test createUsersWithArrayInput', () async { - // TODO - }); - - // Creates list of users with given input array - // - //Future createUsersWithListInput(BuiltList user) async - test('test createUsersWithListInput', () async { - // TODO - }); - - // Delete user - // - // This can only be done by the logged in user. - // - //Future deleteUser(String username) async - test('test deleteUser', () async { - // TODO - }); - - // Get user by user name - // - //Future getUserByName(String username) async - test('test getUserByName', () async { - // TODO - }); - - // Logs user into the system - // - //Future loginUser(String username, String password) async - test('test loginUser', () async { - // TODO - }); - - // Logs out current logged in user session - // - //Future logoutUser() async - test('test logoutUser', () async { - // TODO - }); - - // Updated user - // - // This can only be done by the logged in user. - // - //Future updateUser(String username, User user) async - test('test updateUser', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/user_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/user_test.dart deleted file mode 100644 index 2dc6cb1fcaaa..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/user_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:openapi/model/user.dart'; -import 'package:test/test.dart'; - -// tests for User -void main() { - final instance = UserBuilder(); - // TODO add properties to the builder and call build() - - group(User, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String username - test('to test the property `username`', () async { - // TODO - }); - - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - - // String lastName - test('to test the property `lastName`', () async { - // TODO - }); - - // String email - test('to test the property `email`', () async { - // TODO - }); - - // String password - test('to test the property `password`', () async { - // TODO - }); - - // String phone - test('to test the property `phone`', () async { - // TODO - }); - - // User Status - // int userStatus - test('to test the property `userStatus`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/README.md deleted file mode 100644 index 7f36256df602..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Manual tests for Dart-DIO (DO NOT DELETE) - -These tests depend on the `build_runner` having already been run in the -parent package. - -The test are part of the integration tests for the parent package \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/analysis_options.yaml deleted file mode 100644 index a611887d3acf..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/analysis_options.yaml +++ /dev/null @@ -1,9 +0,0 @@ -analyzer: - language: - strict-inference: true - strict-raw-types: true - strong-mode: - implicit-dynamic: false - implicit-casts: false - exclude: - - test/*.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.lock b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.lock deleted file mode 100644 index f23a0ab8a164..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.lock +++ /dev/null @@ -1,425 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "12.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.40.6" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.1" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - built_collection: - dependency: "direct dev" - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "4.3.2" - built_value: - dependency: "direct dev" - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "7.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - coverage: - dependency: transitive - description: - name: coverage - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.2" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - dio: - dependency: "direct dev" - description: - name: dio - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.10" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "5.2.1" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.11" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.2" - http_mock_adapter: - dependency: "direct dev" - description: - name: http_mock_adapter - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.6" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.4" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "0.11.4" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.9" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - mockito: - dependency: "direct overridden" - description: - name: mockito - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.1" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.13" - openapi: - dependency: "direct dev" - description: - path: "../petstore_client_lib_fake" - relative: true - source: path - version: "1.0.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.0" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.4" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.9" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - shelf_static: - dependency: transitive - description: - name: shelf_static - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.9+2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.4+1" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - source_maps: - dependency: transitive - description: - name: source_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.10" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test: - dependency: "direct dev" - description: - name: test - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.5" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.18+1" - test_core: - dependency: transitive - description: - name: test_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.11+2" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - vm_service: - dependency: transitive - description: - name: vm_service - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.0" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7+15" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.5" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" -sdks: - dart: ">=2.12.0 <3.0.0" diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml deleted file mode 100644 index 83749ed48fb9..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: petstore_client_lib_fake_tests -version: 1.0.0 -description: OpenAPI API Dart DIO client tests for petstore_client_lib_fake - -environment: - sdk: ">=2.10.0 <3.0.0" - -dev_dependencies: - built_collection: ">=4.3.2 <5.0.0" - built_value: ">=7.1.0 <8.0.0" - dio: 3.0.10 - http_mock_adapter: 0.1.6 - openapi: - path: ../petstore_client_lib_fake - test: 1.15.5 - -dependency_overrides: - # This is required to prevent nullsafe versions from being pulled in - mockito: 4.1.1 diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/fake_api_test.dart deleted file mode 100644 index d0e373b7c52a..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/fake_api_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'dart:typed_data'; - -import 'package:built_collection/built_collection.dart'; -import 'package:dio/dio.dart'; -import 'package:http_mock_adapter/http_mock_adapter.dart'; -import 'package:openapi/api.dart'; -import 'package:openapi/api/fake_api.dart'; -import 'package:test/test.dart'; - -void main() { - Openapi client; - DioAdapter server; - - setUp(() { - server = DioAdapter(); - client = Openapi(dio: Dio()..httpClientAdapter = server); - }); - - tearDown(() { - server.close(); - }); - - group(FakeApi, () { - group('testEndpointParameters', () { - test('complete', () async { - server.onPost( - '/fake', - (request) => request.reply(200, null), - data: { - 'number': '3', - 'double': '-13.57', - 'pattern_without_delimiter': 'patternWithoutDelimiter', - 'byte': '0', - 'float': '1.23', - 'integer': '45', - 'int32': '2147483647', - 'int64': '9223372036854775807', - 'date': '2020-08-11T00:00:00.000Z', - 'dateTime': '2020-08-11T12:30:55.123Z', - 'binary': "Instance of 'MultipartFile'", - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded', - 'content-length': 255, - }, - ); - - final response = await client.getFakeApi().testEndpointParameters( - 3, - -13.57, - 'patternWithoutDelimiter', - '0', - float: 1.23, - integer: 45, - int32: 2147483647, - int64: 9223372036854775807, - date: DateTime.utc(2020, 8, 11), - dateTime: DateTime.utc(2020, 8, 11, 12, 30, 55, 123), - binary: Uint8List.fromList([0, 1, 2, 3, 4, 5]), - ); - - expect(response.statusCode, 200); - }); - - test('minimal', () async { - server.onPost( - '/fake', - (request) => request.reply(200, null), - data: { - 'byte': '0', - 'double': '-13.57', - 'number': '3', - 'pattern_without_delimiter': 'patternWithoutDelimiter', - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded', - 'content-length': 79, - }, - ); - - final response = await client.getFakeApi().testEndpointParameters( - 3, - -13.57, - 'patternWithoutDelimiter', - '0', - ); - - expect(response.statusCode, 200); - }); - }); - - group('testEnumParameters', () { - test('in body data', () async { - // Not sure if this is correct, we are not sending - // form data in the body but some weird map - server.onGet( - '/fake', - (request) => request.reply(200, null), - data: { - 'enum_form_string': 'formString', - 'enum_form_string_array': '[foo, bar]', - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded', - }, - ); - - final response = await client.getFakeApi().testEnumParameters( - enumFormString: 'formString', - enumFormStringArray: ListBuilder( - ['foo', 'bar'], - ).build(), - ); - - expect(response.statusCode, 200); - }); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart deleted file mode 100644 index 39baadd83755..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart +++ /dev/null @@ -1,218 +0,0 @@ -import 'package:built_collection/built_collection.dart'; -import 'package:dio/dio.dart'; -import 'package:http_mock_adapter/http_mock_adapter.dart'; -import 'package:openapi/api.dart'; -import 'package:openapi/api/pet_api.dart'; -import 'package:openapi/model/category.dart'; -import 'package:openapi/model/pet.dart'; -import 'package:openapi/model/tag.dart'; -import 'package:test/test.dart'; - -void main() { - const photo1 = 'https://localhost/photo1.jpg'; - const photo2 = 'https://localhost/photo2.jpg'; - - Openapi client; - DioAdapter server; - - setUp(() { - server = DioAdapter(); - client = Openapi(dio: Dio()..httpClientAdapter = server); - }); - - tearDown(() { - server.close(); - }); - - group(PetApi, () { - group('getPetById', () { - test('complete', () async { - server.onGet( - '/pet/5', - (request) => request.reply(200, { - 'id': 5, - 'name': 'Paula', - 'status': 'sold', - 'category': { - 'id': 1, - 'name': 'dog', - }, - 'photoUrls': [ - '$photo1', - '$photo2', - ], - 'tags': [ - { - 'id': 3, - 'name': 'smart', - }, - { - 'id': 4, - 'name': 'cute', - }, - ] - }), - ); - - final response = await client.getPetApi().getPetById(5); - - expect(response.statusCode, 200); - expect(response.data, isNotNull); - expect(response.data.id, 5); - expect(response.data.name, 'Paula'); - expect(response.data.status, PetStatusEnum.sold); - expect(response.data.category.id, 1); - expect(response.data.category.name, 'dog'); - expect(response.data.photoUrls.length, 2); - expect(response.data.tags.length, 2); - }); - - test('minimal', () async { - server.onGet( - '/pet/5', - (request) => request.reply(200, { - 'id': 5, - 'name': 'Paula', - 'photoUrls': [], - }), - ); - - final response = await client.getPetApi().getPetById(5); - - expect(response.statusCode, 200); - expect(response.data, isNotNull); - expect(response.data.id, 5); - expect(response.data.name, 'Paula'); - expect(response.data.status, isNull); - expect(response.data.category, isNull); - expect(response.data.photoUrls, isNotNull); - expect(response.data.photoUrls, isEmpty); - }); - }); - - group('addPet', () { - test('complete', () async { - server.onPost( - '/pet', - (request) => request.reply(200, ''), - data: { - 'id': 5, - 'name': 'Paula', - 'status': 'sold', - 'category': { - 'id': 1, - 'name': 'dog', - }, - 'photoUrls': [ - '$photo1', - '$photo2', - ], - 'tags': [ - { - 'id': 3, - 'name': 'smart', - }, - { - 'id': 4, - 'name': 'cute', - }, - ] - }, - headers: { - 'content-type': 'application/json', - 'content-length': 204, - }, - ); - - final response = await client.getPetApi().addPet(Pet((p) => p - ..id = 5 - ..name = 'Paula' - ..status = PetStatusEnum.sold - ..category = (CategoryBuilder() - ..id = 1 - ..name = 'dog') - ..photoUrls = SetBuilder([photo1, photo2]) - ..tags = ListBuilder([ - Tag((t) => t - ..id = 3 - ..name = 'smart'), - Tag((t) => t - ..id = 4 - ..name = 'cute'), - ]))); - - expect(response.statusCode, 200); - }); - - test('minimal', () async { - server.onPost( - '/pet', - (request) => request.reply(200, ''), - data: { - 'id': 5, - 'name': 'Paula', - 'photoUrls': [], - }, - headers: { - 'content-type': 'application/json', - 'content-length': 38, - }, - ); - - final response = await client.getPetApi().addPet(Pet((p) => p - ..id = 5 - ..name = 'Paula')); - - expect(response.statusCode, 200); - }); - }); - - group('getMultiplePets', () { - test('findByStatus', () async { - server.onRoute( - '/pet/findByStatus', - (request) => request.reply(200, [ - { - 'id': 5, - 'name': 'Paula', - 'status': 'sold', - 'photoUrls': [], - }, - { - 'id': 1, - 'name': 'Mickey', - 'status': 'available', - 'photoUrls': [], - }, - ]), - request: Request( - method: RequestMethods.get, - queryParameters: { - 'status': [ - 'available', - 'sold', - ], - }, - ), - ); - - final response = await client.getPetApi().findPetsByStatus( - ListBuilder([ - PetStatusEnum.available.name, - PetStatusEnum.sold.name, - ]).build(), - ); - - expect(response.statusCode, 200); - expect(response.data, isNotNull); - expect(response.data.length, 2); - expect(response.data[0].id, 5); - expect(response.data[0].name, 'Paula'); - expect(response.data[0].status, PetStatusEnum.sold); - expect(response.data[1].id, 1); - expect(response.data[1].name, 'Mickey'); - expect(response.data[1].status, PetStatusEnum.available); - }); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/store_api_test.dart deleted file mode 100644 index 0cecad29d328..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/store_api_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:http_mock_adapter/http_mock_adapter.dart'; -import 'package:openapi/api.dart'; -import 'package:openapi/api/store_api.dart'; -import 'package:test/test.dart'; - -void main() { - Openapi client; - DioAdapter server; - - setUp(() { - server = DioAdapter(); - client = Openapi(dio: Dio()..httpClientAdapter = server); - }); - - tearDown(() { - server.close(); - }); - - group(StoreApi, () { - group('getInventory', () { - test('with API key', () async { - client.setApiKey('api_key', 'SECRET_API_KEY'); - - server.onGet( - '/store/inventory', - (request) => request.reply(200, { - 'foo': 5, - 'bar': 999, - 'baz': 0, - }), - headers: { - 'api_key': 'SECRET_API_KEY', - }, - ); - - final response = await client.getStoreApi().getInventory(); - - expect(response.statusCode, 200); - expect(response.data, isNotNull); - expect(response.data.length, 3); - }); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart deleted file mode 100644 index f48210be33e0..000000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart +++ /dev/null @@ -1,230 +0,0 @@ -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; -import 'package:dio/dio.dart'; -import 'package:openapi/api_util.dart'; -import 'package:openapi/model/cat.dart'; -import 'package:openapi/serializers.dart'; -import 'package:test/test.dart'; - -void main() { - group('api_utils', () { - group('encodeFormParameter should return', () { - test('empty String for null', () { - expect( - encodeFormParameter( - standardSerializers, - null, - const FullType(Cat), - ), - '', - ); - }); - - test('String for String', () { - expect( - encodeFormParameter( - standardSerializers, - 'foo', - const FullType(String), - ), - 'foo', - ); - }); - - test('List for BuiltList', () { - expect( - encodeFormParameter( - standardSerializers, - ListBuilder(['foo', 'bar', 'baz']).build(), - const FullType(BuiltList, [FullType(String)]), - ), - ['foo', 'bar', 'baz'], - ); - }); - - test('Map for BuiltList', () { - expect( - encodeFormParameter( - standardSerializers, - MapBuilder({ - 'foo': 'foo-value', - 'bar': 'bar-value', - 'baz': 'baz-value', - }).build(), - const FullType(BuiltMap, [FullType(String), FullType(String)]), - ), - { - 'foo': 'foo-value', - 'bar': 'bar-value', - 'baz': 'baz-value', - }, - ); - }); - - test('num for num', () { - expect( - encodeFormParameter(standardSerializers, 0, const FullType(int)), - 0, - ); - expect( - encodeFormParameter(standardSerializers, 1, const FullType(int)), - 1, - ); - expect( - encodeFormParameter(standardSerializers, 1.0, const FullType(num)), - 1.0, - ); - expect( - encodeFormParameter( - standardSerializers, 1.234, const FullType(double)), - 1.234, - ); - }); - - test('List for BuiltList', () { - expect( - encodeFormParameter( - standardSerializers, - ListBuilder([0, 1, 2, 3, 4.5, -123.456]).build(), - const FullType(BuiltList, [FullType(num)]), - ), - [0, 1, 2, 3, 4.5, -123.456], - ); - }); - - test('bool for bool', () { - expect( - encodeFormParameter( - standardSerializers, - true, - const FullType(bool), - ), - true, - ); - expect( - encodeFormParameter( - standardSerializers, - false, - const FullType(bool), - ), - false, - ); - }); - - test('String for Date', () { - expect( - encodeFormParameter( - standardSerializers, - DateTime.utc(2020, 8, 11), - const FullType(DateTime), - ), - '2020-08-11T00:00:00.000Z', - ); - }); - - test('String for DateTime', () { - expect( - encodeFormParameter( - standardSerializers, - DateTime.utc(2020, 8, 11, 12, 30, 55, 123), - const FullType(DateTime), - ), - '2020-08-11T12:30:55.123Z', - ); - }); - - test('JSON String for Cat', () { - // Not sure that is even a valid case, - // sending complex objects via FormData may not work as expected - expect( - encodeFormParameter( - standardSerializers, - (CatBuilder() - ..color = 'black' - ..className = 'cat' - ..declawed = false) - .build(), - const FullType(Cat), - ), - '{"className":"cat","color":"black","declawed":false}', - ); - }); - }); - - test('encodes FormData correctly', () { - final data = FormData.fromMap({ - 'null': encodeFormParameter( - standardSerializers, - null, - const FullType(num), - ), - 'empty': encodeFormParameter( - standardSerializers, - '', - const FullType(String), - ), - 'string_list': encodeFormParameter( - standardSerializers, - ListBuilder(['foo', 'bar', 'baz']).build(), - const FullType(BuiltList, [FullType(String)]), - ), - 'num_list': encodeFormParameter( - standardSerializers, - ListBuilder([0, 1, 2, 3, 4.5, -123.456]).build(), - const FullType(BuiltList, [FullType(num)]), - ), - 'string_map': encodeFormParameter( - standardSerializers, - MapBuilder({ - 'foo': 'foo-value', - 'bar': 'bar-value', - 'baz': 'baz-value', - }).build(), - const FullType(BuiltMap, [FullType(String), FullType(String)]), - ), - 'bool': encodeFormParameter( - standardSerializers, - true, - const FullType(bool), - ), - 'double': encodeFormParameter( - standardSerializers, - -123.456, - const FullType(double), - ), - 'date_time': encodeFormParameter( - standardSerializers, - DateTime.utc(2020, 8, 11, 12, 30, 55, 123), - const FullType(DateTime), - ), - }); - - expect( - data.fields, - pairwiseCompare, MapEntry>( - >[ - MapEntry('null', ''), - MapEntry('empty', ''), - MapEntry('string_list[]', 'foo'), - MapEntry('string_list[]', 'bar'), - MapEntry('string_list[]', 'baz'), - MapEntry('num_list[]', '0'), - MapEntry('num_list[]', '1'), - MapEntry('num_list[]', '2'), - MapEntry('num_list[]', '3'), - MapEntry('num_list[]', '4.5'), - MapEntry('num_list[]', '-123.456'), - MapEntry('string_map[foo]', 'foo-value'), - MapEntry('string_map[bar]', 'bar-value'), - MapEntry('string_map[baz]', 'baz-value'), - MapEntry('bool', 'true'), - MapEntry('double', '-123.456'), - MapEntry('date_time', '2020-08-11T12:30:55.123Z'), - ], - (e, a) => e.key == a.key && e.value == a.value, - 'Compares map entries by key and value', - ), - ); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart index 6042baea5514..5e185d3c8c03 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart @@ -59,17 +59,17 @@ class ApiResponse { String toString() => 'ApiResponse[code=$code, type=$type, message=$message]'; Map toJson() { - final json = {}; + final _json = {}; if (code != null) { - json[r'code'] = code; + _json[r'code'] = code; } if (type != null) { - json[r'type'] = type; + _json[r'type'] = type; } if (message != null) { - json[r'message'] = message; + _json[r'message'] = message; } - return json; + return _json; } /// Returns a new [ApiResponse] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart index f4a572dffc73..8efd3f47b403 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart @@ -48,14 +48,14 @@ class Category { String toString() => 'Category[id=$id, name=$name]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (name != null) { - json[r'name'] = name; + _json[r'name'] = name; } - return json; + return _json; } /// Returns a new [Category] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart index ad84a894e8db..1ffb5d60b745 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart @@ -81,24 +81,24 @@ class Order { String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (petId != null) { - json[r'petId'] = petId; + _json[r'petId'] = petId; } if (quantity != null) { - json[r'quantity'] = quantity; + _json[r'quantity'] = quantity; } if (shipDate != null) { - json[r'shipDate'] = shipDate!.toUtc().toIso8601String(); + _json[r'shipDate'] = shipDate!.toUtc().toIso8601String(); } if (status != null) { - json[r'status'] = status; + _json[r'status'] = status; } - json[r'complete'] = complete; - return json; + _json[r'complete'] = complete; + return _json; } /// Returns a new [Order] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart index 62856ddace32..5f57ab967157 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart @@ -69,20 +69,20 @@ class Pet { String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (category != null) { - json[r'category'] = category; + _json[r'category'] = category; } - json[r'name'] = name; - json[r'photoUrls'] = photoUrls; - json[r'tags'] = tags; + _json[r'name'] = name; + _json[r'photoUrls'] = photoUrls; + _json[r'tags'] = tags; if (status != null) { - json[r'status'] = status; + _json[r'status'] = status; } - return json; + return _json; } /// Returns a new [Pet] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart index 71b8799d1cb1..666a849c73da 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart @@ -48,14 +48,14 @@ class Tag { String toString() => 'Tag[id=$id, name=$name]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (name != null) { - json[r'name'] = name; + _json[r'name'] = name; } - return json; + return _json; } /// Returns a new [Tag] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart index 0b10d4fe7c23..75d3e1e136ae 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart @@ -115,32 +115,32 @@ class User { String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (username != null) { - json[r'username'] = username; + _json[r'username'] = username; } if (firstName != null) { - json[r'firstName'] = firstName; + _json[r'firstName'] = firstName; } if (lastName != null) { - json[r'lastName'] = lastName; + _json[r'lastName'] = lastName; } if (email != null) { - json[r'email'] = email; + _json[r'email'] = email; } if (password != null) { - json[r'password'] = password; + _json[r'password'] = password; } if (phone != null) { - json[r'phone'] = phone; + _json[r'phone'] = phone; } if (userStatus != null) { - json[r'userStatus'] = userStatus; + _json[r'userStatus'] = userStatus; } - return json; + return _json; } /// Returns a new [User] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES index 15809529435e..578005d31c6b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES @@ -3,6 +3,7 @@ README.md analysis_options.yaml doc/AdditionalPropertiesClass.md +doc/AllOfWithSingleRef.md doc/Animal.md doc/AnotherFakeApi.md doc/ApiResponse.md @@ -50,6 +51,7 @@ doc/OuterObjectWithEnumProperty.md doc/Pet.md doc/PetApi.md doc/ReadOnlyFirst.md +doc/SingleRefType.md doc/SpecialModelName.md doc/StoreApi.md doc/Tag.md @@ -73,6 +75,7 @@ lib/auth/http_basic_auth.dart lib/auth/http_bearer_auth.dart lib/auth/oauth.dart lib/model/additional_properties_class.dart +lib/model/all_of_with_single_ref.dart lib/model/animal.dart lib/model/api_response.dart lib/model/array_of_array_of_number_only.dart @@ -115,6 +118,7 @@ lib/model/outer_enum_integer_default_value.dart lib/model/outer_object_with_enum_property.dart lib/model/pet.dart lib/model/read_only_first.dart +lib/model/single_ref_type.dart lib/model/special_model_name.dart lib/model/tag.dart lib/model/user.dart diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index 408714551412..c19234f8d8a3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -104,6 +104,7 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AdditionalPropertiesClass](doc//AdditionalPropertiesClass.md) + - [AllOfWithSingleRef](doc//AllOfWithSingleRef.md) - [Animal](doc//Animal.md) - [ApiResponse](doc//ApiResponse.md) - [ArrayOfArrayOfNumberOnly](doc//ArrayOfArrayOfNumberOnly.md) @@ -146,6 +147,7 @@ Class | Method | HTTP request | Description - [OuterObjectWithEnumProperty](doc//OuterObjectWithEnumProperty.md) - [Pet](doc//Pet.md) - [ReadOnlyFirst](doc//ReadOnlyFirst.md) + - [SingleRefType](doc//SingleRefType.md) - [SpecialModelName](doc//SpecialModelName.md) - [Tag](doc//Tag.md) - [User](doc//User.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md new file mode 100644 index 000000000000..4c6f3ab2fe11 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md @@ -0,0 +1,16 @@ +# openapi.model.AllOfWithSingleRef + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md index 5650cc2a6ebb..0bb17eb79f7b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md @@ -565,7 +565,7 @@ void (empty response body) [[Back to top]](#) [[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(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -582,11 +582,12 @@ final enumQueryStringArray = []; // List | Query parameter enum test (st final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) final enumQueryInteger = 56; // int | Query parameter enum test (double) final enumQueryDouble = 1.2; // double | Query parameter enum test (double) +final enumQueryModelArray = []; // List | final enumFormStringArray = []; // List | Form parameter enum test (string array) final enumFormString = enumFormString_example; // String | Form parameter enum test (string) try { - api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); } @@ -602,6 +603,7 @@ Name | Type | Description | Notes **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**List**](EnumClass.md)| | [optional] [default to const []] **enumFormStringArray** | [**List**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SingleRefType.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SingleRefType.md new file mode 100644 index 000000000000..0dc93840cd7f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SingleRefType.md @@ -0,0 +1,14 @@ +# openapi.model.SingleRefType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## 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/dart2/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart index 48f61a0d5f5d..3e66c2e121d3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart @@ -36,6 +36,7 @@ part 'api/store_api.dart'; part 'api/user_api.dart'; part 'model/additional_properties_class.dart'; +part 'model/all_of_with_single_ref.dart'; part 'model/animal.dart'; part 'model/api_response.dart'; part 'model/array_of_array_of_number_only.dart'; @@ -78,6 +79,7 @@ part 'model/outer_enum_integer_default_value.dart'; part 'model/outer_object_with_enum_property.dart'; part 'model/pet.dart'; part 'model/read_only_first.dart'; +part 'model/single_ref_type.dart'; part 'model/special_model_name.dart'; part 'model/tag.dart'; part 'model/user.dart'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index be64e0d230e9..d4bd12ec939b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -806,12 +806,14 @@ class FakeApi { /// * [double] enumQueryDouble: /// Query parameter enum test (double) /// + /// * [List] enumQueryModelArray: + /// /// * [List] enumFormStringArray: /// Form parameter enum test (string array) /// /// * [String] enumFormString: /// Form parameter enum test (string) - Future testEnumParametersWithHttpInfo({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumFormStringArray, String? enumFormString, }) async { + Future testEnumParametersWithHttpInfo({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumQueryModelArray, List? enumFormStringArray, String? enumFormString, }) async { // ignore: prefer_const_declarations final path = r'/fake'; @@ -834,6 +836,9 @@ class FakeApi { if (enumQueryDouble != null) { queryParams.addAll(_queryParams('', 'enum_query_double', enumQueryDouble)); } + if (enumQueryModelArray != null) { + queryParams.addAll(_queryParams('multi', 'enum_query_model_array', enumQueryModelArray)); + } if (enumHeaderStringArray != null) { headerParams[r'enum_header_string_array'] = parameterToString(enumHeaderStringArray); @@ -888,13 +893,15 @@ class FakeApi { /// * [double] enumQueryDouble: /// Query parameter enum test (double) /// + /// * [List] enumQueryModelArray: + /// /// * [List] enumFormStringArray: /// Form parameter enum test (string array) /// /// * [String] enumFormString: /// Form parameter enum test (string) - Future testEnumParameters({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumFormStringArray, String? enumFormString, }) async { - final response = await testEnumParametersWithHttpInfo( enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString, ); + Future testEnumParameters({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumQueryModelArray, List? enumFormStringArray, String? enumFormString, }) async { + final response = await testEnumParametersWithHttpInfo( enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumQueryModelArray: enumQueryModelArray, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart index 8277ac92e7ca..508d1b2beac9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart @@ -215,6 +215,8 @@ class ApiClient { return valueString == 'true' || valueString == '1'; case 'AdditionalPropertiesClass': return AdditionalPropertiesClass.fromJson(value); + case 'AllOfWithSingleRef': + return AllOfWithSingleRef.fromJson(value); case 'Animal': return Animal.fromJson(value); case 'ApiResponse': @@ -299,6 +301,8 @@ class ApiClient { return Pet.fromJson(value); case 'ReadOnlyFirst': return ReadOnlyFirst.fromJson(value); + case 'SingleRefType': + return SingleRefTypeTypeTransformer().decode(value); case 'SpecialModelName': return SpecialModelName.fromJson(value); case 'Tag': diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart index 1aaf1dae8eb3..4a29277289d8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart @@ -70,6 +70,9 @@ String parameterToString(dynamic value) { if (value is OuterEnumIntegerDefaultValue) { return OuterEnumIntegerDefaultValueTypeTransformer().encode(value).toString(); } + if (value is SingleRefType) { + return SingleRefTypeTypeTransformer().encode(value).toString(); + } return value.toString(); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart index e82b8265bf59..43adda6ff718 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart @@ -36,10 +36,10 @@ class AdditionalPropertiesClass { String toString() => 'AdditionalPropertiesClass[mapProperty=$mapProperty, mapOfMapProperty=$mapOfMapProperty]'; Map toJson() { - final json = {}; - json[r'map_property'] = mapProperty; - json[r'map_of_map_property'] = mapOfMapProperty; - return json; + final _json = {}; + _json[r'map_property'] = mapProperty; + _json[r'map_of_map_property'] = mapOfMapProperty; + return _json; } /// Returns a new [AdditionalPropertiesClass] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart new file mode 100644 index 000000000000..221af9ab17ec --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart @@ -0,0 +1,127 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AllOfWithSingleRef { + /// Returns a new [AllOfWithSingleRef] instance. + AllOfWithSingleRef({ + this.username, + this.singleRefType, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? username; + + SingleRefType? singleRefType; + + @override + bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && + other.username == username && + other.singleRefType == singleRefType; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (username == null ? 0 : username!.hashCode) + + (singleRefType == null ? 0 : singleRefType!.hashCode); + + @override + String toString() => 'AllOfWithSingleRef[username=$username, singleRefType=$singleRefType]'; + + Map toJson() { + final _json = {}; + if (username != null) { + _json[r'username'] = username; + } + if (singleRefType != null) { + _json[r'SingleRefType'] = singleRefType; + } + return _json; + } + + /// Returns a new [AllOfWithSingleRef] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AllOfWithSingleRef? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AllOfWithSingleRef[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AllOfWithSingleRef[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AllOfWithSingleRef( + username: mapValueOfType(json, r'username'), + singleRefType: SingleRefType.fromJson(json[r'SingleRefType']), + ); + } + return null; + } + + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AllOfWithSingleRef.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AllOfWithSingleRef.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AllOfWithSingleRef-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AllOfWithSingleRef.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart index 2d279e07c494..ab9fe4deccdb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart @@ -36,10 +36,10 @@ class Animal { String toString() => 'Animal[className=$className, color=$color]'; Map toJson() { - final json = {}; - json[r'className'] = className; - json[r'color'] = color; - return json; + final _json = {}; + _json[r'className'] = className; + _json[r'color'] = color; + return _json; } /// Returns a new [Animal] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart index 6042baea5514..5e185d3c8c03 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart @@ -59,17 +59,17 @@ class ApiResponse { String toString() => 'ApiResponse[code=$code, type=$type, message=$message]'; Map toJson() { - final json = {}; + final _json = {}; if (code != null) { - json[r'code'] = code; + _json[r'code'] = code; } if (type != null) { - json[r'type'] = type; + _json[r'type'] = type; } if (message != null) { - json[r'message'] = message; + _json[r'message'] = message; } - return json; + return _json; } /// Returns a new [ApiResponse] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart index 4314803a3ba5..c328bc86ab9f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart @@ -31,9 +31,9 @@ class ArrayOfArrayOfNumberOnly { String toString() => 'ArrayOfArrayOfNumberOnly[arrayArrayNumber=$arrayArrayNumber]'; Map toJson() { - final json = {}; - json[r'ArrayArrayNumber'] = arrayArrayNumber; - return json; + final _json = {}; + _json[r'ArrayArrayNumber'] = arrayArrayNumber; + return _json; } /// Returns a new [ArrayOfArrayOfNumberOnly] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart index 8e9d6784f804..15a737605dc6 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart @@ -31,9 +31,9 @@ class ArrayOfNumberOnly { String toString() => 'ArrayOfNumberOnly[arrayNumber=$arrayNumber]'; Map toJson() { - final json = {}; - json[r'ArrayNumber'] = arrayNumber; - return json; + final _json = {}; + _json[r'ArrayNumber'] = arrayNumber; + return _json; } /// Returns a new [ArrayOfNumberOnly] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart index a914c04ee52a..f9497f9a719b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart @@ -41,11 +41,11 @@ class ArrayTest { String toString() => 'ArrayTest[arrayOfString=$arrayOfString, arrayArrayOfInteger=$arrayArrayOfInteger, arrayArrayOfModel=$arrayArrayOfModel]'; Map toJson() { - final json = {}; - json[r'array_of_string'] = arrayOfString; - json[r'array_array_of_integer'] = arrayArrayOfInteger; - json[r'array_array_of_model'] = arrayArrayOfModel; - return json; + final _json = {}; + _json[r'array_of_string'] = arrayOfString; + _json[r'array_array_of_integer'] = arrayArrayOfInteger; + _json[r'array_array_of_model'] = arrayArrayOfModel; + return _json; } /// Returns a new [ArrayTest] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart index 3e781d44c727..c6e9806d6232 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart @@ -93,26 +93,26 @@ class Capitalization { String toString() => 'Capitalization[smallCamel=$smallCamel, capitalCamel=$capitalCamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, sCAETHFlowPoints=$sCAETHFlowPoints, ATT_NAME=$ATT_NAME]'; Map toJson() { - final json = {}; + final _json = {}; if (smallCamel != null) { - json[r'smallCamel'] = smallCamel; + _json[r'smallCamel'] = smallCamel; } if (capitalCamel != null) { - json[r'CapitalCamel'] = capitalCamel; + _json[r'CapitalCamel'] = capitalCamel; } if (smallSnake != null) { - json[r'small_Snake'] = smallSnake; + _json[r'small_Snake'] = smallSnake; } if (capitalSnake != null) { - json[r'Capital_Snake'] = capitalSnake; + _json[r'Capital_Snake'] = capitalSnake; } if (sCAETHFlowPoints != null) { - json[r'SCA_ETH_Flow_Points'] = sCAETHFlowPoints; + _json[r'SCA_ETH_Flow_Points'] = sCAETHFlowPoints; } if (ATT_NAME != null) { - json[r'ATT_NAME'] = ATT_NAME; + _json[r'ATT_NAME'] = ATT_NAME; } - return json; + return _json; } /// Returns a new [Capitalization] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart index f5b639d8e342..6c95b1ebe239 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart @@ -47,13 +47,13 @@ class Cat { String toString() => 'Cat[className=$className, color=$color, declawed=$declawed]'; Map toJson() { - final json = {}; - json[r'className'] = className; - json[r'color'] = color; + final _json = {}; + _json[r'className'] = className; + _json[r'color'] = color; if (declawed != null) { - json[r'declawed'] = declawed; + _json[r'declawed'] = declawed; } - return json; + return _json; } /// Returns a new [Cat] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart index 608082b26ad7..615c104c3b71 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart @@ -37,11 +37,11 @@ class CatAllOf { String toString() => 'CatAllOf[declawed=$declawed]'; Map toJson() { - final json = {}; + final _json = {}; if (declawed != null) { - json[r'declawed'] = declawed; + _json[r'declawed'] = declawed; } - return json; + return _json; } /// Returns a new [CatAllOf] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart index 9b77fed5e7cb..7f2ab121ae93 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart @@ -42,12 +42,12 @@ class Category { String toString() => 'Category[id=$id, name=$name]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } - json[r'name'] = name; - return json; + _json[r'name'] = name; + return _json; } /// Returns a new [Category] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart index 8335e5810968..6473acd90ed9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart @@ -37,11 +37,11 @@ class ClassModel { String toString() => 'ClassModel[class_=$class_]'; Map toJson() { - final json = {}; + final _json = {}; if (class_ != null) { - json[r'_class'] = class_; + _json[r'_class'] = class_; } - return json; + return _json; } /// Returns a new [ClassModel] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart index b8a5b443cc7e..23344ec66dba 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart @@ -37,11 +37,11 @@ class DeprecatedObject { String toString() => 'DeprecatedObject[name=$name]'; Map toJson() { - final json = {}; + final _json = {}; if (name != null) { - json[r'name'] = name; + _json[r'name'] = name; } - return json; + return _json; } /// Returns a new [DeprecatedObject] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart index 8ec20b96c81a..c403d14c05dd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart @@ -47,13 +47,13 @@ class Dog { String toString() => 'Dog[className=$className, color=$color, breed=$breed]'; Map toJson() { - final json = {}; - json[r'className'] = className; - json[r'color'] = color; + final _json = {}; + _json[r'className'] = className; + _json[r'color'] = color; if (breed != null) { - json[r'breed'] = breed; + _json[r'breed'] = breed; } - return json; + return _json; } /// Returns a new [Dog] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart index 03d52a6cb2f9..e059f9e105f8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart @@ -37,11 +37,11 @@ class DogAllOf { String toString() => 'DogAllOf[breed=$breed]'; Map toJson() { - final json = {}; + final _json = {}; if (breed != null) { - json[r'breed'] = breed; + _json[r'breed'] = breed; } - return json; + return _json; } /// Returns a new [DogAllOf] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart index ad8bff240a14..426eb6036f01 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart @@ -36,12 +36,12 @@ class EnumArrays { String toString() => 'EnumArrays[justSymbol=$justSymbol, arrayEnum=$arrayEnum]'; Map toJson() { - final json = {}; + final _json = {}; if (justSymbol != null) { - json[r'just_symbol'] = justSymbol; + _json[r'just_symbol'] = justSymbol; } - json[r'array_enum'] = arrayEnum; - return json; + _json[r'array_enum'] = arrayEnum; + return _json; } /// Returns a new [EnumArrays] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index 06ff55540f79..551376fd2e1b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -84,30 +84,30 @@ class EnumTest { String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerEnum=$outerEnum, outerEnumInteger=$outerEnumInteger, outerEnumDefaultValue=$outerEnumDefaultValue, outerEnumIntegerDefaultValue=$outerEnumIntegerDefaultValue]'; Map toJson() { - final json = {}; + final _json = {}; if (enumString != null) { - json[r'enum_string'] = enumString; + _json[r'enum_string'] = enumString; } - json[r'enum_string_required'] = enumStringRequired; + _json[r'enum_string_required'] = enumStringRequired; if (enumInteger != null) { - json[r'enum_integer'] = enumInteger; + _json[r'enum_integer'] = enumInteger; } if (enumNumber != null) { - json[r'enum_number'] = enumNumber; + _json[r'enum_number'] = enumNumber; } if (outerEnum != null) { - json[r'outerEnum'] = outerEnum; + _json[r'outerEnum'] = outerEnum; } if (outerEnumInteger != null) { - json[r'outerEnumInteger'] = outerEnumInteger; + _json[r'outerEnumInteger'] = outerEnumInteger; } if (outerEnumDefaultValue != null) { - json[r'outerEnumDefaultValue'] = outerEnumDefaultValue; + _json[r'outerEnumDefaultValue'] = outerEnumDefaultValue; } if (outerEnumIntegerDefaultValue != null) { - json[r'outerEnumIntegerDefaultValue'] = outerEnumIntegerDefaultValue; + _json[r'outerEnumIntegerDefaultValue'] = outerEnumIntegerDefaultValue; } - return json; + return _json; } /// Returns a new [EnumTest] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart index 0f53a5ed1f92..2c934d2f28c7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart @@ -42,12 +42,12 @@ class FileSchemaTestClass { String toString() => 'FileSchemaTestClass[file=$file, files=$files]'; Map toJson() { - final json = {}; + final _json = {}; if (file != null) { - json[r'file'] = file; + _json[r'file'] = file; } - json[r'files'] = files; - return json; + _json[r'files'] = files; + return _json; } /// Returns a new [FileSchemaTestClass] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart index 4fd3f08d59a8..d788ffcc5bac 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart @@ -31,9 +31,9 @@ class Foo { String toString() => 'Foo[bar=$bar]'; Map toJson() { - final json = {}; - json[r'bar'] = bar; - return json; + final _json = {}; + _json[r'bar'] = bar; + return _json; } /// Returns a new [Foo] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart index 48f039432af4..a04571fe6d10 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart @@ -190,48 +190,48 @@ class FormatTest { String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; Map toJson() { - final json = {}; + final _json = {}; if (integer != null) { - json[r'integer'] = integer; + _json[r'integer'] = integer; } if (int32 != null) { - json[r'int32'] = int32; + _json[r'int32'] = int32; } if (int64 != null) { - json[r'int64'] = int64; + _json[r'int64'] = int64; } - json[r'number'] = number; + _json[r'number'] = number; if (float != null) { - json[r'float'] = float; + _json[r'float'] = float; } if (double_ != null) { - json[r'double'] = double_; + _json[r'double'] = double_; } if (decimal != null) { - json[r'decimal'] = decimal; + _json[r'decimal'] = decimal; } if (string != null) { - json[r'string'] = string; + _json[r'string'] = string; } - json[r'byte'] = byte; + _json[r'byte'] = byte; if (binary != null) { - json[r'binary'] = binary; + _json[r'binary'] = binary; } - json[r'date'] = _dateFormatter.format(date.toUtc()); + _json[r'date'] = _dateFormatter.format(date.toUtc()); if (dateTime != null) { - json[r'dateTime'] = dateTime!.toUtc().toIso8601String(); + _json[r'dateTime'] = dateTime!.toUtc().toIso8601String(); } if (uuid != null) { - json[r'uuid'] = uuid; + _json[r'uuid'] = uuid; } - json[r'password'] = password; + _json[r'password'] = password; if (patternWithDigits != null) { - json[r'pattern_with_digits'] = patternWithDigits; + _json[r'pattern_with_digits'] = patternWithDigits; } if (patternWithDigitsAndDelimiter != null) { - json[r'pattern_with_digits_and_delimiter'] = patternWithDigitsAndDelimiter; + _json[r'pattern_with_digits_and_delimiter'] = patternWithDigitsAndDelimiter; } - return json; + return _json; } /// Returns a new [FormatTest] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart index 8d6811c7d9b2..7e4166ebf854 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart @@ -48,14 +48,14 @@ class HasOnlyReadOnly { String toString() => 'HasOnlyReadOnly[bar=$bar, foo=$foo]'; Map toJson() { - final json = {}; + final _json = {}; if (bar != null) { - json[r'bar'] = bar; + _json[r'bar'] = bar; } if (foo != null) { - json[r'foo'] = foo; + _json[r'foo'] = foo; } - return json; + return _json; } /// Returns a new [HasOnlyReadOnly] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart index 94c1561bd548..98cb91b77d3d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart @@ -31,11 +31,11 @@ class HealthCheckResult { String toString() => 'HealthCheckResult[nullableMessage=$nullableMessage]'; Map toJson() { - final json = {}; + final _json = {}; if (nullableMessage != null) { - json[r'NullableMessage'] = nullableMessage; + _json[r'NullableMessage'] = nullableMessage; } - return json; + return _json; } /// Returns a new [HealthCheckResult] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart index d66b3546637a..06fb82a95445 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart @@ -37,11 +37,11 @@ class InlineResponseDefault { String toString() => 'InlineResponseDefault[string=$string]'; Map toJson() { - final json = {}; + final _json = {}; if (string != null) { - json[r'string'] = string; + _json[r'string'] = string; } - return json; + return _json; } /// Returns a new [InlineResponseDefault] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart index 5afcb48e86fa..b544dc8c6f76 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart @@ -46,12 +46,12 @@ class MapTest { String toString() => 'MapTest[mapMapOfString=$mapMapOfString, mapOfEnumString=$mapOfEnumString, directMap=$directMap, indirectMap=$indirectMap]'; Map toJson() { - final json = {}; - json[r'map_map_of_string'] = mapMapOfString; - json[r'map_of_enum_string'] = mapOfEnumString; - json[r'direct_map'] = directMap; - json[r'indirect_map'] = indirectMap; - return json; + final _json = {}; + _json[r'map_map_of_string'] = mapMapOfString; + _json[r'map_of_enum_string'] = mapOfEnumString; + _json[r'direct_map'] = directMap; + _json[r'indirect_map'] = indirectMap; + return _json; } /// Returns a new [MapTest] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart index 599c817a66ad..ce90481b6cd3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart @@ -53,15 +53,15 @@ class MixedPropertiesAndAdditionalPropertiesClass { String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, dateTime=$dateTime, map=$map]'; Map toJson() { - final json = {}; + final _json = {}; if (uuid != null) { - json[r'uuid'] = uuid; + _json[r'uuid'] = uuid; } if (dateTime != null) { - json[r'dateTime'] = dateTime!.toUtc().toIso8601String(); + _json[r'dateTime'] = dateTime!.toUtc().toIso8601String(); } - json[r'map'] = map; - return json; + _json[r'map'] = map; + return _json; } /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart index de257edc7cc9..46971d2d4be8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart @@ -48,14 +48,14 @@ class Model200Response { String toString() => 'Model200Response[name=$name, class_=$class_]'; Map toJson() { - final json = {}; + final _json = {}; if (name != null) { - json[r'name'] = name; + _json[r'name'] = name; } if (class_ != null) { - json[r'class'] = class_; + _json[r'class'] = class_; } - return json; + return _json; } /// Returns a new [Model200Response] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart index d48d030c9d06..db045aff6e18 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart @@ -37,11 +37,11 @@ class ModelClient { String toString() => 'ModelClient[client=$client]'; Map toJson() { - final json = {}; + final _json = {}; if (client != null) { - json[r'client'] = client; + _json[r'client'] = client; } - return json; + return _json; } /// Returns a new [ModelClient] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart index dc0f89b1c4f9..aa62095d6ff6 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart @@ -38,11 +38,11 @@ class ModelFile { String toString() => 'ModelFile[sourceURI=$sourceURI]'; Map toJson() { - final json = {}; + final _json = {}; if (sourceURI != null) { - json[r'sourceURI'] = sourceURI; + _json[r'sourceURI'] = sourceURI; } - return json; + return _json; } /// Returns a new [ModelFile] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart index d079e6aa221d..87da3387c5f4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart @@ -37,11 +37,11 @@ class ModelList { String toString() => 'ModelList[n123list=$n123list]'; Map toJson() { - final json = {}; + final _json = {}; if (n123list != null) { - json[r'123-list'] = n123list; + _json[r'123-list'] = n123list; } - return json; + return _json; } /// Returns a new [ModelList] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart index 3042ac8b3af5..6433bf044ff5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart @@ -37,11 +37,11 @@ class ModelReturn { String toString() => 'ModelReturn[return_=$return_]'; Map toJson() { - final json = {}; + final _json = {}; if (return_ != null) { - json[r'return'] = return_; + _json[r'return'] = return_; } - return json; + return _json; } /// Returns a new [ModelReturn] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart index 10461ccba2b6..8f922da35e82 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart @@ -64,18 +64,18 @@ class Name { String toString() => 'Name[name=$name, snakeCase=$snakeCase, property=$property, n123number=$n123number]'; Map toJson() { - final json = {}; - json[r'name'] = name; + final _json = {}; + _json[r'name'] = name; if (snakeCase != null) { - json[r'snake_case'] = snakeCase; + _json[r'snake_case'] = snakeCase; } if (property != null) { - json[r'property'] = property; + _json[r'property'] = property; } if (n123number != null) { - json[r'123Number'] = n123number; + _json[r'123Number'] = n123number; } - return json; + return _json; } /// Returns a new [Name] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart index 2f3d55046fed..7dce3d71cf40 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart @@ -86,40 +86,40 @@ class NullableClass { String toString() => 'NullableClass[integerProp=$integerProp, numberProp=$numberProp, booleanProp=$booleanProp, stringProp=$stringProp, dateProp=$dateProp, datetimeProp=$datetimeProp, arrayNullableProp=$arrayNullableProp, arrayAndItemsNullableProp=$arrayAndItemsNullableProp, arrayItemsNullable=$arrayItemsNullable, objectNullableProp=$objectNullableProp, objectAndItemsNullableProp=$objectAndItemsNullableProp, objectItemsNullable=$objectItemsNullable]'; Map toJson() { - final json = {}; + final _json = {}; if (integerProp != null) { - json[r'integer_prop'] = integerProp; + _json[r'integer_prop'] = integerProp; } if (numberProp != null) { - json[r'number_prop'] = numberProp; + _json[r'number_prop'] = numberProp; } if (booleanProp != null) { - json[r'boolean_prop'] = booleanProp; + _json[r'boolean_prop'] = booleanProp; } if (stringProp != null) { - json[r'string_prop'] = stringProp; + _json[r'string_prop'] = stringProp; } if (dateProp != null) { - json[r'date_prop'] = _dateFormatter.format(dateProp!.toUtc()); + _json[r'date_prop'] = _dateFormatter.format(dateProp!.toUtc()); } if (datetimeProp != null) { - json[r'datetime_prop'] = datetimeProp!.toUtc().toIso8601String(); + _json[r'datetime_prop'] = datetimeProp!.toUtc().toIso8601String(); } if (arrayNullableProp != null) { - json[r'array_nullable_prop'] = arrayNullableProp; + _json[r'array_nullable_prop'] = arrayNullableProp; } if (arrayAndItemsNullableProp != null) { - json[r'array_and_items_nullable_prop'] = arrayAndItemsNullableProp; + _json[r'array_and_items_nullable_prop'] = arrayAndItemsNullableProp; } - json[r'array_items_nullable'] = arrayItemsNullable; + _json[r'array_items_nullable'] = arrayItemsNullable; if (objectNullableProp != null) { - json[r'object_nullable_prop'] = objectNullableProp; + _json[r'object_nullable_prop'] = objectNullableProp; } if (objectAndItemsNullableProp != null) { - json[r'object_and_items_nullable_prop'] = objectAndItemsNullableProp; + _json[r'object_and_items_nullable_prop'] = objectAndItemsNullableProp; } - json[r'object_items_nullable'] = objectItemsNullable; - return json; + _json[r'object_items_nullable'] = objectItemsNullable; + return _json; } /// Returns a new [NullableClass] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart index 2a927dc41d6a..38f4145b1287 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart @@ -37,11 +37,11 @@ class NumberOnly { String toString() => 'NumberOnly[justNumber=$justNumber]'; Map toJson() { - final json = {}; + final _json = {}; if (justNumber != null) { - json[r'JustNumber'] = justNumber; + _json[r'JustNumber'] = justNumber; } - return json; + return _json; } /// Returns a new [NumberOnly] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart index 924aaeaafae4..05404064ef56 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart @@ -64,18 +64,18 @@ class ObjectWithDeprecatedFields { String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedRef=$deprecatedRef, bars=$bars]'; Map toJson() { - final json = {}; + final _json = {}; if (uuid != null) { - json[r'uuid'] = uuid; + _json[r'uuid'] = uuid; } if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (deprecatedRef != null) { - json[r'deprecatedRef'] = deprecatedRef; + _json[r'deprecatedRef'] = deprecatedRef; } - json[r'bars'] = bars; - return json; + _json[r'bars'] = bars; + return _json; } /// Returns a new [ObjectWithDeprecatedFields] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart index ad84a894e8db..1ffb5d60b745 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart @@ -81,24 +81,24 @@ class Order { String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (petId != null) { - json[r'petId'] = petId; + _json[r'petId'] = petId; } if (quantity != null) { - json[r'quantity'] = quantity; + _json[r'quantity'] = quantity; } if (shipDate != null) { - json[r'shipDate'] = shipDate!.toUtc().toIso8601String(); + _json[r'shipDate'] = shipDate!.toUtc().toIso8601String(); } if (status != null) { - json[r'status'] = status; + _json[r'status'] = status; } - json[r'complete'] = complete; - return json; + _json[r'complete'] = complete; + return _json; } /// Returns a new [Order] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart index c60b3d287a12..20caeb7593f2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart @@ -59,17 +59,17 @@ class OuterComposite { String toString() => 'OuterComposite[myNumber=$myNumber, myString=$myString, myBoolean=$myBoolean]'; Map toJson() { - final json = {}; + final _json = {}; if (myNumber != null) { - json[r'my_number'] = myNumber; + _json[r'my_number'] = myNumber; } if (myString != null) { - json[r'my_string'] = myString; + _json[r'my_string'] = myString; } if (myBoolean != null) { - json[r'my_boolean'] = myBoolean; + _json[r'my_boolean'] = myBoolean; } - return json; + return _json; } /// Returns a new [OuterComposite] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart index 8b9b76380e6d..bb346014c77b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart @@ -31,9 +31,9 @@ class OuterObjectWithEnumProperty { String toString() => 'OuterObjectWithEnumProperty[value=$value]'; Map toJson() { - final json = {}; - json[r'value'] = value; - return json; + final _json = {}; + _json[r'value'] = value; + return _json; } /// Returns a new [OuterObjectWithEnumProperty] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart index e9a89d7b51b9..86ecb7e91221 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart @@ -69,20 +69,20 @@ class Pet { String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (category != null) { - json[r'category'] = category; + _json[r'category'] = category; } - json[r'name'] = name; - json[r'photoUrls'] = photoUrls; - json[r'tags'] = tags; + _json[r'name'] = name; + _json[r'photoUrls'] = photoUrls; + _json[r'tags'] = tags; if (status != null) { - json[r'status'] = status; + _json[r'status'] = status; } - return json; + return _json; } /// Returns a new [Pet] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart index 6cda0773d11d..d9919a5e3f60 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart @@ -48,14 +48,14 @@ class ReadOnlyFirst { String toString() => 'ReadOnlyFirst[bar=$bar, baz=$baz]'; Map toJson() { - final json = {}; + final _json = {}; if (bar != null) { - json[r'bar'] = bar; + _json[r'bar'] = bar; } if (baz != null) { - json[r'baz'] = baz; + _json[r'baz'] = baz; } - return json; + return _json; } /// Returns a new [ReadOnlyFirst] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/single_ref_type.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/single_ref_type.dart new file mode 100644 index 000000000000..66809ed40235 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/single_ref_type.dart @@ -0,0 +1,85 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class SingleRefType { + /// Instantiate a new enum with the provided [value]. + const SingleRefType._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const admin = SingleRefType._(r'admin'); + static const user = SingleRefType._(r'user'); + + /// List of all possible values in this [enum][SingleRefType]. + static const values = [ + admin, + user, + ]; + + static SingleRefType? fromJson(dynamic value) => SingleRefTypeTypeTransformer().decode(value); + + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SingleRefType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SingleRefType] to String, +/// and [decode] dynamic data back to [SingleRefType]. +class SingleRefTypeTypeTransformer { + factory SingleRefTypeTypeTransformer() => _instance ??= const SingleRefTypeTypeTransformer._(); + + const SingleRefTypeTypeTransformer._(); + + String encode(SingleRefType data) => data.value; + + /// Decodes a [dynamic value][data] to a SingleRefType. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + SingleRefType? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data.toString()) { + case r'admin': return SingleRefType.admin; + case r'user': return SingleRefType.user; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SingleRefTypeTypeTransformer] instance. + static SingleRefTypeTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart index bdfecbd2e7de..8b452aa02da0 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart @@ -37,11 +37,11 @@ class SpecialModelName { String toString() => 'SpecialModelName[dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket=$dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket]'; Map toJson() { - final json = {}; + final _json = {}; if (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { - json[r'$special[property.name]'] = dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + _json[r'$special[property.name]'] = dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; } - return json; + return _json; } /// Returns a new [SpecialModelName] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart index 71b8799d1cb1..666a849c73da 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart @@ -48,14 +48,14 @@ class Tag { String toString() => 'Tag[id=$id, name=$name]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (name != null) { - json[r'name'] = name; + _json[r'name'] = name; } - return json; + return _json; } /// Returns a new [Tag] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart index 0b10d4fe7c23..75d3e1e136ae 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart @@ -115,32 +115,32 @@ class User { String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; Map toJson() { - final json = {}; + final _json = {}; if (id != null) { - json[r'id'] = id; + _json[r'id'] = id; } if (username != null) { - json[r'username'] = username; + _json[r'username'] = username; } if (firstName != null) { - json[r'firstName'] = firstName; + _json[r'firstName'] = firstName; } if (lastName != null) { - json[r'lastName'] = lastName; + _json[r'lastName'] = lastName; } if (email != null) { - json[r'email'] = email; + _json[r'email'] = email; } if (password != null) { - json[r'password'] = password; + _json[r'password'] = password; } if (phone != null) { - json[r'phone'] = phone; + _json[r'phone'] = phone; } if (userStatus != null) { - json[r'userStatus'] = userStatus; + _json[r'userStatus'] = userStatus; } - return json; + return _json; } /// Returns a new [User] instance and imports its values from diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart new file mode 100644 index 000000000000..0005229b9ede --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AllOfWithSingleRef +void main() { + // final instance = AllOfWithSingleRef(); + + group('test AllOfWithSingleRef', () { + // String username + test('to test the property `username`', () async { + // TODO + }); + + // AllOfWithSingleRefSingleRefType singleRefType + test('to test the property `singleRefType`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/single_ref_type_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/single_ref_type_test.dart new file mode 100644 index 000000000000..7f2fe102bf17 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/single_ref_type_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for SingleRefType +void main() { + + group('test SingleRefType', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES index 2d4797298149..100fdeb9795b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES @@ -52,8 +52,12 @@ docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md docs/Name.md +docs/NullableAllOf.md +docs/NullableAllOfChild.md docs/NullableClass.md docs/NumberOnly.md +docs/OneOfPrimitiveType.md +docs/OneOfPrimitiveTypeChild.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md @@ -113,8 +117,12 @@ model_mammal.go model_map_test_.go model_mixed_properties_and_additional_properties_class.go model_name.go +model_nullable_all_of.go +model_nullable_all_of_child.go model_nullable_class.go model_number_only.go +model_one_of_primitive_type.go +model_one_of_primitive_type_child.go model_order.go model_outer_composite.go model_outer_enum.go diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index 10f8ee9f4365..387082499c5c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -158,8 +158,12 @@ Class | Method | HTTP request | Description - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) - [Name](docs/Name.md) + - [NullableAllOf](docs/NullableAllOf.md) + - [NullableAllOfChild](docs/NullableAllOfChild.md) - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [OneOfPrimitiveType](docs/OneOfPrimitiveType.md) + - [OneOfPrimitiveTypeChild](docs/OneOfPrimitiveTypeChild.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 46269e0ec1a9..4790eaddd3cc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -2087,6 +2087,33 @@ components: default: 120 type: number type: object + NullableAllOfChild: + properties: + name: + type: string + type: object + NullableAllOf: + properties: + child: + allOf: + - $ref: '#/components/schemas/NullableAllOfChild' + nullable: true + type: object + OneOfPrimitiveType: + oneOf: + - $ref: '#/components/schemas/OneOfPrimitiveTypeChild' + - format: int32 + type: integer + - $ref: '#/components/schemas/OneOfArrayOfString' + OneOfPrimitiveTypeChild: + properties: + name: + type: string + type: object + OneOfArrayOfString: + items: + type: string + type: array inline_response_default: example: string: diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/NullableAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/NullableAllOf.md new file mode 100644 index 000000000000..9c3a3a29fbec --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/NullableAllOf.md @@ -0,0 +1,66 @@ +# NullableAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Child** | Pointer to [**NullableNullableAllOfChild**](NullableAllOfChild.md) | | [optional] + +## Methods + +### NewNullableAllOf + +`func NewNullableAllOf() *NullableAllOf` + +NewNullableAllOf instantiates a new NullableAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNullableAllOfWithDefaults + +`func NewNullableAllOfWithDefaults() *NullableAllOf` + +NewNullableAllOfWithDefaults instantiates a new NullableAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChild + +`func (o *NullableAllOf) GetChild() NullableAllOfChild` + +GetChild returns the Child field if non-nil, zero value otherwise. + +### GetChildOk + +`func (o *NullableAllOf) GetChildOk() (*NullableAllOfChild, bool)` + +GetChildOk returns a tuple with the Child field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChild + +`func (o *NullableAllOf) SetChild(v NullableAllOfChild)` + +SetChild sets Child field to given value. + +### HasChild + +`func (o *NullableAllOf) HasChild() bool` + +HasChild returns a boolean if a field has been set. + +### SetChildNil + +`func (o *NullableAllOf) SetChildNil(b bool)` + + SetChildNil sets the value for Child to be an explicit nil + +### UnsetChild +`func (o *NullableAllOf) UnsetChild()` + +UnsetChild ensures that no value is present for Child, not even an explicit nil + +[[Back to Model list]](../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/NullableAllOfChild.md b/samples/openapi3/client/petstore/go/go-petstore/docs/NullableAllOfChild.md new file mode 100644 index 000000000000..9b2ea7b4b399 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/NullableAllOfChild.md @@ -0,0 +1,56 @@ +# NullableAllOfChild + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewNullableAllOfChild + +`func NewNullableAllOfChild() *NullableAllOfChild` + +NewNullableAllOfChild instantiates a new NullableAllOfChild object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNullableAllOfChildWithDefaults + +`func NewNullableAllOfChildWithDefaults() *NullableAllOfChild` + +NewNullableAllOfChildWithDefaults instantiates a new NullableAllOfChild object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NullableAllOfChild) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NullableAllOfChild) 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. + +### SetName + +`func (o *NullableAllOfChild) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NullableAllOfChild) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../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/OneOfPrimitiveType.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OneOfPrimitiveType.md new file mode 100644 index 000000000000..5bb6c8194402 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OneOfPrimitiveType.md @@ -0,0 +1,56 @@ +# OneOfPrimitiveType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewOneOfPrimitiveType + +`func NewOneOfPrimitiveType() *OneOfPrimitiveType` + +NewOneOfPrimitiveType instantiates a new OneOfPrimitiveType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOneOfPrimitiveTypeWithDefaults + +`func NewOneOfPrimitiveTypeWithDefaults() *OneOfPrimitiveType` + +NewOneOfPrimitiveTypeWithDefaults instantiates a new OneOfPrimitiveType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *OneOfPrimitiveType) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OneOfPrimitiveType) 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. + +### SetName + +`func (o *OneOfPrimitiveType) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OneOfPrimitiveType) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../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/OneOfPrimitiveTypeChild.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OneOfPrimitiveTypeChild.md new file mode 100644 index 000000000000..76755e97adee --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OneOfPrimitiveTypeChild.md @@ -0,0 +1,56 @@ +# OneOfPrimitiveTypeChild + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewOneOfPrimitiveTypeChild + +`func NewOneOfPrimitiveTypeChild() *OneOfPrimitiveTypeChild` + +NewOneOfPrimitiveTypeChild instantiates a new OneOfPrimitiveTypeChild object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOneOfPrimitiveTypeChildWithDefaults + +`func NewOneOfPrimitiveTypeChildWithDefaults() *OneOfPrimitiveTypeChild` + +NewOneOfPrimitiveTypeChildWithDefaults instantiates a new OneOfPrimitiveTypeChild object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *OneOfPrimitiveTypeChild) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OneOfPrimitiveTypeChild) 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. + +### SetName + +`func (o *OneOfPrimitiveTypeChild) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OneOfPrimitiveTypeChild) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../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/model_nullable_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go new file mode 100644 index 000000000000..2bd8971b2aea --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go @@ -0,0 +1,150 @@ +/* +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +import ( + "encoding/json" +) + +// NullableAllOf struct for NullableAllOf +type NullableAllOf struct { + Child NullableNullableAllOfChild `json:"child,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NullableAllOf NullableAllOf + +// NewNullableAllOf instantiates a new NullableAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNullableAllOf() *NullableAllOf { + this := NullableAllOf{} + return &this +} + +// NewNullableAllOfWithDefaults instantiates a new NullableAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNullableAllOfWithDefaults() *NullableAllOf { + this := NullableAllOf{} + return &this +} + +// GetChild returns the Child field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableAllOf) GetChild() NullableAllOfChild { + if o == nil || o.Child.Get() == nil { + var ret NullableAllOfChild + return ret + } + return *o.Child.Get() +} + +// GetChildOk returns a tuple with the Child field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableAllOf) GetChildOk() (*NullableAllOfChild, bool) { + if o == nil { + return nil, false + } + return o.Child.Get(), o.Child.IsSet() +} + +// HasChild returns a boolean if a field has been set. +func (o *NullableAllOf) HasChild() bool { + if o != nil && o.Child.IsSet() { + return true + } + + return false +} + +// SetChild gets a reference to the given NullableNullableAllOfChild and assigns it to the Child field. +func (o *NullableAllOf) SetChild(v NullableAllOfChild) { + o.Child.Set(&v) +} +// SetChildNil sets the value for Child to be an explicit nil +func (o *NullableAllOf) SetChildNil() { + o.Child.Set(nil) +} + +// UnsetChild ensures that no value is present for Child, not even an explicit nil +func (o *NullableAllOf) UnsetChild() { + o.Child.Unset() +} + +func (o NullableAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Child.IsSet() { + toSerialize["child"] = o.Child.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *NullableAllOf) UnmarshalJSON(bytes []byte) (err error) { + varNullableAllOf := _NullableAllOf{} + + if err = json.Unmarshal(bytes, &varNullableAllOf); err == nil { + *o = NullableAllOf(varNullableAllOf) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "child") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNullableAllOf struct { + value *NullableAllOf + isSet bool +} + +func (v NullableNullableAllOf) Get() *NullableAllOf { + return v.value +} + +func (v *NullableNullableAllOf) Set(val *NullableAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableNullableAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableNullableAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNullableAllOf(val *NullableAllOf) *NullableNullableAllOf { + return &NullableNullableAllOf{value: val, isSet: true} +} + +func (v NullableNullableAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNullableAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go new file mode 100644 index 000000000000..7f9c7779d865 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.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 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +import ( + "encoding/json" +) + +// NullableAllOfChild struct for NullableAllOfChild +type NullableAllOfChild struct { + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NullableAllOfChild NullableAllOfChild + +// NewNullableAllOfChild instantiates a new NullableAllOfChild object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNullableAllOfChild() *NullableAllOfChild { + this := NullableAllOfChild{} + return &this +} + +// NewNullableAllOfChildWithDefaults instantiates a new NullableAllOfChild object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNullableAllOfChildWithDefaults() *NullableAllOfChild { + this := NullableAllOfChild{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NullableAllOfChild) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NullableAllOfChild) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NullableAllOfChild) 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 *NullableAllOfChild) SetName(v string) { + o.Name = &v +} + +func (o NullableAllOfChild) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *NullableAllOfChild) UnmarshalJSON(bytes []byte) (err error) { + varNullableAllOfChild := _NullableAllOfChild{} + + if err = json.Unmarshal(bytes, &varNullableAllOfChild); err == nil { + *o = NullableAllOfChild(varNullableAllOfChild) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNullableAllOfChild struct { + value *NullableAllOfChild + isSet bool +} + +func (v NullableNullableAllOfChild) Get() *NullableAllOfChild { + return v.value +} + +func (v *NullableNullableAllOfChild) Set(val *NullableAllOfChild) { + v.value = val + v.isSet = true +} + +func (v NullableNullableAllOfChild) IsSet() bool { + return v.isSet +} + +func (v *NullableNullableAllOfChild) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNullableAllOfChild(val *NullableAllOfChild) *NullableNullableAllOfChild { + return &NullableNullableAllOfChild{value: val, isSet: true} +} + +func (v NullableNullableAllOfChild) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNullableAllOfChild) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type.go b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type.go new file mode 100644 index 000000000000..dd008dfc1502 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type.go @@ -0,0 +1,178 @@ +/* +OpenAPI Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +import ( + "encoding/json" + "fmt" +) + +// OneOfPrimitiveType - struct for OneOfPrimitiveType +type OneOfPrimitiveType struct { + OneOfPrimitiveTypeChild *OneOfPrimitiveTypeChild + ArrayOfString *[]string + Int32 *int32 +} + +// OneOfPrimitiveTypeChildAsOneOfPrimitiveType is a convenience function that returns OneOfPrimitiveTypeChild wrapped in OneOfPrimitiveType +func OneOfPrimitiveTypeChildAsOneOfPrimitiveType(v *OneOfPrimitiveTypeChild) OneOfPrimitiveType { + return OneOfPrimitiveType{ + OneOfPrimitiveTypeChild: v, + } +} + +// []stringAsOneOfPrimitiveType is a convenience function that returns []string wrapped in OneOfPrimitiveType +func ArrayOfStringAsOneOfPrimitiveType(v *[]string) OneOfPrimitiveType { + return OneOfPrimitiveType{ + ArrayOfString: v, + } +} + +// int32AsOneOfPrimitiveType is a convenience function that returns int32 wrapped in OneOfPrimitiveType +func Int32AsOneOfPrimitiveType(v *int32) OneOfPrimitiveType { + return OneOfPrimitiveType{ + Int32: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *OneOfPrimitiveType) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into OneOfPrimitiveTypeChild + err = newStrictDecoder(data).Decode(&dst.OneOfPrimitiveTypeChild) + if err == nil { + jsonOneOfPrimitiveTypeChild, _ := json.Marshal(dst.OneOfPrimitiveTypeChild) + if string(jsonOneOfPrimitiveTypeChild) == "{}" { // empty struct + dst.OneOfPrimitiveTypeChild = nil + } else { + match++ + } + } else { + dst.OneOfPrimitiveTypeChild = nil + } + + // try to unmarshal data into ArrayOfString + err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + if err == nil { + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct + dst.ArrayOfString = nil + } else { + match++ + } + } else { + dst.ArrayOfString = nil + } + + // try to unmarshal data into Int32 + err = newStrictDecoder(data).Decode(&dst.Int32) + if err == nil { + jsonInt32, _ := json.Marshal(dst.Int32) + if string(jsonInt32) == "{}" { // empty struct + dst.Int32 = nil + } else { + match++ + } + } else { + dst.Int32 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.OneOfPrimitiveTypeChild = nil + dst.ArrayOfString = nil + dst.Int32 = nil + + return fmt.Errorf("Data matches more than one schema in oneOf(OneOfPrimitiveType)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf(OneOfPrimitiveType)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src OneOfPrimitiveType) MarshalJSON() ([]byte, error) { + if src.OneOfPrimitiveTypeChild != nil { + return json.Marshal(&src.OneOfPrimitiveTypeChild) + } + + if src.ArrayOfString != nil { + return json.Marshal(&src.ArrayOfString) + } + + if src.Int32 != nil { + return json.Marshal(&src.Int32) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *OneOfPrimitiveType) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.OneOfPrimitiveTypeChild != nil { + return obj.OneOfPrimitiveTypeChild + } + + if obj.ArrayOfString != nil { + return obj.ArrayOfString + } + + if obj.Int32 != nil { + return obj.Int32 + } + + // all schemas are nil + return nil +} + +type NullableOneOfPrimitiveType struct { + value *OneOfPrimitiveType + isSet bool +} + +func (v NullableOneOfPrimitiveType) Get() *OneOfPrimitiveType { + return v.value +} + +func (v *NullableOneOfPrimitiveType) Set(val *OneOfPrimitiveType) { + v.value = val + v.isSet = true +} + +func (v NullableOneOfPrimitiveType) IsSet() bool { + return v.isSet +} + +func (v *NullableOneOfPrimitiveType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOneOfPrimitiveType(val *OneOfPrimitiveType) *NullableOneOfPrimitiveType { + return &NullableOneOfPrimitiveType{value: val, isSet: true} +} + +func (v NullableOneOfPrimitiveType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOneOfPrimitiveType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go new file mode 100644 index 000000000000..0d1f54271cda --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.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 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +import ( + "encoding/json" +) + +// OneOfPrimitiveTypeChild struct for OneOfPrimitiveTypeChild +type OneOfPrimitiveTypeChild struct { + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OneOfPrimitiveTypeChild OneOfPrimitiveTypeChild + +// NewOneOfPrimitiveTypeChild instantiates a new OneOfPrimitiveTypeChild object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOneOfPrimitiveTypeChild() *OneOfPrimitiveTypeChild { + this := OneOfPrimitiveTypeChild{} + return &this +} + +// NewOneOfPrimitiveTypeChildWithDefaults instantiates a new OneOfPrimitiveTypeChild object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOneOfPrimitiveTypeChildWithDefaults() *OneOfPrimitiveTypeChild { + this := OneOfPrimitiveTypeChild{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *OneOfPrimitiveTypeChild) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneOfPrimitiveTypeChild) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *OneOfPrimitiveTypeChild) 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 *OneOfPrimitiveTypeChild) SetName(v string) { + o.Name = &v +} + +func (o OneOfPrimitiveTypeChild) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *OneOfPrimitiveTypeChild) UnmarshalJSON(bytes []byte) (err error) { + varOneOfPrimitiveTypeChild := _OneOfPrimitiveTypeChild{} + + if err = json.Unmarshal(bytes, &varOneOfPrimitiveTypeChild); err == nil { + *o = OneOfPrimitiveTypeChild(varOneOfPrimitiveTypeChild) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOneOfPrimitiveTypeChild struct { + value *OneOfPrimitiveTypeChild + isSet bool +} + +func (v NullableOneOfPrimitiveTypeChild) Get() *OneOfPrimitiveTypeChild { + return v.value +} + +func (v *NullableOneOfPrimitiveTypeChild) Set(val *OneOfPrimitiveTypeChild) { + v.value = val + v.isSet = true +} + +func (v NullableOneOfPrimitiveTypeChild) IsSet() bool { + return v.isSet +} + +func (v *NullableOneOfPrimitiveTypeChild) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOneOfPrimitiveTypeChild(val *OneOfPrimitiveTypeChild) *NullableOneOfPrimitiveTypeChild { + return &NullableOneOfPrimitiveTypeChild{value: val, isSet: true} +} + +func (v NullableOneOfPrimitiveTypeChild) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOneOfPrimitiveTypeChild) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/openapi3/client/petstore/go/go.mod b/samples/openapi3/client/petstore/go/go.mod index a35619c519fc..439761133d2a 100644 --- a/samples/openapi3/client/petstore/go/go.mod +++ b/samples/openapi3/client/petstore/go/go.mod @@ -7,5 +7,6 @@ replace go-petstore => ./go-petstore require ( github.com/stretchr/testify v1.7.0 go-petstore v0.0.0-00010101000000-000000000000 - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a ) diff --git a/samples/openapi3/client/petstore/go/go.sum b/samples/openapi3/client/petstore/go/go.sum index 0df1d1a38a06..c8c9afd72fad 100644 --- a/samples/openapi3/client/petstore/go/go.sum +++ b/samples/openapi3/client/petstore/go/go.sum @@ -184,6 +184,10 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -191,6 +195,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -224,11 +230,15 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml index babf79856dec..a74ced440426 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml @@ -20,7 +20,7 @@ paths: schema: $ref: '#/components/schemas/MySchemaName._-Characters' description: the response - x-contentType: application/json + x-content-type: application/json x-accepts: application/json components: schemas: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle index 459364339f38..0bec3bb5f3da 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle @@ -11,8 +11,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.6.3" - jackson_version = "2.13.0" - jackson_databind_version = "2.13.0" + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2.2" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" jersey_version = "2.35" - junit_version = "4.13.2" + junit_version = "5.8.2" } dependencies { @@ -121,7 +121,12 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() } javadoc { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt index 6cc3961e3039..3ecfc035b114 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt @@ -10,19 +10,18 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "com.google.code.findbugs" % "jsr305" % "3.0.0", - "io.swagger" % "swagger-annotations" % "1.6.3", + "io.swagger" % "swagger-annotations" % "1.6.5", "org.glassfish.jersey.core" % "jersey-client" % "2.35", "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", - "com.fasterxml.jackson.core" % "jackson-core" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.0" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.2" % "compile", "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchema.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchema.md index 80b7e462da3d..75a20ddd12c9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchema.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchema.md @@ -6,9 +6,9 @@ A schema that does not have any special character. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prop1** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop1** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md index fa7bb48d0186..fc8352cbff11 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prop1** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop1** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/DefaultApi.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/DefaultApi.md index 1e954678bbda..c28d29f65a0d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/DefaultApi.md @@ -2,9 +2,9 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testPost**](DefaultApi.md#testPost) | **POST** /test | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testPost**](DefaultApi.md#testPost) | **POST** /test | | @@ -48,9 +48,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mySchemaNameCharacters** | [**MySchemaNameCharacters**](MySchemaNameCharacters.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **mySchemaNameCharacters** | [**MySchemaNameCharacters**](MySchemaNameCharacters.md)| | [optional] | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharacters.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharacters.md index 33f57d4cda66..6750ba368341 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharacters.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharacters.md @@ -6,9 +6,9 @@ A schema name that has letters, numbers, punctuation and non-ASCII characters. T ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prop2** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop2** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md index 7771f62ad1e0..f74dcbbefccd 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prop2** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop2** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/Parent.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/Parent.md index e71831a39a46..18b7f4959df1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/Parent.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/Parent.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**objectType** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**objectType** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml index 02b86119bceb..fe9ea83f94d1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -102,7 +102,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -325,21 +325,21 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test UTF-8 - 1.6.3 + 1.6.5 2.35 - 2.13.0 - 2.13.0 + 2.13.2 + 2.13.2.2 0.2.2 1.3.5 - 4.13.2 - 2.17.3 + 5.8.2 + 2.21.0 diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchema.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchema.java index c1f37a5acc46..4f3257f9571e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchema.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchema.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -44,7 +45,11 @@ ChildSchema.JSON_PROPERTY_PROP1 }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "objectType", visible = true) +@JsonIgnoreProperties( + value = "objectType", // ignore manually set objectType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the objectType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType", visible = true) public class ChildSchema extends Parent { public static final String JSON_PROPERTY_PROP1 = "prop1"; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharacters.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharacters.java index 3d163c3c9597..4775d350c482 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharacters.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharacters.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -45,7 +46,11 @@ }) @JsonTypeName("MySchemaName._-Characters") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "objectType", visible = true) +@JsonIgnoreProperties( + value = "objectType", // ignore manually set objectType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the objectType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType", visible = true) public class MySchemaNameCharacters extends Parent { public static final String JSON_PROPERTY_PROP2 = "prop2"; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/Parent.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/Parent.java index dd8e55a9a24d..00064687e113 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/Parent.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/Parent.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ Parent.JSON_PROPERTY_OBJECT_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "objectType", visible = true) +@JsonIgnoreProperties( + value = "objectType", // ignore manually set objectType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the objectType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = ChildSchema.class, name = "ChildSchema"), @JsonSubTypes.Type(value = MySchemaNameCharacters.class, name = "MySchemaName._-Characters"), diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/api/DefaultApiTest.java index 51a3dbedfb37..a32b7135e33c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -16,10 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.MySchemaNameCharacters; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -34,12 +34,7 @@ public class DefaultApiTest { private final DefaultApi api = new DefaultApi(); /** - * - * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testPostTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java index 2e21267fd936..03d8bd98c4d6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ChildSchemaAllOf diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java index ed8952c9c5ce..9964cd58721b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java @@ -13,21 +13,23 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.JSON; import org.openapitools.client.model.ChildSchemaAllOf; import org.openapitools.client.model.Parent; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ChildSchema @@ -42,12 +44,12 @@ public class ChildSchemaTest { public void testChildSchema() { String objJson = "{ \"objectType\": \"ChildSchema\", \"prop1\":\"some_value\" }"; try { - JSON j = new JSON(); - ChildSchema obj = j.getMapper().readValue(objJson, ChildSchema.class); - Assert.assertEquals(obj.getObjectType(), "ChildSchema"); - Assert.assertEquals(obj.getProp1(), "some_value"); + JSON j = new JSON(); + ChildSchema obj = j.getMapper().readValue(objJson, ChildSchema.class); + Assertions.assertEquals(obj.getObjectType(), "ChildSchema"); + Assertions.assertEquals(obj.getProp1(), "some_value"); } catch (Exception ex) { - Assert.fail("Exception '" + ex.getMessage() + "' should not have been raised"); + Assertions.fail("Exception '" + ex.getMessage() + "' should not have been raised"); } } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java index 47b20942db18..f1c8982409cd 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for MySchemaNameCharactersAllOf diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java index 481778dbfc56..e925ed74c937 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java @@ -13,21 +13,23 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.JSON; import org.openapitools.client.model.MySchemaNameCharactersAllOf; import org.openapitools.client.model.Parent; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for MySchemaNameCharacters @@ -42,21 +44,21 @@ public class MySchemaNameCharactersTest { public void testMySchemaNameCharacters() { String objJson = "{ \"objectType\": \"MySchemaName._-Characters\", \"prop2\":\"some_value\" }"; try { - JSON j = new JSON(); - MySchemaNameCharacters obj = j.getMapper().readValue(objJson, MySchemaNameCharacters.class); - Assert.assertEquals(obj.getObjectType(), "MySchemaName._-Characters"); - Assert.assertEquals(obj.getProp2(), "some_value"); + JSON j = new JSON(); + MySchemaNameCharacters obj = j.getMapper().readValue(objJson, MySchemaNameCharacters.class); + Assertions.assertEquals(obj.getObjectType(), "MySchemaName._-Characters"); + Assertions.assertEquals(obj.getProp2(), "some_value"); } catch (Exception ex) { - Assert.fail("Exception '" + ex.getMessage() + "' should not have been raised"); + Assertions.fail("Exception '" + ex.getMessage() + "' should not have been raised"); } } /** - * Test the property 'prop1' + * Test the property 'objectType' */ @Test - public void prop1Test() { - // TODO: test prop1 + public void objectTypeTest() { + // TODO: test objectType } /** diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ParentTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ParentTest.java index 0b4ac9856147..3e56c7ff2aa4 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ParentTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ParentTest.java @@ -13,19 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.ChildSchema; import org.openapitools.client.model.MySchemaNameCharacters; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Parent @@ -42,10 +45,11 @@ public void testParent() { } /** - * Test the property 'prop1' + * Test the property 'objectType' */ @Test - public void prop1Test() { + public void objectTypeTest() { + // TODO: test objectType } } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index 3511da6146dc..6e508514df84 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -68,7 +68,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: description: "" @@ -90,7 +90,7 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json servers: - url: http://petstore.swagger.io/v2 @@ -284,7 +284,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -328,7 +328,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -376,7 +376,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -452,7 +452,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: @@ -466,7 +466,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithList: post: @@ -480,7 +480,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/login: get: @@ -624,7 +624,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: @@ -644,7 +644,7 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake: delete: @@ -825,7 +825,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json patch: description: To test "client" model @@ -842,7 +842,7 @@ paths: summary: To test "client" model tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json post: description: | @@ -943,7 +943,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/outer/number: post: @@ -964,7 +964,7 @@ paths: description: Output number tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -985,7 +985,7 @@ paths: description: Output string tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -1006,7 +1006,7 @@ paths: description: Output boolean tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -1027,7 +1027,7 @@ paths: description: Output composite tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: @@ -1055,7 +1055,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /fake/inline-additionalProperties: post: @@ -1076,7 +1076,7 @@ paths: summary: test inline additionalProperties tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: @@ -1100,7 +1100,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /another-fake/dummy: patch: @@ -1118,7 +1118,7 @@ paths: summary: To test special tags tags: - $another-fake? - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: @@ -1136,7 +1136,7 @@ paths: description: Success tags: - fake - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /fake/test-query-parameters: put: @@ -1238,7 +1238,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /fake/health: get: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle b/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle index 841a3c55eb55..0bd0fe1b0490 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle @@ -11,8 +11,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.6.3" - jackson_version = "2.13.0" - jackson_databind_version = "2.13.0" + swagger_annotations_version = "1.6.5" + jackson_version = "2.13.2" + jackson_databind_version = "2.13.2.2" jackson_databind_nullable_version = "0.2.2" jakarta_annotation_version = "1.3.5" jersey_version = "2.35" - junit_version = "4.13.2" + junit_version = "5.8.2" scribejava_apis_version = "8.3.1" tomitribe_http_signatures_version = "1.7" } @@ -125,7 +125,12 @@ dependencies { implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation "junit:junit:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" +} + +test { + useJUnitPlatform() } javadoc { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt b/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt index a420957d37a8..a978449bb84f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt @@ -10,21 +10,20 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "com.google.code.findbugs" % "jsr305" % "3.0.0", - "io.swagger" % "swagger-annotations" % "1.6.3", + "io.swagger" % "swagger-annotations" % "1.6.5", "org.glassfish.jersey.core" % "jersey-client" % "2.35", "org.glassfish.jersey.inject" % "jersey-hk2" % "2.35", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.35", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.35", "org.glassfish.jersey.connectors" % "jersey-apache-connector" % "2.35", - "com.fasterxml.jackson.core" % "jackson-core" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.0" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.0" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.2" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.2.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.2" % "compile", "org.openapitools" % "jackson-databind-nullable" % "0.2.2" % "compile", "com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile", "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "junit" % "junit" % "4.13.2" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md index 3d032d4504ad..83051d9be44b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapProperty** | **Map<String, String>** | | [optional] -**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] -**anytype1** | **Object** | | [optional] -**mapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] -**mapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] -**mapWithUndeclaredPropertiesAnytype3** | **Map<String, Object>** | | [optional] -**emptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] -**mapWithUndeclaredPropertiesString** | **Map<String, String>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | +|**anytype1** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] | +|**mapWithUndeclaredPropertiesAnytype3** | **Map<String, Object>** | | [optional] | +|**emptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] | +|**mapWithUndeclaredPropertiesString** | **Map<String, String>** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Animal.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Animal.md index 7edc25cd2b04..d9b32f14c88a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Animal.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Animal.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md index 4524daa6f9c7..3cd7cd99f71f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | @@ -50,9 +50,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Apple.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Apple.md index 513643aeb77f..0ef7a92c74d6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Apple.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Apple.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cultivar** | **String** | | [optional] -**origin** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | [optional] | +|**origin** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/AppleReq.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/AppleReq.md index d2fccd5306d8..989e1cfedd1e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/AppleReq.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/AppleReq.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cultivar** | **String** | | -**mealy** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cultivar** | **String** | | | +|**mealy** | **Boolean** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md index 9b1f85869990..0188db3eb131 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md index 4e95f1ae74ef..a5753530aada 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayOfNumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **List<BigDecimal>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayNumber** | **List<BigDecimal>** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayTest.md index 9b90810fc286..36077c9df300 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ArrayTest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **List<String>** | | [optional] -**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] -**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfString** | **List<String>** | | [optional] | +|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Banana.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Banana.md index 7ddff9847aa6..5356d17ee700 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Banana.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Banana.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lengthCm** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lengthCm** | **BigDecimal** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/BananaReq.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/BananaReq.md index 35a773503b8e..22ebe1a7105f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/BananaReq.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/BananaReq.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lengthCm** | **BigDecimal** | | -**sweet** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lengthCm** | **BigDecimal** | | | +|**sweet** | **Boolean** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/BasquePig.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/BasquePig.md index 05d4cf397071..160cb71c321f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/BasquePig.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/BasquePig.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Capitalization.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Capitalization.md index ad8939b744cd..82a812711de2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Capitalization.md @@ -5,14 +5,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**scAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**smallCamel** | **String** | | [optional] | +|**capitalCamel** | **String** | | [optional] | +|**smallSnake** | **String** | | [optional] | +|**capitalSnake** | **String** | | [optional] | +|**scAETHFlowPoints** | **String** | | [optional] | +|**ATT_NAME** | **String** | Name of the pet | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Cat.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Cat.md index 87a3ab44a396..390dd519c8ce 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Cat.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Cat.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md index 3fd01aaebfc9..926bc0abd78f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Category.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Category.md index d03ffbfd06f9..ab6d1ec334dc 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Category.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Category.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md index da63b7067f7f..6a114cc4ffb3 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md @@ -5,18 +5,18 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**petType** | [**String**](#String) | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**petType** | [**String**](#String) | | | ## Enum: String -Name | Value ----- | ----- -CHILDCAT | "ChildCat" +| Name | Value | +|---- | -----| +| CHILDCAT | "ChildCat" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md index 35c6b1c43a66..35fac5c5f09f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md @@ -5,18 +5,18 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**petType** | [**String**](#String) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**petType** | [**String**](#String) | | [optional] | ## Enum: String -Name | Value ----- | ----- -CHILDCAT | "ChildCat" +| Name | Value | +|---- | -----| +| CHILDCAT | "ChildCat" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ClassModel.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ClassModel.md index 04beba3384a1..af46dea1f6c8 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ClassModel.md @@ -6,9 +6,9 @@ Model for testing model with \"_class\" property ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**propertyClass** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Client.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Client.md index 125a20b3fcee..ef07b4ab8b9d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Client.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Client.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**client** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ComplexQuadrilateral.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ComplexQuadrilateral.md index 9e7a27f8a591..d0a4b1a0a758 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ComplexQuadrilateral.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ComplexQuadrilateral.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DanishPig.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DanishPig.md index 0e86a6716583..0b366d3cf2ff 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DanishPig.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DanishPig.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DefaultApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DefaultApi.md index 6ceb1705e7ed..00a8ac2ac24d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DefaultApi.md @@ -2,9 +2,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DeprecatedObject.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DeprecatedObject.md index d5128bdb84a2..48de1d624425 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DeprecatedObject.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DeprecatedObject.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Dog.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Dog.md index f4ba57fa3b86..972c981c0d05 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Dog.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Dog.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md index 1f7e23d981b7..d4e4ea0d548c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Drawing.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Drawing.md index 0874f4811de9..6b815fc4131b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Drawing.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Drawing.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mainShape** | [**Shape**](Shape.md) | | [optional] -**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] -**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional] -**shapes** | [**List<Shape>**](Shape.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mainShape** | [**Shape**](Shape.md) | | [optional] | +|**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] | +|**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional] | +|**shapes** | [**List<Shape>**](Shape.md) | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumArrays.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumArrays.md index 94505276726b..b2222d5beb25 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumArrays.md @@ -5,28 +5,28 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] -**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | +|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | ## Enum: JustSymbolEnum -Name | Value ----- | ----- -GREATER_THAN_OR_EQUAL_TO | ">=" -DOLLAR | "$" +| Name | Value | +|---- | -----| +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| DOLLAR | "$" | ## Enum: List<ArrayEnumEnum> -Name | Value ----- | ----- -FISH | "fish" -CRAB | "crab" +| Name | Value | +|---- | -----| +| FISH | "fish" | +| CRAB | "crab" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md index 342b462ccc06..3e226e18b50b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md @@ -5,64 +5,64 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] -**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | -**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] -**enumIntegerOnly** | [**EnumIntegerOnlyEnum**](#EnumIntegerOnlyEnum) | | [optional] -**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] -**outerEnum** | **OuterEnum** | | [optional] -**outerEnumInteger** | **OuterEnumInteger** | | [optional] -**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] -**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | +|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | +|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | +|**enumIntegerOnly** | [**EnumIntegerOnlyEnum**](#EnumIntegerOnlyEnum) | | [optional] | +|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | +|**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | ## Enum: EnumStringEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumStringRequiredEnum -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" -EMPTY | "" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | +| EMPTY | "" | ## Enum: EnumIntegerEnum -Name | Value ----- | ----- -NUMBER_1 | 1 -NUMBER_MINUS_1 | -1 +| Name | Value | +|---- | -----| +| NUMBER_1 | 1 | +| NUMBER_MINUS_1 | -1 | ## Enum: EnumIntegerOnlyEnum -Name | Value ----- | ----- -NUMBER_2 | 2 -NUMBER_MINUS_2 | -2 +| Name | Value | +|---- | -----| +| NUMBER_2 | 2 | +| NUMBER_MINUS_2 | -2 | ## Enum: EnumNumberEnum -Name | Value ----- | ----- -NUMBER_1_DOT_1 | 1.1 -NUMBER_MINUS_1_DOT_2 | -1.2 +| Name | Value | +|---- | -----| +| NUMBER_1_DOT_1 | 1.1 | +| NUMBER_MINUS_1_DOT_2 | -1.2 | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EquilateralTriangle.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EquilateralTriangle.md index e4b49735d658..eade817feb3e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EquilateralTriangle.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EquilateralTriangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index f8e6c3b1dde6..00365edeae97 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -2,23 +2,23 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums -[**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-parameters | +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums | +| [**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-parameters | | @@ -123,9 +123,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Boolean**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Boolean**| Input boolean as post body | [optional] | ### Return type @@ -188,9 +188,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -254,9 +254,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **BigDecimal**| Input number as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **BigDecimal**| Input number as post body | [optional] | ### Return type @@ -319,9 +319,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **String**| Input string as post body | [optional] | ### Return type @@ -442,9 +442,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -505,10 +505,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **user** | [**User**](User.md)| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -571,9 +571,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -662,22 +662,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **BigDecimal**| None | - **_double** | **Double**| None | - **patternWithoutDelimiter** | **String**| None | - **_byte** | **byte[]**| None | - **integer** | **Integer**| None | [optional] - **int32** | **Integer**| None | [optional] - **int64** | **Long**| None | [optional] - **_float** | **Float**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **File**| None | [optional] - **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] [default to 2010-02-01T10:20:10.111110+01:00] - **password** | **String**| None | [optional] - **paramCallback** | **String**| None | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **number** | **BigDecimal**| None | | +| **_double** | **Double**| None | | +| **patternWithoutDelimiter** | **String**| None | | +| **_byte** | **byte[]**| None | | +| **integer** | **Integer**| None | [optional] | +| **int32** | **Integer**| None | [optional] | +| **int64** | **Long**| None | [optional] | +| **_float** | **Float**| None | [optional] | +| **string** | **String**| None | [optional] | +| **binary** | **File**| None | [optional] | +| **date** | **LocalDate**| None | [optional] | +| **dateTime** | **OffsetDateTime**| None | [optional] [default to 2010-02-01T10:20:10.111110+01:00] | +| **password** | **String**| None | [optional] | +| **paramCallback** | **String**| None | [optional] | ### Return type @@ -747,16 +747,16 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] - **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] - **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumHeaderStringArray** | **List<String>**| Header parameter enum test (string array) | [optional] [enum: >, $] | +| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | +| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | +| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type @@ -836,14 +836,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Integer**| Required String in group parameters | - **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | - **requiredInt64Group** | **Long**| Required Integer in group parameters | - **stringGroup** | **Integer**| String in group parameters | [optional] - **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] - **int64Group** | **Long**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requiredStringGroup** | **Integer**| Required String in group parameters | | +| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | +| **requiredInt64Group** | **Long**| Required Integer in group parameters | | +| **stringGroup** | **Integer**| String in group parameters | [optional] | +| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | +| **int64Group** | **Long**| Integer in group parameters | [optional] | ### Return type @@ -905,9 +905,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | **Map<String,String>**| request body | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requestBody** | **Map<String,String>**| request body | | ### Return type @@ -970,10 +970,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **param** | **String**| field1 | | +| **param2** | **String**| field2 | | ### Return type @@ -1039,13 +1039,13 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | **List<String>**| | - **ioutil** | **List<String>**| | - **http** | **List<String>**| | - **url** | **List<String>**| | - **context** | **List<String>**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pipe** | **List<String>**| | | +| **ioutil** | **List<String>**| | | +| **http** | **List<String>**| | | +| **url** | **List<String>**| | | +| **context** | **List<String>**| | | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md index 1222c2676d37..c0534bcf0439 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md @@ -2,9 +2,9 @@ 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 +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | @@ -57,9 +57,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md index 17c973823592..85d1a0636694 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FileSchemaTestClass.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | +|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Foo.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Foo.md index 7893cf3f4474..6b3f0556528a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Foo.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Foo.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md index 91da637f0880..01b8c777ae06 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Integer** | | [optional] -**int32** | **Integer** | | [optional] -**int64** | **Long** | | [optional] -**number** | **BigDecimal** | | -**_float** | **Float** | | [optional] -**_double** | **Double** | | [optional] -**decimal** | **BigDecimal** | | [optional] -**string** | **String** | | [optional] -**_byte** | **byte[]** | | -**binary** | **File** | | [optional] -**date** | **LocalDate** | | -**dateTime** | **OffsetDateTime** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | -**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integer** | **Integer** | | [optional] | +|**int32** | **Integer** | | [optional] | +|**int64** | **Long** | | [optional] | +|**number** | **BigDecimal** | | | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | +|**string** | **String** | | [optional] | +|**_byte** | **byte[]** | | | +|**binary** | **File** | | [optional] | +|**date** | **LocalDate** | | | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**password** | **String** | | | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/GrandparentAnimal.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/GrandparentAnimal.md index 8c7632266ed1..9737408f2724 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/GrandparentAnimal.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/GrandparentAnimal.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**petType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**petType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md index 6416f8f37158..29da5205dbba 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**foo** | **String** | | [optional] [readonly] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/HealthCheckResult.md index 80ba4783bbd8..4885e6f1cada 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/HealthCheckResult.md @@ -6,9 +6,9 @@ Just a string to inform instance is up and running. Make it nullable in hope to ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/InlineResponseDefault.md index 1c7c639d48cb..41cadb0373c2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/InlineResponseDefault.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/InlineResponseDefault.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/IsoscelesTriangle.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/IsoscelesTriangle.md index 535e9216413f..0bd5045bc68f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/IsoscelesTriangle.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/IsoscelesTriangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/MapTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/MapTest.md index 16f3ab934496..54380188e1d6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/MapTest.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/MapTest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] -**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] -**directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | **Map<String, Boolean>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | +|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | +|**directMap** | **Map<String, Boolean>** | | [optional] | +|**indirectMap** | **Map<String, Boolean>** | | [optional] | ## Enum: Map<String, InnerEnum> -Name | Value ----- | ----- -UPPER | "UPPER" -LOWER | "lower" +| Name | Value | +|---- | -----| +| UPPER | "UPPER" | +| LOWER | "lower" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8bc2ed1571fe..a5ddf0faa6a9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **OffsetDateTime** | | [optional] -**map** | [**Map<String, Animal>**](Animal.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | | [optional] | +|**dateTime** | **OffsetDateTime** | | [optional] | +|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Model200Response.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Model200Response.md index 91c45e494210..109411580c62 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Model200Response.md @@ -6,10 +6,10 @@ Model for testing model name starting with number ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] -**propertyClass** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | [optional] | +|**propertyClass** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md index aca98405e375..e374c2dd2dec 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelApiResponse.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelFile.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelFile.md index 1282785e329d..adcde984f527 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelFile.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelFile.md @@ -6,9 +6,9 @@ Must be named `File` for test. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceURI** | **String** | Test capitalization | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelList.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelList.md index c838a6a72e4f..f93ab7dde8d4 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelList.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelList.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_123list** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelReturn.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelReturn.md index 3684358a040f..0bd356861eb7 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelReturn.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ModelReturn.md @@ -6,9 +6,9 @@ Model for testing reserved words ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_return** | **Integer** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Name.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Name.md index 219628217ca1..c901d9435309 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Name.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Name.md @@ -6,12 +6,12 @@ Model for testing model name same as property name ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] [readonly] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **Integer** | | | +|**snakeCase** | **Integer** | | [optional] [readonly] | +|**property** | **String** | | [optional] | +|**_123number** | **Integer** | | [optional] [readonly] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/NullableClass.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/NullableClass.md index c8152be3d314..fa98c5c6d984 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/NullableClass.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integerProp** | **Integer** | | [optional] -**numberProp** | **BigDecimal** | | [optional] -**booleanProp** | **Boolean** | | [optional] -**stringProp** | **String** | | [optional] -**dateProp** | **LocalDate** | | [optional] -**datetimeProp** | **OffsetDateTime** | | [optional] -**arrayNullableProp** | **List<Object>** | | [optional] -**arrayAndItemsNullableProp** | **List<Object>** | | [optional] -**arrayItemsNullable** | **List<Object>** | | [optional] -**objectNullableProp** | **Map<String, Object>** | | [optional] -**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] -**objectItemsNullable** | **Map<String, Object>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/NumberOnly.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/NumberOnly.md index 26c0b18032ef..b8ed1a4cfae1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/NumberOnly.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**justNumber** | **BigDecimal** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ObjectWithDeprecatedFields.md index be55a96c3b7c..f1cf571f4c09 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ObjectWithDeprecatedFields.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**id** | **BigDecimal** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] -**bars** | **List<String>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Order.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Order.md index fa708e882413..27af32855c5c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Order.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Order.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**petId** | **Long** | | [optional] -**quantity** | **Integer** | | [optional] -**shipDate** | **OffsetDateTime** | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] -**complete** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | "placed" -APPROVED | "approved" -DELIVERED | "delivered" +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/OuterComposite.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/OuterComposite.md index 7274cb075938..98b56e0763ff 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/OuterComposite.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **BigDecimal** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**myNumber** | **BigDecimal** | | [optional] | +|**myString** | **String** | | [optional] | +|**myBoolean** | **Boolean** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ParentPet.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ParentPet.md index ad7e02196658..4992b88a6710 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ParentPet.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ParentPet.md @@ -5,8 +5,8 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Pet.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Pet.md index 8aab74536872..08dfd8623602 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Pet.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Pet.md @@ -5,24 +5,24 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **List<String>** | | -**tags** | [**List<Tag>**](Tag.md) | | [optional] -**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | ## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | "available" -PENDING | "pending" -SOLD | "sold" +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md index 618243bc0091..eb2957e47054 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -2,17 +2,17 @@ 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) +| 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) | @@ -63,9 +63,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -133,10 +133,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| Pet id to delete | - **apiKey** | **String**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | ### Return type @@ -205,9 +205,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | **List<String>**| Status values that need to be considered for filter | [enum: available, pending, sold] | ### Return type @@ -277,9 +277,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | **List<String>**| Tags to filter by | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | **List<String>**| Tags to filter by | | ### Return type @@ -350,9 +350,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to return | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | ### Return type @@ -422,9 +422,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -495,11 +495,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | ### Return type @@ -570,11 +570,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **_file** | **File**| file to upload | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | ### Return type @@ -645,11 +645,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Long**| ID of pet to update | - **requiredFile** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **requiredFile** | **File**| file to upload | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/QuadrilateralInterface.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/QuadrilateralInterface.md index a26b27107797..99451f3bd020 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/QuadrilateralInterface.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/QuadrilateralInterface.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quadrilateralType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md index a329bf4419a2..ad6af7ee155f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] [readonly] | +|**baz** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ScaleneTriangle.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ScaleneTriangle.md index f49fe5a12f33..c578f6cbfaab 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ScaleneTriangle.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ScaleneTriangle.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**triangleType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ShapeInterface.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ShapeInterface.md index f8b65a8a9720..b4f981e3b566 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ShapeInterface.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ShapeInterface.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/SimpleQuadrilateral.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/SimpleQuadrilateral.md index c2cf751d1b8a..52fb7d1a6a49 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/SimpleQuadrilateral.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/SimpleQuadrilateral.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**shapeType** | **String** | | -**quadrilateralType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shapeType** | **String** | | | +|**quadrilateralType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/SpecialModelName.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/SpecialModelName.md index 352611142df0..e17d0d797b7f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/SpecialModelName.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**$specialPropertyName** | **Long** | | [optional] -**specialModelName** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**$specialPropertyName** | **Long** | | [optional] | +|**specialModelName** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md index ba96d7f61a7e..a3cbc7ec0507 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -2,12 +2,12 @@ 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 +| 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 | @@ -52,9 +52,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | ### Return type @@ -186,9 +186,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Long**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | ### Return type @@ -253,9 +253,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Tag.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Tag.md index 70d36f5d0d4d..5088b2dd1c31 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Tag.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Tag.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/TriangleInterface.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/TriangleInterface.md index 525872029f5c..ef5fc7575f34 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/TriangleInterface.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/TriangleInterface.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**triangleType** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/User.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/User.md index c29bce5c1261..9e97dc35485f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/User.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/User.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Integer** | User Status | [optional] -**objectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**objectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] -**anyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] -**anyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | +|**objectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] | +|**objectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] | +|**anyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] | +|**anyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/UserApi.md index a05412e98096..6df604acce37 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -2,16 +2,16 @@ 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 +| 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 | @@ -56,9 +56,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -120,9 +120,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -184,9 +184,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -248,9 +248,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | ### Return type @@ -314,9 +314,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -382,10 +382,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | ### Return type @@ -509,10 +509,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Whale.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Whale.md index 87470ae5fac7..30ce4bb82151 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Whale.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Whale.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hasBaleen** | **Boolean** | | [optional] -**hasTeeth** | **Boolean** | | [optional] -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasBaleen** | **Boolean** | | [optional] | +|**hasTeeth** | **Boolean** | | [optional] | +|**className** | **String** | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Zebra.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Zebra.md index eafe1861f2be..f7c4389b6456 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/Zebra.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/Zebra.md @@ -5,20 +5,20 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**TypeEnum**](#TypeEnum) | | [optional] -**className** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**className** | **String** | | | ## Enum: TypeEnum -Name | Value ----- | ----- -PLAINS | "plains" -MOUNTAIN | "mountain" -GREVYS | "grevys" +| Name | Value | +|---- | -----| +| PLAINS | "plains" | +| MOUNTAIN | "mountain" | +| GREVYS | "grevys" | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml index fc1e1fd7637e..addf6fc45b49 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -102,7 +102,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add_sources @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -335,23 +335,23 @@ - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test UTF-8 - 1.6.3 + 1.6.5 2.35 - 2.13.0 - 2.13.0 + 2.13.2 + 2.13.2.2 0.2.2 1.3.5 - 4.13.2 + 5.8.2 1.7 8.3.1 - 2.17.3 + 2.21.0 diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java index c5bd38a59e4e..0339233f586e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,7 +41,11 @@ Animal.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java index b99939ade459..6e454e1c9b8e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -43,7 +44,11 @@ Cat.JSON_PROPERTY_DECLAWED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java index 7fcc5c6bc09d..44a735d8daf5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -46,7 +47,11 @@ ChildCat.JSON_PROPERTY_PET_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "pet_type", visible = true) +@JsonIgnoreProperties( + value = "pet_type", // ignore manually set pet_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the pet_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "pet_type", visible = true) public class ChildCat extends ParentPet { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java index fdc8db5c411e..ce8628d2bf0a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -43,7 +44,11 @@ Dog.JSON_PROPERTY_BREED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 7bac5a69e9ec..9fc4412bf621 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,11 @@ GrandparentAnimal.JSON_PROPERTY_PET_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "pet_type", visible = true) +@JsonIgnoreProperties( + value = "pet_type", // ignore manually set pet_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the pet_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "pet_type", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = ChildCat.class, name = "ChildCat"), @JsonSubTypes.Type(value = ParentPet.class, name = "ParentPet"), diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java index 05ea22122ef1..564a987d2735 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Mammal.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java index dc226958b270..1daeb49ad391 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NullableShape.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java index 80092aa82062..358b0010cd8b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ParentPet.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -42,7 +43,11 @@ @JsonPropertyOrder({ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "pet_type", visible = true) +@JsonIgnoreProperties( + value = "pet_type", // ignore manually set pet_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the pet_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "pet_type", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = ChildCat.class, name = "ChildCat"), }) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java index 8b029071b841..867d9fef6da5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pig.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java index d4a85d5eb5ef..24d07422a79c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Quadrilateral.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java index dcc10dadaa04..aaea99cfa226 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Shape.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java index 195c51dd975d..cf8cc44e02f2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ShapeOrNull.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java index 8991558a310e..85a5cc56a2c1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Triangle.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java index 9239b5386b22..570a2619f94a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java @@ -27,7 +27,8 @@ import java.security.PublicKey; import java.security.PrivateKey; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class ApiClientTest { ApiClient apiClient = null; @@ -35,7 +36,7 @@ public class ApiClientTest { PrivateKey privateKey = null; PublicKey publicKey = null; - @Before + @BeforeEach public void setup() { apiClient = new ApiClient(); pet = new Pet(); @@ -97,7 +98,7 @@ public void testSerializeToString() throws Exception { pet.setCategory(category); pet.setStatus(Pet.StatusEnum.AVAILABLE); pet.setPhotoUrls(Arrays.asList("A", "B", "C")); - Tag tag = new Tag(); + org.openapitools.client.model.Tag tag = new org.openapitools.client.model.Tag(); tag.setId(petId); tag.setName("jersey2 java8 tag"); pet.setTags(Arrays.asList(tag)); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java index 3013a0bf533f..1834c34b0685 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java @@ -6,14 +6,13 @@ import java.util.Map; import com.fasterxml.jackson.databind.JsonMappingException; -import org.junit.*; -import static org.junit.Assert.*; - +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class JSONComposedSchemaTest { JSON json = null; - @Before + @BeforeEach public void setup() { json = new JSON(); } @@ -69,24 +68,32 @@ public void testOneOfSchemaAdditionalProperties() throws Exception { /** * Test to ensure the setter will throw IllegalArgumentException */ - @Test(expected = IllegalArgumentException.class) + @Test public void testEnumDiscriminator() throws Exception { - ChildCat cc = new ChildCat(); - cc.setPetType("ChildCat"); - assertEquals("ChildCat", cc.getPetType()); - - cc.setPetType("WrongValue"); + IllegalArgumentException thrown = Assertions.assertThrows(IllegalArgumentException.class, () -> { + ChildCat cc = new ChildCat(); + cc.setPetType("ChildCat"); + assertEquals("ChildCat", cc.getPetType()); + cc.setPetType("WrongValue"); + }); + Assertions.assertEquals("WrongValue is invalid. Possible values for petType: ChildCat", thrown.getMessage()); } /** * Test to ensure the getter will throw ClassCastException */ - @Test(expected = ClassCastException.class) + @Test public void testCastException() throws Exception { - String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false }"; - FruitReq o = json.getContext(null).readValue(str, FruitReq.class); - assertTrue(o.getActualInstance() instanceof AppleReq); - BananaReq inst2 = o.getBananaReq(); // should throw ClassCastException + ClassCastException thrown = Assertions.assertThrows(ClassCastException.class, () -> { + String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false }"; + FruitReq o = json.getContext(null).readValue(str, FruitReq.class); + assertTrue(o.getActualInstance() instanceof AppleReq); + BananaReq inst2 = o.getBananaReq(); // should throw ClassCastException + }); + // comment out below as the erorr message can be different due to JDK versions + // org.opentest4j.AssertionFailedError: expected: but was: + //Assertions.assertEquals("class org.openapitools.client.model.AppleReq cannot be cast to class org.openapitools.client.model.BananaReq (org.openapitools.client.model.AppleReq and org.openapitools.client.model.BananaReq are in unnamed module of loader 'app')", thrown.getMessage()); + Assertions.assertNotNull(thrown); } /** @@ -384,13 +391,13 @@ public void testAllOfSchema() throws Exception { public void testNullValueDisallowed() throws Exception { { String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }"; - Order o = json.getContext(null).readValue(str, Order.class); + org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class); assertEquals(100L, (long)o.getQuantity()); - assertEquals(Order.StatusEnum.PLACED, o.getStatus()); + assertEquals(org.openapitools.client.model.Order.StatusEnum.PLACED, o.getStatus()); } { String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": null }"; - Order o = json.getContext(null).readValue(str, Order.class); + org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class); // TODO: the null value is not allowed per OAS document. // The deserialization should fail. assertNull(o.getQuantity()); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java index 26c568d1956a..b5e9d7872a0e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java @@ -10,15 +10,15 @@ import java.time.OffsetDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; -import org.junit.*; -import static org.junit.Assert.*; +import org.junit.jupiter.api.*; +import static org.junit.jupiter.api.Assertions.*; public class JSONTest { JSON json = null; Order order = null; - @Before + @BeforeEach public void setup() { json = new JSON(); order = new Order(); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 24df57d8d7eb..746794d96876 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -16,9 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -37,8 +38,7 @@ public class AnotherFakeApiTest { * * To test special tags and operation ID starting with number * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void call123testSpecialTagsTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/DefaultApiTest.java index 3f6b4c2d7160..248dbfc04553 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -16,9 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.InlineResponseDefault; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -33,12 +34,7 @@ public class DefaultApiTest { private final DefaultApi api = new DefaultApi(); /** - * - * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fooGetTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java index b46f1ae7b267..99ec8629a504 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -23,10 +23,12 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterEnum; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -43,10 +45,7 @@ public class FakeApiTest { /** * Health check endpoint * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeHealthGetTest() throws ApiException { @@ -55,12 +54,9 @@ public void fakeHealthGetTest() throws ApiException { } /** - * - * * Test serialization of outer boolean types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterBooleanSerializeTest() throws ApiException { @@ -70,12 +66,9 @@ public void fakeOuterBooleanSerializeTest() throws ApiException { } /** - * - * * Test serialization of object with outer number type * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { @@ -85,12 +78,9 @@ public void fakeOuterCompositeSerializeTest() throws ApiException { } /** - * - * * Test serialization of outer number types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterNumberSerializeTest() throws ApiException { @@ -100,12 +90,9 @@ public void fakeOuterNumberSerializeTest() throws ApiException { } /** - * - * * Test serialization of outer string types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterStringSerializeTest() throws ApiException { @@ -115,12 +102,20 @@ public void fakeOuterStringSerializeTest() throws ApiException { } /** - * + * Array of Enums * + * @throws ApiException if the Api call fails + */ + @Test + public void getArrayOfEnumsTest() throws ApiException { + //List response = api.getArrayOfEnums(); + // TODO: test validations + } + + /** * For this test, the body for this request much reference a schema named `File`. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { @@ -130,12 +125,7 @@ public void testBodyWithFileSchemaTest() throws ApiException { } /** - * - * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithQueryParamsTest() throws ApiException { @@ -150,8 +140,7 @@ public void testBodyWithQueryParamsTest() throws ApiException { * * To test \"client\" model * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClientModelTest() throws ApiException { @@ -165,8 +154,7 @@ public void testClientModelTest() throws ApiException { * * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEndpointParametersTest() throws ApiException { @@ -193,8 +181,7 @@ public void testEndpointParametersTest() throws ApiException { * * To test enum parameters * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEnumParametersTest() throws ApiException { @@ -215,8 +202,7 @@ public void testEnumParametersTest() throws ApiException { * * Fake endpoint to test group parameters (optional) * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testGroupParametersTest() throws ApiException { @@ -242,8 +228,7 @@ public void testGroupParametersTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { @@ -257,8 +242,7 @@ public void testInlineAdditionalPropertiesTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testJsonFormDataTest() throws ApiException { @@ -269,12 +253,9 @@ public void testJsonFormDataTest() throws ApiException { } /** - * - * * To test the collection format in query parameters * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testQueryParameterCollectionFormatTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 2194d1682951..92a40d23900a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -16,9 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -37,8 +38,7 @@ public class FakeClassnameTags123ApiTest { * * To test class name in snake case * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClassnameTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java index bddf4c4db819..9c61bba29e36 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -17,16 +17,17 @@ import org.openapitools.client.auth.*; import java.io.File; import org.openapitools.client.model.*; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; -import java.util.ArrayList; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + import java.util.Arrays; +import java.util.ArrayList; +import java.util.Map; import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; /** * API tests for PetApi @@ -41,8 +42,7 @@ public class PetApiTest { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void addPetTest() throws ApiException { @@ -65,42 +65,41 @@ public void addPetTest() throws ApiException { //get pet by ID Pet result = api.getPetById(petId); - Assert.assertEquals(result.getId(), body.getId()); - Assert.assertEquals(result.getCategory(), category); - Assert.assertEquals(result.getName(), body.getName()); - Assert.assertEquals(result.getPhotoUrls(), body.getPhotoUrls()); - Assert.assertEquals(result.getStatus(), body.getStatus()); - Assert.assertEquals(result.getTags(), body.getTags()); + Assertions.assertEquals(result.getId(), body.getId()); + Assertions.assertEquals(result.getCategory(), category); + Assertions.assertEquals(result.getName(), body.getName()); + Assertions.assertEquals(result.getPhotoUrls(), body.getPhotoUrls()); + Assertions.assertEquals(result.getStatus(), body.getStatus()); + Assertions.assertEquals(result.getTags(), body.getTags()); // update pet api.updatePetWithForm(petId, "jersey2 java8 pet 2", "sold"); //get pet by ID Pet result2 = api.getPetById(petId); - Assert.assertEquals(result2.getId(), body.getId()); - Assert.assertEquals(result2.getCategory(), category); - Assert.assertEquals(result2.getName(), "jersey2 java8 pet 2"); - Assert.assertEquals(result2.getPhotoUrls(), body.getPhotoUrls()); - Assert.assertEquals(result2.getStatus(), Pet.StatusEnum.SOLD); - Assert.assertEquals(result2.getTags(), body.getTags()); + Assertions.assertEquals(result2.getId(), body.getId()); + Assertions.assertEquals(result2.getCategory(), category); + Assertions.assertEquals(result2.getName(), "jersey2 java8 pet 2"); + Assertions.assertEquals(result2.getPhotoUrls(), body.getPhotoUrls()); + Assertions.assertEquals(result2.getStatus(), Pet.StatusEnum.SOLD); + Assertions.assertEquals(result2.getTags(), body.getTags()); // delete pet api.deletePet(petId, "empty api key"); try { Pet result3 = api.getPetById(petId); - Assert.assertEquals(false, true); + Assertions.assertEquals(false, true); } catch (ApiException e) { // System.err.println("Exception when calling PetApi#getPetById"); // System.err.println("Status code: " + e.getCode()); // System.err.println("Reason: " + e.getResponseBody()); // System.err.println("Response headers: " + e.getResponseHeaders()); - Assert.assertEquals(e.getCode(), 404); - Assert.assertEquals(e.getResponseBody(), "{\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}"); + Assertions.assertEquals(e.getCode(), 404); + Assertions.assertEquals(e.getResponseBody(), "{\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}"); } - } /** @@ -108,8 +107,7 @@ public void addPetTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deletePetTest() throws ApiException { @@ -124,8 +122,7 @@ public void deletePetTest() throws ApiException { * * Multiple status values can be provided with comma separated strings * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void findPetsByStatusTest() throws ApiException { @@ -139,8 +136,7 @@ public void findPetsByStatusTest() throws ApiException { * * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void findPetsByTagsTest() throws ApiException { @@ -154,8 +150,7 @@ public void findPetsByTagsTest() throws ApiException { * * Returns a single pet * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getPetByIdTest() throws ApiException { @@ -169,8 +164,7 @@ public void getPetByIdTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updatePetTest() throws ApiException { @@ -184,8 +178,7 @@ public void updatePetTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updatePetWithFormTest() throws ApiException { @@ -201,15 +194,14 @@ public void updatePetWithFormTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void uploadFileTest() throws ApiException { //Long petId = null; //String additionalMetadata = null; - //File file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + //File _file = null; + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); // TODO: test validations } @@ -218,8 +210,7 @@ public void uploadFileTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void uploadFileWithRequiredFileTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java index 20dcc8c1d6e5..38f008c16cdb 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -16,9 +16,10 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -37,8 +38,7 @@ public class StoreApiTest { * * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteOrderTest() throws ApiException { @@ -52,8 +52,7 @@ public void deleteOrderTest() throws ApiException { * * Returns a map of status codes to quantities * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getInventoryTest() throws ApiException { @@ -66,8 +65,7 @@ public void getInventoryTest() throws ApiException { * * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getOrderByIdTest() throws ApiException { @@ -81,8 +79,7 @@ public void getOrderByIdTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void placeOrderTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java index 17c07ffe226f..358763cb9be0 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,10 +15,12 @@ import org.openapitools.client.*; import org.openapitools.client.auth.*; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -37,8 +39,7 @@ public class UserApiTest { * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUserTest() throws ApiException { @@ -52,8 +53,7 @@ public void createUserTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithArrayInputTest() throws ApiException { @@ -67,8 +67,7 @@ public void createUsersWithArrayInputTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithListInputTest() throws ApiException { @@ -82,8 +81,7 @@ public void createUsersWithListInputTest() throws ApiException { * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteUserTest() throws ApiException { @@ -97,8 +95,7 @@ public void deleteUserTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getUserByNameTest() throws ApiException { @@ -112,8 +109,7 @@ public void getUserByNameTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void loginUserTest() throws ApiException { @@ -128,8 +124,7 @@ public void loginUserTest() throws ApiException { * * * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void logoutUserTest() throws ApiException { @@ -142,8 +137,7 @@ public void logoutUserTest() throws ApiException { * * This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updateUserTest() throws ApiException { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 88ee16219b0a..635c50f435e6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -16,19 +16,21 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AdditionalPropertiesClass diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java index 558153c5578a..84cc827725b4 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Animal diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleReqTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleReqTest.java index 0f39f3ad75cf..436f436eff06 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleReqTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleReqTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for AppleReq diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleTest.java index d983478a130b..a0dfa4507a5f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AppleTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Apple diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index e25187a3b608..843755edbbef 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayOfArrayOfNumberOnly diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index ae1061823991..7c4c38a6e064 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayOfNumberOnly diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 36bd9951cf60..58d78aa4a5cd 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ArrayTest diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaReqTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaReqTest.java index a6d9b0c6123d..675128f9b9d9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaReqTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaReqTest.java @@ -16,14 +16,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for BananaReq diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaTest.java index ce5b24ce27f9..60855139ce79 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BananaTest.java @@ -16,14 +16,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Banana diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BasquePigTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BasquePigTest.java index c89b20084dfa..f08be5450b77 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BasquePigTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BasquePigTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for BasquePig diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java index a701b341fc59..f36daac40c15 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Capitalization diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 1d85a0447253..a0731738b24d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for CatAllOf diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java index 1792dc3cc76a..43055fd2be03 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.CatAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Cat diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java index 6027994a2ac3..8ad0eee05e0a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Category diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java index 23ba3a5e47cd..f2820f8cd35d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java @@ -16,13 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import java.util.Set; +import java.util.HashSet; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ChildCatAllOf @@ -46,4 +49,12 @@ public void nameTest() { // TODO: test name } + /** + * Test the property 'petType' + */ + @Test + public void petTypeTest() { + // TODO: test petType + } + } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatTest.java index 4e71ac70188f..82ff19a5d767 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatTest.java @@ -13,20 +13,24 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ChildCatAllOf; import org.openapitools.client.model.ParentPet; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import java.util.Set; +import java.util.HashSet; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ChildCat diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java index 8914c9cad43d..d60c8d4aaabb 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ClassModel diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java index c21b346272d7..f6759ee68279 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Client diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java index 6237f87cb9b6..685c0829fa1d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ComplexQuadrilateralTest.java @@ -16,15 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.QuadrilateralInterface; import org.openapitools.client.model.ShapeInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ComplexQuadrilateral diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DanishPigTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DanishPigTest.java index 9d2b8aeaa0bf..2a5ade5f5452 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DanishPigTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DanishPigTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for DanishPig diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index 91da27da0af6..56a80875062c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for DeprecatedObject diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 6e4b49108098..7e139a4d950e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for DogAllOf diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java index 3446815a300a..e6f849f7f8c8 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Dog diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DrawingTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DrawingTest.java index 406cad75e14f..0b00214330f8 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DrawingTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DrawingTest.java @@ -16,24 +16,24 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.openapitools.client.model.Fruit; import org.openapitools.client.model.NullableShape; import org.openapitools.client.model.Shape; import org.openapitools.client.model.ShapeOrNull; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Drawing diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 45b8fbbd8220..cfb1a337de90 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -16,15 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EnumArrays diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd2..50fc9572fcdd 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EnumClass diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java index 936fbe191c01..3fe8f8bce99d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -23,13 +24,14 @@ import org.openapitools.client.model.OuterEnumDefaultValue; import org.openapitools.client.model.OuterEnumInteger; import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EnumTest @@ -69,6 +71,14 @@ public void enumIntegerTest() { // TODO: test enumInteger } + /** + * Test the property 'enumIntegerOnly' + */ + @Test + public void enumIntegerOnlyTest() { + // TODO: test enumIntegerOnly + } + /** * Test the property 'enumNumber' */ diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java index 66a6d32e76f7..c5236c89e195 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EquilateralTriangleTest.java @@ -16,15 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ShapeInterface; import org.openapitools.client.model.TriangleInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for EquilateralTriangle diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index ef37e666be39..aad267bb2416 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -16,15 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.client.model.ModelFile; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for FileSchemaTestClass @@ -41,11 +43,11 @@ public void testFileSchemaTestClass() { } /** - * Test the property 'file' + * Test the property '_file' */ @Test - public void fileTest() { - // TODO: test file + public void _fileTest() { + // TODO: test _file } /** diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FooTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FooTest.java index e315d9e3b155..4a1f200121eb 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FooTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FooTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Foo diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java index d282af3ac23b..68a894af142b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -24,10 +25,10 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.UUID; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for FormatTest @@ -91,6 +92,14 @@ public void _doubleTest() { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitReqTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitReqTest.java index dc614b817d83..1e1dfda43c9d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitReqTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitReqTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.client.model.AppleReq; import org.openapitools.client.model.BananaReq; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for FruitReq diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitTest.java index 36dee4f05ba7..5cb1cf300bb4 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FruitTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.client.model.Apple; import org.openapitools.client.model.Banana; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Fruit diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GmFruitTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GmFruitTest.java index ed3965cd8a06..5b9e5aba2c19 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GmFruitTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GmFruitTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.client.model.Apple; import org.openapitools.client.model.Banana; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for GmFruit diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java index 59aba05da2db..b6c369b5e405 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/GrandparentAnimalTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ChildCat; import org.openapitools.client.model.ParentPet; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for GrandparentAnimal diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index e902c100383b..2102a335f53b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for HasOnlyReadOnly diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java index 43806e73f933..db11384e8c41 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -16,16 +16,18 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for HealthCheckResult diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject1Test.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject1Test.java deleted file mode 100644 index f7e7347374d3..000000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject1Test.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for InlineObject1 - */ -public class InlineObject1Test { - private final InlineObject1 model = new InlineObject1(); - - /** - * Model tests for InlineObject1 - */ - @Test - public void testInlineObject1() { - // TODO: test InlineObject1 - } - - /** - * Test the property 'additionalMetadata' - */ - @Test - public void additionalMetadataTest() { - // TODO: test additionalMetadata - } - - /** - * Test the property 'file' - */ - @Test - public void fileTest() { - // TODO: test file - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject2Test.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject2Test.java deleted file mode 100644 index a25872427e3d..000000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject2Test.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for InlineObject2 - */ -public class InlineObject2Test { - private final InlineObject2 model = new InlineObject2(); - - /** - * Model tests for InlineObject2 - */ - @Test - public void testInlineObject2() { - // TODO: test InlineObject2 - } - - /** - * Test the property 'enumFormStringArray' - */ - @Test - public void enumFormStringArrayTest() { - // TODO: test enumFormStringArray - } - - /** - * Test the property 'enumFormString' - */ - @Test - public void enumFormStringTest() { - // TODO: test enumFormString - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject3Test.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject3Test.java deleted file mode 100644 index 66d973213517..000000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject3Test.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for InlineObject3 - */ -public class InlineObject3Test { - private final InlineObject3 model = new InlineObject3(); - - /** - * Model tests for InlineObject3 - */ - @Test - public void testInlineObject3() { - // TODO: test InlineObject3 - } - - /** - * Test the property 'integer' - */ - @Test - public void integerTest() { - // TODO: test integer - } - - /** - * Test the property 'int32' - */ - @Test - public void int32Test() { - // TODO: test int32 - } - - /** - * Test the property 'int64' - */ - @Test - public void int64Test() { - // TODO: test int64 - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property '_float' - */ - @Test - public void _floatTest() { - // TODO: test _float - } - - /** - * Test the property '_double' - */ - @Test - public void _doubleTest() { - // TODO: test _double - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - - /** - * Test the property 'patternWithoutDelimiter' - */ - @Test - public void patternWithoutDelimiterTest() { - // TODO: test patternWithoutDelimiter - } - - /** - * Test the property '_byte' - */ - @Test - public void _byteTest() { - // TODO: test _byte - } - - /** - * Test the property 'binary' - */ - @Test - public void binaryTest() { - // TODO: test binary - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'callback' - */ - @Test - public void callbackTest() { - // TODO: test callback - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject4Test.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject4Test.java deleted file mode 100644 index dee98299577f..000000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject4Test.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for InlineObject4 - */ -public class InlineObject4Test { - private final InlineObject4 model = new InlineObject4(); - - /** - * Model tests for InlineObject4 - */ - @Test - public void testInlineObject4() { - // TODO: test InlineObject4 - } - - /** - * Test the property 'param' - */ - @Test - public void paramTest() { - // TODO: test param - } - - /** - * Test the property 'param2' - */ - @Test - public void param2Test() { - // TODO: test param2 - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject5Test.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject5Test.java deleted file mode 100644 index bca9d9d5532f..000000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObject5Test.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for InlineObject5 - */ -public class InlineObject5Test { - private final InlineObject5 model = new InlineObject5(); - - /** - * Model tests for InlineObject5 - */ - @Test - public void testInlineObject5() { - // TODO: test InlineObject5 - } - - /** - * Test the property 'additionalMetadata' - */ - @Test - public void additionalMetadataTest() { - // TODO: test additionalMetadata - } - - /** - * Test the property 'requiredFile' - */ - @Test - public void requiredFileTest() { - // TODO: test requiredFile - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObjectTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObjectTest.java deleted file mode 100644 index eac0e1987dce..000000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineObjectTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for InlineObject - */ -public class InlineObjectTest { - private final InlineObject model = new InlineObject(); - - /** - * Model tests for InlineObject - */ - @Test - public void testInlineObject() { - // TODO: test InlineObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java index dc7262e10b10..a8c56aa226ff 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java @@ -16,14 +16,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Foo; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for InlineResponseDefault diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java index b51db78af295..fc5cf03cfe4b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/IsoscelesTriangleTest.java @@ -16,15 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ShapeInterface; import org.openapitools.client.model.TriangleInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for IsoscelesTriangle diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MammalTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MammalTest.java index 3bbcb214d3e9..209262fde520 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MammalTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MammalTest.java @@ -13,11 +13,13 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -25,10 +27,10 @@ import org.openapitools.client.model.Pig; import org.openapitools.client.model.Whale; import org.openapitools.client.model.Zebra; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Mammal @@ -46,7 +48,7 @@ public void testMammal() throws Exception { z.setType(Zebra.TypeEnum.MOUNTAIN); z.setClassName("zebra"); m.setActualInstance(z); - Assert.assertEquals(JSON.getDefault().getMapper().writeValueAsString(m), "{\"type\":\"mountain\",\"className\":\"zebra\"}"); + Assertions.assertEquals(JSON.getDefault().getMapper().writeValueAsString(m), "{\"type\":\"mountain\",\"className\":\"zebra\"}"); } /** @@ -60,12 +62,11 @@ public void testGetActualInstanceRecursively() throws Exception { dp.setClassName("danish_pig"); p.setActualInstance(dp); m.setActualInstance(p); - Assert.assertTrue(m.getActualInstanceRecursively() instanceof DanishPig); + Assertions.assertTrue(m.getActualInstanceRecursively() instanceof DanishPig); Pig p2 = new Pig(); m.setActualInstance(p2); - Assert.assertEquals(m.getActualInstanceRecursively(), null); - + Assertions.assertEquals(m.getActualInstanceRecursively(), null); } /** diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java index a0c991bb7588..b8483619edfb 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -16,16 +16,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for MapTest diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 630b566f54db..a8c724138097 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -25,10 +26,10 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 82c7208079db..9a98de5ff16d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Model200Response diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 97a1287aa413..31fe5cea6c4b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelApiResponse diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java index 5b3fde28d4b4..2fad149d668b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelFile diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java index 36755ee2bd6a..3c7f35ce7291 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -20,10 +20,10 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelList diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java index f884519ebc86..0d3f00e6fc46 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelReturn diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java index cb3a94cf74ab..8a50c814697b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Name diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableClassTest.java index 380cb9f5c540..fbeeed0b7624 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableClassTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -26,13 +27,14 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for NullableClass diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableShapeTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableShapeTest.java index 9ce46c36f5ea..9ae3eba5aa66 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableShapeTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NullableShapeTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Quadrilateral; import org.openapitools.client.model.Triangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for NullableShape diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index f4fbd5ee8b42..c7e5efc28ccd 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -16,14 +16,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for NumberOnly diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 6f2848cab581..1ecac2abcf28 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -24,10 +24,10 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.DeprecatedObject; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ObjectWithDeprecatedFields diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java index da63441c6597..22743d42dd48 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java @@ -16,14 +16,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Order diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index ebea3ca304c0..0eab13de6999 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -16,14 +16,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterComposite diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java index 59c4eebd2f0f..5e6c1ecb1587 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterEnumDefaultValue diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java index fa981c709357..226897579ad2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterEnumIntegerDefaultValue diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java index 1b98d326bb13..61330bb05eea 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterEnumInteger diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf0..052ad003478d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -13,10 +13,10 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for OuterEnum diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ParentPetTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ParentPetTest.java index 9e1393c03c40..99209770aaed 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ParentPetTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ParentPetTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ChildCat; import org.openapitools.client.model.GrandparentAnimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ParentPet diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java index c3c0d4cc35dd..a1ebb6782c3f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -23,10 +24,10 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Pet diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PigTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PigTest.java index 4fc8bfae7dcb..f3c0218c837d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PigTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PigTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BasquePig; import org.openapitools.client.model.DanishPig; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Pig diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java index 718ab0efe92c..e2d81c731720 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralInterfaceTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralTest.java index 75a2d3c42f45..54d0189f8db5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/QuadrilateralTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ComplexQuadrilateral; import org.openapitools.client.model.SimpleQuadrilateral; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Quadrilateral diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index b82a7d0ef561..86f8a92da18d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ReadOnlyFirst diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java index 6f5fb0093e45..0e96e8ba04cd 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ScaleneTriangleTest.java @@ -16,15 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.ShapeInterface; import org.openapitools.client.model.TriangleInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ScaleneTriangle diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java index 9c22ccba6d37..fa26c0fe98ed 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeInterfaceTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ShapeInterface diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java index 65468232ee58..dfe730ca97a9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeOrNullTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Quadrilateral; import org.openapitools.client.model.Triangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ShapeOrNull diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeTest.java index b882ac315568..8249ec7bba1a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ShapeTest.java @@ -13,20 +13,22 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Quadrilateral; import org.openapitools.client.model.Triangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Shape diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java index b1dda86fe7f2..a21fd430e4ed 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SimpleQuadrilateralTest.java @@ -16,15 +16,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.QuadrilateralInterface; import org.openapitools.client.model.ShapeInterface; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for SimpleQuadrilateral diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index d5a19c371e68..991753f718ff 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for SpecialModelName @@ -46,4 +47,12 @@ public void testSpecialModelName() { // TODO: test $specialPropertyName } + /** + * Test the property 'specialModelName' + */ + @Test + public void specialModelNameTest() { + // TODO: test specialModelName + } + } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java index 5c2cc6f49e05..97e1aa2743a5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Tag diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java index d07b83711447..4fdd985d127f 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleInterfaceTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for TriangleInterface diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleTest.java index 2c9070813847..d1dea3a429d3 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TriangleTest.java @@ -13,21 +13,23 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.EquilateralTriangle; import org.openapitools.client.model.IsoscelesTriangle; import org.openapitools.client.model.ScaleneTriangle; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Triangle diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java index f5a8e85cb65c..dc7ea6d5e9c5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java @@ -16,16 +16,18 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for User diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/WhaleTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/WhaleTest.java index 26810e2c280e..674ec1456e8a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/WhaleTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/WhaleTest.java @@ -16,13 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Whale diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java index 357d7837928a..4bd27dc0f12a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java @@ -3,7 +3,7 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,13 +16,23 @@ import com.fasterxml.jackson.databind.type.MapType; import com.fasterxml.jackson.databind.type.TypeFactory; import com.fasterxml.jackson.core.type.TypeReference; -import org.junit.Assert; -import org.junit.Test; -import org.openapitools.client.JSON; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; +import org.openapitools.client.JSON; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + /** * Model tests for Zebra */ @@ -44,18 +54,18 @@ public void testZebra() { JSON j = new JSON(); try { // serialize - Assert.assertEquals(j.getMapper().writeValueAsString(z), "{\"type\":\"mountain\",\"className\":\"zebra\",\"key1\":\"value1\",\"key2\":12321}"); + Assertions.assertEquals(j.getMapper().writeValueAsString(z), "{\"type\":\"mountain\",\"className\":\"zebra\",\"key1\":\"value1\",\"key2\":12321}"); // deserialize String zebraJson = "{\"type\":\"mountain\",\"className\":\"zebra\",\"key1\":\"value1\",\"key2\":12321}"; Zebra zebraFromJson = j.getMapper().readValue(zebraJson, Zebra.class); - Assert.assertEquals(zebraFromJson.getType(), Zebra.TypeEnum.MOUNTAIN); - Assert.assertEquals(zebraFromJson.getClassName(), "zebra"); - Assert.assertEquals(zebraFromJson.getAdditionalProperties().size(), 2); - Assert.assertEquals(zebraFromJson.getAdditionalProperty("key1"), "value1"); - Assert.assertEquals(zebraFromJson.getAdditionalProperty("key2"), 12321); + Assertions.assertEquals(zebraFromJson.getType(), Zebra.TypeEnum.MOUNTAIN); + Assertions.assertEquals(zebraFromJson.getClassName(), "zebra"); + Assertions.assertEquals(zebraFromJson.getAdditionalProperties().size(), 2); + Assertions.assertEquals(zebraFromJson.getAdditionalProperty("key1"), "value1"); + Assertions.assertEquals(zebraFromJson.getAdditionalProperty("key2"), 12321); } catch (Exception ex) { - Assert.assertEquals(true, false); // exception shouldn't be thrown + Assertions.assertEquals(true, false); // exception shouldn't be thrown } } @@ -71,16 +81,15 @@ public void typeTest() { MapType mapType = typeFactory.constructMapType(HashMap.class, String.class, Object.class); try { HashMap map = j.getMapper().readValue(zebraJson, mapType); - Assert.assertEquals(map.get("type"), "mountain"); + Assertions.assertEquals(map.get("type"), "mountain"); Map result = j.getMapper().readValue(zebraJson, new TypeReference>() {}); - Assert.assertEquals(result.get("type"), "mountain"); + Assertions.assertEquals(result.get("type"), "mountain"); } catch (Exception ex) { - Assert.assertEquals(true, false); // exception shouldn't be thrown + Assertions.assertEquals(true, false); // exception shouldn't be thrown } - } /** @@ -88,7 +97,7 @@ public void typeTest() { */ @Test public void classNameTest() { - + // TODO: test className } } diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index 9a12a513393b..b2acef46f4f2 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -8,6 +8,7 @@ docs/Address.md docs/Animal.md docs/AnimalFarm.md docs/AnotherFakeApi.md +docs/AnyTypeNotString.md docs/ApiResponse.md docs/Apple.md docs/AppleReq.md @@ -79,6 +80,7 @@ docs/IntegerMin15.md docs/IsoscelesTriangle.md docs/IsoscelesTriangleAllOf.md docs/Mammal.md +docs/MapBean.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -124,6 +126,7 @@ docs/StringWithValidation.md docs/Tag.md docs/Triangle.md docs/TriangleInterface.md +docs/UUIDString.md docs/User.md docs/UserApi.md docs/Whale.md @@ -148,6 +151,7 @@ petstore_api/model/additional_properties_with_array_of_enums.py petstore_api/model/address.py petstore_api/model/animal.py petstore_api/model/animal_farm.py +petstore_api/model/any_type_not_string.py petstore_api/model/api_response.py petstore_api/model/apple.py petstore_api/model/apple_req.py @@ -216,6 +220,7 @@ petstore_api/model/integer_min15.py petstore_api/model/isosceles_triangle.py petstore_api/model/isosceles_triangle_all_of.py petstore_api/model/mammal.py +petstore_api/model/map_bean.py petstore_api/model/map_test.py petstore_api/model/mixed_properties_and_additional_properties_class.py petstore_api/model/model200_response.py @@ -260,6 +265,7 @@ petstore_api/model/tag.py petstore_api/model/triangle.py petstore_api/model/triangle_interface.py petstore_api/model/user.py +petstore_api/model/uuid_string.py petstore_api/model/whale.py petstore_api/model/zebra.py petstore_api/models/__init__.py diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md index eaf9a932d09c..f6b927f9a77b 100644 --- a/samples/openapi3/client/petstore/python-experimental/README.md +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -100,11 +100,15 @@ Class | Method | HTTP request | Description *FakeApi* | [**inline_additional_properties**](docs/FakeApi.md#inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**inline_composition**](docs/FakeApi.md#inline_composition) | **POST** /fake/inlineComposition/ | testing composed schemas at inline locations *FakeApi* | [**json_form_data**](docs/FakeApi.md#json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**json_with_charset**](docs/FakeApi.md#json_with_charset) | **POST** /fake/jsonWithCharset | json with charset tx and rx *FakeApi* | [**mammal**](docs/FakeApi.md#mammal) | **POST** /fake/refs/mammal | *FakeApi* | [**number_with_validations**](docs/FakeApi.md#number_with_validations) | **POST** /fake/refs/number | +*FakeApi* | [**object_in_query**](docs/FakeApi.md#object_in_query) | **GET** /fake/objInQuery | user list *FakeApi* | [**object_model_with_ref_props**](docs/FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props | *FakeApi* | [**parameter_collisions**](docs/FakeApi.md#parameter_collisions) | **POST** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case *FakeApi* | [**query_parameter_collection_format**](docs/FakeApi.md#query_parameter_collection_format) | **PUT** /fake/test-query-paramters | +*FakeApi* | [**ref_object_in_query**](docs/FakeApi.md#ref_object_in_query) | **GET** /fake/refObjInQuery | user list +*FakeApi* | [**response_without_schema**](docs/FakeApi.md#response_without_schema) | **GET** /fake/responseWithoutSchema | receives a response without schema *FakeApi* | [**string**](docs/FakeApi.md#string) | **POST** /fake/refs/string | *FakeApi* | [**string_enum**](docs/FakeApi.md#string_enum) | **POST** /fake/refs/enum | *FakeApi* | [**upload_download_file**](docs/FakeApi.md#upload_download_file) | **POST** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream @@ -140,6 +144,7 @@ Class | Method | HTTP request | Description - [Address](docs/Address.md) - [Animal](docs/Animal.md) - [AnimalFarm](docs/AnimalFarm.md) + - [AnyTypeNotString](docs/AnyTypeNotString.md) - [ApiResponse](docs/ApiResponse.md) - [Apple](docs/Apple.md) - [AppleReq](docs/AppleReq.md) @@ -208,6 +213,7 @@ Class | Method | HTTP request | Description - [IsoscelesTriangle](docs/IsoscelesTriangle.md) - [IsoscelesTriangleAllOf](docs/IsoscelesTriangleAllOf.md) - [Mammal](docs/Mammal.md) + - [MapBean](docs/MapBean.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -251,6 +257,7 @@ Class | Method | HTTP request | Description - [Tag](docs/Tag.md) - [Triangle](docs/Triangle.md) - [TriangleInterface](docs/TriangleInterface.md) + - [UUIDString](docs/UUIDString.md) - [User](docs/User.md) - [Whale](docs/Whale.md) - [Zebra](docs/Zebra.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md index 6ec2e771f866..163f2000ca7c 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -68,7 +68,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnyTypeNotString.md b/samples/openapi3/client/petstore/python-experimental/docs/AnyTypeNotString.md new file mode 100644 index 000000000000..6ec0912a0b01 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnyTypeNotString.md @@ -0,0 +1,9 @@ +# AnyTypeNotString + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/CompositionInProperty.md b/samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md index 12441fe99ec1..923b00a2185a 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md @@ -3,7 +3,7 @@ #### Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProp** | **object** | | [optional] +**someProp** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/DateTimeTest.md b/samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md index 408c95d0f9ae..4dd977eac981 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md @@ -2,7 +2,7 @@ Type | Description | Notes ------------- | ------------- | ------------- -**datetime** | | defaults to isoparse('2010-01-01T10:10:10.000111+01:00') +**datetime** | | defaults to 2010-01-01T10:10:10.000111+01:00 [[Back to Model list]](../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-experimental/docs/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md index 768fca5bd474..71f36c7bc6b3 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md @@ -44,7 +44,7 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | ApiResponseForDefault | response +default | ApiResponseForDefault | response #### ApiResponseForDefault Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 69d80dcb49fa..626f18ba6df6 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -20,11 +20,15 @@ Method | HTTP request | Description [**inline_additional_properties**](FakeApi.md#inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**inline_composition**](FakeApi.md#inline_composition) | **POST** /fake/inlineComposition/ | testing composed schemas at inline locations [**json_form_data**](FakeApi.md#json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +[**json_with_charset**](FakeApi.md#json_with_charset) | **POST** /fake/jsonWithCharset | json with charset tx and rx [**mammal**](FakeApi.md#mammal) | **POST** /fake/refs/mammal | [**number_with_validations**](FakeApi.md#number_with_validations) | **POST** /fake/refs/number | +[**object_in_query**](FakeApi.md#object_in_query) | **GET** /fake/objInQuery | user list [**object_model_with_ref_props**](FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props | [**parameter_collisions**](FakeApi.md#parameter_collisions) | **POST** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case [**query_parameter_collection_format**](FakeApi.md#query_parameter_collection_format) | **PUT** /fake/test-query-paramters | +[**ref_object_in_query**](FakeApi.md#ref_object_in_query) | **GET** /fake/refObjInQuery | user list +[**response_without_schema**](FakeApi.md#response_without_schema) | **GET** /fake/responseWithoutSchema | receives a response without schema [**string**](FakeApi.md#string) | **POST** /fake/refs/string | [**string_enum**](FakeApi.md#string_enum) | **POST** /fake/refs/enum | [**upload_download_file**](FakeApi.md#upload_download_file) | **POST** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream @@ -93,7 +97,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Got object with additional properties with array of enums +200 | ApiResponseFor200 | Got object with additional properties with array of enums #### ApiResponseFor200 Name | Type | Description | Notes @@ -178,7 +182,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output model +200 | ApiResponseFor200 | Output model #### ApiResponseFor200 Name | Type | Description | Notes @@ -262,7 +266,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Got named array of enums +200 | ApiResponseFor200 | Got named array of enums #### ApiResponseFor200 Name | Type | Description | Notes @@ -350,7 +354,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Success +200 | ApiResponseFor200 | Success #### ApiResponseFor200 Name | Type | Description | Notes @@ -407,6 +411,7 @@ with petstore_api.ApiClient(configuration) as api_client: object_with_no_declared_props=dict(), object_with_no_declared_props_nullable=dict(), any_type_prop=None, + any_type_except_null_prop=None, any_type_prop_nullable=None, ) try: @@ -455,7 +460,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Success +200 | ApiResponseFor200 | Success #### ApiResponseFor200 Name | Type | Description | Notes @@ -531,7 +536,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output boolean +200 | ApiResponseFor200 | Output boolean #### ApiResponseFor200 Name | Type | Description | Notes @@ -634,7 +639,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Success +200 | ApiResponseFor200 | Success #### ApiResponseFor200 Name | Type | Description | Notes @@ -714,7 +719,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -764,7 +769,7 @@ with petstore_api.ApiClient(configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = ComposedOneOfDifferentTypes() + body = ComposedOneOfDifferentTypes(None) try: api_response = api_instance.composed_one_of_different_types( body=body, @@ -797,7 +802,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output model +200 | ApiResponseFor200 | Output model #### ApiResponseFor200 Name | Type | Description | Notes @@ -864,12 +869,12 @@ with petstore_api.ApiClient(configuration) as api_client: number=32.1, _float=3.14, double=67.8, - string="a", - pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C", + string="A", + pattern_without_delimiter="Aj", byte='YQ==', binary=open('/path/to/file', 'rb'), - date=isoparse('1970-01-01').date(), - date_time=isoparse('2020-02-02T20:20:20.22222Z'), + date="1970-01-01", + date_time="2020-02-02T20:20:20.222220Z", password="password_example", callback="callback_example", ) @@ -909,7 +914,7 @@ Name | Type | Description | Notes **byte** | **str** | None | **binary** | **file_type** | None | [optional] **date** | **date** | None | [optional] -**dateTime** | **datetime** | None | [optional] if omitted the server will use the default value of isoparse('2010-02-01T10:20:10.11111+01:00') +**dateTime** | **datetime** | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.11111+01:00 **password** | **str** | None | [optional] **callback** | **str** | None | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] @@ -919,8 +924,8 @@ Name | Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid username supplied -404 | ApiResponseFor404 | User not found +400 | ApiResponseFor400 | Invalid username supplied +404 | ApiResponseFor404 | User not found #### ApiResponseFor400 Name | Type | Description | Notes @@ -1083,8 +1088,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid request -404 | ApiResponseFor404 | Not found +400 | ApiResponseFor400 | Invalid request +404 | ApiResponseFor404 | Not found #### ApiResponseFor400 Name | Type | Description | Notes @@ -1148,7 +1153,7 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | The instance started successfully +200 | ApiResponseFor200 | The instance started successfully #### ApiResponseFor200 Name | Type | Description | Notes @@ -1313,7 +1318,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Someting wrong +400 | ApiResponseFor400 | Someting wrong #### ApiResponseFor400 Name | Type | Description | Notes @@ -1389,7 +1394,7 @@ Name | Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -1432,12 +1437,12 @@ with petstore_api.ApiClient(configuration) as api_client: # example passing only optional values query_params = { - 'compositionAtRoot': , + 'compositionAtRoot': None, 'compositionInProperty': dict( - some_prop=, + some_prop="some_prop_example", ), } - body = + body = None try: # testing composed schemas at inline locations api_response = api_instance.inline_composition( @@ -1504,7 +1509,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success +200 | ApiResponseFor200 | success #### ApiResponseFor200 Name | Type | Description | Notes @@ -1598,7 +1603,7 @@ Name | Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -1616,6 +1621,87 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **json_with_charset** +> bool, date, datetime, dict, float, int, list, str, none_type json_with_charset() + +json with charset tx and rx + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = None + try: + # json with charset tx and rx + api_response = api_instance.json_with_charset( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->json_with_charset: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json; charset=utf-8' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json; charset=utf-8', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +#### SchemaForRequestBodyApplicationJsonCharsetutf8 + +Type | Description | Notes +------------- | ------------- | ------------- +typing.Union[dict, frozendict, str, date, datetime, int, float, bool, Decimal, None, list, tuple, bytes] | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJsonCharsetutf8, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJsonCharsetutf8 + +Type | Description | Notes +------------- | ------------- | ------------- +typing.Union[dict, frozendict, str, date, datetime, int, float, bool, Decimal, None, list, tuple, bytes] | | + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **mammal** > Mammal mammal(mammal) @@ -1679,7 +1765,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output mammal +200 | ApiResponseFor200 | Output mammal #### ApiResponseFor200 Name | Type | Description | Notes @@ -1762,7 +1848,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output number +200 | ApiResponseFor200 | Output number #### ApiResponseFor200 Name | Type | Description | Notes @@ -1786,6 +1872,89 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **object_in_query** +> object_in_query() + +user list + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.map_bean import MapBean +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + query_params = { + 'mapBean': dict( + keyword="keyword_example", + ), + } + try: + # user list + api_response = api_instance.object_in_query( + query_params=query_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->object_in_query: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +mapBean | MapBeanSchema | | optional + + +#### MapBeanSchema +Type | Description | Notes +------------- | ------------- | ------------- +[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](MapBean.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | ok + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **object_model_with_ref_props** > ObjectModelWithRefProps object_model_with_ref_props() @@ -1849,7 +2018,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output model +200 | ApiResponseFor200 | Output model #### ApiResponseFor200 Name | Type | Description | Notes @@ -2149,7 +2318,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success +200 | ApiResponseFor200 | success #### ApiResponseFor200 Name | Type | Description | Notes @@ -2287,7 +2456,90 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Success +200 | ApiResponseFor200 | Success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ref_object_in_query** +> ref_object_in_query() + +user list + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.foo import Foo +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + query_params = { + 'mapBean': Foo( + bar="bar", + ), + } + try: + # user list + api_response = api_instance.ref_object_in_query( + query_params=query_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->ref_object_in_query: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +mapBean | MapBeanSchema | | optional + + +#### MapBeanSchema +Type | Description | Notes +------------- | ------------- | ------------- +[**Foo**](Foo.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | ok #### ApiResponseFor200 Name | Type | Description | Notes @@ -2297,6 +2549,61 @@ body | Unset | body was not defined | headers | Unset | headers were not defined | +void (empty response body) + +### Authorization + +No authorization required + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **response_without_schema** +> response_without_schema() + +receives a response without schema + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = fake_api.FakeApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # receives a response without schema + api_response = api_instance.response_without_schema() + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->response_without_schema: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | contents without schema definition + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[Unset, Unset, ] | | +headers | Unset | headers were not defined | + + void (empty response body) ### Authorization @@ -2363,7 +2670,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output string +200 | ApiResponseFor200 | Output string #### ApiResponseFor200 Name | Type | Description | Notes @@ -2446,7 +2753,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Output enum +200 | ApiResponseFor200 | Output enum #### ApiResponseFor200 Name | Type | Description | Notes @@ -2529,7 +2836,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -2619,7 +2926,7 @@ Name | Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -2707,7 +3014,7 @@ Name | Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index f5ddd9538973..1a956e633dbb 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -79,7 +79,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md b/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md new file mode 100644 index 000000000000..ef98f7ce8e94 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md @@ -0,0 +1,10 @@ +# MapBean + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyword** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/Model_200Response.md b/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md new file mode 100644 index 000000000000..279ea183d9bb --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md @@ -0,0 +1,13 @@ +# Model_200Response + +model with an invalid class name for python, starts with a number + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**class** | **str** | this is a reserved python keyword | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/Model_Return.md b/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md new file mode 100644 index 000000000000..f81000f580e5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md @@ -0,0 +1,12 @@ +# Model_Return + +Model for testing reserved words + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return** | **int** | this is a reserved python keyword | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/ObjectWithInlineCompositionProperty.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md index f83f69a567d5..a74c35a74b77 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md @@ -3,7 +3,7 @@ #### Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProp** | **object** | | [optional] +**someProp** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md new file mode 100644 index 000000000000..143ed732ea92 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md @@ -0,0 +1,9 @@ +# ObjectWithInlineCompositionPropertySomeProp + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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-experimental/docs/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md index c979cf2db2bf..7b9ab23bc5db 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md @@ -167,8 +167,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | Ok -405 | ApiResponseFor405 | Invalid input +200 | ApiResponseFor200 | Ok +405 | ApiResponseFor405 | Invalid input #### ApiResponseFor200 Name | Type | Description | Notes @@ -298,7 +298,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid pet value +400 | ApiResponseFor400 | Invalid pet value #### ApiResponseFor400 Name | Type | Description | Notes @@ -456,8 +456,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid status value +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid status value #### ApiResponseFor200 Name | Type | Description | Notes @@ -634,8 +634,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid tag value +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid tag value #### ApiResponseFor200 Name | Type | Description | Notes @@ -749,9 +749,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid ID supplied -404 | ApiResponseFor404 | Pet not found +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Pet not found #### ApiResponseFor200 Name | Type | Description | Notes @@ -946,9 +946,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid ID supplied -404 | ApiResponseFor404 | Pet not found -405 | ApiResponseFor405 | Validation exception +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Pet not found +405 | ApiResponseFor405 | Validation exception #### ApiResponseFor400 Name | Type | Description | Notes @@ -1082,7 +1082,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -405 | ApiResponseFor405 | Invalid input +405 | ApiResponseFor405 | Invalid input #### ApiResponseFor405 Name | Type | Description | Notes @@ -1206,7 +1206,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -1336,7 +1336,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md index 80f9a368f5fd..9840cc8134c1 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md @@ -72,8 +72,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid ID supplied -404 | ApiResponseFor404 | Order not found +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Order not found #### ApiResponseFor400 Name | Type | Description | Notes @@ -149,7 +149,7 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation +200 | ApiResponseFor200 | successful operation #### ApiResponseFor200 Name | Type | Description | Notes @@ -240,9 +240,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid ID supplied -404 | ApiResponseFor404 | Order not found +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Order not found #### ApiResponseFor200 Name | Type | Description | Notes @@ -314,7 +314,7 @@ with petstore_api.ApiClient(configuration) as api_client: id=1, pet_id=1, quantity=1, - ship_date=isoparse('2020-02-02T20:20:20.000222Z'), + ship_date="2020-02-02T20:20:20.000222Z", status="placed", complete=False, ) @@ -351,8 +351,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid Order +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid Order #### ApiResponseFor200 Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/UUIDString.md b/samples/openapi3/client/petstore/python-experimental/docs/UUIDString.md new file mode 100644 index 000000000000..6f743509ec51 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/UUIDString.md @@ -0,0 +1,8 @@ +# UUIDString + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +[[Back to Model list]](../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-experimental/docs/User.md b/samples/openapi3/client/petstore/python-experimental/docs/User.md index cfff38a62691..1083391d7c64 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/User.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/User.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **objectWithNoDeclaredProps** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] **objectWithNoDeclaredPropsNullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] **anyTypeProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] +**anyTypeExceptNullProp** | **object** | any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. | [optional] **anyTypePropNullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md index 5fc0764d75ee..ab65024eaffa 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md @@ -51,6 +51,7 @@ with petstore_api.ApiClient(configuration) as api_client: object_with_no_declared_props=dict(), object_with_no_declared_props_nullable=dict(), any_type_prop=None, + any_type_except_null_prop=None, any_type_prop_nullable=None, ) try: @@ -84,7 +85,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | ApiResponseForDefault | successful operation +default | ApiResponseForDefault | successful operation #### ApiResponseForDefault Name | Type | Description | Notes @@ -139,6 +140,7 @@ with petstore_api.ApiClient(configuration) as api_client: object_with_no_declared_props=dict(), object_with_no_declared_props_nullable=dict(), any_type_prop=None, + any_type_except_null_prop=None, any_type_prop_nullable=None, ) ] @@ -173,7 +175,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | ApiResponseForDefault | successful operation +default | ApiResponseForDefault | successful operation #### ApiResponseForDefault Name | Type | Description | Notes @@ -228,6 +230,7 @@ with petstore_api.ApiClient(configuration) as api_client: object_with_no_declared_props=dict(), object_with_no_declared_props_nullable=dict(), any_type_prop=None, + any_type_except_null_prop=None, any_type_prop_nullable=None, ) ] @@ -262,7 +265,7 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | ApiResponseForDefault | successful operation +default | ApiResponseForDefault | successful operation #### ApiResponseForDefault Name | Type | Description | Notes @@ -343,8 +346,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid username supplied -404 | ApiResponseFor404 | User not found +400 | ApiResponseFor400 | Invalid username supplied +404 | ApiResponseFor404 | User not found #### ApiResponseFor400 Name | Type | Description | Notes @@ -433,9 +436,9 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid username supplied -404 | ApiResponseFor404 | User not found +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid username supplied +404 | ApiResponseFor404 | User not found #### ApiResponseFor200 Name | Type | Description | Notes @@ -551,8 +554,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | successful operation -400 | ApiResponseFor400 | Invalid username/password supplied +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid username/password supplied #### ApiResponseFor200 Name | Type | Description | Notes @@ -649,7 +652,7 @@ This endpoint does not need any parameter. Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | ApiResponseForDefault | successful operation +default | ApiResponseForDefault | successful operation #### ApiResponseForDefault Name | Type | Description | Notes @@ -708,6 +711,7 @@ with petstore_api.ApiClient(configuration) as api_client: object_with_no_declared_props=dict(), object_with_no_declared_props_nullable=dict(), any_type_prop=None, + any_type_except_null_prop=None, any_type_prop_nullable=None, ) try: @@ -756,8 +760,8 @@ Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | ApiResponseFor400 | Invalid user supplied -404 | ApiResponseFor404 | User not found +400 | ApiResponseFor400 | Invalid user supplied +404 | ApiResponseFor404 | User not found #### ApiResponseFor400 Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/__init__.py new file mode 100644 index 000000000000..464f50cb8ecd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.another_fake_api import AnotherFakeApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py index e76f66f18b84..1e7d5354fd4b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/__init__.py new file mode 100644 index 000000000000..9dad5771ea69 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.default_api import DefaultApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py index d47ac5388904..3e9e2852a166 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py index 521ac4a08173..1e135fc899b1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py @@ -26,11 +26,15 @@ from petstore_api.api.fake_api_endpoints.inline_additional_properties import InlineAdditionalProperties from petstore_api.api.fake_api_endpoints.inline_composition import InlineComposition from petstore_api.api.fake_api_endpoints.json_form_data import JsonFormData +from petstore_api.api.fake_api_endpoints.json_with_charset import JsonWithCharset from petstore_api.api.fake_api_endpoints.mammal import Mammal from petstore_api.api.fake_api_endpoints.number_with_validations import NumberWithValidations +from petstore_api.api.fake_api_endpoints.object_in_query import ObjectInQuery from petstore_api.api.fake_api_endpoints.object_model_with_ref_props import ObjectModelWithRefProps from petstore_api.api.fake_api_endpoints.parameter_collisions import ParameterCollisions from petstore_api.api.fake_api_endpoints.query_parameter_collection_format import QueryParameterCollectionFormat +from petstore_api.api.fake_api_endpoints.ref_object_in_query import RefObjectInQuery +from petstore_api.api.fake_api_endpoints.response_without_schema import ResponseWithoutSchema from petstore_api.api.fake_api_endpoints.string import String from petstore_api.api.fake_api_endpoints.string_enum import StringEnum from petstore_api.api.fake_api_endpoints.upload_download_file import UploadDownloadFile @@ -55,11 +59,15 @@ class FakeApi( InlineAdditionalProperties, InlineComposition, JsonFormData, + JsonWithCharset, Mammal, NumberWithValidations, + ObjectInQuery, ObjectModelWithRefProps, ParameterCollisions, QueryParameterCollectionFormat, + RefObjectInQuery, + ResponseWithoutSchema, String, StringEnum, UploadDownloadFile, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/__init__.py new file mode 100644 index 000000000000..46b30d43ce6a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.fake_api import FakeApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py index 2558ab4abfed..8ca397016011 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py index 49b12b8e23eb..611ab3daf784 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py index 3e23d008fbcb..71c91efd5329 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py index dcbde8810f60..dde001190c70 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py index 298b9d752c15..6f5e3caaaccd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py index 8b46d4c9e33b..78767b2fbd6b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py index ab3b1178fce9..7bacd80c11a0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py @@ -29,6 +29,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -50,6 +51,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py index e6f5b673c0b3..5dca29adefbf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py index 1965180d96c7..dfaf495bc3a5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py index 91c0e8af5fba..0a216079896a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py index 1d62e955d524..289f5210680d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -82,12 +84,12 @@ class _items( @classmethod @property def GREATER_THAN(cls): - return cls._enum_by_value[">"](">") + return cls(">") @classmethod @property def DOLLAR(cls): - return cls._enum_by_value["$"]("$") + return cls("$") class EnumQueryStringSchema( @@ -104,17 +106,17 @@ class EnumQueryStringSchema( @classmethod @property def _ABC(cls): - return cls._enum_by_value["_abc"]("_abc") + return cls("_abc") @classmethod @property def EFG(cls): - return cls._enum_by_value["-efg"]("-efg") + return cls("-efg") @classmethod @property def XYZ(cls): - return cls._enum_by_value["(xyz)"]("(xyz)") + return cls("(xyz)") class EnumQueryIntegerSchema( @@ -130,12 +132,12 @@ class EnumQueryIntegerSchema( @classmethod @property def POSITIVE_1(cls): - return cls._enum_by_value[1](1) + return cls(1) @classmethod @property def NEGATIVE_2(cls): - return cls._enum_by_value[-2](-2) + return cls(-2) class EnumQueryDoubleSchema( @@ -151,12 +153,12 @@ class EnumQueryDoubleSchema( @classmethod @property def POSITIVE_1_PT_1(cls): - return cls._enum_by_value[1.1](1.1) + return cls(1.1) @classmethod @property def NEGATIVE_1_PT_2(cls): - return cls._enum_by_value[-1.2](-1.2) + return cls(-1.2) RequestRequiredQueryParams = typing.TypedDict( 'RequestRequiredQueryParams', { @@ -223,12 +225,12 @@ class _items( @classmethod @property def GREATER_THAN(cls): - return cls._enum_by_value[">"](">") + return cls(">") @classmethod @property def DOLLAR(cls): - return cls._enum_by_value["$"]("$") + return cls("$") class EnumHeaderStringSchema( @@ -245,17 +247,17 @@ class EnumHeaderStringSchema( @classmethod @property def _ABC(cls): - return cls._enum_by_value["_abc"]("_abc") + return cls("_abc") @classmethod @property def EFG(cls): - return cls._enum_by_value["-efg"]("-efg") + return cls("-efg") @classmethod @property def XYZ(cls): - return cls._enum_by_value["(xyz)"]("(xyz)") + return cls("(xyz)") RequestRequiredHeaderParams = typing.TypedDict( 'RequestRequiredHeaderParams', { @@ -311,12 +313,12 @@ class _items( @classmethod @property def GREATER_THAN(cls): - return cls._enum_by_value[">"](">") + return cls(">") @classmethod @property def DOLLAR(cls): - return cls._enum_by_value["$"]("$") + return cls("$") class enum_form_string( @@ -333,17 +335,17 @@ class enum_form_string( @classmethod @property def _ABC(cls): - return cls._enum_by_value["_abc"]("_abc") + return cls("_abc") @classmethod @property def EFG(cls): - return cls._enum_by_value["-efg"]("-efg") + return cls("-efg") @classmethod @property def XYZ(cls): - return cls._enum_by_value["(xyz)"]("(xyz)") + return cls("(xyz)") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py index fbe36a965b29..3204f18df65c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py index bcbcbeaf356a..b6b4f59f5b1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py index 945d58b8e424..f2607c324c57 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py index ebb5a6c44c3e..c1a2a4fe64b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -97,6 +99,8 @@ class allOf_0( ], 'anyOf': [ ], + 'not': + None } def __new__( @@ -119,50 +123,12 @@ class CompositionInPropertySchema( class someProp( - ComposedSchema + _SchemaValidator( + min_length=1, + ), + StrSchema ): - - @classmethod - @property - def _composed_schemas(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - - - class allOf_0( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - return { - 'allOf': [ - allOf_0, - ], - 'oneOf': [ - ], - 'anyOf': [ - ], - } - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'someProp': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) + pass def __new__( @@ -244,6 +210,8 @@ class allOf_0( ], 'anyOf': [ ], + 'not': + None } def __new__( @@ -296,6 +264,8 @@ class allOf_0( ], 'anyOf': [ ], + 'not': + None } def __new__( @@ -371,6 +341,8 @@ class allOf_0( ], 'anyOf': [ ], + 'not': + None } def __new__( @@ -423,6 +395,8 @@ class allOf_0( ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py index 8220d47168f2..e441d4136c4e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py new file mode 100644 index 000000000000..3f7bb730be3a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param +SchemaForRequestBodyApplicationJsonCharsetutf8 = AnyTypeSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJsonCharsetutf8), + }, +) +_path = '/fake/jsonWithCharset' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJsonCharsetutf8 = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJsonCharsetutf8, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJsonCharsetutf8), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json; charset=utf-8', +) + + +class JsonWithCharset(api_client.Api): + + def json_with_charset( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, Unset] = unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + json with charset tx and rx + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py index 52ea9c264ab7..4ea35cb0b75f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py index 4c4ba65c9abb..c0168e471e01 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py new file mode 100644 index 000000000000..73b6d14e6746 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.map_bean import MapBean + +# query params + + +class MapBeanSchema( + DictSchema +): + keyword = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + keyword: typing.Union[keyword, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'MapBeanSchema': + return super().__new__( + cls, + *args, + keyword=keyword, + _configuration=_configuration, + **kwargs, + ) +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + 'mapBean': MapBeanSchema, + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_map_bean = api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=MapBeanSchema, + explode=True, +) +_path = '/fake/objInQuery' +_method = 'GET' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class ObjectInQuery(api_client.Api): + + def object_in_query( + self: api_client.Api, + query_params: RequestQueryParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + user list + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_map_bean, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py index 2fc439164a07..de0ae7c01551 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py index bd20c173d4cb..5b9813bb3c2a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py index 683f9d3c3502..66b8ffeb5030 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py @@ -29,6 +29,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -50,6 +51,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py new file mode 100644 index 000000000000..23cbe2dbd24e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.foo import Foo + +# query params +MapBeanSchema = Foo +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + 'mapBean': MapBeanSchema, + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_map_bean = api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=MapBeanSchema, + explode=True, +) +_path = '/fake/refObjInQuery' +_method = 'GET' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class RefObjectInQuery(api_client.Api): + + def ref_object_in_query( + self: api_client.Api, + query_params: RequestQueryParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + user list + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_map_bean, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py new file mode 100644 index 000000000000..448f8397fde1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/fake/responseWithoutSchema' +_method = 'GET' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + Unset, + Unset, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType(), + 'application/xml': api_client.MediaType(), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', + 'application/xml', +) + + +class ResponseWithoutSchema(api_client.Api): + + def response_without_schema( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + receives a response without schema + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py index eb3a762d05dd..2cdc192effea 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py index fdc7c63c29ad..27981dea7eab 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py index 637473cacce6..f87fe3dd9955 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py index 54db5968afdf..02f2eb70a893 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py index 87eac93b2d6a..0d41fccc4f44 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/__init__.py new file mode 100644 index 000000000000..51f0b89af111 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.fake_classname_tags123_api import FakeClassnameTags123Api diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py index 99b59bc4d6bb..4eec66c1e23f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py deleted file mode 100644 index 99b59bc4d6bb..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import re # noqa: F401 -import sys # noqa: F401 -import typing -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - -from petstore_api.model.client import Client - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_path = '/fake_classname_test' -_method = 'PATCH' -_auth = [ - 'api_key_query', -] -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: Unset = unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class Classname(api_client.Api): - - def classname( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: - """ - To test class name in snake case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=_path, - method=_method, - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) - - return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/__init__.py new file mode 100644 index 000000000000..71e83ec44559 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.pet_api import PetApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py index 07edc4a35e83..244e606a0497 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py index 04f2de63359d..a79e75ec889a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py index a0c199caefd0..42fe59410bae 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -85,17 +87,17 @@ class _items( @classmethod @property def AVAILABLE(cls): - return cls._enum_by_value["available"]("available") + return cls("available") @classmethod @property def PENDING(cls): - return cls._enum_by_value["pending"]("pending") + return cls("pending") @classmethod @property def SOLD(cls): - return cls._enum_by_value["sold"]("sold") + return cls("sold") RequestRequiredQueryParams = typing.TypedDict( 'RequestRequiredQueryParams', { diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py index a2fdb8cb0d2f..57b6876bfe50 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py index 2ab39b7fcebe..0cafed897082 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py index 3510aed29b3c..67c4a60a52bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py index e1241732b393..d1a00b38d45c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py index f815449781a5..5ee4d68cdf36 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py index 3e4b5b4e44bf..2eafa03b4377 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/__init__.py new file mode 100644 index 000000000000..30de2b107cbd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.store_api import StoreApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py index bd874c07e3ed..12e6be849ab2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py @@ -29,6 +29,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -50,6 +51,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py index 61bfd7dc7d53..7806b609430a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py index b905d60bc29c..5aa3d3cc9899 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py index f54e82eec398..c2a4a6bda698 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/__init__.py new file mode 100644 index 000000000000..8dced02b7662 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.api.user_api import UserApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py index 3c84f45e584c..13f3918c29b4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py index c55c22b4258f..efe52c782a9f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py index 644e5c817757..6dd9f2e70561 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py index fba5cf8ddbe9..7b02652c6792 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py @@ -29,6 +29,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -50,6 +51,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py index d5605304c1bc..e23d17f17883 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py index da572bf71058..f4902dc1ddbb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py index da285ca93740..9ed4ab9ba7f1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py @@ -29,6 +29,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -50,6 +51,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py index e16227af6b3a..aaf700010f51 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py @@ -30,6 +30,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -51,6 +52,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py index c6918355c9cd..c8797cf4a6e3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py @@ -677,6 +677,7 @@ def __init__( self.allow_reserved = allow_reserved +@dataclass class MediaType: """ Used to store request and response body schema information @@ -686,14 +687,8 @@ class MediaType: The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded. """ - - def __init__( - self, - schema: typing.Type[Schema], - encoding: typing.Optional[typing.Dict[str, Encoding]] = None, - ): - self.schema = schema - self.encoding = encoding + schema: typing.Optional[typing.Type[Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None @dataclass @@ -723,7 +718,20 @@ class ApiResponseWithoutDeserialization(ApiResponse): headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset -class OpenApiResponse: +class JSONDetector: + @staticmethod + def content_type_is_json(content_type: str) -> bool: + """ + for when content_type strings also include charset info like: + application/json; charset=UTF-8 + """ + content_type_piece = content_type.split(';')[0] + if content_type_piece == 'application/json': + return True + return False + + +class OpenApiResponse(JSONDetector): def __init__( self, response_cls: typing.Type[ApiResponse] = ApiResponse, @@ -738,8 +746,8 @@ def __init__( @staticmethod def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - decoded_data = response.data.decode("utf-8") - return json.loads(decoded_data) + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) @staticmethod def __file_name_from_content_disposition(content_disposition: typing.Optional[str]) -> typing.Optional[str]: @@ -799,8 +807,28 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati content_type = response.getheader('content-type') deserialized_body = unset streamed = response.supports_chunked_reads() + + deserialized_headers = unset + if self.headers is not None: + # TODO add header deserialiation here + pass + if self.content is not None: - if content_type == 'application/json': + if content_type not in self.content: + raise ApiValueError( + f'Invalid content_type={content_type} returned for response with ' + 'status_code={str(response.status)}' + ) + body_schema = self.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return self.response_cls( + response=response, + headers=deserialized_headers, + body=unset + ) + + if self.content_type_is_json(content_type): body_data = self.__deserialize_json(response) elif content_type == 'application/octet-stream': body_data = self.__deserialize_application_octet_stream(response) @@ -809,16 +837,11 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = self.content[content_type].schema deserialized_body = body_schema._from_openapi_data( body_data, _configuration=configuration) elif streamed: response.release_conn() - deserialized_headers = unset - if self.headers is not None: - deserialized_headers = unset - return self.response_cls( response=response, headers=deserialized_headers, @@ -1244,7 +1267,7 @@ class SerializedRequestBody(typing.TypedDict, total=False): fields: typing.Tuple[typing.Union[RequestField, tuple[str, str]], ...] -class RequestBody(StyleFormSerializer): +class RequestBody(StyleFormSerializer, JSONDetector): """ A request body parameter content: content_type to MediaType Schema info @@ -1381,7 +1404,7 @@ def serialize( cast_in_data = media_type.schema(in_data) # TODO check for and use encoding if it exists # and content_type is multipart or application/x-www-form-urlencoded - if content_type == 'application/json': + if self.content_type_is_json(content_type): return self.__serialize_json(cast_in_data) elif content_type == 'text/plain': return self.__serialize_text_plain(cast_in_data) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py index 6b58c42daa6f..58c23b81b48a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py @@ -7,7 +7,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.another_fake_api import AnotherFakeApi +# from petstore_api.api.another_fake_api import AnotherFakeApi # # or import this package, but before doing it, use: # diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py index 6078bb2dbae1..72d149623d03 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py index fee5e18bcd0b..ef41c29ee0fd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py index ed6eb84f2b13..5277c2baec46 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py index 0a7ee8a9bbfd..81432c292c64 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py index cc4fe75682ac..b71b750c2076 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py new file mode 100644 index 000000000000..550938873c5c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class AnyTypeNotString( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + NotSchema = StrSchema + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'AnyTypeNotString': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py index 6f88e92b3a5b..b492f2f619fb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py index 14cc41447769..bc3255016400 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py index 7a783a792618..894a7637dcdd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py index bf544e435839..109255ce635d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py index aab971e0126c..96d70497a9e0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py index 103a013aa955..50c11fbe216e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py index bbaa209e0b96..6a220ce9e3a1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py index fd4f706c77ba..a2af10f84c45 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py index 8f55d11fb398..78ef8439e749 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py index 599a3f18133a..8207dcbacbd3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py index d1d3f423ad20..540b1675c26c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py index c7227c6d0884..6c4ee7034bcb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py index 916d0163ba02..c61420c182df 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -88,7 +90,7 @@ class className( @classmethod @property def BASQUEPIG(cls): - return cls._enum_by_value["BasquePig"]("BasquePig") + return cls("BasquePig") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py index 4bfefa998fe8..49e7156f9758 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py index 32bb99030a46..228d6f5b0b7a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -80,4 +82,4 @@ class BooleanEnum( @classmethod @property def TRUE(cls): - return cls._enum_by_value[True](True) + return cls(True) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py index 2cc55f390797..bc276507ae52 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py index 170ffbedc345..0c9cb8c83bfb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py index e9c7e8ce60c6..5b2f5c1da1d9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py index 55a23fb99a59..a2e0278986de 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py index ba9b39bec117..09a40446524a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py index 728dfef2ef1b..2ac33135589e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py index e487ff57e72f..ae74da474bd4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py index ca8b37f7cfe0..e4a0bd303f2c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py index eec32e53e9b3..5dd9f537e9b3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py index de77940b972b..1442efce783d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -85,7 +87,7 @@ class quadrilateralType( @classmethod @property def COMPLEXQUADRILATERAL(cls): - return cls._enum_by_value["ComplexQuadrilateral"]("ComplexQuadrilateral") + return cls("ComplexQuadrilateral") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py index d8e8e670f03b..e6436681f7bf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -126,6 +128,8 @@ class anyOf_9( anyOf_14, anyOf_15, ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py index 5fc3f82f5162..3a546a53c70f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py index cd1f5be59c22..cb9d41450a8c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py index 6915f1d636f1..45ab7081386e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py index ae586d764f9e..1b825daf4838 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py index 30b78e94cdc8..bf352b410160 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py index f4e40d70397f..0401b8fc51f7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -144,6 +146,8 @@ class oneOf_6( ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py index 3ddde890852f..c3925d8dfa87 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py index 22c11f08f12b..fe30b52eb528 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -74,50 +76,12 @@ class CompositionInProperty( class someProp( - ComposedSchema + _SchemaValidator( + min_length=1, + ), + StrSchema ): - - @classmethod - @property - def _composed_schemas(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - - - class allOf_0( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - return { - 'allOf': [ - allOf_0, - ], - 'oneOf': [ - ], - 'anyOf': [ - ], - } - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'someProp': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) + pass def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py index 596551cc08c4..2b0afd273650 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -81,9 +83,9 @@ class Currency( @classmethod @property def EUR(cls): - return cls._enum_by_value["eur"]("eur") + return cls("eur") @classmethod @property def USD(cls): - return cls._enum_by_value["usd"]("usd") + return cls("usd") diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py index c8af4a13ca86..0c900458d907 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -88,7 +90,7 @@ class className( @classmethod @property def DANISHPIG(cls): - return cls._enum_by_value["DanishPig"]("DanishPig") + return cls("DanishPig") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py index 0eaa12b59d16..e69d1bed68cd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py index 5c527be0d857..abd34a7a1d82 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py index 1904c75bf5fe..f90fff654dc7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py index ac7566304df0..7b79cd07a059 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py index 8348b37bb385..b3848ee7a542 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py index cb9155bfd4c8..82cee4c2f86b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py index ba0c560245ce..05ccaa5f9b6b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py index 6f56d337f9f9..be3c95609587 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -86,12 +88,12 @@ class just_symbol( @classmethod @property def GREATER_THAN_EQUALS(cls): - return cls._enum_by_value[">="](">=") + return cls(">=") @classmethod @property def DOLLAR(cls): - return cls._enum_by_value["$"]("$") + return cls("$") class array_enum( @@ -112,12 +114,12 @@ class _items( @classmethod @property def FISH(cls): - return cls._enum_by_value["fish"]("fish") + return cls("fish") @classmethod @property def CRAB(cls): - return cls._enum_by_value["crab"]("crab") + return cls("crab") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py index a8d67b2dab9e..5062446c15ae 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -82,14 +84,14 @@ class EnumClass( @classmethod @property def _ABC(cls): - return cls._enum_by_value["_abc"]("_abc") + return cls("_abc") @classmethod @property def EFG(cls): - return cls._enum_by_value["-efg"]("-efg") + return cls("-efg") @classmethod @property def XYZ(cls): - return cls._enum_by_value["(xyz)"]("(xyz)") + return cls("(xyz)") diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py index 3f82faaa3e87..a294d590bb80 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -90,17 +92,17 @@ class enum_string( @classmethod @property def UPPER(cls): - return cls._enum_by_value["UPPER"]("UPPER") + return cls("UPPER") @classmethod @property def LOWER(cls): - return cls._enum_by_value["lower"]("lower") + return cls("lower") @classmethod @property def EMPTY(cls): - return cls._enum_by_value[""]("") + return cls("") class enum_string_required( @@ -117,17 +119,17 @@ class enum_string_required( @classmethod @property def UPPER(cls): - return cls._enum_by_value["UPPER"]("UPPER") + return cls("UPPER") @classmethod @property def LOWER(cls): - return cls._enum_by_value["lower"]("lower") + return cls("lower") @classmethod @property def EMPTY(cls): - return cls._enum_by_value[""]("") + return cls("") class enum_integer( @@ -143,12 +145,12 @@ class enum_integer( @classmethod @property def POSITIVE_1(cls): - return cls._enum_by_value[1](1) + return cls(1) @classmethod @property def NEGATIVE_1(cls): - return cls._enum_by_value[-1](-1) + return cls(-1) class enum_number( @@ -164,12 +166,12 @@ class enum_number( @classmethod @property def POSITIVE_1_PT_1(cls): - return cls._enum_by_value[1.1](1.1) + return cls(1.1) @classmethod @property def NEGATIVE_1_PT_2(cls): - return cls._enum_by_value[-1.2](-1.2) + return cls(-1.2) @classmethod @property diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py index 9b105672ccfd..e190cfad35f9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py index 0094bf8a7356..080dcc90d276 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -85,7 +87,7 @@ class triangleType( @classmethod @property def EQUILATERALTRIANGLE(cls): - return cls._enum_by_value["EquilateralTriangle"]("EquilateralTriangle") + return cls("EquilateralTriangle") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py index 0f6d81d67850..cb84c0c1f7e7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py index da66de4cea09..be2511cec921 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py index e33a34d6e68a..806d8e8ffbf4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py index 33488e9e9da0..f7de7f9b6d10 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -162,8 +164,8 @@ class string( binary = BinarySchema date = DateSchema dateTime = DateTimeSchema - uuid = StrSchema - uuidNoExample = StrSchema + uuid = UUIDSchema + uuidNoExample = UUIDSchema class password( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py index 52c5c7aab57b..1031f8302ade 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py index 53e0a8b3afc9..b1737345c31c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -93,6 +95,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py index b49581a16b62..73e441074a88 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -92,6 +94,8 @@ def _composed_schemas(cls): Apple, Banana, ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py index 2e4f462d9da7..b29175ff9b08 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py index 81d3661bd5a4..de7b2ae5fa20 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py index d91afa53f58c..1f9b1f7346e9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py index 6354bbc1b51e..68e9c325c84d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py index c84faf0649f1..b55bb1bb1dd8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -82,14 +84,14 @@ class IntegerEnum( @classmethod @property def POSITIVE_0(cls): - return cls._enum_by_value[0](0) + return cls(0) @classmethod @property def POSITIVE_1(cls): - return cls._enum_by_value[1](1) + return cls(1) @classmethod @property def POSITIVE_2(cls): - return cls._enum_by_value[2](2) + return cls(2) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py index 1d40c6b3ecf1..f7c5f87db593 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -82,14 +84,14 @@ class IntegerEnumBig( @classmethod @property def POSITIVE_10(cls): - return cls._enum_by_value[10](10) + return cls(10) @classmethod @property def POSITIVE_11(cls): - return cls._enum_by_value[11](11) + return cls(11) @classmethod @property def POSITIVE_12(cls): - return cls._enum_by_value[12](12) + return cls(12) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py index 101a6b0dfc61..d0b73258d090 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -80,4 +82,4 @@ class IntegerEnumOneValue( @classmethod @property def POSITIVE_0(cls): - return cls._enum_by_value[0](0) + return cls(0) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py index 9c6387d7e308..b79bee62ba7b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -82,14 +84,14 @@ class IntegerEnumWithDefaultValue( @classmethod @property def POSITIVE_0(cls): - return cls._enum_by_value[0](0) + return cls(0) @classmethod @property def POSITIVE_1(cls): - return cls._enum_by_value[1](1) + return cls(1) @classmethod @property def POSITIVE_2(cls): - return cls._enum_by_value[2](2) + return cls(2) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py index 1458e6f6f0d9..8f32a44b6ccb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py index d29d444f2f5a..f4796d80769b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py index 2868d6d93522..a5a8dfe379bb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py index f9a96472196b..b166abba12be 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -85,7 +87,7 @@ class triangleType( @classmethod @property def ISOSCELESTRIANGLE(cls): - return cls._enum_by_value["IsoscelesTriangle"]("IsoscelesTriangle") + return cls("IsoscelesTriangle") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py index 31525a3ab80f..7c9c2b54c6c8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -103,6 +105,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py new file mode 100644 index 000000000000..f5356269e7ba --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class MapBean( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + keyword = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + keyword: typing.Union[keyword, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'MapBean': + return super().__new__( + cls, + *args, + keyword=keyword, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py index 6776bad6d93c..180be2c14494 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -130,12 +132,12 @@ class _additional_properties( @classmethod @property def UPPER(cls): - return cls._enum_by_value["UPPER"]("UPPER") + return cls("UPPER") @classmethod @property def LOWER(cls): - return cls._enum_by_value["lower"]("lower") + return cls("lower") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py index de6e82588446..979d365b83cc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -71,7 +73,7 @@ class MixedPropertiesAndAdditionalPropertiesClass( Do not edit the class manually. """ - uuid = StrSchema + uuid = UUIDSchema dateTime = DateTimeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py index da8c9d0d86a6..261e8e22c6c9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py new file mode 100644 index 000000000000..828b96198341 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Model_200Response( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + model with an invalid class name for python, starts with a number + """ + name = Int32Schema + _class = StrSchema + locals()['class'] = _class + del locals()['_class'] + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + name: typing.Union[name, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'Model_200Response': + return super().__new__( + cls, + *args, + name=name, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py index 6785ae9cef23..ea6632b190c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py index 04afed1a7749..c4ef5aa02dde 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py index 0c8ea4e15aff..0c5ad0377293 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py index 171d2258af55..c1f887be25db 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py index 4812bccb0c72..9066c714ee39 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py index 9e7f7c3085d1..007bdfb71826 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -95,6 +97,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py index 987f2a371596..249dadf8ad72 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py index 82148f83add9..f31e355362e5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py index f34d96909fa3..fb8f6d4fd8e4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py index ed0714bf90fb..f762950bf5a8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py index 9fc8af65acde..df415574612f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py index fd9839f9c90a..abc6a7f119db 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py index b9ecbec7b4a7..409bfc5d4f96 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py index 857143f86488..57b8b24963fc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py index 2318269e8a42..35e659da7db4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -74,50 +76,12 @@ class ObjectWithInlineCompositionProperty( class someProp( - ComposedSchema + _SchemaValidator( + min_length=1, + ), + StrSchema ): - - @classmethod - @property - def _composed_schemas(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - - - class allOf_0( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - return { - 'allOf': [ - allOf_0, - ], - 'oneOf': [ - ], - 'anyOf': [ - ], - } - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'someProp': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) + pass def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py new file mode 100644 index 000000000000..4007c64efc31 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ObjectWithInlineCompositionPropertySomeProp( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + + + class allOf_0( + _SchemaValidator( + min_length=1, + ), + StrSchema + ): + pass + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + None + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'ObjectWithInlineCompositionPropertySomeProp': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py index 4bf41af5c466..3717ae6bc9a0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py index 343ca34cc5cc..dbf535def294 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,17 +93,17 @@ class status( @classmethod @property def PLACED(cls): - return cls._enum_by_value["placed"]("placed") + return cls("placed") @classmethod @property def APPROVED(cls): - return cls._enum_by_value["approved"]("approved") + return cls("approved") @classmethod @property def DELIVERED(cls): - return cls._enum_by_value["delivered"]("delivered") + return cls("delivered") complete = BoolSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py index 20004fa3fc99..cf8e85bca108 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -100,6 +102,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py index 400fc3cebe47..14f783ee2fda 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -116,17 +118,17 @@ class status( @classmethod @property def AVAILABLE(cls): - return cls._enum_by_value["available"]("available") + return cls("available") @classmethod @property def PENDING(cls): - return cls._enum_by_value["pending"]("pending") + return cls("pending") @classmethod @property def SOLD(cls): - return cls._enum_by_value["sold"]("sold") + return cls("sold") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py index adfe1fea39f1..408620d59677 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -101,6 +103,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py index 13871d566de9..836c81189b34 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py index e127013a4127..657f3ebe30bb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -101,6 +103,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py index 4b3b3f64070f..9560bc5a5483 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -89,7 +91,7 @@ class shapeType( @classmethod @property def QUADRILATERAL(cls): - return cls._enum_by_value["Quadrilateral"]("Quadrilateral") + return cls("Quadrilateral") quadrilateralType = StrSchema def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py index 6813a6a665bf..2a3b06dcd334 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py index 20af1fdfa5b4..b6dcf5a3180c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py index 551a5991a805..257d28bb7c6b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -85,7 +87,7 @@ class triangleType( @classmethod @property def SCALENETRIANGLE(cls): - return cls._enum_by_value["ScaleneTriangle"]("ScaleneTriangle") + return cls("ScaleneTriangle") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py index 4c347898fa84..9b1382f32902 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -101,6 +103,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py index 0d5e42fcba43..44cb1815023e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -105,6 +107,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py index e6afc2c14b50..ac25d65da037 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -91,6 +93,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py index a84205f2f9f8..ae5179cb5b14 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -85,7 +87,7 @@ class quadrilateralType( @classmethod @property def SIMPLEQUADRILATERAL(cls): - return cls._enum_by_value["SimpleQuadrilateral"]("SimpleQuadrilateral") + return cls("SimpleQuadrilateral") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py index a5103057cdde..8481ed59d6ed 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -90,6 +92,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py index 1c2c38f7831d..f9870a39623c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py index 8f0c2b0e0f69..bad8f8fed86b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py index 1828f65f8139..ef02720321b5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py index 87c168cb0137..800ee5a3baf0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -96,35 +98,33 @@ def NONE(cls): @classmethod @property def PLACED(cls): - return cls._enum_by_value["placed"]("placed") + return cls("placed") @classmethod @property def APPROVED(cls): - return cls._enum_by_value["approved"]("approved") + return cls("approved") @classmethod @property def DELIVERED(cls): - return cls._enum_by_value["delivered"]("delivered") + return cls("delivered") @classmethod @property def SINGLE_QUOTED(cls): - return cls._enum_by_value["single quoted"]("single quoted") + return cls("single quoted") @classmethod @property def MULTIPLE_LINES(cls): - return cls._enum_by_value['''multiple -lines''']('''multiple + return cls('''multiple lines''') @classmethod @property def DOUBLE_QUOTE_WITH_NEWLINE(cls): - return cls._enum_by_value['''double quote - with newline''']('''double quote + return cls('''double quote with newline''') def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py index d60c3115eadf..91bfd93fad44 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -82,14 +84,14 @@ class StringEnumWithDefaultValue( @classmethod @property def PLACED(cls): - return cls._enum_by_value["placed"]("placed") + return cls("placed") @classmethod @property def APPROVED(cls): - return cls._enum_by_value["approved"]("approved") + return cls("approved") @classmethod @property def DELIVERED(cls): - return cls._enum_by_value["delivered"]("delivered") + return cls("delivered") diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py index 61a533a9d3f5..5b6ab6047ec5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py index 7cf869932285..c19aeb33a5ac 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py index bf4062c15046..ddc61be69d6a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -103,6 +105,8 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': + None } def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py index 2c2f274801a4..7949415fe153 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -89,7 +91,7 @@ class shapeType( @classmethod @property def TRIANGLE(cls): - return cls._enum_by_value["Triangle"]("Triangle") + return cls("Triangle") triangleType = StrSchema def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py index a8c3355a5c55..38876f70fa8b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -102,6 +104,46 @@ def __new__( **kwargs, ) anyTypeProp = AnyTypeSchema + + + class anyTypeExceptNullProp( + ComposedSchema + ): + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + NotSchema = NoneSchema + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'anyTypeExceptNullProp': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) anyTypePropNullable = AnyTypeSchema @@ -119,6 +161,7 @@ def __new__( objectWithNoDeclaredProps: typing.Union[objectWithNoDeclaredProps, Unset] = unset, objectWithNoDeclaredPropsNullable: typing.Union[objectWithNoDeclaredPropsNullable, Unset] = unset, anyTypeProp: typing.Union[anyTypeProp, Unset] = unset, + anyTypeExceptNullProp: typing.Union[anyTypeExceptNullProp, Unset] = unset, anyTypePropNullable: typing.Union[anyTypePropNullable, Unset] = unset, _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Type[Schema], @@ -137,6 +180,7 @@ def __new__( objectWithNoDeclaredProps=objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable=objectWithNoDeclaredPropsNullable, anyTypeProp=anyTypeProp, + anyTypeExceptNullProp=anyTypeExceptNullProp, anyTypePropNullable=anyTypePropNullable, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py new file mode 100644 index 000000000000..1a0e1a55be56 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class UUIDString( + _SchemaValidator( + min_length=1, + ), + UUIDSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py index 45cee6bfcd9f..1e126220ef97 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -90,7 +92,7 @@ class className( @classmethod @property def WHALE(cls): - return cls._enum_by_value["whale"]("whale") + return cls("whale") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py index 3b3fe6cac406..0d6ad534ca6f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py @@ -31,6 +31,7 @@ Float32Schema, Float64Schema, NumberSchema, + UUIDSchema, DateSchema, DateTimeSchema, DecimalSchema, @@ -52,6 +53,7 @@ Float32Base, Float64Base, NumberBase, + UUIDBase, DateBase, DateTimeBase, BoolBase, @@ -90,17 +92,17 @@ class type( @classmethod @property def PLAINS(cls): - return cls._enum_by_value["plains"]("plains") + return cls("plains") @classmethod @property def MOUNTAIN(cls): - return cls._enum_by_value["mountain"]("mountain") + return cls("mountain") @classmethod @property def GREVYS(cls): - return cls._enum_by_value["grevys"]("grevys") + return cls("grevys") class className( @@ -115,7 +117,7 @@ class className( @classmethod @property def ZEBRA(cls): - return cls._enum_by_value["zebra"]("zebra") + return cls("zebra") def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py index fd3e6fa8d148..0872c91c8092 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py @@ -16,6 +16,7 @@ from petstore_api.model.address import Address from petstore_api.model.animal import Animal from petstore_api.model.animal_farm import AnimalFarm +from petstore_api.model.any_type_not_string import AnyTypeNotString from petstore_api.model.api_response import ApiResponse from petstore_api.model.apple import Apple from petstore_api.model.apple_req import AppleReq @@ -84,6 +85,7 @@ from petstore_api.model.isosceles_triangle import IsoscelesTriangle from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf from petstore_api.model.mammal import Mammal +from petstore_api.model.map_bean import MapBean from petstore_api.model.map_test import MapTest from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass from petstore_api.model.model200_response import Model200Response @@ -127,6 +129,7 @@ from petstore_api.model.tag import Tag from petstore_api.model.triangle import Triangle from petstore_api.model.triangle_interface import TriangleInterface +from petstore_api.model.uuid_string import UUIDString from petstore_api.model.user import User from petstore_api.model.whale import Whale from petstore_api.model.zebra import Zebra diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py index 1d0861194acc..96887c212fd7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py @@ -9,9 +9,8 @@ Generated by: https://openapi-generator.tech """ -from collections import defaultdict, abc +from collections import defaultdict from datetime import date, datetime, timedelta # noqa: F401 -from dataclasses import dataclass import functools import decimal import io @@ -19,6 +18,7 @@ import re import tempfile import typing +import uuid from dateutil.parser.isoparser import isoparser, _takes_ascii from frozendict import frozendict @@ -476,7 +476,6 @@ class Singleton: Enums and singletons are the same The same instance is returned for a given key of (cls, arg) """ - # TODO use bidict to store this so boolean enums can move through it in reverse to get their own arg value? _instances = {} def __new__(cls, *args, **kwargs): @@ -494,7 +493,13 @@ def __new__(cls, *args, **kwargs): return cls._instances[key] def __repr__(self): - return '({}, {})'.format(self.__class__.__name__, self) + if isinstance(self, NoneClass): + return f'<{self.__class__.__name__}: None>' + elif isinstance(self, BoolClass): + if (self.__class__, True) in self._instances: + return f'<{self.__class__.__name__}: True>' + return f'<{self.__class__.__name__}: False>' + return f'<{self.__class__.__name__}: {super().__repr__()}>' class NoneClass(Singleton): @@ -560,6 +565,40 @@ def as_datetime(self) -> datetime: def as_decimal(self) -> decimal.Decimal: raise Exception('not implemented') + @property + def as_uuid(self) -> uuid.UUID: + raise Exception('not implemented') + + +class UUIDBase(StrBase): + @property + @functools.cache + def as_uuid(self) -> uuid.UUID: + return uuid.UUID(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + uuid.UUID(arg) + return True + except ValueError: + raise ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate( + cls, + arg, + validation_metadata: typing.Optional[ValidationMetadata] = None, + ): + """ + UUIDBase _validate + """ + cls._validate_format(arg, validation_metadata=validation_metadata) + return super()._validate(arg, validation_metadata=validation_metadata) + class CustomIsoparser(isoparser): @@ -1357,6 +1396,7 @@ def __get_new_cls( # Use case: value is None, True, False, or an enum value value = arg for key in path[1:]: + # if path is bigger than one, get the value that mfg_cls validated value = value[key] if hasattr(mfg_cls, '_enum_by_value'): mfg_cls = mfg_cls._enum_by_value[value] @@ -1523,6 +1563,11 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal return arg.isoformat() # ApiTypeError will be thrown later by _validate_type return arg + elif isinstance(arg, uuid.UUID): + if not from_server: + return str(arg) + # ApiTypeError will be thrown later by _validate_type + return arg elif isinstance(arg, decimal.Decimal): return arg elif isinstance(arg, bytes): @@ -1541,19 +1586,19 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal class ComposedBase(Discriminable): @classmethod - def __get_allof_classes(cls, *args, validation_metadata: ValidationMetadata): + def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): path_to_schemas = defaultdict(set) for allof_cls in cls._composed_schemas['allOf']: if allof_cls in validation_metadata.base_classes: continue - other_path_to_schemas = allof_cls._validate(*args, validation_metadata=validation_metadata) + other_path_to_schemas = allof_cls._validate(arg, validation_metadata=validation_metadata) update(path_to_schemas, other_path_to_schemas) return path_to_schemas @classmethod def __get_oneof_class( cls, - *args, + arg, discriminated_cls, validation_metadata: ValidationMetadata, path_to_schemas: typing.Dict[typing.Tuple, typing.Set[typing.Type[Schema]]] @@ -1567,13 +1612,13 @@ def __get_oneof_class( if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: oneof_classes.append(oneof_cls) continue - if isinstance(args[0], oneof_cls): + if isinstance(arg, oneof_cls): # passed in instance is the correct type chosen_oneof_cls = oneof_cls oneof_classes.append(oneof_cls) continue try: - path_to_schemas = oneof_cls._validate(*args, validation_metadata=validation_metadata) + path_to_schemas = oneof_cls._validate(arg, validation_metadata=validation_metadata) new_base_classes = validation_metadata.base_classes except (ApiValueError, ApiTypeError) as ex: if discriminated_cls is not None and oneof_cls is discriminated_cls: @@ -1596,7 +1641,7 @@ def __get_oneof_class( @classmethod def __get_anyof_classes( cls, - *args, + arg, discriminated_cls, validation_metadata: ValidationMetadata ): @@ -1607,14 +1652,14 @@ def __get_anyof_classes( for anyof_cls in cls._composed_schemas['anyOf']: if anyof_cls in validation_metadata.base_classes: continue - if isinstance(args[0], anyof_cls): + if isinstance(arg, anyof_cls): # passed in instance is the correct type chosen_anyof_cls = anyof_cls anyof_classes.append(anyof_cls) continue try: - other_path_to_schemas = anyof_cls._validate(*args, validation_metadata=validation_metadata) + other_path_to_schemas = anyof_cls._validate(arg, validation_metadata=validation_metadata) except (ApiValueError, ApiTypeError) as ex: if discriminated_cls is not None and anyof_cls is discriminated_cls: raise ex @@ -1711,6 +1756,21 @@ def _validate( validation_metadata=updated_vm ) update(path_to_schemas, other_path_to_schemas) + not_cls = cls._composed_schemas['not'] + if not_cls: + other_path_to_schemas = None + try: + other_path_to_schemas = not_cls._validate(arg, validation_metadata=updated_vm) + except (ApiValueError, ApiTypeError): + pass + if other_path_to_schemas: + raise ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_cls.__name__, + ) + ) if discriminated_cls is not None: # TODO use an exception from this package here @@ -1919,7 +1979,13 @@ class StrSchema( def _from_openapi_data(cls, arg: typing.Union[str], _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super()._from_openapi_data(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[str, date, datetime], **kwargs: typing.Union[ValidationMetadata]): + def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class UUIDSchema(UUIDBase, StrSchema): + + def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]): return super().__new__(cls, arg, **kwargs) @@ -2014,6 +2080,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: typing.Union[ValidationMetadata]): diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_any_type_not_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_any_type_not_string.py new file mode 100644 index 000000000000..1fc8fb99f208 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_any_type_not_string.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.any_type_not_string import AnyTypeNotString + + +class TestAnyTypeNotString(unittest.TestCase): + """AnyTypeNotString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_AnyTypeNotString(self): + """Test AnyTypeNotString""" + # FIXME: construct object with mandatory attributes with example values + # model = AnyTypeNotString() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py deleted file mode 100644 index 63c46155bd68..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api # noqa: E501 - - -class TestFakeClassnameTags123Api(unittest.TestCase): - """FakeClassnameTags123Api unit test stubs""" - - def setUp(self): - self.api = FakeClassnameTags123Api() # noqa: E501 - - def tearDown(self): - pass - - def test_classname(self): - """Test case for classname - - To test class name in snake case # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py b/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py new file mode 100644 index 000000000000..06ae68186c2d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.map_bean import MapBean + + +class TestMapBean(unittest.TestCase): + """MapBean unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_MapBean(self): + """Test MapBean""" + # FIXME: construct object with mandatory attributes with example values + # model = MapBean() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py new file mode 100644 index 000000000000..eade978083f6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.model_200_response import Model_200Response + + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Model_200Response(self): + """Test Model_200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = Model_200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py new file mode 100644 index 000000000000..cc3e7fe25525 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.object_with_inline_composition_property_some_prop import ObjectWithInlineCompositionPropertySomeProp + + +class TestObjectWithInlineCompositionPropertySomeProp(unittest.TestCase): + """ObjectWithInlineCompositionPropertySomeProp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectWithInlineCompositionPropertySomeProp(self): + """Test ObjectWithInlineCompositionPropertySomeProp""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectWithInlineCompositionPropertySomeProp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_uuid_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_uuid_string.py new file mode 100644 index 000000000000..466b7817ac20 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_uuid_string.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.uuid_string import UUIDString + + +class TestUUIDString(unittest.TestCase): + """UUIDString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_UUIDString(self): + """Test UUIDString""" + # FIXME: construct object with mandatory attributes with example values + # model = UUIDString() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_not_string.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_not_string.py new file mode 100644 index 000000000000..88e16175e11a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_not_string.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.any_type_not_string import AnyTypeNotString + + +class TestAnyTypeNotString(unittest.TestCase): + """AnyTypeNotString unit test stubs""" + + def test_AnyTypeNotString(self): + # valid values work + valid_values = [ + True, + None, + 0, + 3.14, + [], + {} + ] + for valid_value in valid_values: + AnyTypeNotString(valid_value) + + # invalid value raises an exception + with self.assertRaises(petstore_api.ApiValueError): + AnyTypeNotString('') + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py index 059c5eaac60f..dfe5fc46f3d9 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py @@ -50,6 +50,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model(a=1, b='hi') @@ -74,6 +75,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model([1, 'hi']) @@ -98,6 +100,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model('hi') @@ -122,6 +125,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model(1) @@ -153,6 +157,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model(1) @@ -181,6 +186,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model(True) @@ -212,6 +218,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model(None) @@ -236,6 +243,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model('1970-01-01') @@ -260,6 +268,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model('2020-01-01T00:00:00') @@ -284,6 +293,7 @@ def _composed_schemas(cls): ], 'anyOf': [ ], + 'not': None } m = Model('12.34') diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py index b2080043ce25..a8c835b1e4a6 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py @@ -10,7 +10,6 @@ """ -import sys import unittest import petstore_api @@ -28,9 +27,9 @@ def tearDown(self): def test_BooleanEnum(self): """Test BooleanEnum""" - # FIXME: construct object with mandatory attributes with example values model = BooleanEnum(True) - model is BooleanEnum.TRUE + assert model is BooleanEnum.TRUE + assert repr(model) == '' with self.assertRaises(petstore_api.ApiValueError): BooleanEnum(False) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py index c6d353f66c97..c6571ded2200 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py @@ -96,7 +96,7 @@ class IntegerOneEnum(IntegerEnumOneValue, IntegerEnum): # accessing invalid enum throws an exception invalid_enums = ['POSITIVE_1', 'POSITIVE_2'] for invalid_enum in invalid_enums: - with self.assertRaises(KeyError): + with self.assertRaises(petstore_api.ApiValueError): getattr(IntegerOneEnum, invalid_enum) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py index 42c4714476c5..8e60133c2649 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py @@ -70,29 +70,34 @@ def __json_bytes(in_data: typing.Any) -> bytes: def __assert_request_called_with( mock_request, url: str, + method: str = 'POST', body: typing.Optional[bytes] = None, - content_type: str = 'application/json', + content_type: typing.Optional[str] = 'application/json', fields: typing.Optional[tuple[api_client.RequestField, ...]] = None, accept_content_type: str = 'application/json', stream: bool = False, query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None ): - mock_request.assert_called_with( - 'POST', - url, - headers=HTTPHeaderDict( - { - 'Accept': accept_content_type, - 'Content-Type': content_type, - 'User-Agent': 'OpenAPI-Generator/1.0.0/python' - } - ), - body=body, + headers = { + 'Accept': accept_content_type, + 'User-Agent': 'OpenAPI-Generator/1.0.0/python' + } + if content_type: + headers['Content-Type'] = content_type + kwargs = dict( + headers=HTTPHeaderDict(headers), query_params=query_params, fields=fields, stream=stream, timeout=None, ) + if method != 'GET': + kwargs['body'] = body + mock_request.assert_called_with( + method, + url, + **kwargs + ) def test_array_model(self): from petstore_api.model import animal_farm, animal @@ -591,93 +596,150 @@ def __encode_multipart_formdata(fields: typing.Dict[str, typing.Any]) -> multipa return m - @patch.object(RESTClientObject, 'request') - def test_inline_composition(self, mock_request): - """Test case for inline_composition + # comment out below for the time being after adding better inline model support + # ref: https://github.com/OpenAPITools/openapi-generator/pull/12104 + # + #@patch.object(RESTClientObject, 'request') + #def test_inline_composition(self, mock_request): + # """Test case for inline_composition + + # testing composed schemas at inline locations # noqa: E501 + # """ + # single_char_str = 'a' + # json_bytes = self.__json_bytes(single_char_str) + + # # tx and rx json with composition at root level of schema for request + response body + # content_type = 'application/json' + # mock_request.return_value = self.__response( + # json_bytes + # ) + # api_response = self.api.inline_composition( + # body=single_char_str, + # query_params={ + # 'compositionAtRoot': single_char_str, + # 'compositionInProperty': {'someProp': single_char_str} + # }, + # accept_content_types=(content_type,) + # ) + # self.__assert_request_called_with( + # mock_request, + # 'http://petstore.swagger.io:80/v2/fake/inlineComposition/', + # accept_content_type=content_type, + # content_type=content_type, + # query_params=(('compositionAtRoot', 'a'), ('someProp', 'a')), + # body=json_bytes + # ) + # self.assertEqual(api_response.body, single_char_str) + # self.assertTrue(isinstance(api_response.body, schemas.StrSchema)) + + # # tx and rx json with composition at property level of schema for request + response body + # content_type = 'multipart/form-data' + # multipart_response = self.__encode_multipart_formdata(fields={'someProp': single_char_str}) + # mock_request.return_value = self.__response( + # bytes(multipart_response), + # content_type=multipart_response.get_content_type() + # ) + # api_response = self.api.inline_composition( + # body={'someProp': single_char_str}, + # query_params={ + # 'compositionAtRoot': single_char_str, + # 'compositionInProperty': {'someProp': single_char_str} + # }, + # content_type=content_type, + # accept_content_types=(content_type,) + # ) + # self.__assert_request_called_with( + # mock_request, + # 'http://petstore.swagger.io:80/v2/fake/inlineComposition/', + # accept_content_type=content_type, + # content_type=content_type, + # query_params=(('compositionAtRoot', 'a'), ('someProp', 'a')), + # fields=( + # api_client.RequestField( + # name='someProp', + # data=single_char_str, + # headers={'Content-Type': 'text/plain'} + # ), + # ), + # ) + # self.assertEqual(api_response.body, {'someProp': single_char_str}) + # self.assertTrue(isinstance(api_response.body.someProp, schemas.StrSchema)) + + # # error thrown when a str is input which doesn't meet the composed schema length constraint + # invalid_value = '' + # variable_locations = 4 + # for invalid_index in range(variable_locations): + # values = [single_char_str]*variable_locations + # values[invalid_index] = invalid_value + # with self.assertRaises(exceptions.ApiValueError): + # multipart_response = self.__encode_multipart_formdata(fields={'someProp': values[0]}) + # mock_request.return_value = self.__response( + # bytes(multipart_response), + # content_type=multipart_response.get_content_type() + # ) + # self.api.inline_composition( + # body={'someProp': values[1]}, + # query_params={ + # 'compositionAtRoot': values[2], + # 'compositionInProperty': {'someProp': values[3]} + # }, + # content_type=content_type, + # accept_content_types=(content_type,) + # ) + + def test_json_with_charset(self): + # serialization + deserialization of json with charset works + with patch.object(RESTClientObject, 'request') as mock_request: + body = None + content_type_with_charset = 'application/json; charset=utf-8' + mock_request.return_value = self.__response( + self.__json_bytes(body), + content_type=content_type_with_charset + ) - testing composed schemas at inline locations # noqa: E501 - """ - single_char_str = 'a' - json_bytes = self.__json_bytes(single_char_str) + api_response = self.api.json_with_charset(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/jsonWithCharset', + body=self.__json_bytes(body), + content_type=content_type_with_charset, + accept_content_type=content_type_with_charset + ) - # tx and rx json with composition at root level of schema for request + response body - content_type = 'application/json' - mock_request.return_value = self.__response( - json_bytes - ) - api_response = self.api.inline_composition( - body=single_char_str, - query_params={ - 'compositionAtRoot': single_char_str, - 'compositionInProperty': {'someProp': single_char_str} - }, - accept_content_types=(content_type,) - ) - self.__assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/inlineComposition/', - accept_content_type=content_type, - content_type=content_type, - query_params=(('compositionAtRoot', 'a'), ('someProp', 'a')), - body=json_bytes - ) - self.assertEqual(api_response.body, single_char_str) - self.assertTrue(isinstance(api_response.body, schemas.StrSchema)) - - # tx and rx json with composition at property level of schema for request + response body - content_type = 'multipart/form-data' - multipart_response = self.__encode_multipart_formdata(fields={'someProp': single_char_str}) - mock_request.return_value = self.__response( - bytes(multipart_response), - content_type=multipart_response.get_content_type() - ) - api_response = self.api.inline_composition( - body={'someProp': single_char_str}, - query_params={ - 'compositionAtRoot': single_char_str, - 'compositionInProperty': {'someProp': single_char_str} - }, - content_type=content_type, - accept_content_types=(content_type,) - ) - self.__assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/inlineComposition/', - accept_content_type=content_type, - content_type=content_type, - query_params=(('compositionAtRoot', 'a'), ('someProp', 'a')), - fields=( - api_client.RequestField( - name='someProp', - data=single_char_str, - headers={'Content-Type': 'text/plain'} - ), - ), - ) - self.assertEqual(api_response.body, {'someProp': single_char_str}) - self.assertTrue(isinstance(api_response.body.someProp, schemas.StrSchema)) - - # error thrown when a str is input which doesn't meet the composed schema length constraint - invalid_value = '' - variable_locations = 4 - for invalid_index in range(variable_locations): - values = [single_char_str]*variable_locations - values[invalid_index] = invalid_value + assert isinstance(api_response.body, schemas.AnyTypeSchema) + assert isinstance(api_response.body, schemas.NoneClass) + assert api_response.body.is_none() + + def test_response_without_schema(self): + # received response is not loaded into body because there is no deserialization schema defined + with patch.object(RESTClientObject, 'request') as mock_request: + body = None + content_type = 'application/json' + mock_request.return_value = self.__response( + self.__json_bytes(body), + ) + + api_response = self.api.response_without_schema() + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/responseWithoutSchema', + method='GET', + accept_content_type='application/json, application/xml', + content_type=None + ) + + assert isinstance(api_response.body, schemas.Unset) + + + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + 'blah', + content_type='text/plain' + ) + + # when an incorrect content-type is sent back, and exception is raised with self.assertRaises(exceptions.ApiValueError): - multipart_response = self.__encode_multipart_formdata(fields={'someProp': values[0]}) - mock_request.return_value = self.__response( - bytes(multipart_response), - content_type=multipart_response.get_content_type() - ) - self.api.inline_composition( - body={'someProp': values[1]}, - query_params={ - 'compositionAtRoot': values[2], - 'compositionInProperty': {'someProp': values[3]} - }, - content_type=content_type, - accept_content_types=(content_type,) - ) + self.api.response_without_schema() if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py index 7d31b94a8252..ae41790e48de 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py @@ -92,6 +92,7 @@ def testFruit(self): apple.Apple, banana.Banana, ], + 'not': None } ) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py index e777e603e1a1..1f4f89947dfa 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py @@ -78,6 +78,7 @@ def testFruitReq(self): apple_req.AppleReq, banana_req.BananaReq, ], + 'not': None } ) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py index 6d27f7c9dab8..22df654e3b1e 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py @@ -74,6 +74,7 @@ def testGmFruit(self): ], 'allOf': [], 'oneOf': [], + 'not': None } ) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py index 2a704a708464..206e84f4b12b 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py @@ -10,7 +10,6 @@ """ -import sys import unittest import petstore_api @@ -34,6 +33,7 @@ def testNullableString(self): assert isinstance(inst, NullableString) assert isinstance(inst, Schema) assert inst.is_none() is True + assert repr(inst) == '' inst = NullableString('approved') assert isinstance(inst, NullableString) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py index efba299d9f3c..a877eddfd2ff 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py @@ -10,7 +10,6 @@ """ -import sys import unittest import petstore_api @@ -32,12 +31,14 @@ def testStringEnum(self): inst = StringEnum(None) assert isinstance(inst, StringEnum) assert isinstance(inst, NoneClass) + assert repr(inst) == '' inst = StringEnum('approved') assert isinstance(inst, StringEnum) assert isinstance(inst, Singleton) assert isinstance(inst, str) assert inst == 'approved' + assert repr(inst) == "" with self.assertRaises(petstore_api.ApiValueError): StringEnum('garbage') diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_uuid_string.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_uuid_string.py new file mode 100644 index 000000000000..1f6da7bd97bd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_uuid_string.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +from petstore_api import schemas, exceptions +from petstore_api.model.uuid_string import UUIDString +import uuid + + +class TestUUIDString(unittest.TestCase): + """UUIDString unit test stubs""" + + def test_UUIDString(self): + """Test UUIDString""" + uuid_value = '12345678-1234-5678-1234-567812345678' + u = UUIDString(uuid_value) + self.assertEqual(u, uuid_value) + self.assertTrue(isinstance(u, UUIDString)) + self.assertTrue(isinstance(u, schemas.UUIDSchema)) + self.assertTrue(isinstance(u, schemas.StrSchema)) + self.assertTrue(isinstance(u, str)) + self.assertEqual(u.as_uuid, uuid.UUID(uuid_value)) + + # passing in a uuid also works + u = UUIDString(uuid.UUID(uuid_value)) + self.assertEqual(u, uuid_value) + self.assertTrue(isinstance(u, UUIDString)) + self.assertTrue(isinstance(u, schemas.UUIDSchema)) + self.assertTrue(isinstance(u, schemas.StrSchema)) + self.assertTrue(isinstance(u, str)) + self.assertEqual(u.as_uuid, uuid.UUID(uuid_value)) + + # an invalid value does not work + with self.assertRaises(exceptions.ApiValueError): + UUIDString('1') + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/FILES index 4b8573e41171..115adc024f98 100755 --- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/FILES @@ -3,6 +3,7 @@ .travis.yml README.md docs/AdditionalPropertiesClass.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ApiResponse.md @@ -50,6 +51,7 @@ docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md @@ -70,6 +72,7 @@ petstore_api/configuration.py petstore_api/exceptions.py petstore_api/models/__init__.py petstore_api/models/additional_properties_class.py +petstore_api/models/all_of_with_single_ref.py petstore_api/models/animal.py petstore_api/models/api_response.py petstore_api/models/array_of_array_of_number_only.py @@ -112,6 +115,7 @@ petstore_api/models/outer_enum_integer_default_value.py petstore_api/models/outer_object_with_enum_property.py petstore_api/models/pet.py petstore_api/models/read_only_first.py +petstore_api/models/single_ref_type.py petstore_api/models/special_model_name.py petstore_api/models/tag.py petstore_api/models/user.py diff --git a/samples/openapi3/client/petstore/python-legacy/README.md b/samples/openapi3/client/petstore/python-legacy/README.md index a508c7e3d219..1c29f9051228 100755 --- a/samples/openapi3/client/petstore/python-legacy/README.md +++ b/samples/openapi3/client/petstore/python-legacy/README.md @@ -127,6 +127,7 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -169,6 +170,7 @@ Class | Method | HTTP request | Description - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - [User](docs/User.md) diff --git a/samples/openapi3/client/petstore/python-legacy/docs/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/python-legacy/docs/AllOfWithSingleRef.md new file mode 100644 index 000000000000..2867f81fde0d --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/docs/AllOfWithSingleRef.md @@ -0,0 +1,12 @@ +# AllOfWithSingleRef + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**single_ref_type** | [**SingleRefType**](SingleRefType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md b/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md index 64963e785160..72478b719f4c 100755 --- a/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md @@ -853,7 +853,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_enum_parameters** -> test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) +> test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_query_model_array=enum_query_model_array, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) To test enum parameters @@ -884,12 +884,13 @@ enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Quer enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to '-efg') enum_query_integer = 56 # int | Query parameter enum test (double) (optional) enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) +enum_query_model_array = [petstore_api.EnumClass()] # list[EnumClass] | (optional) enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$') enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg') try: # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_query_model_array=enum_query_model_array, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) except ApiException as e: print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` @@ -904,6 +905,7 @@ Name | Type | Description | Notes **enum_query_string** | **str**| Query parameter enum test (string) | [optional] [default to '-efg'] **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **float**| Query parameter enum test (double) | [optional] + **enum_query_model_array** | [**list[EnumClass]**](EnumClass.md)| | [optional] **enum_form_string_array** | [**list[str]**](str.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enum_form_string** | **str**| Form parameter enum test (string) | [optional] [default to '-efg'] diff --git a/samples/openapi3/client/petstore/python-legacy/docs/Model_200Response.md b/samples/openapi3/client/petstore/python-legacy/docs/Model_200Response.md new file mode 100644 index 000000000000..4fd119d12515 --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/docs/Model_200Response.md @@ -0,0 +1,13 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **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-legacy/docs/Model_Return.md b/samples/openapi3/client/petstore/python-legacy/docs/Model_Return.md new file mode 100644 index 000000000000..674c441551b3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/docs/Model_Return.md @@ -0,0 +1,12 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/python-legacy/docs/SingleRefType.md b/samples/openapi3/client/petstore/python-legacy/docs/SingleRefType.md new file mode 100644 index 000000000000..4178ac3b505e --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/docs/SingleRefType.md @@ -0,0 +1,10 @@ +# SingleRefType + + +## 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/python-legacy/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/__init__.py index 420638f92939..acaabdb17730 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/__init__.py @@ -36,6 +36,7 @@ from petstore_api.exceptions import ApiException # import models into sdk package from petstore_api.models.additional_properties_class import AdditionalPropertiesClass +from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef from petstore_api.models.animal import Animal from petstore_api.models.api_response import ApiResponse from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly @@ -78,6 +79,7 @@ from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.models.pet import Pet from petstore_api.models.read_only_first import ReadOnlyFirst +from petstore_api.models.single_ref_type import SingleRefType from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.tag import Tag from petstore_api.models.user import User diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py index 4d184e6420f6..844e1507ee94 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py @@ -128,8 +128,7 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py index 4bb39adf2914..d0d098cc042c 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py @@ -261,8 +261,7 @@ def fake_http_signature_test_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `fake_http_signature_test`") # noqa: E501 collection_formats = {} @@ -270,7 +269,7 @@ def fake_http_signature_test_with_http_info(self, pet, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'query_1' in local_var_params and local_var_params['query_1'] is not None: # noqa: E501 + if local_var_params.get('query_1') is not None: # noqa: E501 query_params.append(('query_1', local_var_params['query_1'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -973,8 +972,7 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'outer_object_with_enum_property' is set - if self.api_client.client_side_validation and ('outer_object_with_enum_property' not in local_var_params or # noqa: E501 - local_var_params['outer_object_with_enum_property'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('outer_object_with_enum_property') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `outer_object_with_enum_property` when calling `fake_property_enum_integer_serialize`") # noqa: E501 collection_formats = {} @@ -1255,8 +1253,7 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'file_schema_test_class' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 = {} @@ -1398,12 +1395,10 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('user') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -1411,7 +1406,7 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 + if local_var_params.get('query') is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1544,8 +1539,7 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('client') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -1755,20 +1749,16 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 - local_var_params['double'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 - local_var_params['byte'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('byte') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 @@ -1891,6 +1881,8 @@ def test_enum_parameters(self, **kwargs): # noqa: E501 :type enum_query_integer: int :param enum_query_double: Query parameter enum test (double) :type enum_query_double: float + :param enum_query_model_array: + :type enum_query_model_array: list[EnumClass] :param enum_form_string_array: Form parameter enum test (string array) :type enum_form_string_array: list[str] :param enum_form_string: Form parameter enum test (string) @@ -1935,6 +1927,8 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 :type enum_query_integer: int :param enum_query_double: Query parameter enum test (double) :type enum_query_double: float + :param enum_query_model_array: + :type enum_query_model_array: list[EnumClass] :param enum_form_string_array: Form parameter enum test (string array) :type enum_form_string_array: list[str] :param enum_form_string: Form parameter enum test (string) @@ -1972,6 +1966,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 'enum_query_string', 'enum_query_integer', 'enum_query_double', + 'enum_query_model_array', 'enum_form_string_array', 'enum_form_string' ] @@ -2001,15 +1996,18 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_string'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_integer'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['enum_query_double'] is not None: # noqa: E501 + if local_var_params.get('enum_query_double') is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 + if local_var_params.get('enum_query_model_array') is not None: # noqa: E501 + query_params.append(('enum_query_model_array', local_var_params['enum_query_model_array'])) # noqa: E501 + collection_formats['enum_query_model_array'] = 'multi' # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) if 'enum_header_string_array' in local_var_params: @@ -2174,16 +2172,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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 = {} @@ -2191,13 +2186,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['required_int64_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['string_group'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['int64_group'] is not None: # noqa: E501 + if local_var_params.get('int64_group') is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -2324,8 +2319,7 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'request_body' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('request_body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -2469,12 +2463,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 - local_var_params['param2'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('param2') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -2645,28 +2637,22 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 - local_var_params['ioutil'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 - local_var_params['http'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 - local_var_params['url'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 - local_var_params['context'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('context') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'allow_empty' is set - if self.api_client.client_side_validation and ('allow_empty' not in local_var_params or # noqa: E501 - local_var_params['allow_empty'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('allow_empty') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `allow_empty` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -2674,24 +2660,24 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 + if local_var_params.get('pipe') is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'pipes' # noqa: E501 - if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['http'] is not None: # noqa: E501 + if local_var_params.get('http') is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'ssv' # noqa: E501 - if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 + if local_var_params.get('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 and local_var_params['context'] is not None: # noqa: E501 + if local_var_params.get('context') is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 - if 'language' in local_var_params and local_var_params['language'] is not None: # noqa: E501 + if local_var_params.get('language') is not None: # noqa: E501 query_params.append(('language', local_var_params['language'])) # noqa: E501 - if 'allow_empty' in local_var_params and local_var_params['allow_empty'] is not None: # noqa: E501 + if local_var_params.get('allow_empty') is not None: # noqa: E501 query_params.append(('allowEmpty', local_var_params['allow_empty'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py index db8bff321615..4bc981fb8871 100644 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags123_api.py @@ -128,8 +128,7 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py index cf546a00625f..ed1d8d6c5044 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -141,8 +141,7 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -287,8 +286,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -421,8 +419,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('status') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -430,7 +427,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + if local_var_params.get('status') is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -561,8 +558,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('tags') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -570,7 +566,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + if local_var_params.get('tags') is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -701,8 +697,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -854,8 +849,7 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -1005,8 +999,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -1159,8 +1152,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -1319,12 +1311,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py index d66190ccbc64..02fe7dcbf57b 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py @@ -128,8 +128,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -387,8 +386,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # 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 @@ -531,8 +529,7 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py index 1dc9860baf48..4e326c6a51fd 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py @@ -128,8 +128,7 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('user') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -268,8 +267,7 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('user') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -408,8 +406,7 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('user') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -548,8 +545,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -680,8 +676,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -825,12 +820,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 - local_var_params['password'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('password') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -838,9 +831,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 + if local_var_params.get('username') is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 + if local_var_params.get('password') is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) @@ -1096,12 +1089,10 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - 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 + if self.api_client.client_side_validation and local_var_params.get('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 self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('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-legacy/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/__init__.py index af74db1c2582..2bb081e87ba9 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/__init__.py @@ -15,6 +15,7 @@ # import models into model package from petstore_api.models.additional_properties_class import AdditionalPropertiesClass +from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef from petstore_api.models.animal import Animal from petstore_api.models.api_response import ApiResponse from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly @@ -57,6 +58,7 @@ from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.models.pet import Pet from petstore_api.models.read_only_first import ReadOnlyFirst +from petstore_api.models.single_ref_type import SingleRefType from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.tag import Tag from petstore_api.models.user import User diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/all_of_with_single_ref.py new file mode 100644 index 000000000000..8466199c80a8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/all_of_with_single_ref.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from petstore_api.configuration import Configuration + + +class AllOfWithSingleRef(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'username': 'str', + 'single_ref_type': 'SingleRefType' + } + + attribute_map = { + 'username': 'username', + 'single_ref_type': 'SingleRefType' + } + + def __init__(self, username=None, single_ref_type=None, local_vars_configuration=None): # noqa: E501 + """AllOfWithSingleRef - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._username = None + self._single_ref_type = None + self.discriminator = None + + if username is not None: + self.username = username + self.single_ref_type = single_ref_type + + @property + def username(self): + """Gets the username of this AllOfWithSingleRef. # noqa: E501 + + + :return: The username of this AllOfWithSingleRef. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this AllOfWithSingleRef. + + + :param username: The username of this AllOfWithSingleRef. # noqa: E501 + :type username: str + """ + + self._username = username + + @property + def single_ref_type(self): + """Gets the single_ref_type of this AllOfWithSingleRef. # noqa: E501 + + + :return: The single_ref_type of this AllOfWithSingleRef. # noqa: E501 + :rtype: SingleRefType + """ + return self._single_ref_type + + @single_ref_type.setter + def single_ref_type(self, single_ref_type): + """Sets the single_ref_type of this AllOfWithSingleRef. + + + :param single_ref_type: The single_ref_type of this AllOfWithSingleRef. # noqa: E501 + :type single_ref_type: SingleRefType + """ + + self._single_ref_type = single_ref_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AllOfWithSingleRef): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AllOfWithSingleRef): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/models/model_200_response.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/model_200_response.py new file mode 100644 index 000000000000..96498ac6b1df --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/model_200_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from petstore_api.configuration import Configuration + + +class Model_200Response(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'int', + '_class': 'str' + } + + attribute_map = { + 'name': 'name', + '_class': 'class' + } + + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 + """Model_200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self.__class = None + self.discriminator = None + + if name is not None: + self.name = name + if _class is not None: + self._class = _class + + @property + def name(self): + """Gets the name of this Model_200Response. # noqa: E501 + + + :return: The name of this Model_200Response. # noqa: E501 + :rtype: int + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Model_200Response. + + + :param name: The name of this Model_200Response. # noqa: E501 + :type name: int + """ + + self._name = name + + @property + def _class(self): + """Gets the _class of this Model_200Response. # noqa: E501 + + + :return: The _class of this Model_200Response. # noqa: E501 + :rtype: str + """ + return self.__class + + @_class.setter + def _class(self, _class): + """Sets the _class of this Model_200Response. + + + :param _class: The _class of this Model_200Response. # noqa: E501 + :type _class: str + """ + + self.__class = _class + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Model_200Response): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Model_200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/models/single_ref_type.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/single_ref_type.py new file mode 100644 index 000000000000..a4aad0b8a070 --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/single_ref_type.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from petstore_api.configuration import Configuration + + +class SingleRefType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + ADMIN = "admin" + USER = "user" + + allowable_values = [ADMIN, USER] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SingleRefType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SingleRefType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SingleRefType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python-legacy/test/test_all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-legacy/test/test_all_of_with_single_ref.py new file mode 100644 index 000000000000..ee761ef82d0a --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/test/test_all_of_with_single_ref.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import petstore_api +from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef # noqa: E501 +from petstore_api.rest import ApiException + +class TestAllOfWithSingleRef(unittest.TestCase): + """AllOfWithSingleRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AllOfWithSingleRef + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = petstore_api.models.all_of_with_single_ref.AllOfWithSingleRef() # noqa: E501 + if include_optional : + return AllOfWithSingleRef( + username = '', + single_ref_type = None + ) + else : + return AllOfWithSingleRef( + ) + + def testAllOfWithSingleRef(self): + """Test AllOfWithSingleRef""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-legacy/test/test_model_200_response.py b/samples/openapi3/client/petstore/python-legacy/test/test_model_200_response.py new file mode 100644 index 000000000000..314ee5e3dde6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/test/test_model_200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import petstore_api +from petstore_api.models.model_200_response import Model_200Response # noqa: E501 +from petstore_api.rest import ApiException + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Model_200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = petstore_api.models.model_200_response.Model_200Response() # noqa: E501 + if include_optional : + return Model_200Response( + name = 56, + _class = '' + ) + else : + return Model_200Response( + ) + + def testModel_200Response(self): + """Test Model_200Response""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-legacy/test/test_single_ref_type.py b/samples/openapi3/client/petstore/python-legacy/test/test_single_ref_type.py new file mode 100644 index 000000000000..66b9e0075fbd --- /dev/null +++ b/samples/openapi3/client/petstore/python-legacy/test/test_single_ref_type.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import petstore_api +from petstore_api.models.single_ref_type import SingleRefType # noqa: E501 +from petstore_api.rest import ApiException + +class TestSingleRefType(unittest.TestCase): + """SingleRefType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SingleRefType + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = petstore_api.models.single_ref_type.SingleRefType() # noqa: E501 + if include_optional : + return SingleRefType( + ) + else : + return SingleRefType( + ) + + def testSingleRefType(self): + """Test SingleRefType""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/docs/Model_200Response.md b/samples/openapi3/client/petstore/python/docs/Model_200Response.md new file mode 100644 index 000000000000..3d5777b2b108 --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/Model_200Response.md @@ -0,0 +1,14 @@ +# Model_200Response + +Model for testing model name starting with number + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**_class** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/Model_Return.md b/samples/openapi3/client/petstore/python/docs/Model_Return.md new file mode 100644 index 000000000000..d9c1a2d8119b --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/Model_Return.md @@ -0,0 +1,13 @@ +# Model_Return + +Model for testing reserved words + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **int** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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 503decf303f1..9945fc1ee9b7 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 @@ -129,6 +129,10 @@ def call_123_test_special_tags( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -160,6 +164,7 @@ def call_123_test_special_tags( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['client'] = \ client return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py index 8ba49f05e760..c3515258b952 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py @@ -117,6 +117,10 @@ def foo_get( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -148,5 +152,6 @@ def foo_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.foo_get_endpoint.call_with_http_info(**kwargs) 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 4067bbc9464c..e36e3b013121 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 @@ -1730,6 +1730,10 @@ def additional_properties_with_array_of_enums( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1761,6 +1765,7 @@ def additional_properties_with_array_of_enums( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.additional_properties_with_array_of_enums_endpoint.call_with_http_info(**kwargs) def array_model( @@ -1804,6 +1809,10 @@ def array_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1835,6 +1844,7 @@ def array_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.array_model_endpoint.call_with_http_info(**kwargs) def array_of_enums( @@ -1877,6 +1887,10 @@ def array_of_enums( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1908,6 +1922,7 @@ def array_of_enums( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.array_of_enums_endpoint.call_with_http_info(**kwargs) def boolean( @@ -1951,6 +1966,10 @@ def boolean( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1982,6 +2001,7 @@ def boolean( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.boolean_endpoint.call_with_http_info(**kwargs) def composed_one_of_number_with_validations( @@ -2025,6 +2045,10 @@ def composed_one_of_number_with_validations( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2056,6 +2080,7 @@ def composed_one_of_number_with_validations( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.composed_one_of_number_with_validations_endpoint.call_with_http_info(**kwargs) def download_attachment( @@ -2100,6 +2125,10 @@ def download_attachment( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2131,6 +2160,7 @@ def download_attachment( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['file_name'] = \ file_name return self.download_attachment_endpoint.call_with_http_info(**kwargs) @@ -2175,6 +2205,10 @@ def enum_test( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2206,6 +2240,7 @@ def enum_test( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.enum_test_endpoint.call_with_http_info(**kwargs) def fake_health_get( @@ -2247,6 +2282,10 @@ def fake_health_get( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2278,6 +2317,7 @@ def fake_health_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.fake_health_get_endpoint.call_with_http_info(**kwargs) def mammal( @@ -2323,6 +2363,10 @@ def mammal( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2354,6 +2398,7 @@ def mammal( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['mammal'] = \ mammal return self.mammal_endpoint.call_with_http_info(**kwargs) @@ -2399,6 +2444,10 @@ def number_with_validations( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2430,6 +2479,7 @@ def number_with_validations( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.number_with_validations_endpoint.call_with_http_info(**kwargs) def object_model_with_ref_props( @@ -2473,6 +2523,10 @@ def object_model_with_ref_props( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2504,6 +2558,7 @@ def object_model_with_ref_props( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.object_model_with_ref_props_endpoint.call_with_http_info(**kwargs) def post_inline_additional_properties_payload( @@ -2546,6 +2601,10 @@ def post_inline_additional_properties_payload( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2577,6 +2636,7 @@ def post_inline_additional_properties_payload( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.post_inline_additional_properties_payload_endpoint.call_with_http_info(**kwargs) def post_inline_additional_properties_ref_payload( @@ -2619,6 +2679,10 @@ def post_inline_additional_properties_ref_payload( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2650,6 +2714,7 @@ def post_inline_additional_properties_ref_payload( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.post_inline_additional_properties_ref_payload_endpoint.call_with_http_info(**kwargs) def string( @@ -2693,6 +2758,10 @@ def string( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2724,6 +2793,7 @@ def string( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.string_endpoint.call_with_http_info(**kwargs) def string_enum( @@ -2767,6 +2837,10 @@ def string_enum( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2798,6 +2872,7 @@ def string_enum( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.string_enum_endpoint.call_with_http_info(**kwargs) def test_body_with_file_schema( @@ -2843,6 +2918,10 @@ def test_body_with_file_schema( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2874,6 +2953,7 @@ def test_body_with_file_schema( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['file_schema_test_class'] = \ file_schema_test_class return self.test_body_with_file_schema_endpoint.call_with_http_info(**kwargs) @@ -2922,6 +3002,10 @@ def test_body_with_query_params( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -2953,6 +3037,7 @@ def test_body_with_query_params( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['query'] = \ query kwargs['user'] = \ @@ -3002,6 +3087,10 @@ def test_client_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3033,6 +3122,7 @@ def test_client_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['client'] = \ client return self.test_client_model_endpoint.call_with_http_info(**kwargs) @@ -3096,6 +3186,10 @@ def test_endpoint_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3127,6 +3221,7 @@ def test_endpoint_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['number'] = \ number kwargs['double'] = \ @@ -3185,6 +3280,10 @@ def test_enum_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3216,6 +3315,7 @@ def test_enum_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.test_enum_parameters_endpoint.call_with_http_info(**kwargs) def test_group_parameters( @@ -3268,6 +3368,10 @@ def test_group_parameters( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3299,6 +3403,7 @@ def test_group_parameters( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['required_string_group'] = \ required_string_group kwargs['required_boolean_group'] = \ @@ -3350,6 +3455,10 @@ def test_inline_additional_properties( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3381,6 +3490,7 @@ def test_inline_additional_properties( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['request_body'] = \ request_body return self.test_inline_additional_properties_endpoint.call_with_http_info(**kwargs) @@ -3430,6 +3540,10 @@ def test_json_form_data( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3461,6 +3575,7 @@ def test_json_form_data( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['param'] = \ param kwargs['param2'] = \ @@ -3518,6 +3633,10 @@ def test_query_parameter_collection_format( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3549,6 +3668,7 @@ def test_query_parameter_collection_format( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pipe'] = \ pipe kwargs['ioutil'] = \ @@ -3601,6 +3721,10 @@ def tx_rx_any_of_model( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3632,6 +3756,7 @@ def tx_rx_any_of_model( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.tx_rx_any_of_model_endpoint.call_with_http_info(**kwargs) def upload_download_file( @@ -3677,6 +3802,10 @@ def upload_download_file( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3708,6 +3837,7 @@ def upload_download_file( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['body'] = \ body return self.upload_download_file_endpoint.call_with_http_info(**kwargs) @@ -3756,6 +3886,10 @@ def upload_file( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3787,6 +3921,7 @@ def upload_file( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['file'] = \ file return self.upload_file_endpoint.call_with_http_info(**kwargs) @@ -3832,6 +3967,10 @@ def upload_files( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -3863,5 +4002,6 @@ def upload_files( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.upload_files_endpoint.call_with_http_info(**kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py index a6c187b02518..95f69b706e09 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py @@ -131,6 +131,10 @@ def test_classname( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -162,6 +166,7 @@ def test_classname( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['client'] = \ client return self.test_classname_endpoint.call_with_http_info(**kwargs) 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 a6c187b02518..bc79105589de 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 @@ -131,6 +131,10 @@ def test_classname( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auth (dict): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -162,6 +166,7 @@ def test_classname( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auth'] = kwargs.get('_request_auth', None) kwargs['client'] = \ client return self.test_classname_endpoint.call_with_http_info(**kwargs) 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 bb8bebf03839..562acfd41223 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 @@ -483,6 +483,10 @@ def add_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -514,6 +518,7 @@ def add_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet'] = \ pet return self.add_pet_endpoint.call_with_http_info(**kwargs) @@ -562,6 +567,10 @@ def delete_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -593,6 +602,7 @@ def delete_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.delete_pet_endpoint.call_with_http_info(**kwargs) @@ -640,6 +650,10 @@ def find_pets_by_status( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -671,6 +685,7 @@ def find_pets_by_status( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['status'] = \ status return self.find_pets_by_status_endpoint.call_with_http_info(**kwargs) @@ -718,6 +733,10 @@ def find_pets_by_tags( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -749,6 +768,7 @@ def find_pets_by_tags( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['tags'] = \ tags return self.find_pets_by_tags_endpoint.call_with_http_info(**kwargs) @@ -796,6 +816,10 @@ def get_pet_by_id( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -827,6 +851,7 @@ def get_pet_by_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.get_pet_by_id_endpoint.call_with_http_info(**kwargs) @@ -874,6 +899,10 @@ def update_pet( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -905,6 +934,7 @@ def update_pet( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet'] = \ pet return self.update_pet_endpoint.call_with_http_info(**kwargs) @@ -954,6 +984,10 @@ def update_pet_with_form( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -985,6 +1019,7 @@ def update_pet_with_form( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['pet_id'] = \ pet_id return self.update_pet_with_form_endpoint.call_with_http_info(**kwargs) 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 d31348f08596..1e63e3bef307 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 @@ -277,6 +277,10 @@ def delete_order( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -308,6 +312,7 @@ def delete_order( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order_id'] = \ order_id return self.delete_order_endpoint.call_with_http_info(**kwargs) @@ -352,6 +357,10 @@ def get_inventory( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -383,6 +392,7 @@ def get_inventory( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.get_inventory_endpoint.call_with_http_info(**kwargs) def get_order_by_id( @@ -428,6 +438,10 @@ def get_order_by_id( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -459,6 +473,7 @@ def get_order_by_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order_id'] = \ order_id return self.get_order_by_id_endpoint.call_with_http_info(**kwargs) @@ -506,6 +521,10 @@ def place_order( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -537,6 +556,7 @@ def place_order( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['order'] = \ order return self.place_order_endpoint.call_with_http_info(**kwargs) 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 4f5b6e366272..38c7f659bddb 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 @@ -470,6 +470,10 @@ def create_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -501,6 +505,7 @@ def create_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['user'] = \ user return self.create_user_endpoint.call_with_http_info(**kwargs) @@ -548,6 +553,10 @@ def create_users_with_array_input( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -579,6 +588,7 @@ def create_users_with_array_input( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['user'] = \ user return self.create_users_with_array_input_endpoint.call_with_http_info(**kwargs) @@ -626,6 +636,10 @@ def create_users_with_list_input( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -657,6 +671,7 @@ def create_users_with_list_input( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['user'] = \ user return self.create_users_with_list_input_endpoint.call_with_http_info(**kwargs) @@ -704,6 +719,10 @@ def delete_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -735,6 +754,7 @@ def delete_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username return self.delete_user_endpoint.call_with_http_info(**kwargs) @@ -782,6 +802,10 @@ def get_user_by_name( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -813,6 +837,7 @@ def get_user_by_name( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username return self.get_user_by_name_endpoint.call_with_http_info(**kwargs) @@ -862,6 +887,10 @@ def login_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -893,6 +922,7 @@ def login_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username kwargs['password'] = \ @@ -939,6 +969,10 @@ def logout_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -970,6 +1004,7 @@ def logout_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.logout_user_endpoint.call_with_http_info(**kwargs) def update_user( @@ -1017,6 +1052,10 @@ def update_user( _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None async_req (bool): execute request asynchronously Returns: @@ -1048,6 +1087,7 @@ def update_user( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['username'] = \ username kwargs['user'] = \ 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 c5e0b7ffeb65..eb1abcf5cc35 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -132,7 +132,8 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -182,7 +183,8 @@ def __call_api( # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -350,7 +352,8 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -398,6 +401,10 @@ def call_api( :param _check_type: boolean describing if the data back from the server should have its type checked. :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -412,7 +419,7 @@ def call_api( response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -425,7 +432,7 @@ def call_api( collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -597,7 +604,7 @@ def select_header_content_type(self, content_types, method=None, body=None): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -607,31 +614,41 @@ def update_params_for_auth(self, headers, queries, auth_settings, :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - else: - # The HTTP signature scheme requires multiple HTTP headers - # that are calculated dynamically. - signing_info = self.configuration.signing_info - auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, queries) - headers.update(auth_headers) - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + else: + # The HTTP signature scheme requires multiple HTTP headers + # that are calculated dynamically. + signing_info = self.configuration.signing_info + auth_headers = signing_info.get_http_signature_headers( + resource_path, method, headers, body, queries) + headers.update(auth_headers) + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -681,7 +698,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -696,7 +714,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -871,4 +890,5 @@ def call_with_http_info(self, **kwargs): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py index 2fec461eafed..381ad9572b17 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.another_fake_api import AnotherFakeApi +# from petstore_api.api.another_fake_api import AnotherFakeApi # # or import this package, but before doing it, use: # diff --git a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py index 51527f606112..b0c764b6cbea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py +++ b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py @@ -112,7 +112,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py index 0d8a59a4a97b..307a8c772ff0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py @@ -159,7 +159,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -167,14 +167,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py index 1846afd1eec7..9b33b4689d5f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py @@ -141,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -149,14 +149,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -228,14 +232,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/address.py b/samples/openapi3/client/petstore/python/petstore_api/model/address.py index 01ff154e5262..6ab145672442 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/address.py @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -143,14 +143,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -222,14 +226,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py index 8f80b4669b60..b93180ea0559 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py @@ -161,7 +161,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -169,14 +169,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py index 0cca3901cb37..89062cff69cb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py index ed202b6bdcca..5e21cdaf5988 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -234,14 +238,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py index dee3d8ef80bc..9909e1994ab7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py @@ -154,7 +154,7 @@ def _from_openapi_data(cls, cultivar, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -162,14 +162,18 @@ def _from_openapi_data(cls, cultivar, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def __init__(self, cultivar, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py index b4ce3f132a40..ce9ae6721e57 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py @@ -137,7 +137,7 @@ def _from_openapi_data(cls, cultivar, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -145,14 +145,18 @@ def _from_openapi_data(cls, cultivar, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -229,14 +233,18 @@ def __init__(self, cultivar, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py index 39a76641c6d5..41e90e2ae966 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py index fbe28556441b..8ca15fd6c8fb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py index 73abf32b511f..068dc80b1a90 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py index fc4e6c345375..119a5ad1fdd0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py index 2d527ca3bbec..f6f6792990d8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, length_cm, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, length_cm, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, length_cm, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py index 1974ea8a9627..1e6d97d13430 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py @@ -137,7 +137,7 @@ def _from_openapi_data(cls, length_cm, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -145,14 +145,18 @@ def _from_openapi_data(cls, length_cm, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -229,14 +233,18 @@ def __init__(self, length_cm, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py index b7a690cd388a..456066d2ce5e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py index e19d454603a1..e4002fb8f622 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py @@ -156,14 +156,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -244,14 +248,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py index d5d7202f9af1..d57e30d2c85e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py @@ -153,7 +153,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py index 03d534161075..04a16c49115e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py @@ -165,14 +165,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -266,14 +270,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py index 0fa2471efddc..f4e32d0b736a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.py b/samples/openapi3/client/petstore/python/petstore_api/model/category.py index b4557487e022..21fb7bd65b51 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/category.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 name = kwargs.get('name', "default-name") _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -237,14 +241,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py index 5fd213c0ce9d..6d971fd192aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -257,14 +261,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py index 21c3ac606b2b..92d2a18ab707 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py index d73e8f42ef7f..cbbd0ff1e81c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.py b/samples/openapi3/client/petstore/python/petstore_api/model/client.py index 091a06051333..82c5a6ed6bb4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/client.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py index 99d9199382a0..3ad5b7a7180f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py index 67429de5a425..5dfc7dcb8cd9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py @@ -159,14 +159,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -259,14 +263,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py index 4fd927a1e5cd..b9324a12c8e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py @@ -149,14 +149,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -249,14 +253,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py index 72ca3e3b2eb0..3a37b353933c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py index 22fbae182f48..f5b4d580f081 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py @@ -170,14 +170,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -272,14 +276,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py index 830390f06fa0..c9d98095446b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py @@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -236,14 +240,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py index 68143f247fe5..c08b8d2a0bee 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py @@ -159,7 +159,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -167,14 +167,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -250,14 +254,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py index 56b055e4a517..65b981ab7be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py @@ -149,7 +149,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -157,14 +157,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -238,14 +242,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py index 476d3da6587e..bf9b682bd05d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py @@ -158,14 +158,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py index 924212176dcb..dd47ea4f74c2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py @@ -215,7 +215,7 @@ def _from_openapi_data(cls, enum_string_required, *args, **kwargs): # noqa: E50 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -223,14 +223,18 @@ def _from_openapi_data(cls, enum_string_required, *args, **kwargs): # noqa: E50 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -318,14 +322,18 @@ def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py index 1ef377f52403..47e8e9a64f18 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fake_post_inline_additional_properties_payload_array_data.py b/samples/openapi3/client/petstore/python/petstore_api/model/fake_post_inline_additional_properties_payload_array_data.py index 95faf3468d0a..3e3afcf462bc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fake_post_inline_additional_properties_payload_array_data.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fake_post_inline_additional_properties_payload_array_data.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.py b/samples/openapi3/client/petstore/python/petstore_api/model/file.py index 90ebbacfefe9..6d8d65f45752 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py index 4dcd9995d8aa..d8db617ffa80 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py @@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -236,14 +240,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py index e572bea9afe1..fd07a6d8ade3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py index 5c2113edd1c1..73ae897b8ef2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py @@ -141,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -149,14 +149,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -230,14 +234,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py index 1cf20a6b1ebc..5b425f42332d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py @@ -228,7 +228,7 @@ def _from_openapi_data(cls, number, byte, date, password, *args, **kwargs): # n """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -236,14 +236,18 @@ def _from_openapi_data(cls, number, byte, date, password, *args, **kwargs): # n self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -337,14 +341,18 @@ def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py index deddaf8a7399..79952ac853aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py @@ -172,14 +172,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -273,14 +277,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py index b9ecc53a570f..62fdc158f582 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -262,14 +266,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py index d30fc516b056..93f102967ff3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py @@ -172,14 +172,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -273,14 +277,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit_no_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit_no_properties.py index d8ddf14ea593..c215e1764b08 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit_no_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit_no_properties.py @@ -169,14 +169,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -269,14 +273,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py index 7037a2283303..f6d1b0bb2043 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py @@ -154,7 +154,7 @@ def _from_openapi_data(cls, pet_type, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -162,14 +162,18 @@ def _from_openapi_data(cls, pet_type, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -245,14 +249,18 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py index 967d83544cd8..1ccc67be07a1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py @@ -143,7 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -151,14 +151,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -232,14 +236,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py index a6174163da85..e0f31297fe00 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py index 861507574d0e..795e1dff8660 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -232,14 +236,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py index b6277de408d3..f86bf6e9ccad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -232,14 +236,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py index 7e12891bfed5..5c3edc3a45d9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -152,14 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -232,14 +236,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py index 97384f48acfe..de46d21f64f6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py @@ -162,14 +162,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py index 252560ee7690..9091039a21a8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py @@ -156,14 +156,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -244,14 +248,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py index df7749b22f8b..f3473cffa273 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py @@ -158,14 +158,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py index d093a15ac36f..162f8fedb53a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/legs.py b/samples/openapi3/client/petstore/python/petstore_api/model/legs.py index 3258e0a85be1..cb5c157e2b53 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/legs.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/legs.py @@ -148,7 +148,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 legs = kwargs.get('legs', "4") _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -156,14 +156,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -241,14 +245,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/list.py b/samples/openapi3/client/petstore/python/petstore_api/model/list.py index f22e79bdde21..1dfa33efc320 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/list.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/list.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py index e06cc8396c05..0a2d927ea7ac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py @@ -175,14 +175,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -276,14 +280,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py index 5ffaa783df3a..eccf9c9e610c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py @@ -157,7 +157,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -165,14 +165,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -248,14 +252,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py index 780a112d2439..4d825b8dd46d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -150,7 +150,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py index 4fda496353e3..9bebea2423fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py @@ -141,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -149,14 +149,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -230,14 +234,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_200_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/model_200_response.py new file mode 100644 index 000000000000..d2f97900d188 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model_200_response.py @@ -0,0 +1,267 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class Model_200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (int,), # noqa: E501 + '_class': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + '_class': 'class', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Model_200Response - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Model_200Response - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py index ed436bd3890a..f3bd5123dd74 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mole.py b/samples/openapi3/client/petstore/python/petstore_api/model/mole.py index 53c2f443ad92..0e149e15f5ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mole.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mole.py @@ -157,7 +157,7 @@ def _from_openapi_data(cls, blind, smell, hearing, *args, **kwargs): # noqa: E5 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -165,14 +165,18 @@ def _from_openapi_data(cls, blind, smell, hearing, *args, **kwargs): # noqa: E5 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -253,14 +257,18 @@ def __init__(self, smell, hearing, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.py b/samples/openapi3/client/petstore/python/petstore_api/model/name.py index 65e733099c69..aec8c8b900cb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/name.py @@ -151,7 +151,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -159,14 +159,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -245,14 +249,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py index e038a93fe219..0c6765a33ca5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py @@ -174,7 +174,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -182,14 +182,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -274,14 +278,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py index 04bc5a0a3457..75aad1b1b010 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py @@ -164,14 +164,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -264,14 +268,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py index 92d24e178c03..7a586085d7c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py index 068c1c47dfb7..67e019ad54db 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py @@ -161,14 +161,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -253,14 +257,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py index 4b3275bcc8e8..4f9e0edf9862 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -143,14 +143,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -222,14 +226,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py index bd98ec208bfc..085a1533c4bd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py @@ -155,7 +155,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -163,14 +163,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py index bbedc4a07fc4..16e0c1f1a2d3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -225,14 +229,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.py b/samples/openapi3/client/petstore/python/petstore_api/model/order.py index eac0013231d2..98fe0b869760 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/order.py @@ -158,7 +158,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -166,14 +166,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -251,14 +255,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py index f72997edfbcf..8d94006f1591 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py @@ -157,14 +157,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -255,14 +259,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py index 2a33b0889ab1..5eb4041e91d0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py @@ -168,7 +168,7 @@ def _from_openapi_data(cls, name, photo_urls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -176,14 +176,18 @@ def _from_openapi_data(cls, name, photo_urls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -265,14 +269,18 @@ def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py index a8e18e7b9fb0..5c9bcc5bd034 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py @@ -158,14 +158,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -256,14 +260,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py index c5eef71f4569..ddb76e43e806 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py @@ -161,14 +161,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -260,14 +264,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py index 7f46f6bd626c..9f61569c9c04 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, quadrilateral_type, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, quadrilateral_type, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py index bd2a75175ae5..965325c2864d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py @@ -142,7 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -150,14 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py b/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py index 7ce992e47142..fc085618b95f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py index d2143ba334e8..6a7bfe81bd82 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py index cec42d033227..025657240278 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py @@ -164,14 +164,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -264,14 +268,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py index 313de6aa05ea..c72aea42b725 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, shape_type, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, shape_type, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py index bde6391563ad..28bd8ecd4b5a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py @@ -164,14 +164,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -264,14 +268,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py index 3db924e7dd1e..7c342851203f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py @@ -155,14 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -254,14 +258,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py index 7e650d0dea1c..cee41c9aa7f1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py @@ -147,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -244,14 +248,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py index 25e24ea8ee5c..c6e04bc0342d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py index 9a7743a2a42e..6044e5e10084 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -146,14 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -226,14 +230,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py index cb0e03f19e57..52b6f39964bd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -143,14 +143,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -222,14 +226,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py index a208eb4780ea..0fbdcdc6af33 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py @@ -172,14 +172,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -268,14 +272,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py index 2c53501ef3ec..37775c93ca08 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py @@ -158,14 +158,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -246,14 +250,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py index 9daf411a5bb0..b56728bb6bda 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py @@ -141,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -149,14 +149,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -230,14 +234,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py index 3329e98a7b72..fd9103c96bd6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py @@ -164,14 +164,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -263,14 +267,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py index 2b88e89e3326..3bb817d86bcc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py @@ -140,7 +140,7 @@ def _from_openapi_data(cls, triangle_type, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -148,14 +148,18 @@ def _from_openapi_data(cls, triangle_type, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -231,14 +235,18 @@ def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.py b/samples/openapi3/client/petstore/python/petstore_api/model/user.py index 39efcbbc2ddf..a8056b29a293 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/user.py @@ -171,7 +171,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -179,14 +179,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -270,14 +274,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py index d03a3a7b5c9e..7c1a8426712f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py @@ -146,7 +146,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -154,14 +154,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -239,14 +243,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py index cd897ef3b6ec..b6d2fe934d52 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py @@ -148,7 +148,7 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -156,14 +156,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type @@ -240,14 +244,18 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) self._data_store = {} self._check_type = _check_type diff --git a/samples/openapi3/client/petstore/python/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python/petstore_api/model_utils.py index 6414688b772b..1b16e528b137 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model_utils.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model_utils.py @@ -16,6 +16,7 @@ import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -192,7 +193,7 @@ def __copy__(self): if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ @@ -1399,7 +1400,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -1564,7 +1571,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + if (configuration + or (input_class_simple == dict + and not dict in valid_classes)): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, diff --git a/samples/openapi3/client/petstore/python/test/test_model_200_response.py b/samples/openapi3/client/petstore/python/test/test_model_200_response.py new file mode 100644 index 000000000000..5858658d2947 --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_model_200_response.py @@ -0,0 +1,35 @@ +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.model_200_response import Model_200Response + + +class TestModel_200Response(unittest.TestCase): + """Model_200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testModel_200Response(self): + """Test Model_200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = Model_200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py index 33812b1b3f58..f9ac740e4ef7 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py @@ -495,42 +495,46 @@ def test_download_attachment(self): # sample from http://www.jtricks.com/download-text file_name = 'content.txt' - headers = {'Content-Disposition': 'attachment; filename={}'.format(file_name), 'Content-Type': 'text/plain'} - def get_headers(): - return headers - def get_header(name, default=None): - return headers.get(name, default) + headers_dict = { + 'with_filename': {'Content-Disposition': 'attachment; filename={}'.format(file_name), 'Content-Type': 'text/plain'}, + 'no_filename': {'Content-Disposition': 'attachment;', 'Content-Type': 'text/plain'} + } + def get_headers(*args): + return args file_data = ( "You are reading text file that was supposed to be downloaded\r\n" "to your hard disk. If your browser offered to save you the file," "\r\nthen it handled the Content-Disposition header correctly." ) - http_response = HTTPResponse( - status=200, - reason='OK', - data=file_data, - getheaders=get_headers, - getheader=get_header - ) - # deserialize response to a file - mock_response = RESTResponse(http_response) - with patch.object(RESTClientObject, 'request') as mock_method: - mock_method.return_value = mock_response - try: - file_object = self.api.download_attachment(file_name='download-text') - self.assert_request_called_with( - mock_method, - 'http://www.jtricks.com/download-text', - http_method='GET', - accept='text/plain', - content_type=None, - ) - self.assertTrue(isinstance(file_object, file_type)) - self.assertFalse(file_object.closed) - self.assertEqual(file_object.read(), file_data.encode('utf-8')) - finally: - file_object.close() - os.unlink(file_object.name) + for key, headers in headers_dict.items(): + def get_header(name, default=None): + return headers_dict[key].get(name, default) + http_response = HTTPResponse( + status=200, + reason='OK', + data=file_data, + getheaders=get_headers(headers), + getheader=get_header + ) + # deserialize response to a file + mock_response = RESTResponse(http_response) + with patch.object(RESTClientObject, 'request') as mock_method: + mock_method.return_value = mock_response + try: + file_object = self.api.download_attachment(file_name='download-text') + self.assert_request_called_with( + mock_method, + 'http://www.jtricks.com/download-text', + http_method='GET', + accept='text/plain', + content_type=None, + ) + self.assertTrue(isinstance(file_object, file_type)) + self.assertFalse(file_object.closed) + self.assertEqual(file_object.read(), file_data.encode('utf-8')) + finally: + file_object.close() + os.unlink(file_object.name) def test_upload_download_file(self): test_file_dir = os.path.realpath( diff --git a/samples/openapi3/client/petstore/spring-cloud-async/pom.xml b/samples/openapi3/client/petstore/spring-cloud-async/pom.xml index d236e4527106..d58ba6fe8582 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-async/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 1.6.4 + UTF-8 + 1.6.6 org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index ccf770677850..b601ae7c4efd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Pet", description = "the Pet API") +@Tag(name = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 0a7cdb2f5a13..af327e5f0eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Store", description = "the Store API") +@Tag(name = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index c71f790b7362..8d94bd15e1e9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -34,7 +34,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "User", description = "the User API") +@Tag(name = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index 03e4a4ce0b51..ed3c428e34a3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml b/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml index cd2a2017c6cf..6ec95e2589dd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 1.6.4 + UTF-8 + 1.6.6 org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java index ea6a030db272..e928a0c2c1f5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("@type") private String atType = "Pet"; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml index 899cb60d2d7c..dfb83acaba0f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 1.6.4 + UTF-8 + 1.6.6 org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index b5d45b63013a..53b1fdc2358e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Pet", description = "the Pet API") +@Tag(name = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index 17b1e9a972f4..85d2ac5344d6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Store", description = "the Store API") +@Tag(name = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index 781f7a3f223b..0c398c9ca52b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "User", description = "the User API") +@Tag(name = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 88ea058c0c51..0d95d7f91b29 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 0d4d67f1a9e9..0a45cd0d195e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 219d797ee642..c53b449a5070 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b2245551ad3e..ae060d44dc4d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index ea102c40ed2e..87a903f3e7f2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7a3a5d839f8a..873d1c9c229e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 22e47f1bc1cb..97827d22d963 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 91f47a9e83ee..53967d619036 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java index ef0fc61b5b6a..8b3225fee193 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ad560c9d8344..4fc6a6447db5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4409856d5a37..da4dc071cfdf 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java index fd25397b6b67..03052a955e3b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java index 275a075f527d..7208cedbd0b5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java index 843e46a1f6cd..96ddb1f49cd8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java index 80d6c5b28514..e7f3b66e4814 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java index 0b3c8b8759b2..0e7e1b097362 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java index 88bc8c3d6492..bc83998fc4d5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java index 66dd429525dd..586658c922c5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java index 13a83893e619..d3d25d6df8cd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java index 9fbd7e3b4338..7ed5fbaae188 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java index 36f36600dafa..155bff326518 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java index 1a4f50f5bcd4..fbcd7127e41b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java index c3e82d4c0282..3c18fc1189fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index fb2ee5373fbf..dc15f99afe84 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java index a2ee29fbfd69..d9a8ab4aa1f2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77868e774104..5794883ff564 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index 05abfd1c26ef..c4bacc257a36 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 768e7277a703..d817048f2a75 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java index 2da2a81ac823..6942169188d2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9681c13f29d4..bd1c5716f064 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java index 95f81f418d28..80ff3f1fc638 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java index 474ed54662f7..ed829bcb62cd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java index 7615d501057e..56e79c554452 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java index eef02c8ade31..d95ce3f15491 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java index 2876e64e9917..32cec75d981d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java index 05c9f0a77856..14fb6641f919 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java index 90b0d2957184..9b54a719dbae 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java index 14ff8ff8a9f4..461f98baa866 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index 51d583a02e55..c137885adb7f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1d95448aeefe..39862919e7c7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java index 1eac86e9ebca..fb431f59071a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java index 6b24df204718..75f3df1d0e17 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index 66695c3e8478..4d939d69a1e7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index fdc9a0960759..c9b40aac5fa1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java index 9aae48b0ceb2..9df36d407748 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index b886d9d3f61e..3b3593e71797 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml index 933cfb2a5ff7..575d665b4717 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 1.6.4 + UTF-8 + 1.6.6 org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index b124ccf522df..521f1fec5ff6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -34,7 +34,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Pet", description = "the Pet API") +@Tag(name = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 9983f217acea..0a9ae121bab6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Store", description = "the Store API") +@Tag(name = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 1ab0b17179ef..ad39e93ce830 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "User", description = "the User API") +@Tag(name = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index 03e4a4ce0b51..ed3c428e34a3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud/pom.xml b/samples/openapi3/client/petstore/spring-cloud/pom.xml index 899cb60d2d7c..dfb83acaba0f 100644 --- a/samples/openapi3/client/petstore/spring-cloud/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 1.6.4 + UTF-8 + 1.6.6 org.springframework.boot spring-boot-starter-parent - 2.6.2 + 2.6.6 + src/main/java @@ -25,7 +27,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2021.0.0 + 2021.0.1 pom import diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 307ea9886436..4d4cd94a0e1f 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Pet", description = "the Pet API") +@Tag(name = "Pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 17e53e217f67..14949a906ab5 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Store", description = "the Store API") +@Tag(name = "Store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 83552da50a15..91cd07390a66 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "User", description = "the User API") +@Tag(name = "User", description = "Operations about user") public interface UserApi { /** diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index 823adb2ae4d8..24264bce8b2d 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/pom.xml b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/pom.xml index 5a357f4fd888..2b2c9751ddc5 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/pom.xml +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index b81ca7656efb..eaece9e1bdfd 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index 0c89c7d14dd0..e394359dab42 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index 4bcf2d7074ea..ee7a0ce59504 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { /** diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java index 03e4a4ce0b51..ed3c428e34a3 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs/pom.xml b/samples/openapi3/client/petstore/spring-stubs/pom.xml index 5a357f4fd888..2b2c9751ddc5 100644 --- a/samples/openapi3/client/petstore/spring-stubs/pom.xml +++ b/samples/openapi3/client/petstore/spring-stubs/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index e78e227b68d1..937f0eb61bdb 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index be4671c1c5db..06cec7ed437e 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index d37aeb35fde5..7bccdd377a84 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index 03e4a4ce0b51..ed3c428e34a3 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/.gitignore b/samples/openapi3/client/petstore/typescript/builds/browser/.gitignore new file mode 100644 index 000000000000..1521c8b7652b --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/.gitignore @@ -0,0 +1 @@ +dist diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator-ignore b/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator-ignore similarity index 100% rename from samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator-ignore rename to samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator-ignore diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/FILES b/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/FILES new file mode 100644 index 000000000000..4137d52d1cdf --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/FILES @@ -0,0 +1,33 @@ +.gitignore +PetApi.md +README.md +StoreApi.md +UserApi.md +apis/PetApi.ts +apis/StoreApi.ts +apis/UserApi.ts +apis/baseapi.ts +apis/exception.ts +auth/auth.ts +configuration.ts +git_push.sh +http/http.ts +http/isomorphic-fetch.ts +index.ts +middleware.ts +models/ApiResponse.ts +models/Category.ts +models/ObjectSerializer.ts +models/Order.ts +models/Pet.ts +models/Tag.ts +models/User.ts +models/all.ts +package.json +rxjsStub.ts +servers.ts +tsconfig.json +types/ObjectParamAPI.ts +types/ObservableAPI.ts +types/PromiseAPI.ts +util.ts diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/VERSION similarity index 100% rename from samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION rename to samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/VERSION diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/PetApi.md b/samples/openapi3/client/petstore/typescript/builds/browser/PetApi.md new file mode 100644 index 000000000000..2aac946907bb --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/PetApi.md @@ -0,0 +1,510 @@ +# petstore.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** +> Pet addPet(pet) + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiAddPetRequest = { + // Pet | Pet object that needs to be added to the store + pet: { + id: 1, + category: { + id: 1, + name: "CbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awLMdeXylwK0lMGUSM4jsrh4dstlnQUN5vVdMLPA", + }, + name: "doggie", + photoUrls: [ + "photoUrls_example", + ], + tags: [ + { + id: 1, + name: "name_example", + }, + ], + status: "available", + }, +}; + +apiInstance.addPet(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | **Pet**| Pet object that needs to be added to the store | + + +### Return type + +**Pet** + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**405** | Invalid input | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deletePet** +> deletePet() + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiDeletePetRequest = { + // number | Pet id to delete + petId: 1, + // string (optional) + apiKey: "api_key_example", +}; + +apiInstance.deletePet(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | [**number**] | Pet id to delete | defaults to undefined + **apiKey** | [**string**] | | (optional) defaults to undefined + + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**400** | Invalid pet value | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **findPetsByStatus** +> Array findPetsByStatus() + +Multiple status values can be provided with comma separated strings + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiFindPetsByStatusRequest = { + // Array<'available' | 'pending' | 'sold'> | Status values that need to be considered for filter + status: [ + "available", + ], +}; + +apiInstance.findPetsByStatus(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **Array<'available' | 'pending' | 'sold'>** | Status values that need to be considered for filter | defaults to undefined + + +### Return type + +**Array** + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid status value | - | + +[[Back to top]](#) [[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** +> Array findPetsByTags() + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiFindPetsByTagsRequest = { + // Array | Tags to filter by + tags: [ + "tags_example", + ], +}; + +apiInstance.findPetsByTags(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | **Array<string>** | Tags to filter by | defaults to undefined + + +### Return type + +**Array** + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid tag value | - | + +[[Back to top]](#) [[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() + +Returns a single pet + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiGetPetByIdRequest = { + // number | ID of pet to return + petId: 1, +}; + +apiInstance.getPetById(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | [**number**] | ID of pet to return | defaults to undefined + + +### Return type + +**Pet** + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid ID supplied | - | +**404** | Pet not found | - | + +[[Back to top]](#) [[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** +> Pet updatePet(pet) + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiUpdatePetRequest = { + // Pet | Pet object that needs to be added to the store + pet: { + id: 1, + category: { + id: 1, + name: "CbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awLMdeXylwK0lMGUSM4jsrh4dstlnQUN5vVdMLPA", + }, + name: "doggie", + photoUrls: [ + "photoUrls_example", + ], + tags: [ + { + id: 1, + name: "name_example", + }, + ], + status: "available", + }, +}; + +apiInstance.updatePet(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | **Pet**| Pet object that needs to be added to the store | + + +### Return type + +**Pet** + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid ID supplied | - | +**404** | Pet not found | - | +**405** | Validation exception | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updatePetWithForm** +> updatePetWithForm() + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiUpdatePetWithFormRequest = { + // number | ID of pet that needs to be updated + petId: 1, + // string | Updated name of the pet (optional) + name: "name_example", + // string | Updated status of the pet (optional) + status: "status_example", +}; + +apiInstance.updatePetWithForm(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | [**number**] | ID of pet that needs to be updated | defaults to undefined + **name** | [**string**] | Updated name of the pet | (optional) defaults to undefined + **status** | [**string**] | Updated status of the pet | (optional) defaults to undefined + + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**405** | Invalid input | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **uploadFile** +> ApiResponse uploadFile() + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.PetApi(configuration); + +let body:petstore.PetApiUploadFileRequest = { + // number | ID of pet to update + petId: 1, + // string | Additional data to pass to server (optional) + additionalMetadata: "additionalMetadata_example", + // HttpFile | file to upload (optional) + file: { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' }, +}; + +apiInstance.uploadFile(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | [**number**] | ID of pet to update | defaults to undefined + **additionalMetadata** | [**string**] | Additional data to pass to server | (optional) defaults to undefined + **file** | [**HttpFile**] | file to upload | (optional) defaults to undefined + + +### Return type + +**ApiResponse** + +### Authorization + +[petstore_auth](README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/README.md b/samples/openapi3/client/petstore/typescript/builds/browser/README.md new file mode 100644 index 000000000000..24e614547f62 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/README.md @@ -0,0 +1,30 @@ +## ts-petstore-client@1.0.0 + +This generator creates TypeScript/JavaScript client that utilizes fetch-api. + +### Building + +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build +``` + +### Publishing + +First build the package then run ```npm publish``` + +### Consuming + +navigate to the folder of your consuming project and run one of the following commands. + +_published:_ + +``` +npm install ts-petstore-client@1.0.0 --save +``` + +_unPublished (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE --save diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md new file mode 100644 index 000000000000..9dfad28caff6 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md @@ -0,0 +1,234 @@ +# petstore.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() + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.StoreApi(configuration); + +let body:petstore.StoreApiDeleteOrderRequest = { + // string | ID of the order that needs to be deleted + orderId: "orderId_example", +}; + +apiInstance.deleteOrder(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | [**string**] | ID of the order that needs to be deleted | defaults to undefined + + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**400** | Invalid ID supplied | - | +**404** | Order not found | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getInventory** +> { [key: string]: number; } getInventory() + +Returns a map of status codes to quantities + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.StoreApi(configuration); + +let body:any = {}; + +apiInstance.getInventory(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**{ [key: string]: number; }** + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getOrderById** +> Order getOrderById() + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.StoreApi(configuration); + +let body:petstore.StoreApiGetOrderByIdRequest = { + // number | ID of pet that needs to be fetched + orderId: 1, +}; + +apiInstance.getOrderById(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | [**number**] | ID of pet that needs to be fetched | defaults to undefined + + +### Return type + +**Order** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid ID supplied | - | +**404** | Order not found | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **placeOrder** +> Order placeOrder(order) + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.StoreApi(configuration); + +let body:petstore.StoreApiPlaceOrderRequest = { + // Order | order placed for purchasing the pet + order: { + id: 1, + petId: 1, + quantity: 1, + shipDate: new Date('1970-01-01T00:00:00.00Z'), + status: "placed", + complete: false, + }, +}; + +apiInstance.placeOrder(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | **Order**| order placed for purchasing the pet | + + +### Return type + +**Order** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid Order | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/UserApi.md b/samples/openapi3/client/petstore/typescript/builds/browser/UserApi.md new file mode 100644 index 000000000000..c18f5d948960 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/UserApi.md @@ -0,0 +1,494 @@ +# petstore.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(user) + +This can only be done by the logged in user. + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiCreateUserRequest = { + // User | Created user object + user: { + id: 1, + username: "username_example", + firstName: "firstName_example", + lastName: "lastName_example", + email: "email_example", + password: "password_example", + phone: "phone_example", + userStatus: 1, + }, +}; + +apiInstance.createUser(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **User**| Created user object | + + +### Return type + +void (empty response body) + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiCreateUsersWithArrayInputRequest = { + // Array | List of user object + user: [ + { + id: 1, + username: "username_example", + firstName: "firstName_example", + lastName: "lastName_example", + email: "email_example", + password: "password_example", + phone: "phone_example", + userStatus: 1, + }, + ], +}; + +apiInstance.createUsersWithArrayInput(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **Array**| List of user object | + + +### Return type + +void (empty response body) + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(user) + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiCreateUsersWithListInputRequest = { + // Array | List of user object + user: [ + { + id: 1, + username: "username_example", + firstName: "firstName_example", + lastName: "lastName_example", + email: "email_example", + password: "password_example", + phone: "phone_example", + userStatus: 1, + }, + ], +}; + +apiInstance.createUsersWithListInput(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **Array**| List of user object | + + +### Return type + +void (empty response body) + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteUser** +> deleteUser() + +This can only be done by the logged in user. + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiDeleteUserRequest = { + // string | The name that needs to be deleted + username: "username_example", +}; + +apiInstance.deleteUser(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | [**string**] | The name that needs to be deleted | defaults to undefined + + +### Return type + +void (empty response body) + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**400** | Invalid username supplied | - | +**404** | User not found | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getUserByName** +> User getUserByName() + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiGetUserByNameRequest = { + // string | The name that needs to be fetched. Use user1 for testing. + username: "username_example", +}; + +apiInstance.getUserByName(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | [**string**] | The name that needs to be fetched. Use user1 for testing. | defaults to undefined + + +### Return type + +**User** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**400** | Invalid username supplied | - | +**404** | User not found | - | + +[[Back to top]](#) [[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() + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiLoginUserRequest = { + // string | The user name for login + username: "CbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awLMdeXylwK0lMGUSM4jsrh4dstlnQUN5vVdMLPA", + // string | The password for login in clear text + password: "password_example", +}; + +apiInstance.loginUser(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | [**string**] | The user name for login | defaults to undefined + **password** | [**string**] | The password for login in clear text | defaults to undefined + + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
    * X-Rate-Limit - calls per hour allowed by the user
    * X-Expires-After - date in UTC when token expires
    | +**400** | Invalid username/password supplied | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **logoutUser** +> logoutUser() + + + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:any = {}; + +apiInstance.logoutUser(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +void (empty response body) + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateUser** +> updateUser(user) + +This can only be done by the logged in user. + +### Example + + +```typescript +import { petstore } from 'ts-petstore-client'; +import * as fs from 'fs'; + +const configuration = petstore.createConfiguration(); +const apiInstance = new petstore.UserApi(configuration); + +let body:petstore.UserApiUpdateUserRequest = { + // string | name that need to be deleted + username: "username_example", + // User | Updated user object + user: { + id: 1, + username: "username_example", + firstName: "firstName_example", + lastName: "lastName_example", + email: "email_example", + password: "password_example", + phone: "phone_example", + userStatus: 1, + }, +}; + +apiInstance.updateUser(body).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **User**| Updated user object | + **username** | [**string**] | name that need to be deleted | defaults to undefined + + +### Return type + +void (empty response body) + +### Authorization + +[api_key](README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**400** | Invalid user supplied | - | +**404** | User not found | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/browser/apis/PetApi.ts new file mode 100644 index 000000000000..273352e4f6d9 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/apis/PetApi.ts @@ -0,0 +1,672 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ApiResponse } from '../models/ApiResponse'; +import { Pet } from '../models/Pet'; + +/** + * no description + */ +export class PetApiRequestFactory extends BaseAPIRequestFactory { + + /** + * + * Add a new pet to the store + * @param pet Pet object that needs to be added to the store + */ + public async addPet(pet: Pet, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'pet' is not null or undefined + if (pet === null || pet === undefined) { + throw new RequiredError("PetApi", "addPet", "pet"); + } + + + // Path Params + const localVarPath = '/pet'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + + "application/xml" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(pet, "Pet", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Deletes a pet + * @param petId Pet id to delete + * @param apiKey + */ + public async deletePet(petId: number, apiKey?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError("PetApi", "deletePet", "petId"); + } + + + + // Path Params + const localVarPath = '/pet/{petId}' + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Header Params + requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Multiple status values can be provided with comma separated strings + * Finds Pets by status + * @param status Status values that need to be considered for filter + */ + public async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'status' is not null or undefined + if (status === null || status === undefined) { + throw new RequiredError("PetApi", "findPetsByStatus", "status"); + } + + + // Path Params + const localVarPath = '/pet/findByStatus'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (status !== undefined) { + requestContext.setQueryParam("status", ObjectSerializer.serialize(status, "Array<'available' | 'pending' | 'sold'>", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * Finds Pets by tags + * @param tags Tags to filter by + */ + public async findPetsByTags(tags: Array, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'tags' is not null or undefined + if (tags === null || tags === undefined) { + throw new RequiredError("PetApi", "findPetsByTags", "tags"); + } + + + // Path Params + const localVarPath = '/pet/findByTags'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (tags !== undefined) { + requestContext.setQueryParam("tags", ObjectSerializer.serialize(tags, "Array", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Returns a single pet + * Find pet by ID + * @param petId ID of pet to return + */ + public async getPetById(petId: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError("PetApi", "getPetById", "petId"); + } + + + // Path Params + const localVarPath = '/pet/{petId}' + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Update an existing pet + * @param pet Pet object that needs to be added to the store + */ + public async updatePet(pet: Pet, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'pet' is not null or undefined + if (pet === null || pet === undefined) { + throw new RequiredError("PetApi", "updatePet", "pet"); + } + + + // Path Params + const localVarPath = '/pet'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + + "application/xml" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(pet, "Pet", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * 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 + * @param status Updated status of the pet + */ + public async updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError("PetApi", "updatePetWithForm", "petId"); + } + + + + + // Path Params + const localVarPath = '/pet/{petId}' + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Form Params + const useForm = canConsumeForm([ + 'application/x-www-form-urlencoded', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (name !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('name', name as any); + } + if (status !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('status', status as any); + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/x-www-form-urlencoded" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * uploads an image + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param file file to upload + */ + public async uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError("PetApi", "uploadFile", "petId"); + } + + + + + // Path Params + const localVarPath = '/pet/{petId}/uploadImage' + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (additionalMetadata !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('additionalMetadata', additionalMetadata as any); + } + if (file !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file', file, file.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["petstore_auth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class PetApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to addPet + * @throws ApiException if the response code was not in [200, 299] + */ + public async addPet(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Pet = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Pet", "" + ) as Pet; + return body; + } + if (isCodeInRange("405", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid input", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Pet = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Pet", "" + ) as Pet; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deletePet + * @throws ApiException if the response code was not in [200, 299] + */ + public async deletePet(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid pet value", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to findPetsByStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async findPetsByStatus(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid status value", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to findPetsByTags + * @throws ApiException if the response code was not in [200, 299] + */ + public async findPetsByTags(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid tag value", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getPetById + * @throws ApiException if the response code was not in [200, 299] + */ + public async getPetById(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Pet = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Pet", "" + ) as Pet; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Pet not found", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Pet = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Pet", "" + ) as Pet; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updatePet + * @throws ApiException if the response code was not in [200, 299] + */ + public async updatePet(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Pet = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Pet", "" + ) as Pet; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Pet not found", undefined, response.headers); + } + if (isCodeInRange("405", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Validation exception", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Pet = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Pet", "" + ) as Pet; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updatePetWithForm + * @throws ApiException if the response code was not in [200, 299] + */ + public async updatePetWithForm(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("405", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid input", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to uploadFile + * @throws ApiException if the response code was not in [200, 299] + */ + public async uploadFile(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ApiResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ApiResponse", "" + ) as ApiResponse; + return body; + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ApiResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ApiResponse", "" + ) as ApiResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts new file mode 100644 index 000000000000..1eead2922748 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts @@ -0,0 +1,278 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { Order } from '../models/Order'; + +/** + * no description + */ +export class StoreApiRequestFactory extends BaseAPIRequestFactory { + + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * Delete purchase order by ID + * @param orderId ID of the order that needs to be deleted + */ + public async deleteOrder(orderId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'orderId' is not null or undefined + if (orderId === null || orderId === undefined) { + throw new RequiredError("StoreApi", "deleteOrder", "orderId"); + } + + + // Path Params + const localVarPath = '/store/order/{orderId}' + .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Returns a map of status codes to quantities + * Returns pet inventories by status + */ + public async getInventory(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/store/inventory'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Find purchase order by ID + * @param orderId ID of pet that needs to be fetched + */ + public async getOrderById(orderId: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'orderId' is not null or undefined + if (orderId === null || orderId === undefined) { + throw new RequiredError("StoreApi", "getOrderById", "orderId"); + } + + + // Path Params + const localVarPath = '/store/order/{orderId}' + .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Place an order for a pet + * @param order order placed for purchasing the pet + */ + public async placeOrder(order: Order, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'order' is not null or undefined + if (order === null || order === undefined) { + throw new RequiredError("StoreApi", "placeOrder", "order"); + } + + + // Path Params + const localVarPath = '/store/order'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(order, "Order", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class StoreApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrder + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrder(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Order not found", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getInventory + * @throws ApiException if the response code was not in [200, 299] + */ + public async getInventory(response: ResponseContext): Promise<{ [key: string]: number; } > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: { [key: string]: number; } = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "{ [key: string]: number; }", "int32" + ) as { [key: string]: number; }; + return body; + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: { [key: string]: number; } = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "{ [key: string]: number; }", "int32" + ) as { [key: string]: number; }; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getOrderById + * @throws ApiException if the response code was not in [200, 299] + */ + public async getOrderById(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Order = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Order", "" + ) as Order; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Order not found", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Order = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Order", "" + ) as Order; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to placeOrder + * @throws ApiException if the response code was not in [200, 299] + */ + public async placeOrder(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Order = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Order", "" + ) as Order; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid Order", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Order = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Order", "" + ) as Order; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/browser/apis/UserApi.ts new file mode 100644 index 000000000000..9784393c7a40 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/apis/UserApi.ts @@ -0,0 +1,569 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { User } from '../models/User'; + +/** + * no description + */ +export class UserApiRequestFactory extends BaseAPIRequestFactory { + + /** + * This can only be done by the logged in user. + * Create user + * @param user Created user object + */ + public async createUser(user: User, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new RequiredError("UserApi", "createUser", "user"); + } + + + // Path Params + const localVarPath = '/user'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(user, "User", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Creates list of users with given input array + * @param user List of user object + */ + public async createUsersWithArrayInput(user: Array, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new RequiredError("UserApi", "createUsersWithArrayInput", "user"); + } + + + // Path Params + const localVarPath = '/user/createWithArray'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(user, "Array", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Creates list of users with given input array + * @param user List of user object + */ + public async createUsersWithListInput(user: Array, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new RequiredError("UserApi", "createUsersWithListInput", "user"); + } + + + // Path Params + const localVarPath = '/user/createWithList'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(user, "Array", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * This can only be done by the logged in user. + * Delete user + * @param username The name that needs to be deleted + */ + public async deleteUser(username: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError("UserApi", "deleteUser", "username"); + } + + + // Path Params + const localVarPath = '/user/{username}' + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Get user by user name + * @param username The name that needs to be fetched. Use user1 for testing. + */ + public async getUserByName(username: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError("UserApi", "getUserByName", "username"); + } + + + // Path Params + const localVarPath = '/user/{username}' + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Logs user into the system + * @param username The user name for login + * @param password The password for login in clear text + */ + public async loginUser(username: string, password: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError("UserApi", "loginUser", "username"); + } + + + // verify required parameter 'password' is not null or undefined + if (password === null || password === undefined) { + throw new RequiredError("UserApi", "loginUser", "password"); + } + + + // Path Params + const localVarPath = '/user/login'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (username !== undefined) { + requestContext.setQueryParam("username", ObjectSerializer.serialize(username, "string", "")); + } + + // Query Params + if (password !== undefined) { + requestContext.setQueryParam("password", ObjectSerializer.serialize(password, "string", "")); + } + + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * + * Logs out current logged in user session + */ + public async logoutUser(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/user/logout'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * This can only be done by the logged in user. + * Updated user + * @param username name that need to be deleted + * @param user Updated user object + */ + public async updateUser(username: string, user: User, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError("UserApi", "updateUser", "username"); + } + + + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new RequiredError("UserApi", "updateUser", "user"); + } + + + // Path Params + const localVarPath = '/user/{username}' + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(user, "User", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["api_key"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class UserApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUser(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "successful operation", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUsersWithArrayInput + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUsersWithArrayInput(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "successful operation", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUsersWithListInput + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUsersWithListInput(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "successful operation", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteUser(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "User not found", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getUserByName + * @throws ApiException if the response code was not in [200, 299] + */ + public async getUserByName(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "User not found", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to loginUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async loginUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: string = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "string", "" + ) as string; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid username/password supplied", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: string = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "string", "" + ) as string; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logoutUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async logoutUser(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "successful operation", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateUser(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("400", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "Invalid user supplied", undefined, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + throw new ApiException(response.httpStatusCode, "User not found", undefined, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/browser/apis/baseapi.ts new file mode 100644 index 000000000000..ce1e2dbc47e1 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/apis/baseapi.ts @@ -0,0 +1,37 @@ +import { Configuration } from '../configuration' + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPIRequestFactory { + + constructor(protected configuration: Configuration) { + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/browser/apis/exception.ts new file mode 100644 index 000000000000..9365d33a8f7e --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/apis/exception.ts @@ -0,0 +1,15 @@ +/** + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * and the returned body object. + * + * Example + * API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] + * => ApiException(404, someErrorMessageObject) + * + */ +export class ApiException extends Error { + public constructor(public code: number, message: string, public body: T, public headers: { [key: string]: string; }) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + + JSON.stringify(headers)) + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/browser/auth/auth.ts new file mode 100644 index 000000000000..7c393656367d --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/auth/auth.ts @@ -0,0 +1,107 @@ +import { RequestContext } from "../http/http"; + +/** + * Interface authentication schemes. + */ +export interface SecurityAuthentication { + /* + * @return returns the name of the security authentication as specified in OAI + */ + getName(): string; + + /** + * Applies the authentication scheme to the request context + * + * @params context the request context which should use this authentication scheme + */ + applySecurityAuthentication(context: RequestContext): void | Promise; +} + +export interface TokenProvider { + getToken(): Promise | string; +} + +/** + * Applies apiKey authentication to the request context. + */ +export class ApiKeyAuthentication implements SecurityAuthentication { + /** + * Configures this api key authentication with the necessary properties + * + * @param apiKey: The api key to be used for every request + */ + public constructor(private apiKey: string) {} + + public getName(): string { + return "api_key"; + } + + public applySecurityAuthentication(context: RequestContext) { + context.setHeaderParam("api_key", this.apiKey); + } +} + +/** + * Applies oauth2 authentication to the request context. + */ +export class PetstoreAuthAuthentication implements SecurityAuthentication { + /** + * Configures OAuth2 with the necessary properties + * + * @param accessToken: The access token to be used for every request + */ + public constructor(private accessToken: string) {} + + public getName(): string { + return "petstore_auth"; + } + + public applySecurityAuthentication(context: RequestContext) { + context.setHeaderParam("Authorization", "Bearer " + this.accessToken); + } +} + + +export type AuthMethods = { + "default"?: SecurityAuthentication, + "api_key"?: SecurityAuthentication, + "petstore_auth"?: SecurityAuthentication +} + +export type ApiKeyConfiguration = string; +export type HttpBasicConfiguration = { "username": string, "password": string }; +export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; +export type OAuth2Configuration = { accessToken: string }; + +export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, + "api_key"?: ApiKeyConfiguration, + "petstore_auth"?: OAuth2Configuration +} + +/** + * Creates the authentication methods from a swagger description. + * + */ +export function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods { + let authMethods: AuthMethods = {} + + if (!config) { + return authMethods; + } + authMethods["default"] = config["default"] + + if (config["api_key"]) { + authMethods["api_key"] = new ApiKeyAuthentication( + config["api_key"] + ); + } + + if (config["petstore_auth"]) { + authMethods["petstore_auth"] = new PetstoreAuthAuthentication( + config["petstore_auth"]["accessToken"] + ); + } + + return authMethods; +} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/configuration.ts b/samples/openapi3/client/petstore/typescript/builds/browser/configuration.ts new file mode 100644 index 000000000000..b78d85972a4a --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/configuration.ts @@ -0,0 +1,66 @@ +import { HttpLibrary } from "./http/http"; +import { Middleware, PromiseMiddleware, PromiseMiddlewareWrapper } from "./middleware"; +import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorphic-fetch"; +import { BaseServerConfiguration, server1 } from "./servers"; +import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth"; + +export interface Configuration { + readonly baseServer: BaseServerConfiguration; + readonly httpApi: HttpLibrary; + readonly middleware: Middleware[]; + readonly authMethods: AuthMethods; +} + + +/** + * Interface with which a configuration object can be configured. + */ +export interface ConfigurationParameters { + /** + * Default server to use + */ + baseServer?: BaseServerConfiguration; + /** + * HTTP library to use e.g. IsomorphicFetch + */ + httpApi?: HttpLibrary; + /** + * The middlewares which will be applied to requests and responses + */ + middleware?: Middleware[]; + /** + * Configures all middlewares using the promise api instead of observables (which Middleware uses) + */ + promiseMiddleware?: PromiseMiddleware[]; + /** + * Configuration for the available authentication methods + */ + authMethods?: AuthMethodsConfiguration +} + +/** + * Configuration factory function + * + * If a property is not included in conf, a default is used: + * - baseServer: server1 + * - httpApi: IsomorphicFetchHttpLibrary + * - middleware: [] + * - promiseMiddleware: [] + * - authMethods: {} + * + * @param conf partial configuration + */ +export function createConfiguration(conf: ConfigurationParameters = {}): Configuration { + const configuration: Configuration = { + baseServer: conf.baseServer !== undefined ? conf.baseServer : server1, + httpApi: conf.httpApi || new DefaultHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + m => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/browser/git_push.sh new file mode 100644 index 000000000000..b253029754ed --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/git_push.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/browser/http/http.ts new file mode 100644 index 000000000000..f8f62d6ce6f6 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/http/http.ts @@ -0,0 +1,234 @@ +import URLParse from "url-parse"; +import { Observable, from } from '../rxjsStub'; + +export * from './isomorphic-fetch'; + +/** + * Represents an HTTP method. + */ +export enum HttpMethod { + GET = "GET", + HEAD = "HEAD", + POST = "POST", + PUT = "PUT", + DELETE = "DELETE", + CONNECT = "CONNECT", + OPTIONS = "OPTIONS", + TRACE = "TRACE", + PATCH = "PATCH" +} + +/** + * Represents an HTTP file which will be transferred from or to a server. + */ +export type HttpFile = Blob & { readonly name: string }; + + +export class HttpException extends Error { + public constructor(msg: string) { + super(msg); + } +} + +/** + * Represents the body of an outgoing HTTP request. + */ +export type RequestBody = undefined | string | FormData | URLSearchParams; + +/** + * Represents an HTTP request context + */ +export class RequestContext { + private headers: { [key: string]: string } = {}; + private body: RequestBody = undefined; + private url: URLParse; + + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + public constructor(url: string, private httpMethod: HttpMethod) { + this.url = new URLParse(url, true); + } + + /* + * Returns the url set in the constructor including the query string + * + */ + public getUrl(): string { + return this.url.toString(); + } + + /** + * Replaces the url set in the constructor with this url. + * + */ + public setUrl(url: string) { + this.url = new URLParse(url, true); + } + + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + public setBody(body: RequestBody) { + this.body = body; + } + + public getHttpMethod(): HttpMethod { + return this.httpMethod; + } + + public getHeaders(): { [key: string]: string } { + return this.headers; + } + + public getBody(): RequestBody { + return this.body; + } + + public setQueryParam(name: string, value: string) { + let queryObj = this.url.query; + queryObj[name] = value; + this.url.set("query", queryObj); + } + + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + public addCookie(name: string, value: string): void { + if (!this.headers["Cookie"]) { + this.headers["Cookie"] = ""; + } + this.headers["Cookie"] += name + "=" + value + "; "; + } + + public setHeaderParam(key: string, value: string): void { + this.headers[key] = value; + } +} + +export interface ResponseBody { + text(): Promise; + binary(): Promise; +} + +/** + * Helper class to generate a `ResponseBody` from binary data + */ +export class SelfDecodingBody implements ResponseBody { + constructor(private dataSource: Promise) {} + + binary(): Promise { + return this.dataSource; + } + + async text(): Promise { + const data: Blob = await this.dataSource; + // @ts-ignore + if (data.text) { + // @ts-ignore + return data.text(); + } + + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.addEventListener("load", () => resolve(reader.result as string)); + reader.addEventListener("error", () => reject(reader.error)); + reader.readAsText(data); + }); + } +} + +export class ResponseContext { + public constructor( + public httpStatusCode: number, + public headers: { [key: string]: string }, + public body: ResponseBody + ) {} + + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + public getParsedHeader(headerName: string): { [parameter: string]: string } { + const result: { [parameter: string]: string } = {}; + if (!this.headers[headerName]) { + return result; + } + + const parameters = this.headers[headerName].split(";"); + for (const parameter of parameters) { + let [key, value] = parameter.split("=", 2); + key = key.toLowerCase().trim(); + if (value === undefined) { + result[""] = key; + } else { + value = value.trim(); + if (value.startsWith('"') && value.endsWith('"')) { + value = value.substring(1, value.length - 1); + } + result[key] = value; + } + } + return result; + } + + public async getBodyAsFile(): Promise { + const data = await this.body.binary(); + const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; + const contentType = this.headers["content-type"] || ""; + try { + return new File([data], fileName, { type: contentType }); + } catch (error) { + /** Fallback for when the File constructor is not available */ + return Object.assign(data, { + name: fileName, + type: contentType + }); + } + } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } +} + +export interface HttpLibrary { + send(request: RequestContext): Observable; +} + +export interface PromiseHttpLibrary { + send(request: RequestContext): Promise; +} + +export function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary { + return { + send(request: RequestContext): Observable { + return from(promiseHttpLibrary.send(request)); + } + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/http/isomorphic-fetch.ts b/samples/openapi3/client/petstore/typescript/builds/browser/http/isomorphic-fetch.ts new file mode 100644 index 000000000000..3af85f3d902c --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/http/isomorphic-fetch.ts @@ -0,0 +1,32 @@ +import {HttpLibrary, RequestContext, ResponseContext} from './http'; +import { from, Observable } from '../rxjsStub'; +import "whatwg-fetch"; + +export class IsomorphicFetchHttpLibrary implements HttpLibrary { + + public send(request: RequestContext): Observable { + let method = request.getHttpMethod().toString(); + let body = request.getBody(); + + const resultPromise = fetch(request.getUrl(), { + method: method, + body: body as any, + headers: request.getHeaders(), + credentials: "same-origin" + }).then((resp: any) => { + const headers: { [name: string]: string } = {}; + resp.headers.forEach((value: string, name: string) => { + headers[name] = value; + }); + + const body = { + text: () => resp.text(), + binary: () => resp.blob() + }; + return new ResponseContext(resp.status, headers, body); + }); + + return from>(resultPromise); + + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/index.ts b/samples/openapi3/client/petstore/typescript/builds/browser/index.ts new file mode 100644 index 000000000000..61ec7fec0cec --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/index.ts @@ -0,0 +1,12 @@ +export * from "./http/http"; +export * from "./auth/auth"; +export * from "./models/all"; +export { createConfiguration } from "./configuration" +export { Configuration } from "./configuration" +export * from "./apis/exception"; +export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; + +export { PromiseMiddleware as Middleware } from './middleware'; +export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI'; + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/browser/middleware.ts new file mode 100644 index 000000000000..524f93f016b2 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/middleware.ts @@ -0,0 +1,66 @@ +import {RequestContext, ResponseContext} from './http/http'; +import { Observable, from } from './rxjsStub'; + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +export interface Middleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Observable; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Observable; +} + +export class PromiseMiddlewareWrapper implements Middleware { + + public constructor(private middleware: PromiseMiddleware) { + + } + + pre(context: RequestContext): Observable { + return from(this.middleware.pre(context)); + } + + post(context: ResponseContext): Observable { + return from(this.middleware.post(context)); + } + +} + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +export interface PromiseMiddleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Promise; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Promise; +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/ApiResponse.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/ApiResponse.ts new file mode 100644 index 000000000000..f4b2d010fb71 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/ApiResponse.ts @@ -0,0 +1,52 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Describes the result of uploading an image resource +*/ +export class ApiResponse { + 'code'?: number; + 'type'?: string; + 'message'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "number", + "format": "int32" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ApiResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/Category.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/Category.ts new file mode 100644 index 000000000000..5d63fc87a998 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/Category.ts @@ -0,0 +1,45 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* A category for a pet +*/ +export class Category { + 'id'?: number; + 'name'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int64" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Category.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/ObjectSerializer.ts new file mode 100644 index 000000000000..2fb0962a2520 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/ObjectSerializer.ts @@ -0,0 +1,238 @@ +export * from './ApiResponse'; +export * from './Category'; +export * from './Order'; +export * from './Pet'; +export * from './Tag'; +export * from './User'; + +import { ApiResponse } from './ApiResponse'; +import { Category } from './Category'; +import { Order , OrderStatusEnum } from './Order'; +import { Pet , PetStatusEnum } from './Pet'; +import { Tag } from './Tag'; +import { User } from './User'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +const supportedMediaTypes: { [mediaType: string]: number } = { + "application/json": Infinity, + "application/octet-stream": 0, + "application/x-www-form-urlencoded": 0 +} + + +let enumsMap: Set = new Set([ + "OrderStatusEnum", + "PetStatusEnum", +]); + +let typeMap: {[index: string]: any} = { + "ApiResponse": ApiResponse, + "Category": Category, + "Order": Order, + "Pet": Pet, + "Tag": Tag, + "User": User, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap.has(expectedType)) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string, format: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index in data) { + let date = data[index]; + transformedData.push(ObjectSerializer.serialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + if (format == "date") { + let month = data.getMonth()+1 + month = month < 10 ? "0" + month.toString() : month.toString() + let day = data.getDate(); + day = day < 10 ? "0" + day.toString() : day.toString(); + + return data.getFullYear() + "-" + month + "-" + day; + } else { + return data.toISOString(); + } + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index in attributeTypes) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); + } + return instance; + } + } + + public static deserialize(data: any, type: string, format: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index in data) { + let date = data[index]; + transformedData.push(ObjectSerializer.deserialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap.has(type)) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index in attributeTypes) { + let attributeType = attributeTypes[index]; + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } + } + return instance; + } + } + + + /** + * Normalize media type + * + * We currently do not handle any media types attributes, i.e. anything + * after a semicolon. All content is assumed to be UTF-8 compatible. + */ + public static normalizeMediaType(mediaType: string | undefined): string | undefined { + if (mediaType === undefined) { + return undefined; + } + return mediaType.split(";")[0].trim().toLowerCase(); + } + + /** + * From a list of possible media types, choose the one we can handle best. + * + * The order of the given media types does not have any impact on the choice + * made. + */ + public static getPreferredMediaType(mediaTypes: Array): string { + /** According to OAS 3 we should default to json */ + if (!mediaTypes) { + return "application/json"; + } + + const normalMediaTypes = mediaTypes.map(this.normalizeMediaType); + let selectedMediaType: string | undefined = undefined; + let selectedRank: number = -Infinity; + for (const mediaType of normalMediaTypes) { + if (supportedMediaTypes[mediaType!] > selectedRank) { + selectedMediaType = mediaType; + selectedRank = supportedMediaTypes[mediaType!]; + } + } + + if (selectedMediaType === undefined) { + throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); + } + + return selectedMediaType!; + } + + /** + * Convert data to a string according the given media type + */ + public static stringify(data: any, mediaType: string): string { + if (mediaType === "application/json") { + return JSON.stringify(data); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); + } + + /** + * Parse data from a string according to the given media type + */ + public static parse(rawData: string, mediaType: string | undefined) { + if (mediaType === undefined) { + throw new Error("Cannot parse content. No Content-Type defined."); + } + + if (mediaType === "application/json") { + return JSON.parse(rawData); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/Order.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/Order.ts new file mode 100644 index 000000000000..a2f84555ff1e --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/Order.ts @@ -0,0 +1,79 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* An order for a pets from the pet store +*/ +export class Order { + 'id'?: number; + 'petId'?: number; + 'quantity'?: number; + 'shipDate'?: Date; + /** + * Order Status + */ + 'status'?: OrderStatusEnum; + 'complete'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int64" + }, + { + "name": "petId", + "baseName": "petId", + "type": "number", + "format": "int64" + }, + { + "name": "quantity", + "baseName": "quantity", + "type": "number", + "format": "int32" + }, + { + "name": "shipDate", + "baseName": "shipDate", + "type": "Date", + "format": "date-time" + }, + { + "name": "status", + "baseName": "status", + "type": "OrderStatusEnum", + "format": "" + }, + { + "name": "complete", + "baseName": "complete", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Order.attributeTypeMap; + } + + public constructor() { + } +} + + +export type OrderStatusEnum = "placed" | "approved" | "delivered" ; + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/Pet.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/Pet.ts new file mode 100644 index 000000000000..6b191ad8d707 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/Pet.ts @@ -0,0 +1,81 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Category } from './Category'; +import { Tag } from './Tag'; +import { HttpFile } from '../http/http'; + +/** +* A pet for sale in the pet store +*/ +export class Pet { + 'id'?: number; + 'category'?: Category; + 'name': string; + 'photoUrls': Array; + 'tags'?: Array; + /** + * pet status in the store + */ + 'status'?: PetStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int64" + }, + { + "name": "category", + "baseName": "category", + "type": "Category", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "photoUrls", + "baseName": "photoUrls", + "type": "Array", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "PetStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Pet.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PetStatusEnum = "available" | "pending" | "sold" ; + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/Tag.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/Tag.ts new file mode 100644 index 000000000000..8c4f6967b9a1 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/Tag.ts @@ -0,0 +1,45 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* A tag for a pet +*/ +export class Tag { + 'id'?: number; + 'name'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int64" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Tag.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/User.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/User.ts new file mode 100644 index 000000000000..68528ad3c9e0 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/User.ts @@ -0,0 +1,90 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* A User who is purchasing from the pet store +*/ +export class User { + 'id'?: number; + 'username'?: string; + 'firstName'?: string; + 'lastName'?: string; + 'email'?: string; + 'password'?: string; + 'phone'?: string; + /** + * User Status + */ + 'userStatus'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int64" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "firstName", + "baseName": "firstName", + "type": "string", + "format": "" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "phone", + "baseName": "phone", + "type": "string", + "format": "" + }, + { + "name": "userStatus", + "baseName": "userStatus", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return User.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/models/all.ts b/samples/openapi3/client/petstore/typescript/builds/browser/models/all.ts new file mode 100644 index 000000000000..2edba7f0bd56 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/models/all.ts @@ -0,0 +1,6 @@ +export * from './ApiResponse' +export * from './Category' +export * from './Order' +export * from './Pet' +export * from './Tag' +export * from './User' diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/package-lock.json b/samples/openapi3/client/petstore/typescript/builds/browser/package-lock.json new file mode 100644 index 000000000000..8bec76149b2f --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/package-lock.json @@ -0,0 +1,113 @@ +{ + "name": "ts-petstore-client", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "ts-petstore-client", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { + "es6-promise": "^4.2.4", + "url-parse": "^1.4.3", + "whatwg-fetch": "^3.0.0" + }, + "devDependencies": { + "@types/url-parse": "1.4.4", + "typescript": "^3.9.3" + } + }, + "node_modules/@types/url-parse": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==", + "dev": true + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz", + "integrity": "sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + } + }, + "dependencies": { + "@types/url-parse": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==", + "dev": true + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true + }, + "url-parse": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz", + "integrity": "sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + } + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/package.json b/samples/openapi3/client/petstore/typescript/builds/browser/package.json new file mode 100644 index 000000000000..67dd0bc4bc06 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/package.json @@ -0,0 +1,33 @@ +{ + "name": "ts-petstore-client", + "version": "1.0.0", + "description": "OpenAPI client for ts-petstore-client", + "author": "OpenAPI-Generator Contributors", + "keywords": [ + "fetch", + "typescript", + "openapi-client", + "openapi-generator" + ], + "license": "Unlicense", + "main": "./dist/index.js", + "type": "module", + "module": "./dist/index.js", + "exports": { + ".": "./dist/index.js" + }, + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepare": "npm run build" + }, + "dependencies": { + "whatwg-fetch": "^3.0.0", + "es6-promise": "^4.2.4", + "url-parse": "^1.4.3" + }, + "devDependencies": { + "typescript": "^4.0", + "@types/url-parse": "1.4.4" + } +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/pom.xml b/samples/openapi3/client/petstore/typescript/builds/browser/pom.xml new file mode 100644 index 000000000000..6f10ad050bb2 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/pom.xml @@ -0,0 +1,60 @@ + + 4.0.0 + org.openapitools + TypeScriptBuildBrowserPetstoreClientSample + pom + 1.0-SNAPSHOT + TS Browser Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + npm-install + pre-integration-test + + exec + + + npm + + install + + + + + npm-build + pre-integration-test + + exec + + + npm + + run + build + + + + + + + + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/rxjsStub.ts b/samples/openapi3/client/petstore/typescript/builds/browser/rxjsStub.ts new file mode 100644 index 000000000000..4c73715a2486 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/rxjsStub.ts @@ -0,0 +1,27 @@ +export class Observable { + constructor(private promise: Promise) {} + + toPromise() { + return this.promise; + } + + pipe(callback: (value: T) => S | Promise): Observable { + return new Observable(this.promise.then(callback)); + } +} + +export function from(promise: Promise) { + return new Observable(promise); +} + +export function of(value: T) { + return new Observable(Promise.resolve(value)); +} + +export function mergeMap(callback: (value: T) => Observable) { + return (value: T) => callback(value).toPromise(); +} + +export function map(callback: any) { + return callback; +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/servers.ts b/samples/openapi3/client/petstore/typescript/builds/browser/servers.ts new file mode 100644 index 000000000000..ce34c8714c0c --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/servers.ts @@ -0,0 +1,53 @@ +import { RequestContext, HttpMethod } from "./http/http"; + +export interface BaseServerConfiguration { + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} + +/** + * + * Represents the configuration of a server including its + * url template and variable configuration based on the url. + * + */ +export class ServerConfiguration implements BaseServerConfiguration { + public constructor(private url: string, private variableConfiguration: T) {} + + /** + * Sets the value of the variables of this server. + * + * @param variableConfiguration a partial variable configuration for the variables contained in the url + */ + public setVariables(variableConfiguration: Partial) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + + public getConfiguration(): T { + return this.variableConfiguration + } + + private getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}","g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl + } + + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext { + return new RequestContext(this.getUrl() + endpoint, httpMethod); + } +} + +export const server1 = new ServerConfiguration<{ }>("http://petstore.swagger.io/v2", { }) + +export const servers = [server1]; diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json new file mode 100644 index 000000000000..2cc80c60873f --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "esModuleInterop": true, + "moduleResolution": "node", + "declaration": true, + + /* Additional Checks */ + "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) + "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + "removeComments": true, + "sourceMap": true, + "outDir": "./dist", + "noLib": false, + "lib": [ "es6", "dom" ], + }, + "exclude": [ + "dist", + "node_modules" + ], + "filesGlob": [ + "./**/*.ts", + ] +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts new file mode 100644 index 000000000000..bad3c9fc25ff --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts @@ -0,0 +1,436 @@ +import { ResponseContext, RequestContext, HttpFile } from '../http/http'; +import * as models from '../models/all'; +import { Configuration} from '../configuration' + +import { ApiResponse } from '../models/ApiResponse'; +import { Category } from '../models/Category'; +import { Order } from '../models/Order'; +import { Pet } from '../models/Pet'; +import { Tag } from '../models/Tag'; +import { User } from '../models/User'; + +import { ObservablePetApi } from "./ObservableAPI"; +import { PetApiRequestFactory, PetApiResponseProcessor} from "../apis/PetApi"; + +export interface PetApiAddPetRequest { + /** + * Pet object that needs to be added to the store + * @type Pet + * @memberof PetApiaddPet + */ + pet: Pet +} + +export interface PetApiDeletePetRequest { + /** + * Pet id to delete + * @type number + * @memberof PetApideletePet + */ + petId: number + /** + * + * @type string + * @memberof PetApideletePet + */ + apiKey?: string +} + +export interface PetApiFindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + * @type Array<'available' | 'pending' | 'sold'> + * @memberof PetApifindPetsByStatus + */ + status: Array<'available' | 'pending' | 'sold'> +} + +export interface PetApiFindPetsByTagsRequest { + /** + * Tags to filter by + * @type Array<string> + * @memberof PetApifindPetsByTags + */ + tags: Array +} + +export interface PetApiGetPetByIdRequest { + /** + * ID of pet to return + * @type number + * @memberof PetApigetPetById + */ + petId: number +} + +export interface PetApiUpdatePetRequest { + /** + * Pet object that needs to be added to the store + * @type Pet + * @memberof PetApiupdatePet + */ + pet: Pet +} + +export interface PetApiUpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + * @type number + * @memberof PetApiupdatePetWithForm + */ + petId: number + /** + * Updated name of the pet + * @type string + * @memberof PetApiupdatePetWithForm + */ + name?: string + /** + * Updated status of the pet + * @type string + * @memberof PetApiupdatePetWithForm + */ + status?: string +} + +export interface PetApiUploadFileRequest { + /** + * ID of pet to update + * @type number + * @memberof PetApiuploadFile + */ + petId: number + /** + * Additional data to pass to server + * @type string + * @memberof PetApiuploadFile + */ + additionalMetadata?: string + /** + * file to upload + * @type HttpFile + * @memberof PetApiuploadFile + */ + file?: HttpFile +} + +export class ObjectPetApi { + private api: ObservablePetApi + + public constructor(configuration: Configuration, requestFactory?: PetApiRequestFactory, responseProcessor?: PetApiResponseProcessor) { + this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); + } + + /** + * + * Add a new pet to the store + * @param param the request object + */ + public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { + return this.api.addPet(param.pet, options).toPromise(); + } + + /** + * + * Deletes a pet + * @param param the request object + */ + public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { + return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); + } + + /** + * Multiple status values can be provided with comma separated strings + * Finds Pets by status + * @param param the request object + */ + public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { + return this.api.findPetsByStatus(param.status, options).toPromise(); + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * Finds Pets by tags + * @param param the request object + */ + public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { + return this.api.findPetsByTags(param.tags, options).toPromise(); + } + + /** + * Returns a single pet + * Find pet by ID + * @param param the request object + */ + public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { + return this.api.getPetById(param.petId, options).toPromise(); + } + + /** + * + * Update an existing pet + * @param param the request object + */ + public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { + return this.api.updatePet(param.pet, options).toPromise(); + } + + /** + * + * Updates a pet in the store with form data + * @param param the request object + */ + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { + return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); + } + + /** + * + * uploads an image + * @param param the request object + */ + public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { + return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); + } + +} + +import { ObservableStoreApi } from "./ObservableAPI"; +import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; + +export interface StoreApiDeleteOrderRequest { + /** + * ID of the order that needs to be deleted + * @type string + * @memberof StoreApideleteOrder + */ + orderId: string +} + +export interface StoreApiGetInventoryRequest { +} + +export interface StoreApiGetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + * @type number + * @memberof StoreApigetOrderById + */ + orderId: number +} + +export interface StoreApiPlaceOrderRequest { + /** + * order placed for purchasing the pet + * @type Order + * @memberof StoreApiplaceOrder + */ + order: Order +} + +export class ObjectStoreApi { + private api: ObservableStoreApi + + public constructor(configuration: Configuration, requestFactory?: StoreApiRequestFactory, responseProcessor?: StoreApiResponseProcessor) { + this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); + } + + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * Delete purchase order by ID + * @param param the request object + */ + public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { + return this.api.deleteOrder(param.orderId, options).toPromise(); + } + + /** + * Returns a map of status codes to quantities + * Returns pet inventories by status + * @param param the request object + */ + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { + return this.api.getInventory( options).toPromise(); + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Find purchase order by ID + * @param param the request object + */ + public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { + return this.api.getOrderById(param.orderId, options).toPromise(); + } + + /** + * + * Place an order for a pet + * @param param the request object + */ + public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { + return this.api.placeOrder(param.order, options).toPromise(); + } + +} + +import { ObservableUserApi } from "./ObservableAPI"; +import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; + +export interface UserApiCreateUserRequest { + /** + * Created user object + * @type User + * @memberof UserApicreateUser + */ + user: User +} + +export interface UserApiCreateUsersWithArrayInputRequest { + /** + * List of user object + * @type Array<User> + * @memberof UserApicreateUsersWithArrayInput + */ + user: Array +} + +export interface UserApiCreateUsersWithListInputRequest { + /** + * List of user object + * @type Array<User> + * @memberof UserApicreateUsersWithListInput + */ + user: Array +} + +export interface UserApiDeleteUserRequest { + /** + * The name that needs to be deleted + * @type string + * @memberof UserApideleteUser + */ + username: string +} + +export interface UserApiGetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + * @type string + * @memberof UserApigetUserByName + */ + username: string +} + +export interface UserApiLoginUserRequest { + /** + * The user name for login + * @type string + * @memberof UserApiloginUser + */ + username: string + /** + * The password for login in clear text + * @type string + * @memberof UserApiloginUser + */ + password: string +} + +export interface UserApiLogoutUserRequest { +} + +export interface UserApiUpdateUserRequest { + /** + * name that need to be deleted + * @type string + * @memberof UserApiupdateUser + */ + username: string + /** + * Updated user object + * @type User + * @memberof UserApiupdateUser + */ + user: User +} + +export class ObjectUserApi { + private api: ObservableUserApi + + public constructor(configuration: Configuration, requestFactory?: UserApiRequestFactory, responseProcessor?: UserApiResponseProcessor) { + this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); + } + + /** + * This can only be done by the logged in user. + * Create user + * @param param the request object + */ + public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { + return this.api.createUser(param.user, options).toPromise(); + } + + /** + * + * Creates list of users with given input array + * @param param the request object + */ + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { + return this.api.createUsersWithArrayInput(param.user, options).toPromise(); + } + + /** + * + * Creates list of users with given input array + * @param param the request object + */ + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { + return this.api.createUsersWithListInput(param.user, options).toPromise(); + } + + /** + * This can only be done by the logged in user. + * Delete user + * @param param the request object + */ + public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { + return this.api.deleteUser(param.username, options).toPromise(); + } + + /** + * + * Get user by user name + * @param param the request object + */ + public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { + return this.api.getUserByName(param.username, options).toPromise(); + } + + /** + * + * Logs user into the system + * @param param the request object + */ + public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { + return this.api.loginUser(param.username, param.password, options).toPromise(); + } + + /** + * + * Logs out current logged in user session + * @param param the request object + */ + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { + return this.api.logoutUser( options).toPromise(); + } + + /** + * This can only be done by the logged in user. + * Updated user + * @param param the request object + */ + public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { + return this.api.updateUser(param.username, param.user, options).toPromise(); + } + +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts new file mode 100644 index 000000000000..74f57a7e1c7c --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts @@ -0,0 +1,550 @@ +import { ResponseContext, RequestContext, HttpFile } from '../http/http'; +import * as models from '../models/all'; +import { Configuration} from '../configuration' +import { Observable, of, from } from '../rxjsStub'; +import {mergeMap, map} from '../rxjsStub'; +import { ApiResponse } from '../models/ApiResponse'; +import { Category } from '../models/Category'; +import { Order } from '../models/Order'; +import { Pet } from '../models/Pet'; +import { Tag } from '../models/Tag'; +import { User } from '../models/User'; + +import { PetApiRequestFactory, PetApiResponseProcessor} from "../apis/PetApi"; +export class ObservablePetApi { + private requestFactory: PetApiRequestFactory; + private responseProcessor: PetApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: PetApiRequestFactory, + responseProcessor?: PetApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new PetApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); + } + + /** + * + * Add a new pet to the store + * @param pet Pet object that needs to be added to the store + */ + public addPet(pet: Pet, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.addPet(pet, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPet(rsp))); + })); + } + + /** + * + * Deletes a pet + * @param petId Pet id to delete + * @param apiKey + */ + public deletePet(petId: number, apiKey?: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deletePet(petId, apiKey, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePet(rsp))); + })); + } + + /** + * Multiple status values can be provided with comma separated strings + * Finds Pets by status + * @param status Status values that need to be considered for filter + */ + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.findPetsByStatus(status, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatus(rsp))); + })); + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * Finds Pets by tags + * @param tags Tags to filter by + */ + public findPetsByTags(tags: Array, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.findPetsByTags(tags, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTags(rsp))); + })); + } + + /** + * Returns a single pet + * Find pet by ID + * @param petId ID of pet to return + */ + public getPetById(petId: number, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getPetById(petId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetById(rsp))); + })); + } + + /** + * + * Update an existing pet + * @param pet Pet object that needs to be added to the store + */ + public updatePet(pet: Pet, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updatePet(pet, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePet(rsp))); + })); + } + + /** + * + * 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 + * @param status Updated status of the pet + */ + public updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updatePetWithForm(petId, name, status, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithForm(rsp))); + })); + } + + /** + * + * uploads an image + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param file file to upload + */ + public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.uploadFile(petId, additionalMetadata, file, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFile(rsp))); + })); + } + +} + +import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; +export class ObservableStoreApi { + private requestFactory: StoreApiRequestFactory; + private responseProcessor: StoreApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: StoreApiRequestFactory, + responseProcessor?: StoreApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new StoreApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); + } + + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * Delete purchase order by ID + * @param orderId ID of the order that needs to be deleted + */ + public deleteOrder(orderId: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteOrder(orderId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrder(rsp))); + })); + } + + /** + * Returns a map of status codes to quantities + * Returns pet inventories by status + */ + public getInventory(_options?: Configuration): Observable<{ [key: string]: number; }> { + const requestContextPromise = this.requestFactory.getInventory(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventory(rsp))); + })); + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Find purchase order by ID + * @param orderId ID of pet that needs to be fetched + */ + public getOrderById(orderId: number, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getOrderById(orderId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderById(rsp))); + })); + } + + /** + * + * Place an order for a pet + * @param order order placed for purchasing the pet + */ + public placeOrder(order: Order, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.placeOrder(order, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrder(rsp))); + })); + } + +} + +import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; +export class ObservableUserApi { + private requestFactory: UserApiRequestFactory; + private responseProcessor: UserApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: UserApiRequestFactory, + responseProcessor?: UserApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new UserApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); + } + + /** + * This can only be done by the logged in user. + * Create user + * @param user Created user object + */ + public createUser(user: User, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUser(user, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); + })); + } + + /** + * + * Creates list of users with given input array + * @param user List of user object + */ + public createUsersWithArrayInput(user: Array, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUsersWithArrayInput(user, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInput(rsp))); + })); + } + + /** + * + * Creates list of users with given input array + * @param user List of user object + */ + public createUsersWithListInput(user: Array, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUsersWithListInput(user, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInput(rsp))); + })); + } + + /** + * This can only be done by the logged in user. + * Delete user + * @param username The name that needs to be deleted + */ + public deleteUser(username: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteUser(username, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); + })); + } + + /** + * + * Get user by user name + * @param username The name that needs to be fetched. Use user1 for testing. + */ + public getUserByName(username: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getUserByName(username, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByName(rsp))); + })); + } + + /** + * + * Logs user into the system + * @param username The user name for login + * @param password The password for login in clear text + */ + public loginUser(username: string, password: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.loginUser(username, password, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUser(rsp))); + })); + } + + /** + * + * Logs out current logged in user session + */ + public logoutUser(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.logoutUser(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUser(rsp))); + })); + } + + /** + * This can only be done by the logged in user. + * Updated user + * @param username name that need to be deleted + * @param user Updated user object + */ + public updateUser(username: string, user: User, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateUser(username, user, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); + })); + } + +} diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts new file mode 100644 index 000000000000..92d57b673df0 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts @@ -0,0 +1,272 @@ +import { ResponseContext, RequestContext, HttpFile } from '../http/http'; +import * as models from '../models/all'; +import { Configuration} from '../configuration' + +import { ApiResponse } from '../models/ApiResponse'; +import { Category } from '../models/Category'; +import { Order } from '../models/Order'; +import { Pet } from '../models/Pet'; +import { Tag } from '../models/Tag'; +import { User } from '../models/User'; +import { ObservablePetApi } from './ObservableAPI'; + +import { PetApiRequestFactory, PetApiResponseProcessor} from "../apis/PetApi"; +export class PromisePetApi { + private api: ObservablePetApi + + public constructor( + configuration: Configuration, + requestFactory?: PetApiRequestFactory, + responseProcessor?: PetApiResponseProcessor + ) { + this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); + } + + /** + * + * Add a new pet to the store + * @param pet Pet object that needs to be added to the store + */ + public addPet(pet: Pet, _options?: Configuration): Promise { + const result = this.api.addPet(pet, _options); + return result.toPromise(); + } + + /** + * + * Deletes a pet + * @param petId Pet id to delete + * @param apiKey + */ + public deletePet(petId: number, apiKey?: string, _options?: Configuration): Promise { + const result = this.api.deletePet(petId, apiKey, _options); + return result.toPromise(); + } + + /** + * Multiple status values can be provided with comma separated strings + * Finds Pets by status + * @param status Status values that need to be considered for filter + */ + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise> { + const result = this.api.findPetsByStatus(status, _options); + return result.toPromise(); + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * Finds Pets by tags + * @param tags Tags to filter by + */ + public findPetsByTags(tags: Array, _options?: Configuration): Promise> { + const result = this.api.findPetsByTags(tags, _options); + return result.toPromise(); + } + + /** + * Returns a single pet + * Find pet by ID + * @param petId ID of pet to return + */ + public getPetById(petId: number, _options?: Configuration): Promise { + const result = this.api.getPetById(petId, _options); + return result.toPromise(); + } + + /** + * + * Update an existing pet + * @param pet Pet object that needs to be added to the store + */ + public updatePet(pet: Pet, _options?: Configuration): Promise { + const result = this.api.updatePet(pet, _options); + return result.toPromise(); + } + + /** + * + * 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 + * @param status Updated status of the pet + */ + public updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Promise { + const result = this.api.updatePetWithForm(petId, name, status, _options); + return result.toPromise(); + } + + /** + * + * uploads an image + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param file file to upload + */ + public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise { + const result = this.api.uploadFile(petId, additionalMetadata, file, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableStoreApi } from './ObservableAPI'; + +import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; +export class PromiseStoreApi { + private api: ObservableStoreApi + + public constructor( + configuration: Configuration, + requestFactory?: StoreApiRequestFactory, + responseProcessor?: StoreApiResponseProcessor + ) { + this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); + } + + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * Delete purchase order by ID + * @param orderId ID of the order that needs to be deleted + */ + public deleteOrder(orderId: string, _options?: Configuration): Promise { + const result = this.api.deleteOrder(orderId, _options); + return result.toPromise(); + } + + /** + * Returns a map of status codes to quantities + * Returns pet inventories by status + */ + public getInventory(_options?: Configuration): Promise<{ [key: string]: number; }> { + const result = this.api.getInventory(_options); + return result.toPromise(); + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Find purchase order by ID + * @param orderId ID of pet that needs to be fetched + */ + public getOrderById(orderId: number, _options?: Configuration): Promise { + const result = this.api.getOrderById(orderId, _options); + return result.toPromise(); + } + + /** + * + * Place an order for a pet + * @param order order placed for purchasing the pet + */ + public placeOrder(order: Order, _options?: Configuration): Promise { + const result = this.api.placeOrder(order, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableUserApi } from './ObservableAPI'; + +import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; +export class PromiseUserApi { + private api: ObservableUserApi + + public constructor( + configuration: Configuration, + requestFactory?: UserApiRequestFactory, + responseProcessor?: UserApiResponseProcessor + ) { + this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); + } + + /** + * This can only be done by the logged in user. + * Create user + * @param user Created user object + */ + public createUser(user: User, _options?: Configuration): Promise { + const result = this.api.createUser(user, _options); + return result.toPromise(); + } + + /** + * + * Creates list of users with given input array + * @param user List of user object + */ + public createUsersWithArrayInput(user: Array, _options?: Configuration): Promise { + const result = this.api.createUsersWithArrayInput(user, _options); + return result.toPromise(); + } + + /** + * + * Creates list of users with given input array + * @param user List of user object + */ + public createUsersWithListInput(user: Array, _options?: Configuration): Promise { + const result = this.api.createUsersWithListInput(user, _options); + return result.toPromise(); + } + + /** + * This can only be done by the logged in user. + * Delete user + * @param username The name that needs to be deleted + */ + public deleteUser(username: string, _options?: Configuration): Promise { + const result = this.api.deleteUser(username, _options); + return result.toPromise(); + } + + /** + * + * Get user by user name + * @param username The name that needs to be fetched. Use user1 for testing. + */ + public getUserByName(username: string, _options?: Configuration): Promise { + const result = this.api.getUserByName(username, _options); + return result.toPromise(); + } + + /** + * + * Logs user into the system + * @param username The user name for login + * @param password The password for login in clear text + */ + public loginUser(username: string, password: string, _options?: Configuration): Promise { + const result = this.api.loginUser(username, password, _options); + return result.toPromise(); + } + + /** + * + * Logs out current logged in user session + */ + public logoutUser(_options?: Configuration): Promise { + const result = this.api.logoutUser(_options); + return result.toPromise(); + } + + /** + * This can only be done by the logged in user. + * Updated user + * @param username name that need to be deleted + * @param user Updated user object + */ + public updateUser(username: string, user: User, _options?: Configuration): Promise { + const result = this.api.updateUser(username, user, _options); + return result.toPromise(); + } + + +} + + + diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/util.ts b/samples/openapi3/client/petstore/typescript/builds/browser/util.ts new file mode 100644 index 000000000000..96ea3dfdc770 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/browser/util.ts @@ -0,0 +1,37 @@ +/** + * Returns if a specific http code is in a given code range + * where the code range is defined as a combination of digits + * and "X" (the letter X) with a length of 3 + * + * @param codeRange string with length 3 consisting of digits and "X" (the letter X) + * @param code the http status code to be checked against the code range + */ +export function isCodeInRange(codeRange: string, code: number): boolean { + // This is how the default value is encoded in OAG + if (codeRange === "0") { + return true; + } + if (codeRange == code.toString()) { + return true; + } else { + const codeString = code.toString(); + if (codeString.length != codeRange.length) { + return false; + } + for (let i = 0; i < codeString.length; i++) { + if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) { + return false; + } + } + return true; + } +} + +/** +* Returns if it can consume form +* +* @param consumes array +*/ +export function canConsumeForm(contentTypes: string[]): boolean { + return contentTypes.indexOf('multipart/form-data') !== -1 +} diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts index 49340932e11b..be50274b9d65 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts @@ -1,4 +1,3 @@ -// typings for btoa are incorrect import { RequestContext } from "../http/http"; /** diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts index f19e206b19ff..579326776771 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts @@ -1,5 +1,3 @@ -// typings of url-parse are incorrect... -// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/index.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/index.ts index 127f89d99723..89069bd11889 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/index.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration" export { Configuration } from "./configuration" export * from "./apis/exception"; export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; export { PromiseDefaultApi as DefaultApi } from './types/PromiseAPI'; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObjectFile.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObjectFile.ts new file mode 100644 index 000000000000..d417167b4b00 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObjectFile.ts @@ -0,0 +1,29 @@ +/** + * Example + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class InlineObjectFile { + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + ]; + + static getAttributeTypeMap() { + return InlineObjectFile.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts index 8c4dc674984c..a05be911708c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts @@ -162,7 +162,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json index 1605e85eb131..cd7e83b1ec45 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json @@ -11,6 +11,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + "type": "commonjs", + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -22,6 +26,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index 6576215ef877..aa173eb68f32 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -3,7 +3,6 @@ "strict": true, /* Basic Options */ "target": "es5", - "module": "commonjs", "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index 3b6e1461d924..7daeb7728cb1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -3,8 +3,6 @@ import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; -// typings of url-parse are incorrect... -// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/index.ts b/samples/openapi3/client/petstore/typescript/builds/default/index.ts index de89bb05e702..61ec7fec0cec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/index.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration" export { Configuration } from "./configuration" export * from "./apis/exception"; export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts index 97cf165c7f33..2fb0962a2520 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts @@ -158,7 +158,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index f26767636102..c2cd8b50bea8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -11,6 +11,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + "type": "commonjs", + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -26,6 +30,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index 3ada5c62a9f2..4a8d5cb2f334 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -3,7 +3,6 @@ "strict": true, /* Basic Options */ "target": "es5", - "module": "commonjs", "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index 87599b496251..1e06ca4f61b4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -5,7 +5,7 @@ import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/htt import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; -import {SecurityAuthentication} from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth.ts'; import { ApiResponse } from '../models/ApiResponse.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index 8dc5b78b09d2..95dfda9bf228 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -5,7 +5,7 @@ import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/htt import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; -import {SecurityAuthentication} from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth.ts'; import { Order } from '../models/Order.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index a286e69e89ca..6b8aedbb87a3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -5,7 +5,7 @@ import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/htt import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; -import {SecurityAuthentication} from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth.ts'; import { User } from '../models/User.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts index 85086dde5fae..2f891fb94ea5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts @@ -1,4 +1,3 @@ -// typings for btoa are incorrect import { RequestContext } from "../http/http.ts"; /** diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/index.ts b/samples/openapi3/client/petstore/typescript/builds/deno/index.ts index c81b0e2421d0..b73e795b265e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/index.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration.ts" export type { Configuration } from "./configuration.ts" export * from "./apis/exception.ts"; export * from "./servers.ts"; +export { RequiredError } from "./apis/baseapi.ts"; export type { PromiseMiddleware as Middleware } from './middleware.ts'; export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts index a9ef124f1b2b..c68836c67605 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts @@ -158,7 +158,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index 3b6e1461d924..7daeb7728cb1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -3,8 +3,6 @@ import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; -// typings of url-parse are incorrect... -// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts index 4d48e5222adf..fd45f69c4278 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration" export { Configuration } from "./configuration" export * from "./apis/exception"; export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts index 97cf165c7f33..2fb0962a2520 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts @@ -158,7 +158,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index 71908ad48cae..872e96f05c47 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -11,6 +11,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + "type": "commonjs", + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -27,6 +31,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index c09901ad10fb..e57dd6fe3b8c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -3,7 +3,6 @@ "strict": true, /* Basic Options */ "target": "es5", - "module": "commonjs", "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts index ed2aa2bfe6db..7c393656367d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts @@ -1,4 +1,3 @@ -// typings for btoa are incorrect import { RequestContext } from "../http/http"; /** diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts index 4b9ef54beeb5..8e4d7d66f282 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts @@ -1,5 +1,3 @@ -// typings of url-parse are incorrect... -// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts index de89bb05e702..61ec7fec0cec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration" export { Configuration } from "./configuration" export * from "./apis/exception"; export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI'; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts index 97cf165c7f33..2fb0962a2520 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts @@ -158,7 +158,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package-lock.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package-lock.json index 31fa281aeedb..eda6ec3587df 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package-lock.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package-lock.json @@ -1,8 +1,86 @@ { "name": "ts-petstore-client", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "ts-petstore-client", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { + "@types/jquery": "^3.3.29", + "es6-promise": "^4.2.4", + "jquery": "^3.4.1", + "url-parse": "^1.4.3" + }, + "devDependencies": { + "@types/url-parse": "1.4.4", + "typescript": "^3.9.3" + } + }, + "node_modules/@types/jquery": { + "version": "3.3.29", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.29.tgz", + "integrity": "sha512-FhJvBninYD36v3k6c+bVk1DSZwh7B5Dpb/Pyk3HKVsiohn0nhbefZZ+3JXbWQhFyt0MxSl2jRDdGQPHeOHFXrQ==", + "dependencies": { + "@types/sizzle": "*" + } + }, + "node_modules/@types/sizzle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" + }, + "node_modules/@types/url-parse": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==", + "dev": true + }, + "node_modules/es6-promise": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", + "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" + }, + "node_modules/jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" + }, + "node_modules/querystringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", + "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "node_modules/typescript": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", + "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/url-parse": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", + "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + } + }, "dependencies": { "@types/jquery": { "version": "3.3.29", @@ -17,6 +95,12 @@ "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" }, + "@types/url-parse": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==", + "dev": true + }, "es6-promise": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index 7c35bc6c6dd3..6c77c71968f9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -11,6 +11,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + "type": "commonjs", + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -23,6 +27,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index 6576215ef877..aa173eb68f32 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -3,7 +3,6 @@ "strict": true, /* Basic Options */ "target": "es5", - "module": "commonjs", "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index 3b6e1461d924..7daeb7728cb1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -3,8 +3,6 @@ import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; -// typings of url-parse are incorrect... -// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts index 49a513cbb84c..14f1249f31a3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts @@ -5,6 +5,7 @@ export { createConfiguration } from "./configuration" export { Configuration } from "./configuration" export * from "./apis/exception"; export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; export { PetApiAddPetRequest, PetApiDeletePetRequest, PetApiFindPetsByStatusRequest, PetApiFindPetsByTagsRequest, PetApiGetPetByIdRequest, PetApiUpdatePetRequest, PetApiUpdatePetWithFormRequest, PetApiUploadFileRequest, ObjectPetApi as PetApi, StoreApiDeleteOrderRequest, StoreApiGetInventoryRequest, StoreApiGetOrderByIdRequest, StoreApiPlaceOrderRequest, ObjectStoreApi as StoreApi, UserApiCreateUserRequest, UserApiCreateUsersWithArrayInputRequest, UserApiCreateUsersWithListInputRequest, UserApiDeleteUserRequest, UserApiGetUserByNameRequest, UserApiLoginUserRequest, UserApiLogoutUserRequest, UserApiUpdateUserRequest, ObjectUserApi as UserApi } from './types/ObjectParamAPI'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts index 97cf165c7f33..2fb0962a2520 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts @@ -158,7 +158,10 @@ export class ObjectSerializer { let attributeTypes = typeMap[type].getAttributeTypeMap(); for (let index in attributeTypes) { let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } } return instance; } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index f26767636102..c2cd8b50bea8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -11,6 +11,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + "type": "commonjs", + "exports": { + ".": "./dist/index.js" + }, "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", @@ -26,6 +30,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^4.0", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index 3ada5c62a9f2..4a8d5cb2f334 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -3,7 +3,6 @@ "strict": true, /* Basic Options */ "target": "es5", - "module": "commonjs", "moduleResolution": "node", "declaration": true, diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/.gitignore b/samples/openapi3/client/petstore/typescript/tests/browser/.gitignore new file mode 100644 index 000000000000..87517b411c9f --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/.gitignore @@ -0,0 +1,5 @@ +node_modules +.DS_Store +dist +bundle +*.local \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json b/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json new file mode 100644 index 000000000000..ab8a207c1e32 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json @@ -0,0 +1,5958 @@ +{ + "name": "typescript-test", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "typescript-test", + "version": "0.0.0", + "dependencies": { + "@esm-bundle/chai": "^4.3.4-fix.0", + "@web/test-runner": "^0.13.26", + "@web/test-runner-puppeteer": "^0.10.5", + "ts-petstore-client": "file:../../builds/browser" + }, + "devDependencies": { + "esbuild": "^0.14.14", + "typescript": "^4.4.4" + } + }, + "../../builds/browser": { + "name": "ts-petstore-client", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { + "es6-promise": "^4.2.4", + "url-parse": "^1.4.3", + "whatwg-fetch": "^3.0.0" + }, + "devDependencies": { + "@types/url-parse": "1.4.4", + "typescript": "^3.9.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dependencies": { + "@babel/highlight": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esm-bundle/chai": { + "version": "4.3.4-fix.0", + "resolved": "https://registry.npmjs.org/@esm-bundle/chai/-/chai-4.3.4-fix.0.tgz", + "integrity": "sha512-26SKdM4uvDWlY8/OOOxSB1AqQWeBosCX3wRYUZO7enTAj03CtVxIiCimYVG2WpULcyV51qapK4qTovwkUr5Mlw==", + "dependencies": { + "@types/chai": "^4.2.12" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", + "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@types/accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/babel__code-frame": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz", + "integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==" + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz", + "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==" + }, + "node_modules/@types/co-body": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/co-body/-/co-body-6.1.0.tgz", + "integrity": "sha512-3e0q2jyDAnx/DSZi0z2H0yoZ2wt5yRDZ+P7ymcMObvq0ufWRT4tsajyO+Q1VwVWiv9PRR4W3YEjEzBjeZlhF+w==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*" + } + }, + "node_modules/@types/command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==" + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-0mPF08jn9zYI0n0Q/Pnz7C4kThdSt+6LD4amsrYDDpgBfrVWa3TcCOxKX1zkGgYniGagRv8heN2cbh+CAn+uuQ==" + }, + "node_modules/@types/convert-source-map": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.2.tgz", + "integrity": "sha512-tHs++ZeXer40kCF2JpE51Hg7t4HPa18B1b1Dzy96S0eCw8QKECNMYMfwa1edK/x8yCN0r4e6ewvLcc5CsVGkdg==" + }, + "node_modules/@types/cookies": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.7.tgz", + "integrity": "sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==", + "dependencies": { + "@types/connect": "*", + "@types/express": "*", + "@types/keygrip": "*", + "@types/node": "*" + } + }, + "node_modules/@types/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA==" + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" + }, + "node_modules/@types/express": { + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", + "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.28", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", + "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/http-assert": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.3.tgz", + "integrity": "sha512-FyAOrDuQmBi8/or3ns4rwPno7/9tJTijVW6aQQjK02+kOQ8zmoNg2XJtAuQhvQcy1ASJq38wirX5//9J1EqoUA==" + }, + "node_modules/@types/http-errors": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz", + "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/keygrip": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz", + "integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==" + }, + "node_modules/@types/koa": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.4.tgz", + "integrity": "sha512-dfHYMfU+z/vKtQB7NUrthdAEiSvnLebvBjwHtfFmpZmB7em2N3WVQdHgnFq+xvyVgxW5jKDmjWfLD3lw4g4uTw==", + "dependencies": { + "@types/accepts": "*", + "@types/content-disposition": "*", + "@types/cookies": "*", + "@types/http-assert": "*", + "@types/http-errors": "*", + "@types/keygrip": "*", + "@types/koa-compose": "*", + "@types/node": "*" + } + }, + "node_modules/@types/koa-compose": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz", + "integrity": "sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ==", + "dependencies": { + "@types/koa": "*" + } + }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" + }, + "node_modules/@types/mocha": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", + "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==" + }, + "node_modules/@types/node": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.13.tgz", + "integrity": "sha512-Y86MAxASe25hNzlDbsviXl8jQHb0RDvKt4c40ZJQ1Don0AAL0STLZSs4N+6gLEO55pedy7r2cLwS+ZDxPm/2Bw==" + }, + "node_modules/@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==" + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" + }, + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.13.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz", + "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yauzl": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz", + "integrity": "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@web/browser-logs": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@web/browser-logs/-/browser-logs-0.2.5.tgz", + "integrity": "sha512-Qxo1wY/L7yILQqg0jjAaueh+tzdORXnZtxQgWH23SsTCunz9iq9FvsZa8Q5XlpjnZ3vLIsFEuEsCMqFeohJnEg==", + "dependencies": { + "errorstacks": "^2.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@web/config-loader": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@web/config-loader/-/config-loader-0.1.3.tgz", + "integrity": "sha512-XVKH79pk4d3EHRhofete8eAnqto1e8mCRAqPV00KLNFzCWSe8sWmLnqKCqkPNARC6nksMaGrATnA5sPDRllMpQ==", + "dependencies": { + "semver": "^7.3.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@web/dev-server": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.29.tgz", + "integrity": "sha512-oDz6vC9JEDZd4ZTno+SV57zCpsQl9v5LOkGuWGyei5gx5xu8NVDvh2IgTugz6DhZnffsSE6Zi0ubs+AhonLnGA==", + "dependencies": { + "@babel/code-frame": "^7.12.11", + "@types/command-line-args": "^5.0.0", + "@web/config-loader": "^0.1.3", + "@web/dev-server-core": "^0.3.17", + "@web/dev-server-rollup": "^0.3.13", + "camelcase": "^6.2.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.1", + "debounce": "^1.2.0", + "deepmerge": "^4.2.2", + "ip": "^1.1.5", + "nanocolors": "^0.2.1", + "open": "^8.0.2", + "portfinder": "^1.0.28" + }, + "bin": { + "wds": "dist/bin.js", + "web-dev-server": "dist/bin.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@web/dev-server-core": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.3.17.tgz", + "integrity": "sha512-vN1dwQ8yDHGiAvCeUo9xFfjo+pFl8TW+pON7k9kfhbegrrB8CKhJDUxmHbZsyQUmjf/iX57/LhuWj1xGhRL8AA==", + "dependencies": { + "@types/koa": "^2.11.6", + "@types/ws": "^7.4.0", + "@web/parse5-utils": "^1.2.0", + "chokidar": "^3.4.3", + "clone": "^2.1.2", + "es-module-lexer": "^0.9.0", + "get-stream": "^6.0.0", + "is-stream": "^2.0.0", + "isbinaryfile": "^4.0.6", + "koa": "^2.13.0", + "koa-etag": "^4.0.0", + "koa-send": "^5.0.1", + "koa-static": "^5.0.0", + "lru-cache": "^6.0.0", + "mime-types": "^2.1.27", + "parse5": "^6.0.1", + "picomatch": "^2.2.2", + "ws": "^7.4.2" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@web/dev-server-core/node_modules/ws": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@web/dev-server-rollup": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.15.tgz", + "integrity": "sha512-hhxvBmNIY19vXeocYB1IBOuhpVpy1L7jbwBarmvC0QJKZsgkxssNTzXJ8iga70c2+H0c/rBz1xUaKuAcov0uOA==", + "dependencies": { + "@rollup/plugin-node-resolve": "^11.0.1", + "@web/dev-server-core": "^0.3.16", + "nanocolors": "^0.2.1", + "parse5": "^6.0.1", + "rollup": "^2.66.1", + "whatwg-url": "^11.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@web/parse5-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@web/parse5-utils/-/parse5-utils-1.3.0.tgz", + "integrity": "sha512-Pgkx3ECc8EgXSlS5EyrgzSOoUbM6P8OKS471HLAyvOBcP1NCBn0to4RN/OaKASGq8qa3j+lPX9H14uA5AHEnQg==", + "dependencies": { + "@types/parse5": "^6.0.1", + "parse5": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@web/test-runner": { + "version": "0.13.26", + "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.13.26.tgz", + "integrity": "sha512-hiujl3GekUWbF/q1QJKDVcVWCB5zIbD05E+km2666SsP5+JCsnciDMm670TSaS4g8xoH/8WIJEyZnDVNQy/X6A==", + "dependencies": { + "@web/browser-logs": "^0.2.2", + "@web/config-loader": "^0.1.3", + "@web/dev-server": "^0.1.24", + "@web/test-runner-chrome": "^0.10.6", + "@web/test-runner-commands": "^0.6.0", + "@web/test-runner-core": "^0.10.22", + "@web/test-runner-mocha": "^0.7.5", + "camelcase": "^6.2.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.1", + "convert-source-map": "^1.7.0", + "diff": "^5.0.0", + "globby": "^11.0.1", + "nanocolors": "^0.2.1", + "portfinder": "^1.0.28", + "source-map": "^0.7.3" + }, + "bin": { + "web-test-runner": "dist/bin.js", + "wtr": "dist/bin.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@web/test-runner-chrome": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/@web/test-runner-chrome/-/test-runner-chrome-0.10.6.tgz", + "integrity": "sha512-oktBTPy1SLxbmwvC5dD3xnFvMnHwGwJ051SKBR1SPSR5wAXqyYQcsYEpcwk/jNrpZPXm1m+jJxk7SuPZflc+SQ==", + "dependencies": { + "@web/test-runner-core": "^0.10.20", + "@web/test-runner-coverage-v8": "^0.4.8", + "chrome-launcher": "^0.15.0", + "puppeteer-core": "^13.1.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@web/test-runner-commands": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@web/test-runner-commands/-/test-runner-commands-0.6.1.tgz", + "integrity": "sha512-P4aQqp0duumeGdGxQ8TwLnplkrXzpLqb47eSEEqBRS//C1H7s6VskaqEng+k0dbk+cSpEa4RuZGY/G5k8aTjTw==", + "dependencies": { + "@web/test-runner-core": "^0.10.20", + "mkdirp": "^1.0.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@web/test-runner-commands/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@web/test-runner-core": { + "version": "0.10.23", + "resolved": "https://registry.npmjs.org/@web/test-runner-core/-/test-runner-core-0.10.23.tgz", + "integrity": "sha512-02qig6GufCMdzGEXD1HT4uy1pxBhHeEZ0Yb4HqenbW2b2/8qPk983dYl1OmUwzFPPMIHcvCjpl9u5LxF464+Ng==", + "dependencies": { + "@babel/code-frame": "^7.12.11", + "@types/babel__code-frame": "^7.0.2", + "@types/co-body": "^6.1.0", + "@types/convert-source-map": "^1.5.1", + "@types/debounce": "^1.2.0", + "@types/istanbul-lib-coverage": "^2.0.3", + "@types/istanbul-reports": "^3.0.0", + "@web/browser-logs": "^0.2.1", + "@web/dev-server-core": "^0.3.16", + "chokidar": "^3.4.3", + "cli-cursor": "^3.1.0", + "co-body": "^6.1.0", + "convert-source-map": "^1.7.0", + "debounce": "^1.2.0", + "dependency-graph": "^0.11.0", + "globby": "^11.0.1", + "ip": "^1.1.5", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "log-update": "^4.0.0", + "nanocolors": "^0.2.1", + "nanoid": "^3.1.25", + "open": "^8.0.2", + "picomatch": "^2.2.2", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@web/test-runner-coverage-v8": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/@web/test-runner-coverage-v8/-/test-runner-coverage-v8-0.4.8.tgz", + "integrity": "sha512-Ib0AscR8Xf9E/V7rf3XOVQTe4vKIbwSTupxV1xGgzj3x4RKUuMUg9FLz9EigZ5iN0mOzZKDllyRS523hbdhDtA==", + "dependencies": { + "@web/test-runner-core": "^0.10.20", + "istanbul-lib-coverage": "^3.0.0", + "picomatch": "^2.2.2", + "v8-to-istanbul": "^8.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@web/test-runner-mocha": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", + "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", + "dependencies": { + "@types/mocha": "^8.2.0", + "@web/test-runner-core": "^0.10.20" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@web/test-runner-puppeteer": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@web/test-runner-puppeteer/-/test-runner-puppeteer-0.10.5.tgz", + "integrity": "sha512-B+dn5wWMUwHZEm68o3f4WJEoqeApDxfKtNbLNbsVp7Mg2JUnoQkKpbOTi5uyU4YjWVIpP+CHkD5jJ9JWikGiNQ==", + "dependencies": { + "@web/test-runner-chrome": "^0.10.6", + "@web/test-runner-core": "^0.10.20", + "puppeteer": "^13.1.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "engines": { + "node": "*" + } + }, + "node_modules/builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", + "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cache-content-type": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", + "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", + "dependencies": { + "mime-types": "^2.1.18", + "ylru": "^1.2.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "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" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/chrome-launcher": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.0.tgz", + "integrity": "sha512-ZQqX5kb9H0+jy1OqLnWampfocrtSZaGl7Ny3F9GRha85o4odbL8x55paUzh51UC7cEmZ5obp3H2Mm70uC2PpRA==", + "dependencies": { + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0" + }, + "bin": { + "print-chrome-path": "bin/print-chrome-path.js" + }, + "engines": { + "node": ">=12.13.0" + } + }, + "node_modules/chrome-launcher/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/co-body": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.1.0.tgz", + "integrity": "sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==", + "dependencies": { + "inflation": "^2.0.0", + "qs": "^6.5.2", + "raw-body": "^2.3.3", + "type-is": "^1.6.16" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-4zqtU1hYsSJzcJBOcNZIbW5Fbk9BkjCp1pZVhQKoRaWL5J7N4XphDLwo8aWwdQpTugxwu+jf9u2ZhkXiqp5Z6A==", + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz", + "integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==", + "dependencies": { + "array-back": "^4.0.1", + "chalk": "^2.4.2", + "table-layout": "^1.0.1", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/cookies": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", + "integrity": "sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==", + "dependencies": { + "depd": "~2.0.0", + "keygrip": "~1.1.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/destroy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.1.0.tgz", + "integrity": "sha512-R5QZrOXxSs0JDUIU/VANvRJlQVMts9C0L76HToQdPdlftfZCE7W6dyH0G4GZ5UW9fRqUOhAoCE2aGekuu+3HjQ==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.948846", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.948846.tgz", + "integrity": "sha512-5fGyt9xmMqUl2VI7+rnUkKCiAQIpLns8sfQtTENy5L70ktbNw0Z3TFJ1JoFNYdx/jffz4YXU45VF75wKZD7sZQ==" + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/errorstacks": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/errorstacks/-/errorstacks-2.3.2.tgz", + "integrity": "sha512-cJp8qf5t2cXmVZJjZVrcU4ODFJeQOcUyjJEtPFtWO+3N6JPM6vCe4Sfv3cwIs/qS7gnUo/fvKX/mDCVQZq+P7A==" + }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + }, + "node_modules/esbuild": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.14.tgz", + "integrity": "sha512-aiK4ddv+uui0k52OqSHu4xxu+SzOim7Rlz4i25pMEiC8rlnGU0HJ9r+ZMfdWL5bzifg+nhnn7x4NSWTeehYblg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "optionalDependencies": { + "esbuild-android-arm64": "0.14.14", + "esbuild-darwin-64": "0.14.14", + "esbuild-darwin-arm64": "0.14.14", + "esbuild-freebsd-64": "0.14.14", + "esbuild-freebsd-arm64": "0.14.14", + "esbuild-linux-32": "0.14.14", + "esbuild-linux-64": "0.14.14", + "esbuild-linux-arm": "0.14.14", + "esbuild-linux-arm64": "0.14.14", + "esbuild-linux-mips64le": "0.14.14", + "esbuild-linux-ppc64le": "0.14.14", + "esbuild-linux-s390x": "0.14.14", + "esbuild-netbsd-64": "0.14.14", + "esbuild-openbsd-64": "0.14.14", + "esbuild-sunos-64": "0.14.14", + "esbuild-windows-32": "0.14.14", + "esbuild-windows-64": "0.14.14", + "esbuild-windows-arm64": "0.14.14" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.14.tgz", + "integrity": "sha512-be/Uw6DdpQiPfula1J4bdmA+wtZ6T3BRCZsDMFB5X+k0Gp8TIh9UvmAcqvKNnbRAafSaXG3jPCeXxDKqnc8hFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/esbuild-darwin-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.14.tgz", + "integrity": "sha512-BEexYmjWafcISK8cT6O98E3TfcLuZL8DKuubry6G54n2+bD4GkoRD6HYUOnCkfl2p7jodA+s4369IjSFSWjtHg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.14.tgz", + "integrity": "sha512-tnBKm41pDOB1GtZ8q/w26gZlLLRzVmP8fdsduYjvM+yFD7E2DLG4KbPAqFMWm4Md9B+DitBglP57FY7AznxbTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.14.tgz", + "integrity": "sha512-Q9Rx6sgArOHalQtNwAaIzJ6dnQ8A+I7f/RsQsdkS3JrdzmnlFo8JEVofTmwVQLoIop7OKUqIVOGP4PoQcwfVMA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.14.tgz", + "integrity": "sha512-TJvq0OpLM7BkTczlyPIphcvnwrQwQDG1HqxzoYePWn26SMUAlt6wrLnEvxdbXAvNvDLVzG83kA+JimjK7aRNBA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-linux-32": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.14.tgz", + "integrity": "sha512-h/CrK9Baimt5VRbu8gqibWV7e1P9l+mkanQgyOgv0Ng3jHT1NVFC9e6rb1zbDdaJVmuhWX5xVliUA5bDDCcJeg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.14.tgz", + "integrity": "sha512-IC+wAiIg/egp5OhQp4W44D9PcBOH1b621iRn1OXmlLzij9a/6BGr9NMIL4CRwz4j2kp3WNZu5sT473tYdynOuQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.14.tgz", + "integrity": "sha512-gxpOaHOPwp7zSmcKYsHrtxabScMqaTzfSQioAMUaB047YiMuDBzqVcKBG8OuESrYkGrL9DDljXr/mQNg7pbdaQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.14.tgz", + "integrity": "sha512-6QVul3RI4M5/VxVIRF/I5F+7BaxzR3DfNGoqEVSCZqUbgzHExPn+LXr5ly1C7af2Kw4AHpo+wDqx8A4ziP9avw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.14.tgz", + "integrity": "sha512-4Jl5/+xoINKbA4cesH3f4R+q0vltAztZ6Jm8YycS8lNhN1pgZJBDxWfI6HUMIAdkKlIpR1PIkA9aXQgZ8sxFAg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.14.tgz", + "integrity": "sha512-BitW37GxeebKxqYNl4SVuSdnIJAzH830Lr6Mkq3pBHXtzQay0vK+IeOR/Ele1GtNVJ+/f8wYM53tcThkv5SC5w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.14.tgz", + "integrity": "sha512-vLj6p76HOZG3wfuTr5MyO3qW5iu8YdhUNxuY+tx846rPo7GcKtYSPMusQjeVEfZlJpSYoR+yrNBBxq+qVF9zrw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.14.tgz", + "integrity": "sha512-fn8looXPQhpVqUyCBWUuPjesH+yGIyfbIQrLKG05rr1Kgm3rZD/gaYrd3Wpmf5syVZx70pKZPvdHp8OTA+y7cQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ] + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.14.tgz", + "integrity": "sha512-HdAnJ399pPff3SKbd8g+P4o5znseni5u5n5rJ6Z7ouqOdgbOwHe2ofZbMow17WMdNtz1IyOZk2Wo9Ve6/lZ4Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/esbuild-sunos-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.14.tgz", + "integrity": "sha512-bmDHa99ulsGnYlh/xjBEfxoGuC8CEG5OWvlgD+pF7bKKiVTbtxqVCvOGEZeoDXB+ja6AvHIbPxrEE32J+m5nqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ] + }, + "node_modules/esbuild-windows-32": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.14.tgz", + "integrity": "sha512-6tVooQcxJCNenPp5GHZBs/RLu31q4B+BuF4MEoRxswT+Eq2JGF0ZWDRQwNKB8QVIo3t6Svc5wNGez+CwKNQjBg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.14.tgz", + "integrity": "sha512-kl3BdPXh0/RD/dad41dtzj2itMUR4C6nQbXQCyYHHo4zoUoeIXhpCrSl7BAW1nv5EFL8stT1V+TQVXGZca5A2A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.14.tgz", + "integrity": "sha512-dCm1wTOm6HIisLanmybvRKvaXZZo4yEVrHh1dY0v582GThXJOzuXGja1HIQgV09RpSHYRL3m4KoUBL00l6SWEg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extract-zip/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" + }, + "node_modules/http-assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", + "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", + "dependencies": { + "deep-equal": "~1.0.1", + "http-errors": "~1.8.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflation": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.0.0.tgz", + "integrity": "sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8=", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isbinaryfile": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", + "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==", + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", + "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/keygrip": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", + "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", + "dependencies": { + "tsscmp": "1.0.6" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/koa": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/koa/-/koa-2.13.4.tgz", + "integrity": "sha512-43zkIKubNbnrULWlHdN5h1g3SEKXOEzoAlRsHOTFpnlDu8JlAOZSMJBLULusuXRequboiwJcj5vtYXKB3k7+2g==", + "dependencies": { + "accepts": "^1.3.5", + "cache-content-type": "^1.0.0", + "content-disposition": "~0.5.2", + "content-type": "^1.0.4", + "cookies": "~0.8.0", + "debug": "^4.3.2", + "delegates": "^1.0.0", + "depd": "^2.0.0", + "destroy": "^1.0.4", + "encodeurl": "^1.0.2", + "escape-html": "^1.0.3", + "fresh": "~0.5.2", + "http-assert": "^1.3.0", + "http-errors": "^1.6.3", + "is-generator-function": "^1.0.7", + "koa-compose": "^4.1.0", + "koa-convert": "^2.0.0", + "on-finished": "^2.3.0", + "only": "~0.0.2", + "parseurl": "^1.3.2", + "statuses": "^1.5.0", + "type-is": "^1.6.16", + "vary": "^1.1.2" + }, + "engines": { + "node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4" + } + }, + "node_modules/koa-compose": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", + "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" + }, + "node_modules/koa-convert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz", + "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==", + "dependencies": { + "co": "^4.6.0", + "koa-compose": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/koa-etag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/koa-etag/-/koa-etag-4.0.0.tgz", + "integrity": "sha512-1cSdezCkBWlyuB9l6c/IFoe1ANCDdPBxkDkRiaIup40xpUub6U/wwRXoKBZw/O5BifX9OlqAjYnDyzM6+l+TAg==", + "dependencies": { + "etag": "^1.8.1" + } + }, + "node_modules/koa-send": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-5.0.1.tgz", + "integrity": "sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==", + "dependencies": { + "debug": "^4.1.1", + "http-errors": "^1.7.3", + "resolve-path": "^1.4.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/koa-static": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-5.0.0.tgz", + "integrity": "sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==", + "dependencies": { + "debug": "^3.1.0", + "koa-send": "^5.0.0" + }, + "engines": { + "node": ">= 7.6.0" + } + }, + "node_modules/koa-static/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/lighthouse-logger": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.3.0.tgz", + "integrity": "sha512-BbqAKApLb9ywUli+0a+PcV04SyJ/N1q/8qgCNe6U97KbPCS1BTksEuHFLYdvc8DltuhfxIUBqDZsC0bBGtl3lA==", + "dependencies": { + "debug": "^2.6.9", + "marky": "^1.2.2" + } + }, + "node_modules/lighthouse-logger/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/lighthouse-logger/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/marky": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.2.tgz", + "integrity": "sha512-k1dB2HNeaNyORco8ulVEhctyEGkKHb2YWAhDsxeFlW2nROIirsctBYzKwwS3Vza+sKTS1zO4Z+n9/+9WbGLIxQ==" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "dependencies": { + "mime-db": "1.51.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nanocolors": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.13.tgz", + "integrity": "sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==" + }, + "node_modules/nanoid": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/only": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", + "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=" + }, + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dependencies": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/portfinder/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/puppeteer": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.1.2.tgz", + "integrity": "sha512-ozVM8Tdg0patMtm/xAr3Uh7rQ28vBpbTHLP+ECmoAxG/s4PKrVLN764H/poLux7Ln77jHThOd8OBJj5mTuA6Iw==", + "hasInstallScript": true, + "dependencies": { + "debug": "4.3.2", + "devtools-protocol": "0.0.948846", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.7", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.2.3" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/puppeteer-core": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.1.2.tgz", + "integrity": "sha512-A60/BJkYKpvoWPN0sq0WbOUYey6Wqpn1vlWCt8Ov7PxGIjyuGX2Wb39LObGjOxh4UN+YxCVE+oYQlkIFSmHJtg==", + "dependencies": { + "debug": "4.3.2", + "devtools-protocol": "0.0.948846", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.7", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.2.3" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/puppeteer-core/node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/puppeteer/node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/raw-body": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", + "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "dependencies": { + "bytes": "3.1.1", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/resolve": { + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.1.tgz", + "integrity": "sha512-lfEImVbnolPuaSZuLQ52cAxPBHeI77sPwCOWRdy12UG/CNa8an7oBHH1R+Fp1/mUqSJi4c8TIP6FOIPSZAUrEQ==", + "dependencies": { + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-path": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", + "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc=", + "dependencies": { + "http-errors": "~1.6.2", + "path-is-absolute": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/resolve-path/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/resolve-path/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/resolve-path/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/resolve-path/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz", + "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/ts-petstore-client": { + "resolved": "../../builds/browser", + "link": true + }, + "node_modules/tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", + "engines": { + "node": ">=0.6.x" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/v8-to-istanbul": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/ws": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/ylru": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz", + "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==", + "engines": { + "node": ">= 4.0.0" + } + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "requires": { + "@babel/highlight": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==" + }, + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@esm-bundle/chai": { + "version": "4.3.4-fix.0", + "resolved": "https://registry.npmjs.org/@esm-bundle/chai/-/chai-4.3.4-fix.0.tgz", + "integrity": "sha512-26SKdM4uvDWlY8/OOOxSB1AqQWeBosCX3wRYUZO7enTAj03CtVxIiCimYVG2WpULcyV51qapK4qTovwkUr5Mlw==", + "requires": { + "@types/chai": "^4.2.12" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", + "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } + }, + "@types/accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/babel__code-frame": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz", + "integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==" + }, + "@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/chai": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz", + "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==" + }, + "@types/co-body": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/co-body/-/co-body-6.1.0.tgz", + "integrity": "sha512-3e0q2jyDAnx/DSZi0z2H0yoZ2wt5yRDZ+P7ymcMObvq0ufWRT4tsajyO+Q1VwVWiv9PRR4W3YEjEzBjeZlhF+w==", + "requires": { + "@types/node": "*", + "@types/qs": "*" + } + }, + "@types/command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==" + }, + "@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-0mPF08jn9zYI0n0Q/Pnz7C4kThdSt+6LD4amsrYDDpgBfrVWa3TcCOxKX1zkGgYniGagRv8heN2cbh+CAn+uuQ==" + }, + "@types/convert-source-map": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.2.tgz", + "integrity": "sha512-tHs++ZeXer40kCF2JpE51Hg7t4HPa18B1b1Dzy96S0eCw8QKECNMYMfwa1edK/x8yCN0r4e6ewvLcc5CsVGkdg==" + }, + "@types/cookies": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.7.tgz", + "integrity": "sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==", + "requires": { + "@types/connect": "*", + "@types/express": "*", + "@types/keygrip": "*", + "@types/node": "*" + } + }, + "@types/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA==" + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" + }, + "@types/express": { + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", + "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.28", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", + "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "@types/http-assert": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.3.tgz", + "integrity": "sha512-FyAOrDuQmBi8/or3ns4rwPno7/9tJTijVW6aQQjK02+kOQ8zmoNg2XJtAuQhvQcy1ASJq38wirX5//9J1EqoUA==" + }, + "@types/http-errors": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz", + "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==" + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/keygrip": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz", + "integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==" + }, + "@types/koa": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.4.tgz", + "integrity": "sha512-dfHYMfU+z/vKtQB7NUrthdAEiSvnLebvBjwHtfFmpZmB7em2N3WVQdHgnFq+xvyVgxW5jKDmjWfLD3lw4g4uTw==", + "requires": { + "@types/accepts": "*", + "@types/content-disposition": "*", + "@types/cookies": "*", + "@types/http-assert": "*", + "@types/http-errors": "*", + "@types/keygrip": "*", + "@types/koa-compose": "*", + "@types/node": "*" + } + }, + "@types/koa-compose": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz", + "integrity": "sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ==", + "requires": { + "@types/koa": "*" + } + }, + "@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" + }, + "@types/mocha": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", + "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==" + }, + "@types/node": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.13.tgz", + "integrity": "sha512-Y86MAxASe25hNzlDbsviXl8jQHb0RDvKt4c40ZJQ1Don0AAL0STLZSs4N+6gLEO55pedy7r2cLwS+ZDxPm/2Bw==" + }, + "@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==" + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "requires": { + "@types/node": "*" + } + }, + "@types/serve-static": { + "version": "1.13.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz", + "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==", + "requires": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "requires": { + "@types/node": "*" + } + }, + "@types/yauzl": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz", + "integrity": "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==", + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@web/browser-logs": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@web/browser-logs/-/browser-logs-0.2.5.tgz", + "integrity": "sha512-Qxo1wY/L7yILQqg0jjAaueh+tzdORXnZtxQgWH23SsTCunz9iq9FvsZa8Q5XlpjnZ3vLIsFEuEsCMqFeohJnEg==", + "requires": { + "errorstacks": "^2.2.0" + } + }, + "@web/config-loader": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@web/config-loader/-/config-loader-0.1.3.tgz", + "integrity": "sha512-XVKH79pk4d3EHRhofete8eAnqto1e8mCRAqPV00KLNFzCWSe8sWmLnqKCqkPNARC6nksMaGrATnA5sPDRllMpQ==", + "requires": { + "semver": "^7.3.4" + } + }, + "@web/dev-server": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.29.tgz", + "integrity": "sha512-oDz6vC9JEDZd4ZTno+SV57zCpsQl9v5LOkGuWGyei5gx5xu8NVDvh2IgTugz6DhZnffsSE6Zi0ubs+AhonLnGA==", + "requires": { + "@babel/code-frame": "^7.12.11", + "@types/command-line-args": "^5.0.0", + "@web/config-loader": "^0.1.3", + "@web/dev-server-core": "^0.3.17", + "@web/dev-server-rollup": "^0.3.13", + "camelcase": "^6.2.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.1", + "debounce": "^1.2.0", + "deepmerge": "^4.2.2", + "ip": "^1.1.5", + "nanocolors": "^0.2.1", + "open": "^8.0.2", + "portfinder": "^1.0.28" + } + }, + "@web/dev-server-core": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.3.17.tgz", + "integrity": "sha512-vN1dwQ8yDHGiAvCeUo9xFfjo+pFl8TW+pON7k9kfhbegrrB8CKhJDUxmHbZsyQUmjf/iX57/LhuWj1xGhRL8AA==", + "requires": { + "@types/koa": "^2.11.6", + "@types/ws": "^7.4.0", + "@web/parse5-utils": "^1.2.0", + "chokidar": "^3.4.3", + "clone": "^2.1.2", + "es-module-lexer": "^0.9.0", + "get-stream": "^6.0.0", + "is-stream": "^2.0.0", + "isbinaryfile": "^4.0.6", + "koa": "^2.13.0", + "koa-etag": "^4.0.0", + "koa-send": "^5.0.1", + "koa-static": "^5.0.0", + "lru-cache": "^6.0.0", + "mime-types": "^2.1.27", + "parse5": "^6.0.1", + "picomatch": "^2.2.2", + "ws": "^7.4.2" + }, + "dependencies": { + "ws": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "requires": {} + } + } + }, + "@web/dev-server-rollup": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.15.tgz", + "integrity": "sha512-hhxvBmNIY19vXeocYB1IBOuhpVpy1L7jbwBarmvC0QJKZsgkxssNTzXJ8iga70c2+H0c/rBz1xUaKuAcov0uOA==", + "requires": { + "@rollup/plugin-node-resolve": "^11.0.1", + "@web/dev-server-core": "^0.3.16", + "nanocolors": "^0.2.1", + "parse5": "^6.0.1", + "rollup": "^2.66.1", + "whatwg-url": "^11.0.0" + } + }, + "@web/parse5-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@web/parse5-utils/-/parse5-utils-1.3.0.tgz", + "integrity": "sha512-Pgkx3ECc8EgXSlS5EyrgzSOoUbM6P8OKS471HLAyvOBcP1NCBn0to4RN/OaKASGq8qa3j+lPX9H14uA5AHEnQg==", + "requires": { + "@types/parse5": "^6.0.1", + "parse5": "^6.0.1" + } + }, + "@web/test-runner": { + "version": "0.13.26", + "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.13.26.tgz", + "integrity": "sha512-hiujl3GekUWbF/q1QJKDVcVWCB5zIbD05E+km2666SsP5+JCsnciDMm670TSaS4g8xoH/8WIJEyZnDVNQy/X6A==", + "requires": { + "@web/browser-logs": "^0.2.2", + "@web/config-loader": "^0.1.3", + "@web/dev-server": "^0.1.24", + "@web/test-runner-chrome": "^0.10.6", + "@web/test-runner-commands": "^0.6.0", + "@web/test-runner-core": "^0.10.22", + "@web/test-runner-mocha": "^0.7.5", + "camelcase": "^6.2.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.1", + "convert-source-map": "^1.7.0", + "diff": "^5.0.0", + "globby": "^11.0.1", + "nanocolors": "^0.2.1", + "portfinder": "^1.0.28", + "source-map": "^0.7.3" + } + }, + "@web/test-runner-chrome": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/@web/test-runner-chrome/-/test-runner-chrome-0.10.6.tgz", + "integrity": "sha512-oktBTPy1SLxbmwvC5dD3xnFvMnHwGwJ051SKBR1SPSR5wAXqyYQcsYEpcwk/jNrpZPXm1m+jJxk7SuPZflc+SQ==", + "requires": { + "@web/test-runner-core": "^0.10.20", + "@web/test-runner-coverage-v8": "^0.4.8", + "chrome-launcher": "^0.15.0", + "puppeteer-core": "^13.1.2" + } + }, + "@web/test-runner-commands": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@web/test-runner-commands/-/test-runner-commands-0.6.1.tgz", + "integrity": "sha512-P4aQqp0duumeGdGxQ8TwLnplkrXzpLqb47eSEEqBRS//C1H7s6VskaqEng+k0dbk+cSpEa4RuZGY/G5k8aTjTw==", + "requires": { + "@web/test-runner-core": "^0.10.20", + "mkdirp": "^1.0.4" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + } + } + }, + "@web/test-runner-core": { + "version": "0.10.23", + "resolved": "https://registry.npmjs.org/@web/test-runner-core/-/test-runner-core-0.10.23.tgz", + "integrity": "sha512-02qig6GufCMdzGEXD1HT4uy1pxBhHeEZ0Yb4HqenbW2b2/8qPk983dYl1OmUwzFPPMIHcvCjpl9u5LxF464+Ng==", + "requires": { + "@babel/code-frame": "^7.12.11", + "@types/babel__code-frame": "^7.0.2", + "@types/co-body": "^6.1.0", + "@types/convert-source-map": "^1.5.1", + "@types/debounce": "^1.2.0", + "@types/istanbul-lib-coverage": "^2.0.3", + "@types/istanbul-reports": "^3.0.0", + "@web/browser-logs": "^0.2.1", + "@web/dev-server-core": "^0.3.16", + "chokidar": "^3.4.3", + "cli-cursor": "^3.1.0", + "co-body": "^6.1.0", + "convert-source-map": "^1.7.0", + "debounce": "^1.2.0", + "dependency-graph": "^0.11.0", + "globby": "^11.0.1", + "ip": "^1.1.5", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "log-update": "^4.0.0", + "nanocolors": "^0.2.1", + "nanoid": "^3.1.25", + "open": "^8.0.2", + "picomatch": "^2.2.2", + "source-map": "^0.7.3" + } + }, + "@web/test-runner-coverage-v8": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/@web/test-runner-coverage-v8/-/test-runner-coverage-v8-0.4.8.tgz", + "integrity": "sha512-Ib0AscR8Xf9E/V7rf3XOVQTe4vKIbwSTupxV1xGgzj3x4RKUuMUg9FLz9EigZ5iN0mOzZKDllyRS523hbdhDtA==", + "requires": { + "@web/test-runner-core": "^0.10.20", + "istanbul-lib-coverage": "^3.0.0", + "picomatch": "^2.2.2", + "v8-to-istanbul": "^8.0.0" + } + }, + "@web/test-runner-mocha": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", + "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", + "requires": { + "@types/mocha": "^8.2.0", + "@web/test-runner-core": "^0.10.20" + } + }, + "@web/test-runner-puppeteer": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@web/test-runner-puppeteer/-/test-runner-puppeteer-0.10.5.tgz", + "integrity": "sha512-B+dn5wWMUwHZEm68o3f4WJEoqeApDxfKtNbLNbsVp7Mg2JUnoQkKpbOTi5uyU4YjWVIpP+CHkD5jJ9JWikGiNQ==", + "requires": { + "@web/test-runner-chrome": "^0.10.6", + "@web/test-runner-core": "^0.10.20", + "puppeteer": "^13.1.2" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==" + }, + "bytes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", + "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==" + }, + "cache-content-type": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", + "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", + "requires": { + "mime-types": "^2.1.18", + "ylru": "^1.2.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "chrome-launcher": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.0.tgz", + "integrity": "sha512-ZQqX5kb9H0+jy1OqLnWampfocrtSZaGl7Ny3F9GRha85o4odbL8x55paUzh51UC7cEmZ5obp3H2Mm70uC2PpRA==", + "requires": { + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + } + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "co-body": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.1.0.tgz", + "integrity": "sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==", + "requires": { + "inflation": "^2.0.0", + "qs": "^6.5.2", + "raw-body": "^2.3.3", + "type-is": "^1.6.16" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-4zqtU1hYsSJzcJBOcNZIbW5Fbk9BkjCp1pZVhQKoRaWL5J7N4XphDLwo8aWwdQpTugxwu+jf9u2ZhkXiqp5Z6A==", + "requires": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + } + }, + "command-line-usage": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz", + "integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==", + "requires": { + "array-back": "^4.0.1", + "chalk": "^2.4.2", + "table-layout": "^1.0.1", + "typical": "^5.2.0" + }, + "dependencies": { + "array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==" + }, + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==" + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookies": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", + "integrity": "sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==", + "requires": { + "depd": "~2.0.0", + "keygrip": "~1.1.0" + } + }, + "debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" + }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "requires": { + "ms": "2.1.2" + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==" + }, + "destroy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.1.0.tgz", + "integrity": "sha512-R5QZrOXxSs0JDUIU/VANvRJlQVMts9C0L76HToQdPdlftfZCE7W6dyH0G4GZ5UW9fRqUOhAoCE2aGekuu+3HjQ==" + }, + "devtools-protocol": { + "version": "0.0.948846", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.948846.tgz", + "integrity": "sha512-5fGyt9xmMqUl2VI7+rnUkKCiAQIpLns8sfQtTENy5L70ktbNw0Z3TFJ1JoFNYdx/jffz4YXU45VF75wKZD7sZQ==" + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "errorstacks": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/errorstacks/-/errorstacks-2.3.2.tgz", + "integrity": "sha512-cJp8qf5t2cXmVZJjZVrcU4ODFJeQOcUyjJEtPFtWO+3N6JPM6vCe4Sfv3cwIs/qS7gnUo/fvKX/mDCVQZq+P7A==" + }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + }, + "esbuild": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.14.tgz", + "integrity": "sha512-aiK4ddv+uui0k52OqSHu4xxu+SzOim7Rlz4i25pMEiC8rlnGU0HJ9r+ZMfdWL5bzifg+nhnn7x4NSWTeehYblg==", + "dev": true, + "requires": { + "esbuild-android-arm64": "0.14.14", + "esbuild-darwin-64": "0.14.14", + "esbuild-darwin-arm64": "0.14.14", + "esbuild-freebsd-64": "0.14.14", + "esbuild-freebsd-arm64": "0.14.14", + "esbuild-linux-32": "0.14.14", + "esbuild-linux-64": "0.14.14", + "esbuild-linux-arm": "0.14.14", + "esbuild-linux-arm64": "0.14.14", + "esbuild-linux-mips64le": "0.14.14", + "esbuild-linux-ppc64le": "0.14.14", + "esbuild-linux-s390x": "0.14.14", + "esbuild-netbsd-64": "0.14.14", + "esbuild-openbsd-64": "0.14.14", + "esbuild-sunos-64": "0.14.14", + "esbuild-windows-32": "0.14.14", + "esbuild-windows-64": "0.14.14", + "esbuild-windows-arm64": "0.14.14" + } + }, + "esbuild-android-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.14.tgz", + "integrity": "sha512-be/Uw6DdpQiPfula1J4bdmA+wtZ6T3BRCZsDMFB5X+k0Gp8TIh9UvmAcqvKNnbRAafSaXG3jPCeXxDKqnc8hFQ==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.14.tgz", + "integrity": "sha512-BEexYmjWafcISK8cT6O98E3TfcLuZL8DKuubry6G54n2+bD4GkoRD6HYUOnCkfl2p7jodA+s4369IjSFSWjtHg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.14.tgz", + "integrity": "sha512-tnBKm41pDOB1GtZ8q/w26gZlLLRzVmP8fdsduYjvM+yFD7E2DLG4KbPAqFMWm4Md9B+DitBglP57FY7AznxbTg==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.14.tgz", + "integrity": "sha512-Q9Rx6sgArOHalQtNwAaIzJ6dnQ8A+I7f/RsQsdkS3JrdzmnlFo8JEVofTmwVQLoIop7OKUqIVOGP4PoQcwfVMA==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.14.tgz", + "integrity": "sha512-TJvq0OpLM7BkTczlyPIphcvnwrQwQDG1HqxzoYePWn26SMUAlt6wrLnEvxdbXAvNvDLVzG83kA+JimjK7aRNBA==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.14.tgz", + "integrity": "sha512-h/CrK9Baimt5VRbu8gqibWV7e1P9l+mkanQgyOgv0Ng3jHT1NVFC9e6rb1zbDdaJVmuhWX5xVliUA5bDDCcJeg==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.14.tgz", + "integrity": "sha512-IC+wAiIg/egp5OhQp4W44D9PcBOH1b621iRn1OXmlLzij9a/6BGr9NMIL4CRwz4j2kp3WNZu5sT473tYdynOuQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.14.tgz", + "integrity": "sha512-gxpOaHOPwp7zSmcKYsHrtxabScMqaTzfSQioAMUaB047YiMuDBzqVcKBG8OuESrYkGrL9DDljXr/mQNg7pbdaQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.14.tgz", + "integrity": "sha512-6QVul3RI4M5/VxVIRF/I5F+7BaxzR3DfNGoqEVSCZqUbgzHExPn+LXr5ly1C7af2Kw4AHpo+wDqx8A4ziP9avw==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.14.tgz", + "integrity": "sha512-4Jl5/+xoINKbA4cesH3f4R+q0vltAztZ6Jm8YycS8lNhN1pgZJBDxWfI6HUMIAdkKlIpR1PIkA9aXQgZ8sxFAg==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.14.tgz", + "integrity": "sha512-BitW37GxeebKxqYNl4SVuSdnIJAzH830Lr6Mkq3pBHXtzQay0vK+IeOR/Ele1GtNVJ+/f8wYM53tcThkv5SC5w==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.14.tgz", + "integrity": "sha512-vLj6p76HOZG3wfuTr5MyO3qW5iu8YdhUNxuY+tx846rPo7GcKtYSPMusQjeVEfZlJpSYoR+yrNBBxq+qVF9zrw==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.14.tgz", + "integrity": "sha512-fn8looXPQhpVqUyCBWUuPjesH+yGIyfbIQrLKG05rr1Kgm3rZD/gaYrd3Wpmf5syVZx70pKZPvdHp8OTA+y7cQ==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.14.tgz", + "integrity": "sha512-HdAnJ399pPff3SKbd8g+P4o5znseni5u5n5rJ6Z7ouqOdgbOwHe2ofZbMow17WMdNtz1IyOZk2Wo9Ve6/lZ4Rg==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.14.tgz", + "integrity": "sha512-bmDHa99ulsGnYlh/xjBEfxoGuC8CEG5OWvlgD+pF7bKKiVTbtxqVCvOGEZeoDXB+ja6AvHIbPxrEE32J+m5nqQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.14.tgz", + "integrity": "sha512-6tVooQcxJCNenPp5GHZBs/RLu31q4B+BuF4MEoRxswT+Eq2JGF0ZWDRQwNKB8QVIo3t6Svc5wNGez+CwKNQjBg==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.14.tgz", + "integrity": "sha512-kl3BdPXh0/RD/dad41dtzj2itMUR4C6nQbXQCyYHHo4zoUoeIXhpCrSl7BAW1nv5EFL8stT1V+TQVXGZca5A2A==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.14.14", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.14.tgz", + "integrity": "sha512-dCm1wTOm6HIisLanmybvRKvaXZZo4yEVrHh1dY0v582GThXJOzuXGja1HIQgV09RpSHYRL3m4KoUBL00l6SWEg==", + "dev": true, + "optional": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + } + } + }, + "fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "requires": { + "reusify": "^1.0.4" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "~1.2.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "requires": { + "array-back": "^3.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" + }, + "http-assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", + "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", + "requires": { + "deep-equal": "~1.0.1", + "http-errors": "~1.8.0" + } + }, + "http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + } + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" + }, + "inflation": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.0.0.tgz", + "integrity": "sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "requires": { + "has": "^1.0.3" + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + }, + "isbinaryfile": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", + "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==" + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==" + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-reports": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", + "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "keygrip": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", + "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", + "requires": { + "tsscmp": "1.0.6" + } + }, + "koa": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/koa/-/koa-2.13.4.tgz", + "integrity": "sha512-43zkIKubNbnrULWlHdN5h1g3SEKXOEzoAlRsHOTFpnlDu8JlAOZSMJBLULusuXRequboiwJcj5vtYXKB3k7+2g==", + "requires": { + "accepts": "^1.3.5", + "cache-content-type": "^1.0.0", + "content-disposition": "~0.5.2", + "content-type": "^1.0.4", + "cookies": "~0.8.0", + "debug": "^4.3.2", + "delegates": "^1.0.0", + "depd": "^2.0.0", + "destroy": "^1.0.4", + "encodeurl": "^1.0.2", + "escape-html": "^1.0.3", + "fresh": "~0.5.2", + "http-assert": "^1.3.0", + "http-errors": "^1.6.3", + "is-generator-function": "^1.0.7", + "koa-compose": "^4.1.0", + "koa-convert": "^2.0.0", + "on-finished": "^2.3.0", + "only": "~0.0.2", + "parseurl": "^1.3.2", + "statuses": "^1.5.0", + "type-is": "^1.6.16", + "vary": "^1.1.2" + } + }, + "koa-compose": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", + "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" + }, + "koa-convert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz", + "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==", + "requires": { + "co": "^4.6.0", + "koa-compose": "^4.1.0" + } + }, + "koa-etag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/koa-etag/-/koa-etag-4.0.0.tgz", + "integrity": "sha512-1cSdezCkBWlyuB9l6c/IFoe1ANCDdPBxkDkRiaIup40xpUub6U/wwRXoKBZw/O5BifX9OlqAjYnDyzM6+l+TAg==", + "requires": { + "etag": "^1.8.1" + } + }, + "koa-send": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-5.0.1.tgz", + "integrity": "sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==", + "requires": { + "debug": "^4.1.1", + "http-errors": "^1.7.3", + "resolve-path": "^1.4.0" + } + }, + "koa-static": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-5.0.0.tgz", + "integrity": "sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==", + "requires": { + "debug": "^3.1.0", + "koa-send": "^5.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "lighthouse-logger": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.3.0.tgz", + "integrity": "sha512-BbqAKApLb9ywUli+0a+PcV04SyJ/N1q/8qgCNe6U97KbPCS1BTksEuHFLYdvc8DltuhfxIUBqDZsC0bBGtl3lA==", + "requires": { + "debug": "^2.6.9", + "marky": "^1.2.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "marky": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.2.tgz", + "integrity": "sha512-k1dB2HNeaNyORco8ulVEhctyEGkKHb2YWAhDsxeFlW2nROIirsctBYzKwwS3Vza+sKTS1zO4Z+n9/+9WbGLIxQ==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==" + }, + "mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "requires": { + "mime-db": "1.51.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nanocolors": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.13.tgz", + "integrity": "sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==" + }, + "nanoid": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "only": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", + "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=" + }, + "open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "puppeteer": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.1.2.tgz", + "integrity": "sha512-ozVM8Tdg0patMtm/xAr3Uh7rQ28vBpbTHLP+ECmoAxG/s4PKrVLN764H/poLux7Ln77jHThOd8OBJj5mTuA6Iw==", + "requires": { + "debug": "4.3.2", + "devtools-protocol": "0.0.948846", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.7", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.2.3" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "puppeteer-core": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.1.2.tgz", + "integrity": "sha512-A60/BJkYKpvoWPN0sq0WbOUYey6Wqpn1vlWCt8Ov7PxGIjyuGX2Wb39LObGjOxh4UN+YxCVE+oYQlkIFSmHJtg==", + "requires": { + "debug": "4.3.2", + "devtools-protocol": "0.0.948846", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.7", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.2.3" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "raw-body": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", + "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "requires": { + "bytes": "3.1.1", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==" + }, + "resolve": { + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.1.tgz", + "integrity": "sha512-lfEImVbnolPuaSZuLQ52cAxPBHeI77sPwCOWRdy12UG/CNa8an7oBHH1R+Fp1/mUqSJi4c8TIP6FOIPSZAUrEQ==", + "requires": { + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-path": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", + "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc=", + "requires": { + "http-errors": "~1.6.2", + "path-is-absolute": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + } + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "rollup": { + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz", + "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==", + "requires": { + "fsevents": "~2.3.2" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "requires": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "dependencies": { + "array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==" + }, + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==" + } + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "requires": { + "punycode": "^2.1.1" + } + }, + "ts-petstore-client": { + "version": "file:../../builds/browser", + "requires": { + "@types/url-parse": "1.4.4", + "es6-promise": "^4.2.4", + "typescript": "^3.9.3", + "url-parse": "^1.4.3", + "whatwg-fetch": "^3.0.0" + } + }, + "tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==" + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true + }, + "typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "v8-to-istanbul": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" + }, + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + }, + "wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "requires": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "dependencies": { + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==" + } + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "requires": {} + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "ylru": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz", + "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==" + } + } +} diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/package.json b/samples/openapi3/client/petstore/typescript/tests/browser/package.json new file mode 100644 index 000000000000..6c8368054307 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/package.json @@ -0,0 +1,20 @@ +{ + "name": "typescript-test", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "build": "tsc --noEmit && esbuild test/*.ts --bundle --outdir=dist", + "test": "web-test-runner" + }, + "dependencies": { + "@esm-bundle/chai": "^4.3.4-fix.0", + "@web/test-runner": "^0.13.26", + "@web/test-runner-puppeteer": "^0.10.5", + "ts-petstore-client": "file:../../builds/browser" + }, + "devDependencies": { + "esbuild": "^0.14.14", + "typescript": "^4.4.4" + } +} diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/pom.xml b/samples/openapi3/client/petstore/typescript/tests/browser/pom.xml new file mode 100644 index 000000000000..01114b494ee2 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/pom.xml @@ -0,0 +1,73 @@ + + 4.0.0 + org.openapitools + TypeScriptBrowserPetstoreClientTests + pom + 1.0-SNAPSHOT + TS Browser Petstore Test Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + npm-install + pre-integration-test + + exec + + + npm + + install + + + + + npm-build + pre-integration-test + + exec + + + npm + + run + build + + + + + npm-test + integration-test + + exec + + + npm + + test + + + + + + + + diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts new file mode 100644 index 000000000000..78d07519cbe4 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts @@ -0,0 +1,131 @@ +import { expect } from '@esm-bundle/chai'; +import { ServerConfiguration, createConfiguration, PetApi, Tag, Pet, ApiException, RequiredError } from 'ts-petstore-client' +import image from "./pet"; + +const configuration = createConfiguration({ + baseServer: new ServerConfiguration("http://localhost/v2", {}), +}) +const petApi = new PetApi(configuration) + +function createTag() { + const tag = new Tag(); + tag.name = "tag1" + tag.id = Math.floor(Math.random() * 100000) + return tag as Required; +} +const tag = createTag(); + +function createPet() { + const pet = new Pet() + pet.id = Math.floor(Math.random() * 100000) + pet.name = "PetName" + pet.photoUrls = [] + pet.status = 'available' + pet.tags = [ tag ] + return pet as Required; +} +let pet: Required; + +describe("PetApi", () => { + beforeEach(async () => { + pet = createPet(); + await petApi.addPet(pet); + }); + + it("addPet", async () => { + const createdPet = await petApi.getPetById(pet.id) + expect(createdPet).to.deep.equal(pet); + }) + + it("deletePet", async () => { + await petApi.deletePet(pet.id); + let deletedPet; + try { + deletedPet = await petApi.getPetById(pet.id) + } catch (error) { + const err = error as ApiException; + expect(err.code).to.equal(404); + expect(err.message).to.include("Pet not found"); + return; + } + throw new Error("Pet with id " + deletedPet.id + " was not deleted!"); + }) + + it("deleteNonExistantPet", async () => { + // Use an id that is too big for the server to handle. + const nonExistantId = 100000000000000000000000000.0; + try { + await petApi.deletePet(nonExistantId) + } catch (error) { + const err = error as ApiException; + // The 404 response for this endpoint is officially documented, but + // that documentation is not used for generating the client code. + // That means we get an error about the response being undefined + // here. + expect(err.code).to.equal(404); + expect(err.message).to.include("Unknown API Status Code"); + expect(err.body).to.include("404"); + expect(err.body).to.include("message"); + return; + } + throw new Error("Deleted non-existant pet with id " + nonExistantId + "!"); + }) + + it("failRunTimeRequiredParameterCheck", async () => { + try { + await petApi.deletePet(null as unknown as number) + } catch (error) { + const err = error as RequiredError; + expect(err.api).to.equal("PetApi"); + expect(err.message).to.include("PetApi"); + expect(err.method).to.equal("deletePet"); + expect(err.message).to.include("deletePet"); + expect(err.field).to.equal("petId"); + expect(err.message).to.include("petId"); + return; + } + throw new Error("Accepted missing parameter!"); + }) + + it("findPetsByStatus", async () => { + const pets = await petApi.findPetsByStatus(["available"]); + expect(pets.length).to.be.at.least(1); + }) + + it("findPetsByTag", async () => { + const pets = await petApi.findPetsByTags([tag.name]) + expect(pets.length).to.be.at.least(1); + }) + + it("getPetById", async () => { + const returnedPet = await petApi.getPetById(pet.id); + expect(returnedPet).to.deep.equal(pet); + }) + + it("updatePet", async () => { + pet.name = "updated name"; + await petApi.updatePet(pet); + await petApi.updatePet(pet); + + const returnedPet = await petApi.getPetById(pet.id); + expect(returnedPet.id).to.equal(pet.id) + expect(returnedPet.name).to.equal(pet.name); + }) + + it("updatePetWithForm", async () => { + const updatedName = "updated name"; + await petApi.updatePetWithForm(pet.id, updatedName); + + const returnedPet = await petApi.getPetById(pet.id) + expect(returnedPet.id).to.equal(pet.id) + expect(returnedPet.name).to.equal(updatedName); + }) + + it("uploadFile", async () => { + const imageResponse = await fetch(image); + const imageFile = new File([await imageResponse.blob()], "pet.png", { type: "image/png" }); + const response = await petApi.uploadFile(pet.id, "Metadata", imageFile); + expect(response.code).to.be.gte(200).and.lt(300); + expect(response.message).to.contain("pet.png"); + }) +}) diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/test/isomorphic-fetch.test.ts b/samples/openapi3/client/petstore/typescript/tests/browser/test/isomorphic-fetch.test.ts new file mode 100644 index 000000000000..0a4f2cd2107f --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/test/isomorphic-fetch.test.ts @@ -0,0 +1,48 @@ +import { expect } from '@esm-bundle/chai'; +import * as petstore from "ts-petstore-client"; + +let libs: { [key: string]: petstore.HttpLibrary } = { + "isomorphic-fetch": new petstore.IsomorphicFetchHttpLibrary() +} + +for (let libName in libs) { + let lib = libs[libName]; + + describe("Isomorphic Fetch", () => { + it("GET-Request", (done) => { + let requestContext = new petstore.RequestContext("http://httpbin.org/get", petstore.HttpMethod.GET); + requestContext.setHeaderParam("X-Test-Token", "Test-Token"); + lib.send(requestContext).toPromise().then((resp: petstore.ResponseContext) => { + expect(resp.httpStatusCode, "Expected status code to be 200").to.eq(200); + return resp.body.text(); + }).then((bodyText: string) => { + let body = JSON.parse(bodyText); + expect(body["headers"]).to.exist; + expect(body["headers"]["X-Test-Token"]).to.equal("Test-Token"); + done(); + }).catch(done) + }); + + it("POST-Request", (done) => { + let requestContext = new petstore.RequestContext("http://httpbin.org/post", petstore.HttpMethod.POST); + requestContext.setHeaderParam("X-Test-Token", "Test-Token"); + let formData: FormData = new FormData() + formData.append("test", "test2"); + formData.append("testFile", new Blob(["abc"]), "fileName.json"); + + requestContext.setBody(formData); + lib.send(requestContext).toPromise().then( + (resp: petstore.ResponseContext) => { + expect(resp.httpStatusCode, "Expected status code to be 200").to.eq(200); + return resp.body.text(); + }).then((bodyText: string) => { + let body = JSON.parse(bodyText); + expect(body["headers"]).to.exist; + expect(body["headers"]["X-Test-Token"]).to.equal("Test-Token"); + expect(body["files"]["testFile"]).to.equal("abc"); + expect(body["form"]["test"]).to.equal("test2"); + done(); + }).catch(done) + }); + }) +} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/test/pet.ts b/samples/openapi3/client/petstore/typescript/tests/browser/test/pet.ts new file mode 100644 index 000000000000..38ae75322092 --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/test/pet.ts @@ -0,0 +1,2 @@ +const pet = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4wMDFScQ1I7VKAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAD2ElEQVRIx51W2W7jMAzUQR2WHbfo//9ikcSxLev0PkyjTRtv0a4ehCCwZsjhkBLf9519u0opKaUQQgjBe48ftVYhBBF1XWeM6bpOa621llJyzh+P0/fotdZaa845hLCu6+12W9d12zYQKKVSSn3fCyE451JK/PgFwb7vOecYo/d+nudpmkCQcyYirXXOed93IpJSYuecP3L8IoNlWZZlOZ/Py7IgA2vt6+srEVlrlVJa62cE+j58ZADd13Wdpgkq5ZyVUqUUKaXW2jlnrS2llFK+qPTTDKDSsiy32817n3OWUoImhJBSAvpBBvu+fynLYwa11mYhJLGuKxCllFLKbdu2bYsxllLw/VeClBIRCSGeoYEeY8w5e++3bQshxBhRZFQ151xKqbWC4AsOY4xKKZzzfd+llI+yAD2l5L2Hc+Z5XtcVTKUUIjLG5PtCPz13FW3bppRSSjHGoBXUxDGALsvivUeXxRhjjJxzRJ1zbrjP+jDGaJ7nrusQMhLc9x2xQ250wPV6nec5hLBtW0rpMZSUErCaBp8IYOqcszGGiGDNVtLr9Xo+n+d5RvjruqaUEDURPeIKIY4zeH9/H8fROZdzhoVLKc2Ul8sFzXW5XODOnDMs1HSHtrXWf2aw73spJYSglIKyqO3tdpvneZ5nyAIXtTgwGFA/WLbW+ux4ul6vCKrrOqUUJFqWBbMBHLA/HCmEKKUopYgIO8Yq9i+DiDFG0zShlWKMyIAx5r2PMU7TBBrM52ZlBK61tveltVZK8fv6ROC9R49s22athZdQ5Bgjqoq0MJ+hhrW273vnnHMOqYP1oNEw3EspWmv4r5UBEwazBOrlnDnnxhhr7TiOwzC8vLwMwzAMg7X2+TJgjFEIQQiB2YDziLc1ERGhevAlERGRc+50Or29vYFAa42SHBAAt9ZK9DE2EEi7FLGjUXFnWWudc+M4juMIAuec1vq5AIwxanWDShAROnDOYXakBaGMMbiEgT6OIy7kwwIwxj7maJOPc951HQzThge6FJXUWvf35Zzr+x6USO6AANpJKfFR3/cIH2lBety66Cxrbdd1cKcxxjl3eNf/JYAsaBljDO6/Btc4ELsQAs8TRI1Th/31qQb4DscQoFLKWgtQxhj0xQ2Dxw+OtAj+hc4YI+ccnjRoTuy4xPEb0O3Z03Dx56HunwiMMShpm1zNJ/gNUHwj7usn0H9rgCbAfYCQrbV4FiJegMJObf/hotPphI5FvMBljMFUTf12of52Udd1mBDoI7Q72rJJ8X/QHwR932PQwzNIosnyvUN+RDAMAwYypIBzDp+x/7f+ANNHbm3PivMgAAAAAElFTkSuQmCC"; +export default pet; \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/tsconfig.json b/samples/openapi3/client/petstore/typescript/tests/browser/tsconfig.json new file mode 100644 index 000000000000..e591f4eb1bec --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es6", + "useDefineForClassFields": true, + "module": "es6", + "lib": ["es6", "DOM"], + "moduleResolution": "Node", + "strict": true, + "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "outDir": "./dist" + }, + "include": ["./test"] +} diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/web-test-runner.config.js b/samples/openapi3/client/petstore/typescript/tests/browser/web-test-runner.config.js new file mode 100644 index 000000000000..db096833265c --- /dev/null +++ b/samples/openapi3/client/petstore/typescript/tests/browser/web-test-runner.config.js @@ -0,0 +1,10 @@ +import { puppeteerLauncher } from '@web/test-runner-puppeteer'; + +export default { + files: "./dist/*.test.js", + nodeResolve: true, + manual: false, + browsers: [ + puppeteerLauncher(), + ], +}; diff --git a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts index cbb1042a6224..4d52bcc20f96 100644 --- a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts @@ -20,7 +20,6 @@ describe("PetApi", () => { pet.photoUrls = [] pet.status = 'available' pet.tags = [ tag ] - pet.category = undefined await petApi.addPet(pet); }); diff --git a/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts b/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts index f29199404e3f..a9575fa8dbbb 100644 --- a/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts @@ -19,7 +19,6 @@ pet.name = "PetName"; pet.photoUrls = []; pet.status = "available"; pet.tags = [tag]; -pet.category = undefined; Deno.test({ name: "PetApi addPet getPetById", diff --git a/samples/openapi3/client/petstore/typescript/tests/jquery/test/api/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/jquery/test/api/PetApi.test.ts index 3bb4a6e8b337..ef3882f9e573 100644 --- a/samples/openapi3/client/petstore/typescript/tests/jquery/test/api/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/jquery/test/api/PetApi.test.ts @@ -18,7 +18,6 @@ pet.name = "PetName" pet.photoUrls = [] pet.status = 'available' pet.tags = [ tag ] -pet.category = undefined QUnit.module("PetApi") diff --git a/samples/openapi3/client/petstore/typescript/tests/object_params/test/api/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/object_params/test/api/PetApi.test.ts index 578fab4b0863..302304492bbc 100644 --- a/samples/openapi3/client/petstore/typescript/tests/object_params/test/api/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/object_params/test/api/PetApi.test.ts @@ -17,7 +17,6 @@ pet.name = "PetName" pet.photoUrls = [] pet.status = 'available' pet.tags = [ tag ] -pet.category = undefined describe("PetApi", () =>{ it("addPet", (done) => { diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator-ignore b/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator-ignore similarity index 100% rename from samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator-ignore rename to samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator-ignore diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/FILES b/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/FILES new file mode 100644 index 000000000000..2b0612d53d7f --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/FILES @@ -0,0 +1,27 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenApiGeneratorApplication.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/BarApi.java +src/main/java/org/openapitools/api/BarApiController.java +src/main/java/org/openapitools/api/FooApi.java +src/main/java/org/openapitools/api/FooApiController.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/Addressable.java +src/main/java/org/openapitools/model/Bar.java +src/main/java/org/openapitools/model/BarCreate.java +src/main/java/org/openapitools/model/BarRef.java +src/main/java/org/openapitools/model/BarRefOrValue.java +src/main/java/org/openapitools/model/Entity.java +src/main/java/org/openapitools/model/EntityRef.java +src/main/java/org/openapitools/model/Extensible.java +src/main/java/org/openapitools/model/Foo.java +src/main/java/org/openapitools/model/FooRef.java +src/main/java/org/openapitools/model/FooRefOrValue.java +src/main/java/org/openapitools/model/Pasta.java +src/main/java/org/openapitools/model/Pizza.java +src/main/java/org/openapitools/model/PizzaSpeziale.java +src/main/resources/application.properties +src/main/resources/openapi.yaml +src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION b/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/VERSION similarity index 100% rename from samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION rename to samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/VERSION diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/README.md b/samples/openapi3/server/petstore/spring-boot-oneof/README.md new file mode 100644 index 000000000000..5cd22b6081a2 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated server + +Spring Boot Server + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + + +The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org). +Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes. +The specification is available to download using the following url: +http://localhost:8080/v3/api-docs/ + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:8080/swagger-ui.html + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/pom.xml b/samples/openapi3/server/petstore/spring-boot-oneof/pom.xml new file mode 100644 index 000000000000..f7a94804ecbf --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + org.openapitools.openapi3 + springboot-oneof + jar + springboot-oneof + 0.0.1-SNAPSHOT + + 1.8 + ${java.version} + ${java.version} + UTF-8 + 1.6.6 + 4.8.1 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.6 + + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/OpenApiGeneratorApplication.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/OpenApiGeneratorApplication.java new file mode 100644 index 000000000000..f62fd6d91797 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/OpenApiGeneratorApplication.java @@ -0,0 +1,23 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenApiGeneratorApplication { + + public static void main(String[] args) { + SpringApplication.run(OpenApiGeneratorApplication.class, args); + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return this; + } +} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java new file mode 100644 index 000000000000..ee9f60cce496 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java @@ -0,0 +1,80 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Bar; +import org.openapitools.model.BarCreate; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "bar", description = "the bar API") +public interface BarApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /bar : Create a Bar + * + * @param barCreate (required) + * @return Bar created (status code 200) + */ + @Operation( + operationId = "createBar", + summary = "Create a Bar", + tags = { "Bar" }, + responses = { + @ApiResponse(responseCode = "200", description = "Bar created", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Bar.class)) + }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/bar", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity createBar( + @Parameter(name = "BarCreate", description = "", required = true) @Valid @RequestBody BarCreate barCreate + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"barPropA\" : \"barPropA\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApiController.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApiController.java new file mode 100644 index 000000000000..7d23950718d3 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApiController.java @@ -0,0 +1,47 @@ +package org.openapitools.api; + +import org.openapitools.model.Bar; +import org.openapitools.model.BarCreate; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.context.request.NativeWebRequest; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.byRefOrValue.base-path:}") +public class BarApiController implements BarApi { + + private final NativeWebRequest request; + + @Autowired + public BarApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java new file mode 100644 index 000000000000..12fb31195d73 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java @@ -0,0 +1,117 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Foo; +import org.openapitools.model.FooRefOrValue; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "foo", description = "the foo API") +public interface FooApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /foo : Create a Foo + * + * @param foo The Foo to be created (optional) + * @return Error (status code 201) + */ + @Operation( + operationId = "createFoo", + summary = "Create a Foo", + tags = { "Foo" }, + responses = { + @ApiResponse(responseCode = "201", description = "Error", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = FooRefOrValue.class)) + }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/foo", + produces = { "application/json" }, + consumes = { "application/json;charset=utf-8" } + ) + default ResponseEntity createFoo( + @Parameter(name = "Foo", description = "The Foo to be created") @Valid @RequestBody(required = false) Foo foo + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "null"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /foo : GET all Foos + * + * @return Success (status code 200) + */ + @Operation( + operationId = "getAllFoos", + summary = "GET all Foos", + tags = { "Foo" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success", content = { + @Content(mediaType = "application/json;charset=utf-8", schema = @Schema(implementation = FooRefOrValue.class)) + }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/foo", + produces = { "application/json;charset=utf-8" } + ) + default ResponseEntity> getAllFoos( + + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json;charset=utf-8"))) { + String exampleString = "null"; + ApiUtil.setExampleResponse(request, "application/json;charset=utf-8", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApiController.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApiController.java new file mode 100644 index 000000000000..ea240bf97a97 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApiController.java @@ -0,0 +1,47 @@ +package org.openapitools.api; + +import org.openapitools.model.Foo; +import org.openapitools.model.FooRefOrValue; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.context.request.NativeWebRequest; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.byRefOrValue.base-path:}") +public class FooApiController implements FooApi { + + private final NativeWebRequest request; + + @Autowired + public FooApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..9aa29284ab5f --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,20 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.GetMapping; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui.html"; + } + +} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java new file mode 100644 index 000000000000..2cc692ebfcb3 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Base schema for adressable entities + */ + +@Schema(name = "Addressable", description = "Base schema for adressable entities") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Addressable { + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + public Addressable href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + + @Schema(name = "href", description = "Hyperlink reference", required = false) + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public Addressable id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", required = false) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Addressable addressable = (Addressable) o; + return Objects.equals(this.href, addressable.href) && + Objects.equals(this.id, addressable.id); + } + + @Override + public int hashCode() { + return Objects.hash(href, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Addressable {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java new file mode 100644 index 000000000000..2ba1acefbf2a --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java @@ -0,0 +1,183 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Entity; +import org.openapitools.model.FooRefOrValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Bar + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Bar extends Entity implements BarRefOrValue { + + @JsonProperty("id") + private String id; + + @JsonProperty("barPropA") + private String barPropA; + + @JsonProperty("fooPropB") + private String fooPropB; + + @JsonProperty("foo") + private FooRefOrValue foo; + + public Bar id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @NotNull + @Schema(name = "id", required = true) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Bar barPropA(String barPropA) { + this.barPropA = barPropA; + return this; + } + + /** + * Get barPropA + * @return barPropA + */ + + @Schema(name = "barPropA", required = false) + public String getBarPropA() { + return barPropA; + } + + public void setBarPropA(String barPropA) { + this.barPropA = barPropA; + } + + public Bar fooPropB(String fooPropB) { + this.fooPropB = fooPropB; + return this; + } + + /** + * Get fooPropB + * @return fooPropB + */ + + @Schema(name = "fooPropB", required = false) + public String getFooPropB() { + return fooPropB; + } + + public void setFooPropB(String fooPropB) { + this.fooPropB = fooPropB; + } + + public Bar foo(FooRefOrValue foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Valid + @Schema(name = "foo", required = false) + public FooRefOrValue getFoo() { + return foo; + } + + public void setFoo(FooRefOrValue foo) { + this.foo = foo; + } + + public Bar href(String href) { + super.setHref(href); + return this; + } + + public Bar atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public Bar atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public Bar atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Bar bar = (Bar) o; + return Objects.equals(this.id, bar.id) && + Objects.equals(this.barPropA, bar.barPropA) && + Objects.equals(this.fooPropB, bar.fooPropB) && + Objects.equals(this.foo, bar.foo) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, barPropA, fooPropB, foo, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Bar {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" barPropA: ").append(toIndentedString(barPropA)).append("\n"); + sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java new file mode 100644 index 000000000000..365251e5d34d --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java @@ -0,0 +1,166 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.Entity; +import org.openapitools.model.FooRefOrValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * BarCreate + */ + + +@JsonTypeName("Bar_Create") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BarCreate extends Entity { + + @JsonProperty("barPropA") + private String barPropA; + + @JsonProperty("fooPropB") + private String fooPropB; + + @JsonProperty("foo") + private FooRefOrValue foo; + + public BarCreate barPropA(String barPropA) { + this.barPropA = barPropA; + return this; + } + + /** + * Get barPropA + * @return barPropA + */ + + @Schema(name = "barPropA", required = false) + public String getBarPropA() { + return barPropA; + } + + public void setBarPropA(String barPropA) { + this.barPropA = barPropA; + } + + public BarCreate fooPropB(String fooPropB) { + this.fooPropB = fooPropB; + return this; + } + + /** + * Get fooPropB + * @return fooPropB + */ + + @Schema(name = "fooPropB", required = false) + public String getFooPropB() { + return fooPropB; + } + + public void setFooPropB(String fooPropB) { + this.fooPropB = fooPropB; + } + + public BarCreate foo(FooRefOrValue foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Valid + @Schema(name = "foo", required = false) + public FooRefOrValue getFoo() { + return foo; + } + + public void setFoo(FooRefOrValue foo) { + this.foo = foo; + } + + public BarCreate href(String href) { + super.setHref(href); + return this; + } + + public BarCreate id(String id) { + super.setId(id); + return this; + } + + public BarCreate atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public BarCreate atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public BarCreate atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BarCreate barCreate = (BarCreate) o; + return Objects.equals(this.barPropA, barCreate.barPropA) && + Objects.equals(this.fooPropB, barCreate.fooPropB) && + Objects.equals(this.foo, barCreate.foo) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(barPropA, fooPropB, foo, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BarCreate {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" barPropA: ").append(toIndentedString(barPropA)).append("\n"); + sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java new file mode 100644 index 000000000000..abae00509426 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java @@ -0,0 +1,100 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.EntityRef; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * BarRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BarRef extends EntityRef implements BarRefOrValue { + + public BarRef name(String name) { + super.setName(name); + return this; + } + + public BarRef atReferredType(String atReferredType) { + super.setAtReferredType(atReferredType); + return this; + } + + public BarRef href(String href) { + super.setHref(href); + return this; + } + + public BarRef id(String id) { + super.setId(id); + return this; + } + + public BarRef atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public BarRef atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public BarRef atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BarRef {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRefOrValue.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRefOrValue.java new file mode 100644 index 000000000000..151f8f044417 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRefOrValue.java @@ -0,0 +1,36 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Bar; +import org.openapitools.model.BarRef; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + + +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Bar.class, name = "Bar"), + @JsonSubTypes.Type(value = BarRef.class, name = "BarRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface BarRefOrValue { + public String getAtType(); +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java new file mode 100644 index 000000000000..b599931e03a1 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java @@ -0,0 +1,204 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Addressable; +import org.openapitools.model.Bar; +import org.openapitools.model.BarCreate; +import org.openapitools.model.Extensible; +import org.openapitools.model.Foo; +import org.openapitools.model.Pasta; +import org.openapitools.model.Pizza; +import org.openapitools.model.PizzaSpeziale; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Entity + */ + +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Bar.class, name = "Bar"), + @JsonSubTypes.Type(value = BarCreate.class, name = "Bar_Create"), + @JsonSubTypes.Type(value = Foo.class, name = "Foo"), + @JsonSubTypes.Type(value = Pasta.class, name = "Pasta"), + @JsonSubTypes.Type(value = Pizza.class, name = "Pizza"), + @JsonSubTypes.Type(value = PizzaSpeziale.class, name = "PizzaSpeziale") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Entity { + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + + @JsonProperty("@baseType") + private String atBaseType; + + @JsonProperty("@type") + private String atType; + + public Entity href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + + @Schema(name = "href", description = "Hyperlink reference", required = false) + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public Entity id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", required = false) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Entity atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false) + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public Entity atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public Entity atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true) + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Entity entity = (Entity) o; + return Objects.equals(this.href, entity.href) && + Objects.equals(this.id, entity.id) && + Objects.equals(this.atSchemaLocation, entity.atSchemaLocation) && + Objects.equals(this.atBaseType, entity.atBaseType) && + Objects.equals(this.atType, entity.atType); + } + + @Override + public int hashCode() { + return Objects.hash(href, id, atSchemaLocation, atBaseType, atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Entity {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java new file mode 100644 index 000000000000..4e3ce69f39eb --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java @@ -0,0 +1,245 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Addressable; +import org.openapitools.model.BarRef; +import org.openapitools.model.Extensible; +import org.openapitools.model.FooRef; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Entity reference schema to be use for all entityRef class. + */ + +@Schema(name = "EntityRef", description = "Entity reference schema to be use for all entityRef class.") +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BarRef.class, name = "BarRef"), + @JsonSubTypes.Type(value = FooRef.class, name = "FooRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EntityRef { + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String atReferredType; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + + @JsonProperty("@baseType") + private String atBaseType; + + @JsonProperty("@type") + private String atType; + + public EntityRef name(String name) { + this.name = name; + return this; + } + + /** + * Name of the related entity. + * @return name + */ + + @Schema(name = "name", description = "Name of the related entity.", required = false) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EntityRef atReferredType(String atReferredType) { + this.atReferredType = atReferredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return atReferredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", required = false) + public String getAtReferredType() { + return atReferredType; + } + + public void setAtReferredType(String atReferredType) { + this.atReferredType = atReferredType; + } + + public EntityRef href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + + @Schema(name = "href", description = "Hyperlink reference", required = false) + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public EntityRef id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", required = false) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityRef atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false) + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public EntityRef atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public EntityRef atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true) + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityRef entityRef = (EntityRef) o; + return Objects.equals(this.name, entityRef.name) && + Objects.equals(this.atReferredType, entityRef.atReferredType) && + Objects.equals(this.href, entityRef.href) && + Objects.equals(this.id, entityRef.id) && + Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) && + Objects.equals(this.atBaseType, entityRef.atBaseType) && + Objects.equals(this.atType, entityRef.atType); + } + + @Override + public int hashCode() { + return Objects.hash(name, atReferredType, href, id, atSchemaLocation, atBaseType, atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java new file mode 100644 index 000000000000..f6a109c1d5f0 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java @@ -0,0 +1,131 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Extensible + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Extensible { + + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + + @JsonProperty("@baseType") + private String atBaseType; + + @JsonProperty("@type") + private String atType; + + public Extensible atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false) + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public Extensible atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public Extensible atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true) + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Extensible extensible = (Extensible) o; + return Objects.equals(this.atSchemaLocation, extensible.atSchemaLocation) && + Objects.equals(this.atBaseType, extensible.atBaseType) && + Objects.equals(this.atType, extensible.atType); + } + + @Override + public int hashCode() { + return Objects.hash(atSchemaLocation, atBaseType, atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Extensible {\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java new file mode 100644 index 000000000000..b0b6f53b1b16 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java @@ -0,0 +1,139 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Entity; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Foo + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Foo extends Entity implements FooRefOrValue { + + @JsonProperty("fooPropA") + private String fooPropA; + + @JsonProperty("fooPropB") + private String fooPropB; + + public Foo fooPropA(String fooPropA) { + this.fooPropA = fooPropA; + return this; + } + + /** + * Get fooPropA + * @return fooPropA + */ + + @Schema(name = "fooPropA", required = false) + public String getFooPropA() { + return fooPropA; + } + + public void setFooPropA(String fooPropA) { + this.fooPropA = fooPropA; + } + + public Foo fooPropB(String fooPropB) { + this.fooPropB = fooPropB; + return this; + } + + /** + * Get fooPropB + * @return fooPropB + */ + + @Schema(name = "fooPropB", required = false) + public String getFooPropB() { + return fooPropB; + } + + public void setFooPropB(String fooPropB) { + this.fooPropB = fooPropB; + } + + public Foo href(String href) { + super.setHref(href); + return this; + } + + public Foo id(String id) { + super.setId(id); + return this; + } + + public Foo atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public Foo atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public Foo atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.fooPropA, foo.fooPropA) && + Objects.equals(this.fooPropB, foo.fooPropB) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(fooPropA, fooPropB, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" fooPropA: ").append(toIndentedString(fooPropA)).append("\n"); + sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java new file mode 100644 index 000000000000..5900228902d6 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.EntityRef; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * FooRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FooRef extends EntityRef implements FooRefOrValue { + + @JsonProperty("foorefPropA") + private String foorefPropA; + + public FooRef foorefPropA(String foorefPropA) { + this.foorefPropA = foorefPropA; + return this; + } + + /** + * Get foorefPropA + * @return foorefPropA + */ + + @Schema(name = "foorefPropA", required = false) + public String getFoorefPropA() { + return foorefPropA; + } + + public void setFoorefPropA(String foorefPropA) { + this.foorefPropA = foorefPropA; + } + + public FooRef name(String name) { + super.setName(name); + return this; + } + + public FooRef atReferredType(String atReferredType) { + super.setAtReferredType(atReferredType); + return this; + } + + public FooRef href(String href) { + super.setHref(href); + return this; + } + + public FooRef id(String id) { + super.setId(id); + return this; + } + + public FooRef atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public FooRef atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public FooRef atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooRef fooRef = (FooRef) o; + return Objects.equals(this.foorefPropA, fooRef.foorefPropA) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(foorefPropA, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooRef {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" foorefPropA: ").append(toIndentedString(foorefPropA)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRefOrValue.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRefOrValue.java new file mode 100644 index 000000000000..0984df6238cc --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRefOrValue.java @@ -0,0 +1,36 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Foo; +import org.openapitools.model.FooRef; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + + +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Foo.class, name = "Foo"), + @JsonSubTypes.Type(value = FooRef.class, name = "FooRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface FooRefOrValue { + public String getAtType(); +} diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java new file mode 100644 index 000000000000..116c2687b84f --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Entity; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Pasta + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pasta extends Entity { + + @JsonProperty("vendor") + private String vendor; + + public Pasta vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get vendor + * @return vendor + */ + + @Schema(name = "vendor", required = false) + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public Pasta href(String href) { + super.setHref(href); + return this; + } + + public Pasta id(String id) { + super.setId(id); + return this; + } + + public Pasta atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public Pasta atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public Pasta atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pasta pasta = (Pasta) o; + return Objects.equals(this.vendor, pasta.vendor) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(vendor, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pasta {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java new file mode 100644 index 000000000000..015b75a8053b --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.math.BigDecimal; +import org.openapitools.model.Entity; +import org.openapitools.model.PizzaSpeziale; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Pizza + */ + +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = PizzaSpeziale.class, name = "PizzaSpeziale") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pizza extends Entity { + + @JsonProperty("pizzaSize") + private BigDecimal pizzaSize; + + public Pizza pizzaSize(BigDecimal pizzaSize) { + this.pizzaSize = pizzaSize; + return this; + } + + /** + * Get pizzaSize + * @return pizzaSize + */ + @Valid + @Schema(name = "pizzaSize", required = false) + public BigDecimal getPizzaSize() { + return pizzaSize; + } + + public void setPizzaSize(BigDecimal pizzaSize) { + this.pizzaSize = pizzaSize; + } + + public Pizza href(String href) { + super.setHref(href); + return this; + } + + public Pizza id(String id) { + super.setId(id); + return this; + } + + public Pizza atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public Pizza atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public Pizza atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pizza pizza = (Pizza) o; + return Objects.equals(this.pizzaSize, pizza.pizzaSize) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(pizzaSize, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pizza {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" pizzaSize: ").append(toIndentedString(pizzaSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java new file mode 100644 index 000000000000..6b50ea036458 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Pizza; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * PizzaSpeziale + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class PizzaSpeziale extends Pizza { + + @JsonProperty("toppings") + private String toppings; + + public PizzaSpeziale toppings(String toppings) { + this.toppings = toppings; + return this; + } + + /** + * Get toppings + * @return toppings + */ + + @Schema(name = "toppings", required = false) + public String getToppings() { + return toppings; + } + + public void setToppings(String toppings) { + this.toppings = toppings; + } + + public PizzaSpeziale pizzaSize(BigDecimal pizzaSize) { + super.setPizzaSize(pizzaSize); + return this; + } + + public PizzaSpeziale href(String href) { + super.setHref(href); + return this; + } + + public PizzaSpeziale id(String id) { + super.setId(id); + return this; + } + + public PizzaSpeziale atSchemaLocation(String atSchemaLocation) { + super.setAtSchemaLocation(atSchemaLocation); + return this; + } + + public PizzaSpeziale atBaseType(String atBaseType) { + super.setAtBaseType(atBaseType); + return this; + } + + public PizzaSpeziale atType(String atType) { + super.setAtType(atType); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PizzaSpeziale pizzaSpeziale = (PizzaSpeziale) o; + return Objects.equals(this.toppings, pizzaSpeziale.toppings) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(toppings, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PizzaSpeziale {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" toppings: ").append(toIndentedString(toppings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/application.properties b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/application.properties new file mode 100644 index 000000000000..7e90813e59b2 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8080 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml new file mode 100644 index 000000000000..9ab9dccf5dfc --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml @@ -0,0 +1,234 @@ +openapi: 3.0.1 +info: + description: | + This tests for a oneOf interface representation + title: ByRefOrValue + version: 0.0.1 +servers: +- url: http://localhost:8080 +tags: +- name: Foo +- name: Bar +paths: + /foo: + get: + operationId: getAllFoos + responses: + "200": + content: + application/json;charset=utf-8: + schema: + items: + $ref: '#/components/schemas/FooRefOrValue' + type: array + description: Success + summary: GET all Foos + tags: + - Foo + x-accepts: application/json;charset=utf-8 + x-tags: + - tag: Foo + post: + operationId: createFoo + requestBody: + $ref: '#/components/requestBodies/Foo' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/FooRefOrValue' + description: Error + summary: Create a Foo + tags: + - Foo + x-content-type: application/json;charset=utf-8 + x-accepts: application/json + x-tags: + - tag: Foo + /bar: + post: + operationId: createBar + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Bar_Create' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Bar' + description: Bar created + summary: Create a Bar + tags: + - Bar + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: Bar +components: + requestBodies: + Foo: + content: + application/json;charset=utf-8: + schema: + $ref: '#/components/schemas/Foo' + description: The Foo to be created + responses: + "204": + content: {} + description: Deleted + "201Foo": + content: + application/json: + schema: + $ref: '#/components/schemas/FooRefOrValue' + description: Error + "200FooArray": + content: + application/json;charset=utf-8: + schema: + items: + $ref: '#/components/schemas/FooRefOrValue' + type: array + description: Success + schemas: + Addressable: + description: Base schema for adressable entities + properties: + href: + description: Hyperlink reference + type: string + id: + description: unique identifier + type: string + type: object + Extensible: + properties: + '@schemaLocation': + description: A URI to a JSON-Schema file that defines additional attributes + and relationships + type: string + '@baseType': + description: "When sub-classing, this defines the super-class" + type: string + '@type': + description: "When sub-classing, this defines the sub-class Extensible name" + type: string + required: + - '@type' + type: object + Entity: + allOf: + - $ref: '#/components/schemas/Addressable' + - $ref: '#/components/schemas/Extensible' + discriminator: + propertyName: '@type' + type: object + EntityRef: + allOf: + - $ref: '#/components/schemas/Addressable' + - $ref: '#/components/schemas/Extensible' + description: Entity reference schema to be use for all entityRef class. + discriminator: + propertyName: '@type' + properties: + name: + description: Name of the related entity. + type: string + '@referredType': + description: The actual type of the target instance when needed for disambiguation. + type: string + type: object + FooRefOrValue: + discriminator: + propertyName: '@type' + oneOf: + - $ref: '#/components/schemas/Foo' + - $ref: '#/components/schemas/FooRef' + type: object + x-one-of-name: FooRefOrValue + Foo: + allOf: + - $ref: '#/components/schemas/Entity' + example: + fooPropA: fooPropA + fooPropB: fooPropB + properties: + fooPropA: + type: string + fooPropB: + type: string + type: object + FooRef: + allOf: + - $ref: '#/components/schemas/EntityRef' + properties: + foorefPropA: + type: string + type: object + BarRef: + allOf: + - $ref: '#/components/schemas/EntityRef' + type: object + Bar_Create: + allOf: + - $ref: '#/components/schemas/Entity' + properties: + barPropA: + type: string + fooPropB: + type: string + foo: + $ref: '#/components/schemas/FooRefOrValue' + type: object + Bar: + allOf: + - $ref: '#/components/schemas/Entity' + example: + foo: null + id: id + fooPropB: fooPropB + barPropA: barPropA + properties: + id: + type: string + barPropA: + type: string + fooPropB: + type: string + foo: + $ref: '#/components/schemas/FooRefOrValue' + required: + - id + type: object + BarRefOrValue: + oneOf: + - $ref: '#/components/schemas/Bar' + - $ref: '#/components/schemas/BarRef' + type: object + x-one-of-name: BarRefOrValue + Pizza: + allOf: + - $ref: '#/components/schemas/Entity' + properties: + pizzaSize: + type: number + type: object + Pasta: + allOf: + - $ref: '#/components/schemas/Entity' + properties: + vendor: + type: string + type: object + PizzaSpeziale: + allOf: + - $ref: '#/components/schemas/Pizza' + properties: + toppings: + type: string + type: object diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java new file mode 100644 index 000000000000..3681f67e7705 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java @@ -0,0 +1,13 @@ +package org.openapitools; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class OpenApiGeneratorApplicationTests { + + @Test + void contextLoads() { + } + +} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml b/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml index dd6b400eb7a3..63ca2d73aafe 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 1.6.4 + UTF-8 + 1.6.6 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index bbf40bd36361..c20d4ec84331 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 2cb677705b6c..a62180f3adab 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 1186f235271d..f6f20314c349 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java index 823adb2ae4d8..24264bce8b2d 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml index 68ee366c83d4..1438a89f5cc3 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml @@ -45,7 +45,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -77,7 +77,7 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -274,7 +274,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -372,7 +372,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: store @@ -456,7 +456,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -474,7 +474,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -492,7 +492,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -661,7 +661,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml index fe0cd0c3a1de..97823b08ae45 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 3fa7a88b40d2..49320ba0dcdf 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 963a60ac29a3..1cfc07767481 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index f4555ba9a1d6..f7cf3701a2a3 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index c21547ebe553..e01b3214db27 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 6f4b99f6bd22..ec428cb349f4 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 603425f75ee4..90527250a4d5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 1de1495fee45..442b3f730a8d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 7760ea488d8c..e71c315dbade 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 385adeaf6859..089260568478 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 01486fe5f8f9..d7852c1184a2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index daceddcbd943..78fd51e521fc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index cab2078ba9db..44e94a714b7f 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; @@ -19,14 +23,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 9871634153fd..29b207211ca7 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 465cf68cf34f..c355a668b998 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 296e8f58112a..c69acc510f40 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index e8cc7d889e63..a5ffffc075a7 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -20,8 +23,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -84,6 +88,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index ad9b04f2b436..622f8115d00d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index 58d6a300418f..58d0d2889dfa 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index d97457af945b..f8b09521a77f 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,8 +23,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -44,6 +57,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 07c3fdf6735e..a7e5bd6ef8cb 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -20,7 +20,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 7f6bb6e1e7a1..eadae546511a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 140f237c1436..27ee22fe70e8 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -19,7 +19,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index 57335b9a7e29..b314b7e6c40b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index 7e3a95ef951c..472111e924cf 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import java.time.OffsetDateTime; @@ -19,8 +22,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -44,6 +48,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 9eae8470eca6..9115e097a41e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -20,7 +20,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 7f032e7b77f2..f6d26222d3d4 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 171fa442d872..5029217180eb 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -22,7 +22,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index 01328e7289d0..7aa43240699d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -19,7 +19,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index a8ff92bd4a93..a8dde57867d8 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 8b97970dabc9..d1f46558af53 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -26,7 +26,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 6af4fea705e5..afca14167ef4 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -20,7 +20,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index ecdcea9ffb88..4a980ded67b3 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e421cb8aaf9e..1b26995e0f73 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -25,7 +25,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 38fee3569e92..cab3e70b2287 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -21,7 +21,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 924df8580f17..c9f3676db045 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -20,7 +20,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 8b2ace12f892..752a252ea435 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -20,7 +20,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 0b030e1b2450..83d5c50471b0 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -21,7 +21,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index 2c89f8764d21..b056fee672b7 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -19,7 +19,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 164351c48a95..dd76d23b712a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index 99fcd106e326..9dde75062926 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index 3b034d2add35..ee285c36534f 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 69f9cd6e8af0..f727b1fd13c2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 580a50e935df..8a406167b2db 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index fef701b6870f..b90088c84169 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -20,7 +20,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index 48d0ddacf537..8d89066ef81d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index d3b55c685d80..aa063c93117a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 04d047121942..eb2fb13585ba 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index 7cc0ac4d18c8..05af7907f063 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index c07275c07db1..7f777c900644 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/openapi3/server/petstore/springboot-delegate/pom.xml b/samples/openapi3/server/petstore/springboot-delegate/pom.xml index 3817b6421c0b..3a7f8e036c9a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/pom.xml +++ b/samples/openapi3/server/petstore/springboot-delegate/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index e2ecf36a6840..7ef726250ec4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -29,7 +29,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index af6187df0548..b103908d7808 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 4a70932e32a2..8fc43c31a4cc 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 88ea058c0c51..0d95d7f91b29 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 0d4d67f1a9e9..0a45cd0d195e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 219d797ee642..c53b449a5070 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b2245551ad3e..ae060d44dc4d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index ea102c40ed2e..87a903f3e7f2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7a3a5d839f8a..873d1c9c229e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 22e47f1bc1cb..97827d22d963 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 91f47a9e83ee..53967d619036 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index ef0fc61b5b6a..8b3225fee193 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ad560c9d8344..4fc6a6447db5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4409856d5a37..da4dc071cfdf 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index fd25397b6b67..03052a955e3b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 275a075f527d..7208cedbd0b5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index 843e46a1f6cd..96ddb1f49cd8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 80d6c5b28514..e7f3b66e4814 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 0b3c8b8759b2..0e7e1b097362 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index 88bc8c3d6492..bc83998fc4d5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 66dd429525dd..586658c922c5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index 13a83893e619..d3d25d6df8cd 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 9fbd7e3b4338..7ed5fbaae188 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 36f36600dafa..155bff326518 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index 1a4f50f5bcd4..fbcd7127e41b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index c3e82d4c0282..3c18fc1189fe 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index fb2ee5373fbf..dc15f99afe84 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index a2ee29fbfd69..d9a8ab4aa1f2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77868e774104..5794883ff564 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 05abfd1c26ef..c4bacc257a36 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 768e7277a703..d817048f2a75 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 2da2a81ac823..6942169188d2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9681c13f29d4..bd1c5716f064 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 95f81f418d28..80ff3f1fc638 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 474ed54662f7..ed829bcb62cd 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index 7615d501057e..56e79c554452 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index eef02c8ade31..d95ce3f15491 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 2876e64e9917..32cec75d981d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 05c9f0a77856..14fb6641f919 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 90b0d2957184..9b54a719dbae 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index 14ff8ff8a9f4..461f98baa866 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 51d583a02e55..c137885adb7f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1d95448aeefe..39862919e7c7 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 1eac86e9ebca..fb431f59071a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 6b24df204718..75f3df1d0e17 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 66695c3e8478..4d939d69a1e7 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index fdc9a0960759..c9b40aac5fa1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 9aae48b0ceb2..9df36d407748 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index b886d9d3f61e..3b3593e71797 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml b/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml index 072919a92260..6a156cab2dbd 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 252c6c11f3c4..653d00e34e9a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -55,8 +55,6 @@ default Optional getRequest() { }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 37d1b62f30ff..69a672b93ff5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -63,8 +63,6 @@ default Optional getRequest() { @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", @@ -94,8 +92,6 @@ default ResponseEntity createXmlItem( }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", @@ -125,8 +121,6 @@ default ResponseEntity fakeOuterBooleanSerialize( }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", @@ -165,8 +159,6 @@ default ResponseEntity fakeOuterCompositeSerialize( }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", @@ -196,8 +188,6 @@ default ResponseEntity fakeOuterNumberSerialize( }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", @@ -225,8 +215,6 @@ default ResponseEntity fakeOuterStringSerialize( @ApiResponse(responseCode = "200", description = "Success") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", @@ -254,8 +242,6 @@ default ResponseEntity testBodyWithFileSchema( @ApiResponse(responseCode = "200", description = "Success") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", @@ -287,8 +273,6 @@ default ResponseEntity testBodyWithQueryParams( }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -345,8 +329,6 @@ default ResponseEntity testClientModel( @SecurityRequirement(name = "http_basic_test") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake", @@ -468,8 +450,6 @@ default ResponseEntity testGroupParameters( @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", @@ -498,8 +478,6 @@ default ResponseEntity testInlineAdditionalProperties( @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", @@ -532,8 +510,6 @@ default ResponseEntity testJsonFormData( @ApiResponse(responseCode = "200", description = "Success") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" @@ -571,8 +547,6 @@ default ResponseEntity testQueryParameterCollectionFormat( @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c731b97ec125..993f4a4b4efa 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -58,8 +58,6 @@ default Optional getRequest() { @SecurityRequirement(name = "api_key_query") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index c0c4cc58b149..70f4e0130000 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { @@ -59,8 +59,6 @@ default Optional getRequest() { @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/pet", @@ -131,8 +129,6 @@ default ResponseEntity deletePet( @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", @@ -184,8 +180,6 @@ default ResponseEntity> findPetsByStatus( @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", @@ -238,8 +232,6 @@ default ResponseEntity> findPetsByTags( @SecurityRequirement(name = "api_key") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", @@ -290,8 +282,6 @@ default ResponseEntity getPetById( @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", @@ -324,8 +314,6 @@ default ResponseEntity updatePet( @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", @@ -362,8 +350,6 @@ default ResponseEntity updatePetWithForm( @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 3c42250c555e..1cfc07767481 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { @@ -56,8 +56,6 @@ default Optional getRequest() { @ApiResponse(responseCode = "404", description = "Order not found") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" @@ -89,8 +87,6 @@ default ResponseEntity deleteOrder( @SecurityRequirement(name = "api_key") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", @@ -126,8 +122,6 @@ default ResponseEntity> getInventory( @ApiResponse(responseCode = "404", description = "Order not found") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", @@ -174,8 +168,6 @@ default ResponseEntity getOrderById( @ApiResponse(responseCode = "400", description = "Invalid Order") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index b375b927cc85..f7cf3701a2a3 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { @@ -55,8 +55,6 @@ default Optional getRequest() { @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/user" @@ -83,8 +81,6 @@ default ResponseEntity createUser( @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" @@ -111,8 +107,6 @@ default ResponseEntity createUsersWithArrayInput( @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" @@ -142,8 +136,6 @@ default ResponseEntity createUsersWithListInput( @ApiResponse(responseCode = "404", description = "User not found") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" @@ -177,8 +169,6 @@ default ResponseEntity deleteUser( @ApiResponse(responseCode = "404", description = "User not found") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", @@ -226,8 +216,6 @@ default ResponseEntity getUserByName( @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", @@ -255,8 +243,6 @@ default ResponseEntity loginUser( @ApiResponse(responseCode = "200", description = "successful operation") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" @@ -287,8 +273,6 @@ default ResponseEntity logoutUser( @ApiResponse(responseCode = "404", description = "User not found") } ) - @Parameters({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 88ea058c0c51..0d95d7f91b29 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 0d4d67f1a9e9..0a45cd0d195e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 219d797ee642..c53b449a5070 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b2245551ad3e..ae060d44dc4d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index ea102c40ed2e..87a903f3e7f2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7a3a5d839f8a..873d1c9c229e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 22e47f1bc1cb..97827d22d963 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 91f47a9e83ee..53967d619036 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index ef0fc61b5b6a..8b3225fee193 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ad560c9d8344..4fc6a6447db5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4409856d5a37..da4dc071cfdf 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index fd25397b6b67..03052a955e3b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 275a075f527d..7208cedbd0b5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index 843e46a1f6cd..96ddb1f49cd8 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 80d6c5b28514..e7f3b66e4814 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 0b3c8b8759b2..0e7e1b097362 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index 88bc8c3d6492..bc83998fc4d5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 66dd429525dd..586658c922c5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index 13a83893e619..d3d25d6df8cd 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 9fbd7e3b4338..7ed5fbaae188 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 36f36600dafa..155bff326518 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index 1a4f50f5bcd4..fbcd7127e41b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index c3e82d4c0282..3c18fc1189fe 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index fb2ee5373fbf..dc15f99afe84 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index a2ee29fbfd69..d9a8ab4aa1f2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77868e774104..5794883ff564 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 05abfd1c26ef..c4bacc257a36 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 768e7277a703..d817048f2a75 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 2da2a81ac823..6942169188d2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9681c13f29d4..bd1c5716f064 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 95f81f418d28..80ff3f1fc638 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 474ed54662f7..ed829bcb62cd 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelFile.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelFile.java deleted file mode 100644 index de11d272cc3c..000000000000 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelFile.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; - -/** - * Must be named `File` for test. - */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelFile { - @JsonProperty("sourceURI") - private String sourceURI; - - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - - public String getSourceURI() { - return sourceURI; - } - - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index 7615d501057e..56e79c554452 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index eef02c8ade31..d95ce3f15491 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 2876e64e9917..32cec75d981d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 05c9f0a77856..14fb6641f919 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 90b0d2957184..9b54a719dbae 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index 14ff8ff8a9f4..461f98baa866 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 51d583a02e55..c137885adb7f 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1d95448aeefe..39862919e7c7 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 1eac86e9ebca..fb431f59071a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 6b24df204718..75f3df1d0e17 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 66695c3e8478..4d939d69a1e7 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index fdc9a0960759..c9b40aac5fa1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index 9aae48b0ceb2..9df36d407748 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index b886d9d3f61e..3b3593e71797 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/openapi3/server/petstore/springboot-reactive/pom.xml b/samples/openapi3/server/petstore/springboot-reactive/pom.xml index 417ecda3e692..dd43545e43e8 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/pom.xml +++ b/samples/openapi3/server/petstore/springboot-reactive/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 203a6f759a36..2b41977f9d36 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 49d7f624b6bc..4d886bdf30cf 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 863193a82ddb..6d4573f4a42e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 88ea058c0c51..0d95d7f91b29 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 0d4d67f1a9e9..0a45cd0d195e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 219d797ee642..c53b449a5070 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b2245551ad3e..ae060d44dc4d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index ea102c40ed2e..87a903f3e7f2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7a3a5d839f8a..873d1c9c229e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 22e47f1bc1cb..97827d22d963 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 91f47a9e83ee..53967d619036 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index ef0fc61b5b6a..8b3225fee193 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ad560c9d8344..4fc6a6447db5 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4409856d5a37..da4dc071cfdf 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index fd25397b6b67..03052a955e3b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 275a075f527d..7208cedbd0b5 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index 843e46a1f6cd..96ddb1f49cd8 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 80d6c5b28514..e7f3b66e4814 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 0b3c8b8759b2..0e7e1b097362 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index 88bc8c3d6492..bc83998fc4d5 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 66dd429525dd..586658c922c5 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index 13a83893e619..d3d25d6df8cd 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index 9fbd7e3b4338..7ed5fbaae188 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 36f36600dafa..155bff326518 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index 1a4f50f5bcd4..fbcd7127e41b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index c3e82d4c0282..3c18fc1189fe 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index fb2ee5373fbf..dc15f99afe84 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index a2ee29fbfd69..d9a8ab4aa1f2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77868e774104..5794883ff564 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 05abfd1c26ef..c4bacc257a36 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 768e7277a703..d817048f2a75 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 2da2a81ac823..6942169188d2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9681c13f29d4..bd1c5716f064 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 95f81f418d28..80ff3f1fc638 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 474ed54662f7..ed829bcb62cd 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index 7615d501057e..56e79c554452 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index eef02c8ade31..d95ce3f15491 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 2876e64e9917..32cec75d981d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 05c9f0a77856..14fb6641f919 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 90b0d2957184..9b54a719dbae 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index 14ff8ff8a9f4..461f98baa866 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 51d583a02e55..c137885adb7f 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1d95448aeefe..39862919e7c7 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 1eac86e9ebca..fb431f59071a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 6b24df204718..75f3df1d0e17 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 66695c3e8478..4d939d69a1e7 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index fdc9a0960759..c9b40aac5fa1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index 9aae48b0ceb2..9df36d407748 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index b886d9d3f61e..3b3593e71797 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/openapi3/server/petstore/springboot-source/pom.xml b/samples/openapi3/server/petstore/springboot-source/pom.xml index 62a892cfbaa9..6a8d71279803 100644 --- a/samples/openapi3/server/petstore/springboot-source/pom.xml +++ b/samples/openapi3/server/petstore/springboot-source/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} - 4.4.1-1 + UTF-8 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java index 6218e1d3e171..0d2e56dfa3d9 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java index 279de49b2ce0..f66ed8b59413 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -20,7 +20,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java index 13ec59e549c9..aafcfc0cc192 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 05a9ea718d7a..c857f5804afd 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java index e3ba0c6d29a8..32f55514e089 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java index 8a27d52814ab..16f35830e845 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java @@ -18,7 +18,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml index 68ee366c83d4..1438a89f5cc3 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml @@ -45,7 +45,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -77,7 +77,7 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -274,7 +274,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -372,7 +372,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: store @@ -456,7 +456,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -474,7 +474,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -492,7 +492,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -661,7 +661,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user diff --git a/samples/openapi3/server/petstore/springboot-useoptional/pom.xml b/samples/openapi3/server/petstore/springboot-useoptional/pom.xml index d01f0f5e07f2..4bbe4fe62b44 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/pom.xml +++ b/samples/openapi3/server/petstore/springboot-useoptional/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 786d96990b4e..2b17b3932331 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 963a60ac29a3..1cfc07767481 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index f4555ba9a1d6..f7cf3701a2a3 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 88ea058c0c51..0d95d7f91b29 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 0d4d67f1a9e9..0a45cd0d195e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 219d797ee642..c53b449a5070 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b2245551ad3e..ae060d44dc4d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index ea102c40ed2e..87a903f3e7f2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7a3a5d839f8a..873d1c9c229e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 22e47f1bc1cb..97827d22d963 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 91f47a9e83ee..53967d619036 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index ef0fc61b5b6a..8b3225fee193 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ad560c9d8344..4fc6a6447db5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4409856d5a37..da4dc071cfdf 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index fd25397b6b67..03052a955e3b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 275a075f527d..7208cedbd0b5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index 843e46a1f6cd..96ddb1f49cd8 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 80d6c5b28514..e7f3b66e4814 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 0b3c8b8759b2..0e7e1b097362 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index 88bc8c3d6492..bc83998fc4d5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 66dd429525dd..586658c922c5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index 13a83893e619..d3d25d6df8cd 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index 9fbd7e3b4338..7ed5fbaae188 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 36f36600dafa..155bff326518 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index 1a4f50f5bcd4..fbcd7127e41b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index c3e82d4c0282..3c18fc1189fe 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index fb2ee5373fbf..dc15f99afe84 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index a2ee29fbfd69..d9a8ab4aa1f2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77868e774104..5794883ff564 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 05abfd1c26ef..c4bacc257a36 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 768e7277a703..d817048f2a75 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 2da2a81ac823..6942169188d2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9681c13f29d4..bd1c5716f064 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 95f81f418d28..80ff3f1fc638 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 474ed54662f7..ed829bcb62cd 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index 7615d501057e..56e79c554452 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index eef02c8ade31..d95ce3f15491 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 2876e64e9917..32cec75d981d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index 05c9f0a77856..14fb6641f919 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 90b0d2957184..9b54a719dbae 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index 14ff8ff8a9f4..461f98baa866 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 51d583a02e55..c137885adb7f 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1d95448aeefe..39862919e7c7 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 1eac86e9ebca..fb431f59071a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 6b24df204718..75f3df1d0e17 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 66695c3e8478..4d939d69a1e7 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index fdc9a0960759..c9b40aac5fa1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index 9aae48b0ceb2..9df36d407748 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index b886d9d3f61e..3b3593e71797 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/openapi3/server/petstore/springboot/pom.xml b/samples/openapi3/server/petstore/springboot/pom.xml index 0524f400cd1f..eb58747fb543 100644 --- a/samples/openapi3/server/petstore/springboot/pom.xml +++ b/samples/openapi3/server/petstore/springboot/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index bbf40bd36361..c20d4ec84331 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 2cb677705b6c..a62180f3adab 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 1186f235271d..f6f20314c349 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index 823adb2ae4d8..24264bce8b2d 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ @Schema(name = "Category", description = "A category for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index a235a99f9035..18e0004c3354 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index e624a0d7c1fe..04bee348f98e 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ @Schema(name = "Order", description = "An order for a pets from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index ddff66759bac..f702d09a1a82 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Schema(name = "Pet", description = "A pet for sale in the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 5c3ac82ba6e8..b4d9d7b0a13b 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ @Schema(name = "Tag", description = "A tag for a pet") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index 328569672eb4..01b7db75ca7a 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ @Schema(name = "User", description = "A User who is purchasing from the pet store") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml index 68ee366c83d4..1438a89f5cc3 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml @@ -45,7 +45,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -77,7 +77,7 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -274,7 +274,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -372,7 +372,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: store @@ -456,7 +456,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -474,7 +474,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -492,7 +492,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user @@ -661,7 +661,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: user diff --git a/samples/schema/petstore/mysql/.openapi-generator/FILES b/samples/schema/petstore/mysql/.openapi-generator/FILES index 59f8ea7241a7..dfa9d914fdea 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/FILES +++ b/samples/schema/petstore/mysql/.openapi-generator/FILES @@ -1,5 +1,6 @@ Model/200Response.sql Model/AdditionalPropertiesClass.sql +Model/AllOfWithSingleRef.sql Model/Animal.sql Model/ApiResponse.sql Model/ArrayOfArrayOfNumberOnly.sql @@ -41,6 +42,7 @@ Model/OuterObjectWithEnumProperty.sql Model/Pet.sql Model/ReadOnlyFirst.sql Model/Return.sql +Model/SingleRefType.sql Model/SpecialModelName.sql Model/Tag.sql Model/User.sql diff --git a/samples/schema/petstore/mysql/Model/AllOfWithSingleRef.sql b/samples/schema/petstore/mysql/Model/AllOfWithSingleRef.sql new file mode 100644 index 000000000000..2383c02b06bb --- /dev/null +++ b/samples/schema/petstore/mysql/Model/AllOfWithSingleRef.sql @@ -0,0 +1,26 @@ +-- +-- OpenAPI Petstore. +-- Prepared SQL queries for 'AllOfWithSingleRef' definition. +-- + + +-- +-- SELECT template for table `AllOfWithSingleRef` +-- +SELECT `username`, `SingleRefType` FROM `AllOfWithSingleRef` WHERE 1; + +-- +-- INSERT template for table `AllOfWithSingleRef` +-- +INSERT INTO `AllOfWithSingleRef`(`username`, `SingleRefType`) VALUES (?, ?); + +-- +-- UPDATE template for table `AllOfWithSingleRef` +-- +UPDATE `AllOfWithSingleRef` SET `username` = ?, `SingleRefType` = ? WHERE 1; + +-- +-- DELETE template for table `AllOfWithSingleRef` +-- +DELETE FROM `AllOfWithSingleRef` WHERE 0; + diff --git a/samples/schema/petstore/mysql/Model/SingleRefType.sql b/samples/schema/petstore/mysql/Model/SingleRefType.sql new file mode 100644 index 000000000000..328c28c7467d --- /dev/null +++ b/samples/schema/petstore/mysql/Model/SingleRefType.sql @@ -0,0 +1,26 @@ +-- +-- OpenAPI Petstore. +-- Prepared SQL queries for 'SingleRefType' definition. +-- + + +-- +-- SELECT template for table `SingleRefType` +-- +SELECT FROM `SingleRefType` WHERE 1; + +-- +-- INSERT template for table `SingleRefType` +-- +INSERT INTO `SingleRefType`() VALUES (); + +-- +-- UPDATE template for table `SingleRefType` +-- +UPDATE `SingleRefType` SET WHERE 1; + +-- +-- DELETE template for table `SingleRefType` +-- +DELETE FROM `SingleRefType` WHERE 0; + diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index a189b16c3ab5..e8566fe64cfa 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -24,6 +24,15 @@ CREATE TABLE IF NOT EXISTS `AdditionalPropertiesClass` ( `map_of_map_property` JSON DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +-- +-- Table structure for table `AllOfWithSingleRef` generated from model 'AllOfWithSingleRef' +-- + +CREATE TABLE IF NOT EXISTS `AllOfWithSingleRef` ( + `username` TEXT DEFAULT NULL, + `SingleRefType` TEXT DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + -- -- Table structure for table `Animal` generated from model 'Animal' -- diff --git a/samples/server/petstore/go-server-required/.openapi-generator/FILES b/samples/server/petstore/go-server-required/.openapi-generator/FILES index 26b2edca0b85..4c3a2a3a7c74 100644 --- a/samples/server/petstore/go-server-required/.openapi-generator/FILES +++ b/samples/server/petstore/go-server-required/.openapi-generator/FILES @@ -13,6 +13,7 @@ go/error.go go/helpers.go go/impl.go go/logger.go +go/model_an_object.go go/model_api_response.go go/model_category.go go/model_order.go diff --git a/samples/server/petstore/go-server-required/api/openapi.yaml b/samples/server/petstore/go-server-required/api/openapi.yaml index b9b1cc704685..47383ea1bedc 100644 --- a/samples/server/petstore/go-server-required/api/openapi.yaml +++ b/samples/server/petstore/go-server-required/api/openapi.yaml @@ -733,10 +733,134 @@ components: id: 1 id: 0 deepSliceMap: - - - "{}" - - "{}" - - - "{}" - - "{}" + - - tag: + name: name + id: 1 + Pet: + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - tag: + name: name + id: 1 + Pet: + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - - tag: + name: name + id: 1 + Pet: + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - tag: + name: name + id: 1 + Pet: + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available email: email username: username properties: @@ -777,17 +901,7 @@ components: items: description: An array 2-deep. items: - description: An array 3-deep. - properties: - tag: - $ref: '#/components/schemas/Tag' - Pet: - description: An array of pet. - items: - $ref: '#/components/schemas/Pet' - type: array - title: an Object - type: object + $ref: '#/components/schemas/an_Object' type: array type: array required: @@ -902,6 +1016,51 @@ components: format: binary type: string type: object + an_Object: + description: An array 3-deep. + example: + tag: + name: name + id: 1 + Pet: + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + - photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + tag: + $ref: '#/components/schemas/Tag' + Pet: + description: An array of pet. + items: + $ref: '#/components/schemas/Pet' + type: array + title: an Object + type: object securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/go-server-required/go/model_an_object.go b/samples/server/petstore/go-server-required/go/model_an_object.go new file mode 100644 index 000000000000..eea13e9c72e2 --- /dev/null +++ b/samples/server/petstore/go-server-required/go/model_an_object.go @@ -0,0 +1,44 @@ +/* + * 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 + +// AnObject - An array 3-deep. +type AnObject struct { + + Tag Tag `json:"tag,omitempty"` + + // An array of pet. + Pet []Pet `json:"Pet,omitempty"` +} + +// AssertAnObjectRequired checks if the required fields are not zero-ed +func AssertAnObjectRequired(obj AnObject) error { + if err := AssertTagRequired(obj.Tag); err != nil { + return err + } + for _, el := range obj.Pet { + if err := AssertPetRequired(el); err != nil { + return err + } + } + return nil +} + +// AssertRecurseAnObjectRequired recursively checks if required fields are not zero-ed in a nested slice. +// Accepts only nested slice of AnObject (e.g. [][]AnObject), otherwise ErrTypeAssertionError is thrown. +func AssertRecurseAnObjectRequired(objSlice interface{}) error { + return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error { + aAnObject, ok := obj.(AnObject) + if !ok { + return ErrTypeAssertionError + } + return AssertAnObjectRequired(aAnObject) + }) +} diff --git a/samples/server/petstore/go-server-required/go/model_user.go b/samples/server/petstore/go-server-required/go/model_user.go index 037b2f1ede62..8a45852e151f 100644 --- a/samples/server/petstore/go-server-required/go/model_user.go +++ b/samples/server/petstore/go-server-required/go/model_user.go @@ -33,7 +33,7 @@ type User struct { DeepSliceModel *[][][]Tag `json:"deepSliceModel"` // An array 1-deep. - DeepSliceMap [][]map[string]interface{} `json:"deepSliceMap,omitempty"` + DeepSliceMap [][]AnObject `json:"deepSliceMap,omitempty"` } // AssertUserRequired checks if the required fields are not zero-ed @@ -52,6 +52,9 @@ func AssertUserRequired(obj User) error { return err } } + if err := AssertRecurseAnObjectRequired(obj.DeepSliceMap); err != nil { + return err + } return nil } diff --git a/samples/server/petstore/haskell-servant/stack.yaml b/samples/server/petstore/haskell-servant/stack.yaml index df636e059180..1f1821220e22 100644 --- a/samples/server/petstore/haskell-servant/stack.yaml +++ b/samples/server/petstore/haskell-servant/stack.yaml @@ -1,12 +1,8 @@ -resolver: lts-13.20 -extra-deps: -- servant-0.16 -- servant-server-0.16 -- servant-client-0.16 -- servant-client-core-0.16 +resolver: lts-19.2 +extra-deps: [] packages: - '.' nix: enable: false packages: - - zlib \ No newline at end of file + - zlib diff --git a/samples/server/petstore/java-camel/pom.xml b/samples/server/petstore/java-camel/pom.xml index 8723287db730..d19df46cee28 100644 --- a/samples/server/petstore/java-camel/pom.xml +++ b/samples/server/petstore/java-camel/pom.xml @@ -38,6 +38,7 @@ Do not edit the class manually. + UTF-8 2.6.2 3.14.0 @@ -182,4 +183,4 @@ Do not edit the class manually. - \ No newline at end of file + diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java index e8a00e182c54..d74962ea1914 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -28,7 +28,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") -public class Category { +public class Category { @JsonProperty("id") @JacksonXmlProperty(localName = "id") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java index cc75dd59249b..8a01264cac07 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") @JacksonXmlProperty(localName = "code") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java index 5e8e4d0fc1aa..d57417899844 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -31,7 +31,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") -public class Order { +public class Order { @JsonProperty("id") @JacksonXmlProperty(localName = "id") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index 935f3db6d63f..43f830ce2952 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -33,7 +33,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") -public class Pet { +public class Pet { @JsonProperty("id") @JacksonXmlProperty(localName = "id") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java index a7beefc24152..84a8c85754e5 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -28,7 +28,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") -public class Tag { +public class Tag { @JsonProperty("id") @JacksonXmlProperty(localName = "id") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java index f8b1176d41bb..b7f1e01576b0 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -28,7 +28,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") -public class User { +public class User { @JsonProperty("id") @JacksonXmlProperty(localName = "id") diff --git a/samples/server/petstore/java-micronaut-server/docs/models/Order.md b/samples/server/petstore/java-micronaut-server/docs/models/Order.md index b514feb22d00..41234a99f6cb 100644 --- a/samples/server/petstore/java-micronaut-server/docs/models/Order.md +++ b/samples/server/petstore/java-micronaut-server/docs/models/Order.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **id** | `Long` | | [optional property] **petId** | `Long` | | [optional property] **quantity** | `Integer` | | [optional property] -**shipDate** | `LocalDateTime` | | [optional property] +**shipDate** | `OffsetDateTime` | | [optional property] **status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional property] **complete** | `Boolean` | | [optional property] diff --git a/samples/server/petstore/java-micronaut-server/pom.xml b/samples/server/petstore/java-micronaut-server/pom.xml index 36e2c01d0352..7ffa53d172b7 100644 --- a/samples/server/petstore/java-micronaut-server/pom.xml +++ b/samples/server/petstore/java-micronaut-server/pom.xml @@ -16,6 +16,7 @@ jar 1.8 + UTF-8 3.3.1 diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java index 3b29717f3eea..a321e00086b7 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java @@ -16,7 +16,7 @@ import io.micronaut.core.annotation.Nullable; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import org.openapitools.model.User; import javax.annotation.Generated; import java.util.ArrayList; diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java index e6a3f7e9432a..2ce23e2fd2de 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java @@ -57,7 +57,7 @@ public Category id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -81,7 +81,7 @@ public Category name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java index aa2fb19253b8..27bb49442729 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -62,7 +62,7 @@ public ModelApiResponse code(Integer code) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCode() { + public Integer getCode() { return code; } @@ -85,7 +85,7 @@ public ModelApiResponse type(String type) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public String getType() { return type; } @@ -108,7 +108,7 @@ public ModelApiResponse message(String message) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { + public String getMessage() { return message; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java index 2ef8aa828587..433ead3daa85 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java @@ -16,7 +16,7 @@ import java.util.Arrays; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -50,7 +50,7 @@ public class Order { private Integer quantity; public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; - private LocalDateTime shipDate; + private OffsetDateTime shipDate; /** * Order Status @@ -108,7 +108,7 @@ public Order id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -131,7 +131,7 @@ public Order petId(Long petId) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPetId() { + public Long getPetId() { return petId; } @@ -154,7 +154,7 @@ public Order quantity(Integer quantity) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getQuantity() { + public Integer getQuantity() { return quantity; } @@ -164,7 +164,7 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(LocalDateTime shipDate) { + public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; return this; } @@ -178,14 +178,14 @@ public Order shipDate(LocalDateTime shipDate) { @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getShipDate() { + public OffsetDateTime getShipDate() { return shipDate; } @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setShipDate(LocalDateTime shipDate) { + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -202,7 +202,7 @@ public Order status(StatusEnum status) { @ApiModelProperty(value = "Order Status") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public StatusEnum getStatus() { + public StatusEnum getStatus() { return status; } @@ -225,7 +225,7 @@ public Order complete(Boolean complete) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getComplete() { + public Boolean getComplete() { return complete; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java index 22c3d0eed21b..275427ed8d3f 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java @@ -113,7 +113,7 @@ public Pet id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -137,7 +137,7 @@ public Pet category(Category category) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Category getCategory() { + public Category getCategory() { return category; } @@ -160,7 +160,7 @@ public Pet name(String name) { @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { + public String getName() { return name; } @@ -188,7 +188,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -219,7 +219,7 @@ public Pet addTagsItem(Tag tagsItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { + public List getTags() { return tags; } @@ -242,7 +242,7 @@ public Pet status(StatusEnum status) { @ApiModelProperty(value = "pet status in the store") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public StatusEnum getStatus() { + public StatusEnum getStatus() { return status; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java index 830c5ded133e..248b99114efa 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java @@ -57,7 +57,7 @@ public Tag id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -80,7 +80,7 @@ public Tag name(String name) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { + public String getName() { return name; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java index 057e2f19d912..d696c046a1ea 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java @@ -81,7 +81,7 @@ public User id(Long id) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public Long getId() { return id; } @@ -104,7 +104,7 @@ public User username(String username) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUsername() { + public String getUsername() { return username; } @@ -127,7 +127,7 @@ public User firstName(String firstName) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFirstName() { + public String getFirstName() { return firstName; } @@ -150,7 +150,7 @@ public User lastName(String lastName) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLastName() { + public String getLastName() { return lastName; } @@ -173,7 +173,7 @@ public User email(String email) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { + public String getEmail() { return email; } @@ -196,7 +196,7 @@ public User password(String password) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPassword() { + public String getPassword() { return password; } @@ -219,7 +219,7 @@ public User phone(String phone) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPhone() { + public String getPhone() { return phone; } @@ -242,7 +242,7 @@ public User userStatus(Integer userStatus) { @ApiModelProperty(value = "User Status") @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUserStatus() { + public Integer getUserStatus() { return userStatus; } diff --git a/samples/server/petstore/java-msf4j/pom.xml b/samples/server/petstore/java-msf4j/pom.xml index d2a5c14078d3..b8edcc49570b 100644 --- a/samples/server/petstore/java-msf4j/pom.xml +++ b/samples/server/petstore/java-msf4j/pom.xml @@ -83,7 +83,7 @@ - 1.7 + 1.8 ${java.version} ${java.version} 4.0.4 diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Animal.java index 2e2d75d776cd..02a01e4840e8 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Animal.java @@ -1,6 +1,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java index 0ce290ed50b2..d7fb41eb1f9d 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java @@ -121,17 +121,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -140,10 +140,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } 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 6044ef02c143..23694debaaeb 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 @@ -124,17 +124,17 @@ public CompletionStage updatePet(Http.Request request) throws Exception @ApiAction public CompletionStage updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -143,10 +143,10 @@ public CompletionStage updatePetWithForm(Http.Request request, Long petI @ApiAction public CompletionStage uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java index 762150e4c638..adf8e0c4b02b 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java @@ -119,17 +119,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -138,10 +138,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json index aed3406f2662..9657373ab3de 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java index 732c05a14685..f7b46fdf15e8 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java @@ -1,5 +1,6 @@ package apimodels; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.*; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java index 98e4052c8ed7..43ff6b75acce 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java @@ -174,96 +174,96 @@ public Result testClientModel(Http.Request request) throws Exception { @ApiAction public Result testEndpointParameters(Http.Request request) throws Exception { - String valueinteger = (request.body().asMultipartFormData().asFormUrlEncoded().get("integer"))[0]; + String[] valueinteger = request.body().asMultipartFormData().asFormUrlEncoded().get("integer"); Integer integer; if (valueinteger != null) { - integer = Integer.parseInt(valueinteger); + integer = Integer.parseInt(valueinteger[0]); } else { integer = null; } - String valueint32 = (request.body().asMultipartFormData().asFormUrlEncoded().get("int32"))[0]; + String[] valueint32 = request.body().asMultipartFormData().asFormUrlEncoded().get("int32"); Integer int32; if (valueint32 != null) { - int32 = Integer.parseInt(valueint32); + int32 = Integer.parseInt(valueint32[0]); } else { int32 = null; } - String valueint64 = (request.body().asMultipartFormData().asFormUrlEncoded().get("int64"))[0]; + String[] valueint64 = request.body().asMultipartFormData().asFormUrlEncoded().get("int64"); Long int64; if (valueint64 != null) { - int64 = Long.parseLong(valueint64); + int64 = Long.parseLong(valueint64[0]); } else { int64 = null; } - String valuenumber = (request.body().asMultipartFormData().asFormUrlEncoded().get("number"))[0]; + String[] valuenumber = request.body().asMultipartFormData().asFormUrlEncoded().get("number"); BigDecimal number; if (valuenumber != null) { - number = new BigDecimal(valuenumber); + number = new BigDecimal(valuenumber[0]); } else { throw new IllegalArgumentException("'number' parameter is required"); } - String value_float = (request.body().asMultipartFormData().asFormUrlEncoded().get("float"))[0]; + String[] value_float = request.body().asMultipartFormData().asFormUrlEncoded().get("float"); Float _float; if (value_float != null) { - _float = Float.parseFloat(value_float); + _float = Float.parseFloat(value_float[0]); } else { _float = null; } - String value_double = (request.body().asMultipartFormData().asFormUrlEncoded().get("double"))[0]; + String[] value_double = request.body().asMultipartFormData().asFormUrlEncoded().get("double"); Double _double; if (value_double != null) { - _double = Double.parseDouble(value_double); + _double = Double.parseDouble(value_double[0]); } else { throw new IllegalArgumentException("'double' parameter is required"); } - String valuestring = (request.body().asMultipartFormData().asFormUrlEncoded().get("string"))[0]; + String[] valuestring = request.body().asMultipartFormData().asFormUrlEncoded().get("string"); String string; if (valuestring != null) { - string = valuestring; + string = valuestring[0]; } else { string = null; } - String valuepatternWithoutDelimiter = (request.body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"))[0]; + String[] valuepatternWithoutDelimiter = request.body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"); String patternWithoutDelimiter; if (valuepatternWithoutDelimiter != null) { - patternWithoutDelimiter = valuepatternWithoutDelimiter; + patternWithoutDelimiter = valuepatternWithoutDelimiter[0]; } else { throw new IllegalArgumentException("'pattern_without_delimiter' parameter is required"); } - String value_byte = (request.body().asMultipartFormData().asFormUrlEncoded().get("byte"))[0]; + String[] value_byte = request.body().asMultipartFormData().asFormUrlEncoded().get("byte"); byte[] _byte; if (value_byte != null) { - _byte = value_byte.getBytes(); + _byte = value_byte[0].getBytes(); } else { throw new IllegalArgumentException("'byte' parameter is required"); } Http.MultipartFormData bodybinary = request.body().asMultipartFormData(); Http.MultipartFormData.FilePart binary = bodybinary.getFile("binary"); - String valuedate = (request.body().asMultipartFormData().asFormUrlEncoded().get("date"))[0]; + String[] valuedate = request.body().asMultipartFormData().asFormUrlEncoded().get("date"); LocalDate date; if (valuedate != null) { - date = LocalDate.parse(valuedate); + date = LocalDate.parse(valuedate[0]); } else { date = null; } - String valuedateTime = (request.body().asMultipartFormData().asFormUrlEncoded().get("dateTime"))[0]; + String[] valuedateTime = request.body().asMultipartFormData().asFormUrlEncoded().get("dateTime"); OffsetDateTime dateTime; if (valuedateTime != null) { - dateTime = OffsetDateTime.parse(valuedateTime); + dateTime = OffsetDateTime.parse(valuedateTime[0]); } else { dateTime = null; } - String valuepassword = (request.body().asMultipartFormData().asFormUrlEncoded().get("password"))[0]; + String[] valuepassword = request.body().asMultipartFormData().asFormUrlEncoded().get("password"); String password; if (valuepassword != null) { - password = valuepassword; + password = valuepassword[0]; } else { password = null; } - String valueparamCallback = (request.body().asMultipartFormData().asFormUrlEncoded().get("callback"))[0]; + String[] valueparamCallback = request.body().asMultipartFormData().asFormUrlEncoded().get("callback"); String paramCallback; if (valueparamCallback != null) { - paramCallback = valueparamCallback; + paramCallback = valueparamCallback[0]; } else { paramCallback = null; } @@ -311,10 +311,10 @@ public Result testEnumParameters(Http.Request request) throws Exception { enumFormStringArray.add(curParam); } } - String valueenumFormString = (request.body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"))[0]; + String[] valueenumFormString = request.body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"); String enumFormString; if (valueenumFormString != null) { - enumFormString = valueenumFormString; + enumFormString = valueenumFormString[0]; } else { enumFormString = "-efg"; } @@ -403,17 +403,17 @@ public Result testInlineAdditionalProperties(Http.Request request) throws Except @ApiAction public Result testJsonFormData(Http.Request request) throws Exception { - String valueparam = (request.body().asMultipartFormData().asFormUrlEncoded().get("param"))[0]; + String[] valueparam = request.body().asMultipartFormData().asFormUrlEncoded().get("param"); String param; if (valueparam != null) { - param = valueparam; + param = valueparam[0]; } else { throw new IllegalArgumentException("'param' parameter is required"); } - String valueparam2 = (request.body().asMultipartFormData().asFormUrlEncoded().get("param2"))[0]; + String[] valueparam2 = request.body().asMultipartFormData().asFormUrlEncoded().get("param2"); String param2; if (valueparam2 != null) { - param2 = valueparam2; + param2 = valueparam2[0]; } else { throw new IllegalArgumentException("'param2' parameter is required"); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java index 53c3ed9ba10e..6ef40b879b47 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java @@ -122,17 +122,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -141,10 +141,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } @@ -155,10 +155,10 @@ public Result uploadFile(Http.Request request, Long petId) throws Exception { @ApiAction public Result uploadFileWithRequiredFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index c419a58de0d0..c25c28ce9bd1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -58,7 +58,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -103,7 +103,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -341,7 +341,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -394,7 +394,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -464,7 +464,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -564,7 +564,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -594,7 +594,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -624,7 +624,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -807,7 +807,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -844,7 +844,7 @@ "summary" : "To test class name in snake case", "tags" : [ "fake_classname_tags 123#$%^" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -1016,7 +1016,7 @@ }, "summary" : "To test enum parameters", "tags" : [ "fake" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" }, "patch" : { @@ -1048,7 +1048,7 @@ "summary" : "To test \"client\" model", "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -1160,7 +1160,7 @@ } ], "summary" : "Fake endpoint for testing various parameters\n 假端點\n 偽のエンドポイント\n 가짜 엔드 포인트", "tags" : [ "fake" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -1193,7 +1193,7 @@ }, "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "*/*" } }, @@ -1226,7 +1226,7 @@ }, "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "*/*" } }, @@ -1259,7 +1259,7 @@ }, "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "*/*" } }, @@ -1292,7 +1292,7 @@ }, "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "*/*" } }, @@ -1327,7 +1327,7 @@ }, "summary" : "test json serialization of form data", "tags" : [ "fake" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -1357,7 +1357,7 @@ "summary" : "test inline additionalProperties", "tags" : [ "fake" ], "x-codegen-request-body-name" : "param", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -1390,7 +1390,7 @@ }, "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -1443,7 +1443,7 @@ "summary" : "creates an XmlItem", "tags" : [ "fake" ], "x-codegen-request-body-name" : "XmlItem", - "x-contentType" : "application/xml", + "x-content-type" : "application/xml", "x-accepts" : "application/json" } }, @@ -1477,7 +1477,7 @@ "summary" : "To test special tags", "tags" : [ "$another-fake?" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -1503,7 +1503,7 @@ }, "tags" : [ "fake" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -1630,7 +1630,7 @@ } ], "summary" : "uploads an image (required)", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiController.java index 79ed73fe05b7..9f90782b4489 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiController.java @@ -111,17 +111,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -130,10 +130,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java index 37ce74ba03d2..893717c9e2ee 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java @@ -122,17 +122,17 @@ public Result updatePet(Http.Request request) throws IOException { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -141,10 +141,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) { @ApiAction public Result uploadFile(Http.Request request, Long petId) { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java index c1c5ab177688..472f237a5bb2 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java @@ -181,17 +181,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -206,10 +206,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java index 4e5f0308bfa2..9b4ea3e85f1f 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java @@ -121,17 +121,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -140,10 +140,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java index 4e5f0308bfa2..9b4ea3e85f1f 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java @@ -121,17 +121,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -140,10 +140,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java index 2808f038dfd4..86074165e002 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java @@ -120,17 +120,17 @@ public Result updatePet(Http.Request request) throws Exception { public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -139,10 +139,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java index 4e5f0308bfa2..9b4ea3e85f1f 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java @@ -121,17 +121,17 @@ public Result updatePet(Http.Request request) throws Exception { @ApiAction public Result updatePetWithForm(Http.Request request, Long petId) throws Exception { - String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String[] valuename = request.body().asMultipartFormData().asFormUrlEncoded().get("name"); String name; if (valuename != null) { - name = valuename; + name = valuename[0]; } else { name = null; } - String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String[] valuestatus = request.body().asMultipartFormData().asFormUrlEncoded().get("status"); String status; if (valuestatus != null) { - status = valuestatus; + status = valuestatus[0]; } else { status = null; } @@ -140,10 +140,10 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti @ApiAction public Result uploadFile(Http.Request request, Long petId) throws Exception { - String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String[] valueadditionalMetadata = request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"); String additionalMetadata; if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; + additionalMetadata = valueadditionalMetadata[0]; } else { additionalMetadata = null; } diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java index 3f538dd91f34..00ff133c1c45 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java @@ -539,10 +539,10 @@ public interface PathHandlerInterface { *

    Response headers: [CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ "type" : "integer", "format" : "int32" -}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ +}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ "type" : "string", "format" : "date-time" -}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false}]

    +}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false}]

    * *

    Produces: [{mediaType=application/xml}, {mediaType=application/json}]

    *

    Returns: {@link String}

    diff --git a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json index a3bd1d08e49e..70d76adacd9e 100644 --- a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json @@ -54,7 +54,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -95,7 +95,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -326,7 +326,7 @@ } ], "summary" : "Updates a pet in the store with form data", "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", + "x-content-type" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" } }, @@ -379,7 +379,7 @@ } ], "summary" : "uploads an image", "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", + "x-content-type" : "multipart/form-data", "x-accepts" : "application/json" } }, @@ -449,7 +449,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -549,7 +549,7 @@ "summary" : "Create user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -579,7 +579,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -609,7 +609,7 @@ "summary" : "Creates list of users with given input array", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } }, @@ -792,7 +792,7 @@ "summary" : "Updated user", "tags" : [ "user" ], "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", + "x-content-type" : "*/*", "x-accepts" : "application/json" } } diff --git a/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml b/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml index 182e45c28c2d..625a038dc381 100644 --- a/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml +++ b/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml @@ -45,7 +45,7 @@ paths: summary: Add a new pet to the store tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json put: description: "" @@ -75,7 +75,7 @@ paths: summary: Update an existing pet tags: - pet - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /pet/findByStatus: get: @@ -262,7 +262,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json /pet/{petId}/uploadImage: post: @@ -306,7 +306,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json /store/inventory: get: @@ -354,7 +354,7 @@ paths: summary: Place an order for a pet tags: - store - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /store/order/{orderId}: delete: @@ -432,7 +432,7 @@ paths: summary: Create user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: @@ -448,7 +448,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/createWithList: post: @@ -464,7 +464,7 @@ paths: summary: Creates list of users with given input array tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json /user/login: get: @@ -623,7 +623,7 @@ paths: summary: Updated user tags: - user - x-contentType: application/json + x-content-type: application/json x-accepts: application/json components: requestBodies: diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Category.java index fa873f92de03..de81b7fe5bd9 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Category.java @@ -11,6 +11,7 @@ * A category for a pet **/ @ApiModel(description="A category for a pet") + public class Category { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/ModelApiResponse.java index 940222d99fe0..b6a2bcb99048 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -12,6 +12,7 @@ * Describes the result of uploading an image resource **/ @ApiModel(description="Describes the result of uploading an image resource") + public class ModelApiResponse { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java index 889c8aeca50a..25181ffee3b5 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java @@ -14,6 +14,7 @@ * An order for a pets from the pet store **/ @ApiModel(description="An order for a pets from the pet store") + public class Order { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java index 875d4e513ed6..a6945964b9d3 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java @@ -17,6 +17,7 @@ * A pet for sale in the pet store **/ @ApiModel(description="A pet for sale in the pet store") + public class Pet { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Tag.java index b3ee95a1db42..654e9e11a310 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Tag.java @@ -11,6 +11,7 @@ * A tag for a pet **/ @ApiModel(description="A tag for a pet") + public class Tag { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/User.java index d4cde9bf25e9..9691cca83ce3 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/User.java @@ -11,6 +11,7 @@ * A User who is purchasing from the pet store **/ @ApiModel(description="A User who is purchasing from the pet store") + public class User { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/FILES b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/FILES deleted file mode 100644 index 296e6f6bae90..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/FILES +++ /dev/null @@ -1,10 +0,0 @@ -pom.xml -src/gen/java/org/openapitools/api/TestHeadersApi.java -src/gen/java/org/openapitools/api/TestHeadersApiService.java -src/gen/java/org/openapitools/api/TestQueryParamsApi.java -src/gen/java/org/openapitools/api/TestQueryParamsApiService.java -src/gen/java/org/openapitools/model/TestResponse.java -src/main/java/org/openapitools/api/RestApplication.java -src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java -src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java -src/main/webapp/WEB-INF/beans.xml diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml index cc6d673012e4..8570bd5504c3 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml @@ -12,21 +12,6 @@ src/main/java - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - true - 128m - 512m - - -Xlint:all - - - org.codehaus.mojo @@ -107,15 +92,12 @@ ${beanvalidation-version} provided - - joda-time - joda-time - 2.10.13 - + - 2.0.2 + UTF-8 + 2.0.2 diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java deleted file mode 100644 index 3a827946cbef..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; -import org.openapitools.api.TestHeadersApiService; - -import javax.ws.rs.*; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; - -import io.swagger.annotations.*; -import java.io.InputStream; - -import org.apache.cxf.jaxrs.ext.PATCH; -import org.apache.cxf.jaxrs.ext.multipart.Attachment; -import org.apache.cxf.jaxrs.ext.multipart.Multipart; - -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -@Path("/test-headers") -@RequestScoped - -@Api(description = "the test-headers API") - - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") - -public class TestHeadersApi { - - @Context SecurityContext securityContext; - - @Inject TestHeadersApiService delegate; - - - @GET - - - @Produces({ "application/json" }) - @ApiOperation(value = "test headers", notes = "desc", response = TestResponse.class, tags={ "verify-default-value" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) - public Response headersTest( @ApiParam(value = "" , defaultValue="11.2")@HeaderParam("headerNumber") BigDecimal headerNumber, @ApiParam(value = "" , defaultValue="qwerty")@HeaderParam("headerString") String headerString, @ApiParam(value = "" , defaultValue="qwerty")@HeaderParam("headerStringWrapped") String headerStringWrapped, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test")@HeaderParam("headerStringQuotes") String headerStringQuotes, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test")@HeaderParam("headerStringQuotesWrapped") String headerStringQuotesWrapped, @ApiParam(value = "" , defaultValue="true")@HeaderParam("headerBoolean") Boolean headerBoolean) { - return delegate.headersTest(headerNumber, headerString, headerStringWrapped, headerStringQuotes, headerStringQuotesWrapped, headerBoolean, securityContext); - } -} diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestHeadersApiService.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestHeadersApiService.java deleted file mode 100644 index 5649bae1a0d5..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestHeadersApiService.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.api.*; -import org.openapitools.model.*; - -import org.apache.cxf.jaxrs.ext.multipart.Attachment; -import org.apache.cxf.jaxrs.ext.multipart.Multipart; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") -public interface TestHeadersApiService { - public Response headersTest(BigDecimal headerNumber, String headerString, String headerStringWrapped, String headerStringQuotes, String headerStringQuotesWrapped, Boolean headerBoolean, SecurityContext securityContext); -} diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java deleted file mode 100644 index 5bd2e2788ee2..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; -import org.openapitools.api.TestQueryParamsApiService; - -import javax.ws.rs.*; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; - -import io.swagger.annotations.*; -import java.io.InputStream; - -import org.apache.cxf.jaxrs.ext.PATCH; -import org.apache.cxf.jaxrs.ext.multipart.Attachment; -import org.apache.cxf.jaxrs.ext.multipart.Multipart; - -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -@Path("/test-query-params") -@RequestScoped - -@Api(description = "the test-query-params API") - - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") - -public class TestQueryParamsApi { - - @Context SecurityContext securityContext; - - @Inject TestQueryParamsApiService delegate; - - - @GET - - - @Produces({ "application/json" }) - @ApiOperation(value = "test query params", notes = "desc", response = TestResponse.class, tags={ "verify-default-value" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) - public Response queryParamsTest(@ApiParam(value = "", defaultValue="11.2") @DefaultValue("11.2") @QueryParam("queryNumber") BigDecimal queryNumber, @ApiParam(value = "", defaultValue="qwerty") @DefaultValue("qwerty") @QueryParam("queryString") String queryString, @ApiParam(value = "", defaultValue="qwerty") @DefaultValue("qwerty") @QueryParam("queryStringWrapped") String queryStringWrapped, @ApiParam(value = "", defaultValue="qwerty\"with quotes\" test") @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotes") String queryStringQuotes, @ApiParam(value = "", defaultValue="qwerty\"with quotes\" test") @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotesWrapped") String queryStringQuotesWrapped, @ApiParam(value = "", defaultValue="true") @DefaultValue("true") @QueryParam("queryBoolean") Boolean queryBoolean) { - return delegate.queryParamsTest(queryNumber, queryString, queryStringWrapped, queryStringQuotes, queryStringQuotesWrapped, queryBoolean, securityContext); - } -} diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestQueryParamsApiService.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestQueryParamsApiService.java deleted file mode 100644 index 2d1ccea3d53f..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/api/TestQueryParamsApiService.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.api.*; -import org.openapitools.model.*; - -import org.apache.cxf.jaxrs.ext.multipart.Attachment; -import org.apache.cxf.jaxrs.ext.multipart.Multipart; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") -public interface TestQueryParamsApiService { - public Response queryParamsTest(BigDecimal queryNumber, String queryString, String queryStringWrapped, String queryStringQuotes, String queryStringQuotesWrapped, Boolean queryBoolean, SecurityContext securityContext); -} diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/model/TestResponse.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/model/TestResponse.java deleted file mode 100644 index df0f85ed79ac..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/gen/java/org/openapitools/model/TestResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import javax.validation.constraints.*; - - -import io.swagger.annotations.*; -import java.util.Objects; - - - -public class TestResponse { - - private Integer id; - - private String stringField = "asd"; - - private BigDecimal numberField = new BigDecimal("11"); - - private Boolean booleanField = true; - - - /** - **/ - public TestResponse id(Integer id) { - this.id = id; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty("id") - @NotNull - public Integer getId() { - return id; - } - public void setId(Integer id) { - this.id = id; - } - - - /** - **/ - public TestResponse stringField(String stringField) { - this.stringField = stringField; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty("stringField") - @NotNull - public String getStringField() { - return stringField; - } - public void setStringField(String stringField) { - this.stringField = stringField; - } - - - /** - **/ - public TestResponse numberField(BigDecimal numberField) { - this.numberField = numberField; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty("numberField") - @NotNull - public BigDecimal getNumberField() { - return numberField; - } - public void setNumberField(BigDecimal numberField) { - this.numberField = numberField; - } - - - /** - **/ - public TestResponse booleanField(Boolean booleanField) { - this.booleanField = booleanField; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty("booleanField") - @NotNull - public Boolean getBooleanField() { - return booleanField; - } - public void setBooleanField(Boolean booleanField) { - this.booleanField = booleanField; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TestResponse testResponse = (TestResponse) o; - return Objects.equals(id, testResponse.id) && - Objects.equals(stringField, testResponse.stringField) && - Objects.equals(numberField, testResponse.numberField) && - Objects.equals(booleanField, testResponse.booleanField); - } - - @Override - public int hashCode() { - return Objects.hash(id, stringField, numberField, booleanField); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TestResponse {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" stringField: ").append(toIndentedString(stringField)).append("\n"); - sb.append(" numberField: ").append(toIndentedString(numberField)).append("\n"); - sb.append(" booleanField: ").append(toIndentedString(booleanField)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/RestApplication.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/RestApplication.java deleted file mode 100644 index dd6442415ba1..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/RestApplication.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openapitools.api; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; - -@ApplicationPath("") -public class RestApplication extends Application { - // Add implementation-specific details here -} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java deleted file mode 100644 index 5db958a69f50..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.openapitools.api.impl; - -import org.openapitools.api.*; -import org.openapitools.model.*; - -import org.apache.cxf.jaxrs.ext.multipart.Attachment; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; - -import java.io.InputStream; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@RequestScoped -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") -public class TestHeadersApiServiceImpl implements TestHeadersApiService { - @Override - public Response headersTest(BigDecimal headerNumber, String headerString, String headerStringWrapped, String headerStringQuotes, String headerStringQuotesWrapped, Boolean headerBoolean, SecurityContext securityContext) { - // do some magic! - return Response.ok().entity("magic!").build(); - } -} diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java deleted file mode 100644 index fc7a757c8ab0..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.openapitools.api.impl; - -import org.openapitools.api.*; -import org.openapitools.model.*; - -import org.apache.cxf.jaxrs.ext.multipart.Attachment; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; - -import java.io.InputStream; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@RequestScoped -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") -public class TestQueryParamsApiServiceImpl implements TestQueryParamsApiService { - @Override - public Response queryParamsTest(BigDecimal queryNumber, String queryString, String queryStringWrapped, String queryStringQuotes, String queryStringQuotesWrapped, Boolean queryBoolean, SecurityContext securityContext) { - // do some magic! - return Response.ok().entity("magic!").build(); - } -} diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/webapp/WEB-INF/beans.xml b/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index cb6d500d43fc..000000000000 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/src/main/webapp/WEB-INF/beans.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml index 71ecc6d584d4..e7e5910ef3c1 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml @@ -61,7 +61,7 @@ - + javax javaee-api @@ -69,7 +69,7 @@ provided - + org.apache.cxf cxf-rt-frontend-jaxrs @@ -79,7 +79,7 @@ provided - + com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider @@ -115,6 +115,7 @@ + UTF-8 2.0.2 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 76d6eb425051..57c63b563958 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 @@ -61,10 +61,13 @@ public Response addPet(@ApiParam(value = "Pet object that needs to be added to t @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @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 = "" )@HeaderParam("api_key") String apiKey) { - return delegate.deletePet(petId, apiKey, securityContext); + public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId) { + return delegate.deletePet(petId, securityContext); } @GET diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApiService.java index 7272b6076d0d..cd8754bc8764 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApiService.java @@ -20,7 +20,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") public interface PetApiService { public Response addPet(Pet body, SecurityContext securityContext); - public Response deletePet(Long petId, String apiKey, SecurityContext securityContext); + public Response deletePet(Long petId, SecurityContext securityContext); public Response findPetsByStatus(List status, SecurityContext securityContext); @Deprecated public Response findPetsByTags(List tags, SecurityContext securityContext); public Response getPetById(Long petId, SecurityContext securityContext); diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index b67a47dc56f5..ad4a65189718 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -26,7 +26,7 @@ public Response addPet(Pet body, SecurityContext securityContext) { return Response.ok().entity("magic!").build(); } @Override - public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) { + public Response deletePet(Long petId, SecurityContext securityContext) { // do some magic! return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Category.java index fa873f92de03..de81b7fe5bd9 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Category.java @@ -11,6 +11,7 @@ * A category for a pet **/ @ApiModel(description="A category for a pet") + public class Category { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/ModelApiResponse.java index 940222d99fe0..b6a2bcb99048 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -12,6 +12,7 @@ * Describes the result of uploading an image resource **/ @ApiModel(description="Describes the result of uploading an image resource") + public class ModelApiResponse { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java index 889c8aeca50a..25181ffee3b5 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java @@ -14,6 +14,7 @@ * An order for a pets from the pet store **/ @ApiModel(description="An order for a pets from the pet store") + public class Order { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java index 875d4e513ed6..a6945964b9d3 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java @@ -17,6 +17,7 @@ * A pet for sale in the pet store **/ @ApiModel(description="A pet for sale in the pet store") + public class Pet { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Tag.java index b3ee95a1db42..654e9e11a310 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Tag.java @@ -11,6 +11,7 @@ * A tag for a pet **/ @ApiModel(description="A tag for a pet") + public class Tag { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/User.java index d4cde9bf25e9..9691cca83ce3 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/User.java @@ -11,6 +11,7 @@ * A User who is purchasing from the pet store **/ @ApiModel(description="A User who is purchasing from the pet store") + public class User { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java index 74f95d7a95d5..b21fadcb1b2e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java @@ -140,10 +140,13 @@ public interface FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) @ApiOperation(value = "To test enum parameters", tags={ "fake" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request"), @ApiResponse(code = 404, message = "Not found") }) - public void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString); + public void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString); /** * Fake endpoint to test group parameters (optional) diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java index 924046ee9370..70ecf6c958c7 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java @@ -52,10 +52,13 @@ public interface PetApi { @DELETE @Path("/pet/{petId}") @ApiOperation(value = "Deletes a pet", tags={ "pet" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation"), @ApiResponse(code = 400, message = "Invalid pet value") }) - public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); + public void deletePet(@PathParam("petId") Long petId); /** * Finds Pets by status diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 600a0710f212..426388c95c5b 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesAnyType extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 95cefcee01a7..60e564fd9da9 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesArray extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index ecb69172e245..17047f7744ed 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesBoolean extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index eacb08e9b07a..8a40e2a85bff 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesClass { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index b6f5305971fe..c1430f755a1b 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesInteger extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index da170698db27..9a48aca1e164 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesNumber extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index c566e4123b14..d0bf89038584 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesObject extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index c71f2f9abf4a..80242fd7f33d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesString extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java index 45d710435487..0813f270780d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import javax.validation.constraints.*; @@ -14,6 +15,7 @@ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) + public class Animal { @ApiModelProperty(required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1ecc2e00ddae..c754d76d6e48 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class ArrayOfArrayOfNumberOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index b2cd6fae9790..a70080c8fef4 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class ArrayOfNumberOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java index 8c4a07789a9a..68da97e5f52c 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class ArrayTest { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCat.java index 63a7e4e9a2f4..1515c9d3ec76 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCat.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class BigCat extends Cat { public enum KindEnum { diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java index fc86ddad6973..e357c7fb51dd 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class BigCatAllOf { public enum KindEnum { diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Capitalization.java index c1068b85872a..d278a359d94a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Capitalization.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Capitalization { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Cat.java index f33e6df06abc..518d95245f63 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Cat.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Cat extends Animal { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java index a9b9e3ee2290..00c1a999f3ab 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class CatAllOf { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Category.java index bc0cf98bd67a..ba2c14cc5103 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Category.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Category { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ClassModel.java index b1ccd862a51a..6380f6e7bc79 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ClassModel.java @@ -11,6 +11,7 @@ * Model for testing model with \"_class\" property **/ @ApiModel(description="Model for testing model with \"_class\" property") + public class ClassModel { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Client.java index d4b20ab1d74e..3f6ed69a39f7 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Client.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Client { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Dog.java index a6543aa091c1..e837bbf6743e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Dog.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Dog extends Animal { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java index a267694d017b..d3cd545c2835 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class DogAllOf { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumArrays.java index 179240228aad..e04e0812e5a7 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumArrays.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class EnumArrays { public enum JustSymbolEnum { diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumTest.java index 25b8936d196f..e1cd415ba0b2 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumTest.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class EnumTest { public enum EnumStringEnum { diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 6213664ff0b2..33c7dafbae33 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class FileSchemaTestClass { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java index 99f6e76de0eb..6791f54cb087 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java @@ -12,6 +12,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class FormatTest { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 6cc81ceeaaed..60231823a452 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class HasOnlyReadOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java index a97fdb0cc73f..638f7c66491c 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java @@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class MapTest { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index ad1fcfc6ba32..7a9e6e20f389 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class MixedPropertiesAndAdditionalPropertiesClass { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Model200Response.java index d0a9b793514c..c6ba617f9fea 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Model200Response.java @@ -12,6 +12,7 @@ * Model for testing model name starting with number **/ @ApiModel(description="Model for testing model name starting with number") + public class Model200Response { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelApiResponse.java index 09472755fffc..4b664bda4b8a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class ModelApiResponse { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelFile.java index 74576478b23c..34140c51f7e1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelFile.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelFile.java @@ -12,6 +12,7 @@ * Must be named `File` for test. **/ @ApiModel(description="Must be named `File` for test.") + public class ModelFile { @ApiModelProperty(value = "Test capitalization") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelList.java index 8ec273dbd0b3..7e4cde02fd61 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelList.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class ModelList { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelReturn.java index bfc732d5e264..4b3662802d87 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ModelReturn.java @@ -12,6 +12,7 @@ * Model for testing reserved words **/ @ApiModel(description="Model for testing reserved words") + public class ModelReturn { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Name.java index 0d03c9281344..5cdbdcdb558b 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Name.java @@ -11,6 +11,7 @@ * Model for testing model name same as property name **/ @ApiModel(description="Model for testing model name same as property name") + public class Name { @ApiModelProperty(required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/NumberOnly.java index 3b950349b271..39e0d08dca0f 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/NumberOnly.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class NumberOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Order.java index eb18aff66bfe..b6218ae0a940 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Order { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java index 8fcc3a3c8de4..1bc0a2824990 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class OuterComposite { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java index 743d3491a305..4fc6493deaaf 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java @@ -15,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Pet { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index e4fad503c694..e61030d85ad6 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class ReadOnlyFirst { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/SpecialModelName.java index b968d9a1bfd2..8c6c9b691974 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class SpecialModelName { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Tag.java index 0cc7bcd634af..f559c857cb74 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Tag.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class Tag { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 31931904fb27..aaa70e2a2d61 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class TypeHolderDefault { @ApiModelProperty(required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java index 884227868060..0a23389dabe8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class TypeHolderExample { @ApiModelProperty(example = "what", required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/User.java index c2df753a8c1e..fd9473728ebc 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/User.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class User { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java index 47b7fda7b3ef..4924cd3b2469 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; + public class XmlItem { @ApiModelProperty(example = "string", value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 43c7e8d61157..ee9663c04551 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -31,9 +31,8 @@ public class AnotherFakeApiServiceImpl implements AnotherFakeApi { */ public Client call123testSpecialTags(Client body) { // TODO: Implement... - + return null; } - -} +} diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 058003851933..a675c6aab67c 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -40,46 +40,46 @@ public class FakeApiServiceImpl implements FakeApi { */ public void createXmlItem(XmlItem xmlItem) { // TODO: Implement... - + } - + public Boolean fakeOuterBooleanSerialize(Boolean body) { // TODO: Implement... - + return null; } - + public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) { // TODO: Implement... - + return null; } - + public BigDecimal fakeOuterNumberSerialize(BigDecimal body) { // TODO: Implement... - + return null; } - + public String fakeOuterStringSerialize(String body) { // TODO: Implement... - + return null; } - + public void testBodyWithFileSchema(FileSchemaTestClass body) { // TODO: Implement... - + } - + public void testBodyWithQueryParams(String query, User body) { // TODO: Implement... - + } - + /** * To test \"client\" model * @@ -88,10 +88,10 @@ public void testBodyWithQueryParams(String query, User body) { */ public Client testClientModel(Client body) { // TODO: Implement... - + return null; } - + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -100,22 +100,22 @@ public Client testClientModel(Client body) { */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Attachment binaryDetail, LocalDate date, Date dateTime, String password, String paramCallback) { // TODO: Implement... - + } - + /** * To test enum parameters * * To test enum parameters * */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) { + public void testEnumParameters(List enumHeaderStringArray, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) { // TODO: Implement... - + } - + /** * Fake endpoint to test group parameters (optional) * @@ -124,35 +124,34 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe */ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) { // TODO: Implement... - + } - + /** * test inline additionalProperties * */ public void testInlineAdditionalProperties(Map param) { // TODO: Implement... - + } - + /** * test json serialization of form data * */ public void testJsonFormData(String param, String param2) { // TODO: Implement... - + } - + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) { // TODO: Implement... - + } - -} +} diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java index 3803ecd3927a..630bc007834a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java @@ -31,9 +31,8 @@ public class FakeClassnameTags123ApiServiceImpl implements FakeClassnameTags123A */ public Client testClassname(Client body) { // TODO: Implement... - + return null; } - -} +} diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index d6c02584e374..8876e678efc5 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -32,20 +32,20 @@ public class PetApiServiceImpl implements PetApi { */ public void addPet(Pet body) { // TODO: Implement... - + } - + /** * Deletes a pet * */ - public void deletePet(Long petId, String apiKey) { + public void deletePet(Long petId) { // TODO: Implement... - + } - + /** * Finds Pets by status * @@ -54,10 +54,10 @@ public void deletePet(Long petId, String apiKey) { */ public List findPetsByStatus(List status) { // TODO: Implement... - + return null; } - + /** * Finds Pets by tags * @@ -66,10 +66,10 @@ public List findPetsByStatus(List status) { */ public Set findPetsByTags(Set tags) { // TODO: Implement... - + return null; } - + /** * Find pet by ID * @@ -78,49 +78,48 @@ public Set findPetsByTags(Set tags) { */ public Pet getPetById(Long petId) { // TODO: Implement... - + return null; } - + /** * Update an existing pet * */ public void updatePet(Pet body) { // TODO: Implement... - + } - + /** * Updates a pet in the store with form data * */ public void updatePetWithForm(Long petId, String name, String status) { // TODO: Implement... - + } - + /** * uploads an image * */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) { + public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment _fileDetail) { // TODO: Implement... - + return null; } - + /** * uploads an image (required) * */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, Attachment requiredFileDetail, String additionalMetadata) { // TODO: Implement... - + return null; } - -} +} diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 33b5142f537c..668e92ac0ac9 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -32,10 +32,10 @@ public class StoreApiServiceImpl implements StoreApi { */ public void deleteOrder(String orderId) { // TODO: Implement... - + } - + /** * Returns pet inventories by status * @@ -44,10 +44,10 @@ public void deleteOrder(String orderId) { */ public Map getInventory() { // TODO: Implement... - + return null; } - + /** * Find purchase order by ID * @@ -56,19 +56,18 @@ public Map getInventory() { */ public Order getOrderById(Long orderId) { // TODO: Implement... - + return null; } - + /** * Place an order for a pet * */ public Order placeOrder(Order body) { // TODO: Implement... - + return null; } - -} +} diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index f867dfc43bbb..8acaea3278c4 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -1,6 +1,7 @@ package org.openapitools.api.impl; import org.openapitools.api.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; @@ -32,30 +33,30 @@ public class UserApiServiceImpl implements UserApi { */ public void createUser(User body) { // TODO: Implement... - + } - + /** * Creates list of users with given input array * */ public void createUsersWithArrayInput(List body) { // TODO: Implement... - + } - + /** * Creates list of users with given input array * */ public void createUsersWithListInput(List body) { // TODO: Implement... - + } - + /** * Delete user * @@ -64,40 +65,40 @@ public void createUsersWithListInput(List body) { */ public void deleteUser(String username) { // TODO: Implement... - + } - + /** * Get user by user name * */ public User getUserByName(String username) { // TODO: Implement... - + return null; } - + /** * Logs user into the system * */ public String loginUser(String username, String password) { // TODO: Implement... - + return null; } - + /** * Logs out current logged in user session * */ public void logoutUser() { // TODO: Implement... - + } - + /** * Updated user * @@ -106,9 +107,8 @@ public void logoutUser() { */ public void updateUser(String username, User body) { // TODO: Implement... - + } - -} +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java index b1e50fee917d..e4f41cc407b0 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -51,23 +39,23 @@ * *

    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 tests for AnotherFakeApi + * API tests for AnotherFakeApi */ public class AnotherFakeApiTest { private AnotherFakeApi api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", AnotherFakeApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); + + ClientConfiguration config = WebClient.getConfig(client); } @@ -85,8 +73,8 @@ public void call123testSpecialTagsTest() { //Client response = api.call123testSpecialTags(body); //assertNotNull(response); // TODO: test validations - - + + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java index 6c3af9f58f7c..272fbb72f433 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -60,23 +48,23 @@ * *

    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 tests for FakeApi + * API tests for FakeApi */ public class FakeApiTest { private FakeApi api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); + + ClientConfiguration config = WebClient.getConfig(client); } @@ -94,8 +82,8 @@ public void createXmlItemTest() { //api.createXmlItem(xmlItem); // TODO: test validations - - + + } /** @@ -108,8 +96,8 @@ public void fakeOuterBooleanSerializeTest() { //Boolean response = api.fakeOuterBooleanSerialize(body); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -122,8 +110,8 @@ public void fakeOuterCompositeSerializeTest() { //OuterComposite response = api.fakeOuterCompositeSerialize(body); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -136,8 +124,8 @@ public void fakeOuterNumberSerializeTest() { //BigDecimal response = api.fakeOuterNumberSerialize(body); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -150,8 +138,8 @@ public void fakeOuterStringSerializeTest() { //String response = api.fakeOuterStringSerialize(body); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -164,8 +152,8 @@ public void testBodyWithFileSchemaTest() { //api.testBodyWithFileSchema(body); // TODO: test validations - - + + } /** @@ -179,8 +167,8 @@ public void testBodyWithQueryParamsTest() { //api.testBodyWithQueryParams(query, body); // TODO: test validations - - + + } /** @@ -197,8 +185,8 @@ public void testClientModelTest() { //Client response = api.testClientModel(body); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -228,8 +216,8 @@ public void testEndpointParametersTest() { //api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); // TODO: test validations - - + + } /** @@ -243,18 +231,17 @@ public void testEndpointParametersTest() { @Test public void testEnumParametersTest() { List enumHeaderStringArray = null; - String enumHeaderString = null; List enumQueryStringArray = null; String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; List enumFormStringArray = null; String enumFormString = null; - //api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + //api.testEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); // TODO: test validations - - + + } /** @@ -276,8 +263,8 @@ public void testGroupParametersTest() { //api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); // TODO: test validations - - + + } /** @@ -292,8 +279,8 @@ public void testInlineAdditionalPropertiesTest() { //api.testInlineAdditionalProperties(param); // TODO: test validations - - + + } /** @@ -309,8 +296,8 @@ public void testJsonFormDataTest() { //api.testJsonFormData(param, param2); // TODO: test validations - - + + } /** @@ -327,8 +314,8 @@ public void testQueryParameterCollectionFormatTest() { //api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); // TODO: test validations - - + + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java index 15194d65a81b..a20299dcb2c2 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -51,23 +39,23 @@ * *

    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 tests for FakeClassnameTags123Api + * API tests for FakeClassnameTags123Api */ public class FakeClassnameTags123ApiTest { private FakeClassnameTags123Api api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeClassnameTags123Api.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); + + ClientConfiguration config = WebClient.getConfig(client); } @@ -85,8 +73,8 @@ public void testClassnameTest() { //Client response = api.testClassname(body); //assertNotNull(response); // TODO: test validations - - + + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java index 583edd073b30..69889c133199 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -54,23 +42,23 @@ * *

    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 tests for PetApi + * API tests for PetApi */ public class PetApiTest { private PetApi api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", PetApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); + + ClientConfiguration config = WebClient.getConfig(client); } @@ -86,8 +74,8 @@ public void addPetTest() { //api.addPet(body); // TODO: test validations - - + + } /** @@ -99,12 +87,11 @@ public void addPetTest() { @Test public void deletePetTest() { Long petId = null; - String apiKey = null; - //api.deletePet(petId, apiKey); + //api.deletePet(petId); // TODO: test validations - - + + } /** @@ -121,8 +108,8 @@ public void findPetsByStatusTest() { //List response = api.findPetsByStatus(status); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -139,8 +126,8 @@ public void findPetsByTagsTest() { //Set response = api.findPetsByTags(tags); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -157,8 +144,8 @@ public void getPetByIdTest() { //Pet response = api.getPetById(petId); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -173,8 +160,8 @@ public void updatePetTest() { //api.updatePet(body); // TODO: test validations - - + + } /** @@ -191,8 +178,8 @@ public void updatePetWithFormTest() { //api.updatePetWithForm(petId, name, status); // TODO: test validations - - + + } /** @@ -205,12 +192,12 @@ public void updatePetWithFormTest() { public void uploadFileTest() { Long petId = null; String additionalMetadata = null; - org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -227,8 +214,8 @@ public void uploadFileWithRequiredFileTest() { //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); //assertNotNull(response); // TODO: test validations - - + + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java index 62fa7f486c3f..7f1910cf795a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -52,23 +40,23 @@ * *

    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 tests for StoreApi + * API tests for StoreApi */ public class StoreApiTest { private StoreApi api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", StoreApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); + + ClientConfiguration config = WebClient.getConfig(client); } @@ -86,8 +74,8 @@ public void deleteOrderTest() { //api.deleteOrder(orderId); // TODO: test validations - - + + } /** @@ -103,8 +91,8 @@ public void getInventoryTest() { //Map response = api.getInventory(); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -121,8 +109,8 @@ public void getOrderByIdTest() { //Order response = api.getOrderById(orderId); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -137,8 +125,8 @@ public void placeOrderTest() { //Order response = api.placeOrder(body); //assertNotNull(response); // TODO: test validations - - + + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java index 0aae86e82a9f..9c7ddf654fd5 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java @@ -8,23 +8,12 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; import org.junit.Test; @@ -52,23 +41,23 @@ * *

    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 tests for UserApi + * API tests for UserApi */ public class UserApiTest { private UserApi api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", UserApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); + + ClientConfiguration config = WebClient.getConfig(client); } @@ -86,8 +75,8 @@ public void createUserTest() { //api.createUser(body); // TODO: test validations - - + + } /** @@ -102,8 +91,8 @@ public void createUsersWithArrayInputTest() { //api.createUsersWithArrayInput(body); // TODO: test validations - - + + } /** @@ -118,8 +107,8 @@ public void createUsersWithListInputTest() { //api.createUsersWithListInput(body); // TODO: test validations - - + + } /** @@ -136,8 +125,8 @@ public void deleteUserTest() { //api.deleteUser(username); // TODO: test validations - - + + } /** @@ -152,8 +141,8 @@ public void getUserByNameTest() { //User response = api.getUserByName(username); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -169,8 +158,8 @@ public void loginUserTest() { //String response = api.loginUser(username, password); //assertNotNull(response); // TODO: test validations - - + + } /** @@ -184,8 +173,8 @@ public void logoutUserTest() { //api.logoutUser(); // TODO: test validations - - + + } /** @@ -203,8 +192,8 @@ public void updateUserTest() { //api.updateUser(username, body); // TODO: test validations - - + + } } diff --git a/samples/server/petstore/jaxrs-datelib-j8/pom.xml b/samples/server/petstore/jaxrs-datelib-j8/pom.xml index 667fb71591b4..5306ea3c7f0a 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/pom.xml +++ b/samples/server/petstore/jaxrs-datelib-j8/pom.xml @@ -175,6 +175,11 @@ ${beanvalidation-version} provided + + javax.annotation + javax.annotation-api + 1.3.2 + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java index 19d06ca7a2ae..d0d617470f91 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES b/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES index 910d1c2a90b9..872bc298acf4 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES @@ -22,6 +22,7 @@ src/gen/java/org/openapitools/api/StringUtil.java src/gen/java/org/openapitools/api/UserApi.java src/gen/java/org/openapitools/api/UserApiService.java src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +src/gen/java/org/openapitools/model/AllOfWithSingleRef.java src/gen/java/org/openapitools/model/Animal.java src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -64,6 +65,7 @@ src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java src/gen/java/org/openapitools/model/Pet.java src/gen/java/org/openapitools/model/ReadOnlyFirst.java +src/gen/java/org/openapitools/model/SingleRefType.java src/gen/java/org/openapitools/model/SpecialModelName.java src/gen/java/org/openapitools/model/Tag.java src/gen/java/org/openapitools/model/User.java diff --git a/samples/server/petstore/jaxrs-jersey/pom.xml b/samples/server/petstore/jaxrs-jersey/pom.xml index 5c8965f738a9..76570cb5d6b8 100644 --- a/samples/server/petstore/jaxrs-jersey/pom.xml +++ b/samples/server/petstore/jaxrs-jersey/pom.xml @@ -175,6 +175,11 @@ ${beanvalidation-version} provided + + javax.annotation + javax.annotation-api + 1.3.2 + 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 3961c0800cb9..8d44fa17173d 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 @@ -10,6 +10,7 @@ import java.math.BigDecimal; import org.openapitools.model.Client; import java.util.Date; +import org.openapitools.model.EnumClass; import java.io.File; import org.openapitools.model.FileSchemaTestClass; import org.openapitools.model.HealthCheckResult; @@ -225,9 +226,9 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@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") @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) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@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") @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 = "") @QueryParam("enum_query_model_array") @Valid List enumQueryModelArray,@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) throws NotFoundException { - return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); + return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } @javax.ws.rs.DELETE diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java index 1b48df160ffd..b264292a22a4 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java @@ -8,6 +8,7 @@ import java.math.BigDecimal; import org.openapitools.model.Client; import java.util.Date; +import org.openapitools.model.EnumClass; import java.io.File; import org.openapitools.model.FileSchemaTestClass; import org.openapitools.model.HealthCheckResult; @@ -40,7 +41,7 @@ public abstract class FakeApiService { public abstract Response testBodyWithQueryParams( @NotNull String query,User user,SecurityContext securityContext) throws NotFoundException; public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,FormDataBodyPart binaryBodypart,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; - public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString,List enumQueryStringArray,String enumQueryString,Integer enumQueryInteger,Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString,List enumQueryStringArray,String enumQueryString,Integer enumQueryInteger,Double enumQueryDouble,List enumQueryModelArray,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; public abstract Response testGroupParameters( @NotNull Integer requiredStringGroup, @NotNull Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group,Integer stringGroup,Boolean booleanGroup,Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/AllOfWithSingleRef.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/AllOfWithSingleRef.java new file mode 100644 index 000000000000..fb68166b6b23 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/AllOfWithSingleRef.java @@ -0,0 +1,124 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + @JsonProperty(JSON_PROPERTY_USERNAME) + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + private SingleRefType singleRefType; + + public AllOfWithSingleRef username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @JsonProperty(value = "username") + @ApiModelProperty(value = "") + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @JsonProperty(value = "SingleRefType") + @ApiModelProperty(value = "") + @Valid + public SingleRefType getSingleRefType() { + return singleRefType; + } + + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java index cdf146a25fa5..a5eae51787ce 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/SingleRefType.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/SingleRefType.java new file mode 100644 index 000000000000..29d6b053312f --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/SingleRefType.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 68be0aeef19e..35bba32738cb 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -6,6 +6,7 @@ import java.math.BigDecimal; import org.openapitools.model.Client; import java.util.Date; +import org.openapitools.model.EnumClass; import java.io.File; import org.openapitools.model.FileSchemaTestClass; import org.openapitools.model.HealthCheckResult; @@ -89,7 +90,7 @@ public Response testEndpointParameters(BigDecimal number, Double _double, String return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { + public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator-ignore b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/FILES b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/FILES deleted file mode 100644 index ab931178fe19..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/FILES +++ /dev/null @@ -1,21 +0,0 @@ -README.md -build.gradle -pom.xml -settings.gradle -src/gen/java/org/openapitools/api/ApiException.java -src/gen/java/org/openapitools/api/ApiOriginFilter.java -src/gen/java/org/openapitools/api/ApiResponseMessage.java -src/gen/java/org/openapitools/api/JacksonConfig.java -src/gen/java/org/openapitools/api/NotFoundException.java -src/gen/java/org/openapitools/api/RFC3339DateFormat.java -src/gen/java/org/openapitools/api/RestApplication.java -src/gen/java/org/openapitools/api/StringUtil.java -src/gen/java/org/openapitools/api/TestHeadersApi.java -src/gen/java/org/openapitools/api/TestHeadersApiService.java -src/gen/java/org/openapitools/api/TestQueryParamsApi.java -src/gen/java/org/openapitools/api/TestQueryParamsApiService.java -src/gen/java/org/openapitools/model/TestResponse.java -src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java -src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java -src/main/webapp/WEB-INF/jboss-web.xml -src/main/webapp/WEB-INF/web.xml diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION deleted file mode 100644 index 5f68295fc196..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/README.md b/samples/server/petstore/jaxrs-resteasy/default-value/README.md deleted file mode 100644 index a1571eab459e..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# JAX-RS/RESTEasy server with OpenAPI - -## Overview -This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an -[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. - -This is an example of building a OpenAPI-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. -RESTEasy is used as JAX-RS implementation library and is defined as dependency. - -To run the server, please execute the following: - -``` -mvn -Djetty.http.port=8080 package org.eclipse.jetty:jetty-maven-plugin:run -``` - -You can then view the OpenAPI v2 specification here: - -``` -http://localhost:8080/swagger.json -``` - -Note that if you have configured the `host` to be something other than localhost, the calls through -swagger-ui will be directed to that host and not localhost! \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle b/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle deleted file mode 100644 index 623f1efab485..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle +++ /dev/null @@ -1,36 +0,0 @@ -apply plugin: 'war' - -project.version = "1.0.0" -project.group = "org.openapitools" - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -dependencies { - providedCompile 'org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final' - providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' - providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' - providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' - providedCompile 'javax:javaee-api:7.0' - providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' - compile 'io.swagger:swagger-annotations:1.5.22' - compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' - compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' - compile 'joda-time:joda-time:2.7' - //TODO: swaggerFeature - compile 'io.swagger:swagger-jaxrs:1.5.12' - - testCompile 'junit:junit:4.13.2', - 'org.hamcrest:hamcrest-core:1.3' -} - -sourceSets { - main { - java { - srcDir 'src/gen/java' - } - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml b/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml index 1734f3e7dc32..f73452466702 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml @@ -15,8 +15,8 @@ maven-compiler-plugin 3.6.1 - 1.8 - 1.8 + 1.7 + 1.7 @@ -126,11 +126,17 @@ ${jakarta-annotation-version} provided + com.fasterxml.jackson.datatype - jackson-datatype-jsr310 + jackson-datatype-joda ${jackson-version} + + joda-time + joda-time + 2.7 + io.swagger swagger-jaxrs @@ -162,18 +168,14 @@ - - - jakarta.validation - jakarta.validation-api - ${beanvalidation-version} - provided - - - joda-time - joda-time - 2.10.13 - + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + @@ -185,14 +187,15 @@ + UTF-8 1.5.22 2.11.2 9.2.9.v20150224 3.13.0.Final 1.6.3 - 4.13.2 + 4.13.1 4.0.4 1.3.5 - 2.0.2 + 2.0.2 diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/settings.gradle b/samples/server/petstore/jaxrs-resteasy/default-value/settings.gradle deleted file mode 100644 index f27c97e6ae8b..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "jaxrs-resteasy-default-value" \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiException.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiException.java deleted file mode 100644 index 6e0c12c35cab..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.openapitools.api; - -/** - * The exception that can be used to store the HTTP status code returned by an API response. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class ApiException extends Exception { - - /** The HTTP status code. */ - private int code; - - /** - * Constructor. - * - * @param code The HTTP status code. - * @param msg The error message. - */ - public ApiException(int code, String msg) { - super(msg); - this.code = code; - } - - /** - * Get the HTTP status code. - * - * @return The HTTP status code. - */ - public int getCode() { - return code; - } - -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiOriginFilter.java deleted file mode 100644 index ae4ceb1a77c2..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiOriginFilter.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.api; - -import java.io.IOException; - -import javax.servlet.*; -import javax.servlet.http.HttpServletResponse; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class ApiOriginFilter implements javax.servlet.Filter { - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } - - public void destroy() {} - - public void init(FilterConfig filterConfig) throws ServletException {} -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java deleted file mode 100644 index 9e071aa75fdd..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.openapitools.api; - -import javax.xml.bind.annotation.XmlTransient; - -@javax.xml.bind.annotation.XmlRootElement -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; - - int code; - String type; - String message; - - public ApiResponseMessage(){} - - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } - - @XmlTransient - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/JacksonConfig.java deleted file mode 100644 index 56feb995554f..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/JacksonConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.api; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; - -import javax.ws.rs.ext.ContextResolver; -import javax.ws.rs.ext.Provider; -import java.io.IOException; - -@Provider -public class JacksonConfig implements ContextResolver { - private final ObjectMapper objectMapper; - - public JacksonConfig() throws Exception { - - objectMapper = new ObjectMapper() - .registerModule(new JavaTimeModule()) - .setDateFormat(new RFC3339DateFormat()); - } - - public ObjectMapper getContext(Class arg0) { - return objectMapper; - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/NotFoundException.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/NotFoundException.java deleted file mode 100644 index 7bba9680d59c..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/NotFoundException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.openapitools.api; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class NotFoundException extends ApiException { - private int code; - public NotFoundException (int code, String msg) { - super(code, msg); - this.code = code; - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/RFC3339DateFormat.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/RFC3339DateFormat.java deleted file mode 100644 index 3c9230efefe2..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/RFC3339DateFormat.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openapitools.api; - -import com.fasterxml.jackson.databind.util.StdDateFormat; - -import java.text.DateFormat; -import java.text.FieldPosition; -import java.text.ParsePosition; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -public class RFC3339DateFormat extends DateFormat { - private static final long serialVersionUID = 1L; - private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); - - private final StdDateFormat fmt = new StdDateFormat() - .withTimeZone(TIMEZONE_Z) - .withColonInTimeZone(true); - - public RFC3339DateFormat() { - this.calendar = new GregorianCalendar(); - } - - @Override - public Date parse(String source, ParsePosition pos) { - return fmt.parse(source, pos); - } - - @Override - public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { - return fmt.format(date, toAppendTo, fieldPosition); - } - - @Override - public Object clone() { - return this; - } -} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/RestApplication.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/RestApplication.java deleted file mode 100644 index 94a781bb4231..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/RestApplication.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openapitools.api; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; - -@ApplicationPath("") -public class RestApplication extends Application { - -} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/StringUtil.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/StringUtil.java deleted file mode 100644 index 4bbe3a4447bc..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/StringUtil.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.openapitools.api; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) return true; - if (value != null && value.equalsIgnoreCase(str)) return true; - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

    - * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

    - * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) return ""; - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java deleted file mode 100644 index d8e7c529b10a..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.*; -import org.openapitools.api.TestHeadersApiService; - -import io.swagger.annotations.ApiParam; -import io.swagger.jaxrs.*; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.Map; -import java.util.List; -import org.openapitools.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.*; -import javax.inject.Inject; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -@Path("/test-headers") - - -@io.swagger.annotations.Api(description = "the test-headers API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class TestHeadersApi { - - @Inject TestHeadersApiService service; - - @GET - - - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "test headers", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) - public Response headersTest( @ApiParam(value = "" , defaultValue="11.2") @HeaderParam("headerNumber") BigDecimal headerNumber, @ApiParam(value = "" , defaultValue="qwerty") @HeaderParam("headerString") String headerString, @ApiParam(value = "" , defaultValue="qwerty") @HeaderParam("headerStringWrapped") String headerStringWrapped, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test") @HeaderParam("headerStringQuotes") String headerStringQuotes, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test") @HeaderParam("headerStringQuotesWrapped") String headerStringQuotesWrapped, @ApiParam(value = "" , defaultValue="true") @HeaderParam("headerBoolean") Boolean headerBoolean,@Context SecurityContext securityContext) - throws NotFoundException { - return service.headersTest(headerNumber,headerString,headerStringWrapped,headerStringQuotes,headerStringQuotesWrapped,headerBoolean,securityContext); - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApiService.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApiService.java deleted file mode 100644 index 47223d0afb76..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApiService.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.api.*; -import org.openapitools.model.*; - - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; -import org.openapitools.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public interface TestHeadersApiService { - Response headersTest(BigDecimal headerNumber,String headerString,String headerStringWrapped,String headerStringQuotes,String headerStringQuotesWrapped,Boolean headerBoolean,SecurityContext securityContext) - throws NotFoundException; -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java deleted file mode 100644 index ec0099e1813e..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.*; -import org.openapitools.api.TestQueryParamsApiService; - -import io.swagger.annotations.ApiParam; -import io.swagger.jaxrs.*; - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.Map; -import java.util.List; -import org.openapitools.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.*; -import javax.inject.Inject; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -@Path("/test-query-params") - - -@io.swagger.annotations.Api(description = "the test-query-params API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class TestQueryParamsApi { - - @Inject TestQueryParamsApiService service; - - @GET - - - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "test query params", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) - public Response queryParamsTest( @DefaultValue("11.2") @QueryParam("queryNumber") BigDecimal queryNumber, @DefaultValue("qwerty") @QueryParam("queryString") String queryString, @DefaultValue("qwerty") @QueryParam("queryStringWrapped") String queryStringWrapped, @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotes") String queryStringQuotes, @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotesWrapped") String queryStringQuotesWrapped, @DefaultValue("true") @QueryParam("queryBoolean") Boolean queryBoolean,@Context SecurityContext securityContext) - throws NotFoundException { - return service.queryParamsTest(queryNumber,queryString,queryStringWrapped,queryStringQuotes,queryStringQuotesWrapped,queryBoolean,securityContext); - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApiService.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApiService.java deleted file mode 100644 index 796bb7f66a72..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApiService.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.api.*; -import org.openapitools.model.*; - - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; -import org.openapitools.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public interface TestQueryParamsApiService { - Response queryParamsTest(BigDecimal queryNumber,String queryString,String queryStringWrapped,String queryStringQuotes,String queryStringQuotesWrapped,Boolean queryBoolean,SecurityContext securityContext) - throws NotFoundException; -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/model/TestResponse.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/model/TestResponse.java deleted file mode 100644 index fce06eb569b1..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/model/TestResponse.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import javax.validation.constraints.*; -import io.swagger.annotations.*; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class TestResponse { - - private Integer id; - private String stringField = "asd"; - private BigDecimal numberField = new BigDecimal("11"); - private Boolean booleanField = true; - - /** - **/ - - @ApiModelProperty(required = true, value = "") - @JsonProperty("id") - @NotNull - public Integer getId() { - return id; - } - public void setId(Integer id) { - this.id = id; - } - - /** - **/ - - @ApiModelProperty(required = true, value = "") - @JsonProperty("stringField") - @NotNull - public String getStringField() { - return stringField; - } - public void setStringField(String stringField) { - this.stringField = stringField; - } - - /** - **/ - - @ApiModelProperty(required = true, value = "") - @JsonProperty("numberField") - @NotNull - public BigDecimal getNumberField() { - return numberField; - } - public void setNumberField(BigDecimal numberField) { - this.numberField = numberField; - } - - /** - **/ - - @ApiModelProperty(required = true, value = "") - @JsonProperty("booleanField") - @NotNull - public Boolean getBooleanField() { - return booleanField; - } - public void setBooleanField(Boolean booleanField) { - this.booleanField = booleanField; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TestResponse testResponse = (TestResponse) o; - return Objects.equals(id, testResponse.id) && - Objects.equals(stringField, testResponse.stringField) && - Objects.equals(numberField, testResponse.numberField) && - Objects.equals(booleanField, testResponse.booleanField); - } - - @Override - public int hashCode() { - return Objects.hash(id, stringField, numberField, booleanField); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TestResponse {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" stringField: ").append(toIndentedString(stringField)).append("\n"); - sb.append(" numberField: ").append(toIndentedString(numberField)).append("\n"); - sb.append(" booleanField: ").append(toIndentedString(booleanField)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java deleted file mode 100644 index 3ba264730b47..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/java/org/openapitools/api/impl/TestHeadersApiServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.openapitools.api.impl; - -import org.openapitools.api.*; -import org.openapitools.model.*; - - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; -import org.openapitools.api.NotFoundException; - -import java.io.InputStream; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@RequestScoped -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class TestHeadersApiServiceImpl implements TestHeadersApiService { - public Response headersTest(BigDecimal headerNumber,String headerString,String headerStringWrapped,String headerStringQuotes,String headerStringQuotesWrapped,Boolean headerBoolean,SecurityContext securityContext) - throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java deleted file mode 100644 index 15baf6b69481..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/java/org/openapitools/api/impl/TestQueryParamsApiServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.openapitools.api.impl; - -import org.openapitools.api.*; -import org.openapitools.model.*; - - -import java.math.BigDecimal; -import org.openapitools.model.TestResponse; - -import java.util.List; -import org.openapitools.api.NotFoundException; - -import java.io.InputStream; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@RequestScoped -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen") -public class TestQueryParamsApiServiceImpl implements TestQueryParamsApiService { - public Response queryParamsTest(BigDecimal queryNumber,String queryString,String queryStringWrapped,String queryStringQuotes,String queryStringQuotesWrapped,Boolean queryBoolean,SecurityContext securityContext) - throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } -} diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/webapp/WEB-INF/jboss-web.xml b/samples/server/petstore/jaxrs-resteasy/default-value/src/main/webapp/WEB-INF/jboss-web.xml deleted file mode 100644 index 63da3d653ee5..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/webapp/WEB-INF/jboss-web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-resteasy/default-value/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f52301872f8d..000000000000 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - ApiOriginFilter - org.openapitools.api.ApiOriginFilter - - - ApiOriginFilter - /* - - diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml index 0329d1b80cf8..77392afb84d1 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml @@ -59,7 +59,7 @@
    - + javax javaee-api @@ -185,6 +185,7 @@ + UTF-8 1.5.22 2.11.2 9.2.9.v20150224 diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java index e7e6850d9799..10376b5849da 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java @@ -61,11 +61,14 @@ public Response addPet(@ApiParam(value = "Pet object that needs to be added to t @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) + public Response deletePet( @PathParam("petId") Long petId,@Context SecurityContext securityContext) throws NotFoundException { - return service.deletePet(petId,apiKey,securityContext); + return service.deletePet(petId,securityContext); } @GET @Path("/findByStatus") diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java index 5415004bc635..b357a638a011 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java @@ -21,7 +21,7 @@ public interface PetApiService { Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - Response deletePet(Long petId,String apiKey,SecurityContext securityContext) + Response deletePet(Long petId,SecurityContext securityContext) throws NotFoundException; Response findPetsByStatus(List status,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 0b264cc92ced..9b62bb6feb6b 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -26,7 +26,7 @@ public Response addPet(Pet body,SecurityContext securityContext) // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response deletePet(Long petId,String apiKey,SecurityContext securityContext) + public Response deletePet(Long petId,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml index 43183c9f0bfe..c01897f1b69a 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml @@ -168,6 +168,7 @@ + UTF-8 1.5.18 9.2.9.v20150224 3.0.11.Final diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java index 1e2e42d17aaf..94bc0769e042 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java @@ -52,9 +52,12 @@ public interface PetApi { @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId,@Context SecurityContext securityContext); @GET @Path("/findByStatus") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java index 47a67a72e502..f5391a0860cc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java @@ -12,9 +12,7 @@ @ApiModel(description="A category for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Category { - private Long id; - private String name; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java index 26f2b55e259c..b878faeea22b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -13,11 +13,8 @@ @ApiModel(description="Describes the result of uploading an image resource")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class ModelApiResponse { - private Integer code; - private String type; - private String message; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java index 0c2c61043471..d1fe5c4e8108 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java @@ -14,13 +14,9 @@ @ApiModel(description="An order for a pets from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Order { - private Long id; - private Long petId; - private Integer quantity; - private OffsetDateTime shipDate; /** @@ -45,9 +41,7 @@ public String toString() { } } - private StatusEnum status; - private Boolean complete = false; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java index ba7e8ffbaad1..c9630f0c3c69 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java @@ -17,15 +17,10 @@ @ApiModel(description="A pet for sale in the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Pet { - private Long id; - private Category category; - private String name; - private List photoUrls = new ArrayList<>(); - private List tags = new ArrayList<>(); /** @@ -50,7 +45,6 @@ public String toString() { } } - private StatusEnum status; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java index c734e0e00278..b2b4142e27e6 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java @@ -12,9 +12,7 @@ @ApiModel(description="A tag for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Tag { - private Long id; - private String name; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java index f5b3b89a9a07..cc1cc0d24227 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java @@ -12,21 +12,13 @@ @ApiModel(description="A User who is purchasing from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class User { - private Long id; - private String username; - private String firstName; - private String lastName; - private String email; - private String password; - private String phone; - private Integer userStatus; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 50a3d2f99c38..7ae1b892f0aa 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -22,7 +22,7 @@ public Response addPet(Pet body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response deletePet(Long petId,String apiKey,SecurityContext securityContext) { + public Response deletePet(Long petId,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml index e9dee66072a4..ff8599c0aab9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml @@ -168,6 +168,7 @@ + UTF-8 1.5.18 9.2.9.v20150224 3.0.11.Final diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java index 47a67a72e502..f5391a0860cc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java @@ -12,9 +12,7 @@ @ApiModel(description="A category for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Category { - private Long id; - private String name; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java index 26f2b55e259c..b878faeea22b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -13,11 +13,8 @@ @ApiModel(description="Describes the result of uploading an image resource")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class ModelApiResponse { - private Integer code; - private String type; - private String message; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java index 2f31649bcea9..c488917d2b39 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java @@ -14,13 +14,9 @@ @ApiModel(description="An order for a pets from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Order { - private Long id; - private Long petId; - private Integer quantity; - private DateTime shipDate; /** @@ -45,9 +41,7 @@ public String toString() { } } - private StatusEnum status; - private Boolean complete = false; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java index ba7e8ffbaad1..c9630f0c3c69 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java @@ -17,15 +17,10 @@ @ApiModel(description="A pet for sale in the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Pet { - private Long id; - private Category category; - private String name; - private List photoUrls = new ArrayList<>(); - private List tags = new ArrayList<>(); /** @@ -50,7 +45,6 @@ public String toString() { } } - private StatusEnum status; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java index c734e0e00278..b2b4142e27e6 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java @@ -12,9 +12,7 @@ @ApiModel(description="A tag for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Tag { - private Long id; - private String name; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java index f5b3b89a9a07..cc1cc0d24227 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java @@ -12,21 +12,13 @@ @ApiModel(description="A User who is purchasing from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class User { - private Long id; - private String username; - private String firstName; - private String lastName; - private String email; - private String password; - private String phone; - private Integer userStatus; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml index ad6ea8709e51..ab704408339c 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml @@ -168,6 +168,7 @@ + UTF-8 1.5.18 9.2.9.v20150224 3.0.11.Final diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java index 47a67a72e502..f5391a0860cc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java @@ -12,9 +12,7 @@ @ApiModel(description="A category for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Category { - private Long id; - private String name; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java index 26f2b55e259c..b878faeea22b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -13,11 +13,8 @@ @ApiModel(description="Describes the result of uploading an image resource")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class ModelApiResponse { - private Integer code; - private String type; - private String message; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java index bc0aa26794bd..6129e7561528 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java @@ -14,13 +14,9 @@ @ApiModel(description="An order for a pets from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Order { - private Long id; - private Long petId; - private Integer quantity; - private Date shipDate; /** @@ -45,9 +41,7 @@ public String toString() { } } - private StatusEnum status; - private Boolean complete = false; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java index ba7e8ffbaad1..c9630f0c3c69 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java @@ -17,15 +17,10 @@ @ApiModel(description="A pet for sale in the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Pet { - private Long id; - private Category category; - private String name; - private List photoUrls = new ArrayList<>(); - private List tags = new ArrayList<>(); /** @@ -50,7 +45,6 @@ public String toString() { } } - private StatusEnum status; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java index c734e0e00278..b2b4142e27e6 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java @@ -12,9 +12,7 @@ @ApiModel(description="A tag for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class Tag { - private Long id; - private String name; /** diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java index f5b3b89a9a07..cc1cc0d24227 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java @@ -12,21 +12,13 @@ @ApiModel(description="A User who is purchasing from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public class User { - private Long id; - private String username; - private String firstName; - private String lastName; - private String email; - private String password; - private String phone; - private Integer userStatus; /** diff --git a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml index 5e9984889111..8a1b40c198f3 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml @@ -59,7 +59,7 @@
    - + javax javaee-api @@ -185,6 +185,7 @@ + UTF-8 1.5.22 2.11.2 9.2.9.v20150224 diff --git a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml index 092a4723f814..b0713f7f7329 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml @@ -59,7 +59,7 @@
    - + javax javaee-api @@ -185,6 +185,7 @@ + UTF-8 1.5.22 2.11.2 9.2.9.v20150224 diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java index 7c6fb6c670ae..f91fa5872391 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java @@ -25,7 +25,7 @@ @JsonTypeName("Animal") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { - + private @Valid String className; private @Valid String color = "red"; @@ -36,9 +36,9 @@ public Animal className(String className) { return this; } - - + + @ApiModelProperty(required = true, value = "") @JsonProperty("className") @NotNull @@ -58,7 +58,7 @@ public Animal color(String color) { return this; } - + @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - + sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-spec-interface/pom.xml b/samples/server/petstore/jaxrs-spec-interface/pom.xml index 9ec53541612c..4e4151642745 100644 --- a/samples/server/petstore/jaxrs-spec-interface/pom.xml +++ b/samples/server/petstore/jaxrs-spec-interface/pom.xml @@ -93,6 +93,7 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.9 4.13.2 2.10.13 diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java index 81535f05cdd2..9919c03985ad 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java @@ -105,10 +105,13 @@ @GET @Consumes({ "application/x-www-form-urlencoded" }) @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); + void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); @DELETE @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java deleted file mode 100644 index e6b87e986d37..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; - -import io.swagger.annotations.*; - -import java.io.InputStream; -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -import javax.validation.Valid; - -@Path("/FakeClassnameTags123") -@Api(description = "the FakeClassnameTags123 API") -public interface FakeClassnameTags123Api { - - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = { - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client testClassname(@Valid Client body); -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java index 075d6931c38c..70790961ae2d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java @@ -39,10 +39,13 @@ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); + void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId); @GET @Path("/findByStatus") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 50c6702c65f7..1c8ec238b7cb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesAnyType") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesAnyType extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesAnyType extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesAnyType name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 3b400ed375e7..3d04c06342b3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -19,7 +19,8 @@ @JsonTypeName("AdditionalPropertiesArray") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesArray extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesArray extends HashMap implements Serializable { private @Valid String name; @@ -31,8 +32,6 @@ public AdditionalPropertiesArray name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index e1dbfa0821ab..8a7da60731f8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesBoolean") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesBoolean extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesBoolean extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesBoolean name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index d8256b29ea3d..dc357d0778d5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -20,7 +20,8 @@ @JsonTypeName("AdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesClass implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapString = new HashMap<>(); private @Valid Map mapNumber = new HashMap<>(); @@ -42,8 +43,6 @@ public AdditionalPropertiesClass mapString(Map mapString) { } - - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -79,8 +78,6 @@ public AdditionalPropertiesClass mapNumber(Map mapNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -116,8 +113,6 @@ public AdditionalPropertiesClass mapInteger(Map mapInteger) { } - - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -153,8 +148,6 @@ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { } - - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -190,8 +183,6 @@ public AdditionalPropertiesClass mapArrayInteger(Map> mapA } - - @ApiModelProperty(value = "") @JsonProperty("map_array_integer") public Map> getMapArrayInteger() { @@ -227,8 +218,6 @@ public AdditionalPropertiesClass mapArrayAnytype(Map> mapAr } - - @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -264,8 +253,6 @@ public AdditionalPropertiesClass mapMapString(Map> m } - - @ApiModelProperty(value = "") @JsonProperty("map_map_string") public Map> getMapMapString() { @@ -301,8 +288,6 @@ public AdditionalPropertiesClass mapMapAnytype(Map> } - - @ApiModelProperty(value = "") @JsonProperty("map_map_anytype") public Map> getMapMapAnytype() { @@ -338,8 +323,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { } - - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -359,8 +342,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { } - - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -380,8 +361,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { } - - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index fc85a62ad023..4ed241faad72 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesInteger") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesInteger extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesInteger extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesInteger name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 25852547106b..c48bafb3b72b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -19,7 +19,8 @@ @JsonTypeName("AdditionalPropertiesNumber") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesNumber extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesNumber extends HashMap implements Serializable { private @Valid String name; @@ -31,8 +32,6 @@ public AdditionalPropertiesNumber name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index 998b85d511da..ed49983b82dc 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesObject") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesObject extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesObject extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesObject name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index b317c03b4c05..2c596592d38a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesString") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesString extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesString extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesString name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java index 7c6fb6c670ae..4e53f6e996ad 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; @@ -24,7 +25,8 @@ @JsonTypeName("Animal") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Animal implements Serializable { private @Valid String className; private @Valid String color = "red"; @@ -37,8 +39,6 @@ public Animal className(String className) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("className") @NotNull @@ -59,8 +59,6 @@ public Animal color(String color) { } - - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 810e56085b5c..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - - - -public class AnimalFarm extends ArrayList implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnimalFarm animalFarm = (AnimalFarm) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6e2646e4da08..922a32ea5c4a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -19,7 +19,8 @@ @JsonTypeName("ArrayOfArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfArrayOfNumberOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList<>(); @@ -31,8 +32,6 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr } - - @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index f2ab42410746..b971245130f5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -19,7 +19,8 @@ @JsonTypeName("ArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfNumberOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList<>(); @@ -31,8 +32,6 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java index 6f2fe46e0ccd..733895ab2185 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java @@ -19,7 +19,8 @@ @JsonTypeName("ArrayTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList<>(); private @Valid List> arrayArrayOfInteger = new ArrayList<>(); @@ -33,8 +34,6 @@ public ArrayTest arrayOfString(List arrayOfString) { } - - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -70,8 +69,6 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { } - - @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -107,8 +104,6 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) } - - @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java index 38fc63872812..f792f4041ae7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java @@ -18,7 +18,8 @@ @JsonTypeName("BigCat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCat extends Cat implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class BigCat extends Cat implements Serializable { public enum KindEnum { @@ -78,8 +79,6 @@ public BigCat kind(KindEnum kind) { } - - @ApiModelProperty(value = "") @JsonProperty("kind") public KindEnum getKind() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java index e40f222f1675..2564d27774a3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -17,7 +17,8 @@ @JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCatAllOf implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class BigCatAllOf implements Serializable { public enum KindEnum { @@ -77,8 +78,6 @@ public BigCatAllOf kind(KindEnum kind) { } - - @ApiModelProperty(value = "") @JsonProperty("kind") public KindEnum getKind() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java index 595296559701..ae3e71e9dee6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java @@ -16,7 +16,8 @@ @JsonTypeName("Capitalization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Capitalization implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Capitalization implements Serializable { private @Valid String smallCamel; private @Valid String capitalCamel; @@ -33,8 +34,6 @@ public Capitalization smallCamel(String smallCamel) { } - - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -54,8 +53,6 @@ public Capitalization capitalCamel(String capitalCamel) { } - - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -75,8 +72,6 @@ public Capitalization smallSnake(String smallSnake) { } - - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -96,8 +91,6 @@ public Capitalization capitalSnake(String capitalSnake) { } - - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -117,8 +110,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { } - - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -139,8 +130,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { } - - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java index 948b28d037a3..dce3644928fa 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java @@ -18,7 +18,8 @@ @JsonTypeName("Cat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Cat extends Animal implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Cat extends Animal implements Serializable { private @Valid Boolean declawed; @@ -30,8 +31,6 @@ public Cat declawed(Boolean declawed) { } - - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java index 2ed18a6de6c3..4c85fb125ee8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java @@ -17,7 +17,8 @@ @JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class CatAllOf implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class CatAllOf implements Serializable { private @Valid Boolean declawed; @@ -29,8 +30,6 @@ public CatAllOf declawed(Boolean declawed) { } - - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java index 6d4e8a879921..5d87f2309559 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java @@ -16,7 +16,8 @@ @JsonTypeName("Category") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Category implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Category implements Serializable { private @Valid Long id; private @Valid String name = "default-name"; @@ -29,8 +30,6 @@ public Category id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -50,8 +49,6 @@ public Category name(String name) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("name") @NotNull diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java index fec3c619257e..eab0da86153e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java @@ -18,7 +18,8 @@ **/ @ApiModel(description = "Model for testing model with \"_class\" property") @JsonTypeName("ClassModel") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ClassModel implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ClassModel implements Serializable { private @Valid String propertyClass; @@ -30,8 +31,6 @@ public ClassModel propertyClass(String propertyClass) { } - - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java index 74d489b5aced..40ebc121c6b9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java @@ -16,7 +16,8 @@ @JsonTypeName("Client") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Client implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Client implements Serializable { private @Valid String client; @@ -28,8 +29,6 @@ public Client client(String client) { } - - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java index 20599ecebcfd..c5330555458e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java @@ -18,7 +18,8 @@ @JsonTypeName("Dog") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Dog extends Animal implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Dog extends Animal implements Serializable { private @Valid String breed; @@ -30,8 +31,6 @@ public Dog breed(String breed) { } - - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java index 6c7208fe19b8..bb5196f40629 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java @@ -17,7 +17,8 @@ @JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class DogAllOf implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class DogAllOf implements Serializable { private @Valid String breed; @@ -29,8 +30,6 @@ public DogAllOf breed(String breed) { } - - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java index 81e5bfed4780..127a6cf3c690 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java @@ -18,7 +18,8 @@ @JsonTypeName("EnumArrays") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumArrays implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class EnumArrays implements Serializable { public enum JustSymbolEnum { @@ -127,8 +128,6 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { } - - @ApiModelProperty(value = "") @JsonProperty("just_symbol") public JustSymbolEnum getJustSymbol() { @@ -148,8 +147,6 @@ public EnumArrays arrayEnum(List arrayEnum) { } - - @ApiModelProperty(value = "") @JsonProperty("array_enum") public List getArrayEnum() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java index 881e2503a6df..b1273c7be473 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java @@ -18,7 +18,8 @@ @JsonTypeName("Enum_Test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class EnumTest implements Serializable { public enum EnumStringEnum { @@ -226,8 +227,6 @@ public EnumTest enumString(EnumStringEnum enumString) { } - - @ApiModelProperty(value = "") @JsonProperty("enum_string") public EnumStringEnum getEnumString() { @@ -247,8 +246,6 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") @NotNull @@ -269,8 +266,6 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { } - - @ApiModelProperty(value = "") @JsonProperty("enum_integer") public EnumIntegerEnum getEnumInteger() { @@ -290,8 +285,6 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("enum_number") public EnumNumberEnum getEnumNumber() { @@ -311,8 +304,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { } - - @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index f2ee479c5b9a..9960e3877c19 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -19,7 +19,8 @@ @JsonTypeName("FileSchemaTestClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FileSchemaTestClass implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; private @Valid List files = new ArrayList<>(); @@ -32,8 +33,6 @@ public FileSchemaTestClass _file(ModelFile _file) { } - - @ApiModelProperty(value = "") @JsonProperty("file") public ModelFile getFile() { @@ -53,8 +52,6 @@ public FileSchemaTestClass files(List files) { } - - @ApiModelProperty(value = "") @JsonProperty("files") public List getFiles() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java index c6b8753a4e66..348d1157d091 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java @@ -22,7 +22,8 @@ @JsonTypeName("format_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FormatTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class FormatTest implements Serializable { private @Valid Integer integer; private @Valid Integer int32; @@ -49,8 +50,6 @@ public FormatTest integer(Integer integer) { } - - @ApiModelProperty(value = "") @JsonProperty("integer") @Min(10) @Max(100) public Integer getInteger() { @@ -72,8 +71,6 @@ public FormatTest int32(Integer int32) { } - - @ApiModelProperty(value = "") @JsonProperty("int32") @Min(20) @Max(200) public Integer getInt32() { @@ -93,8 +90,6 @@ public FormatTest int64(Long int64) { } - - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -116,8 +111,6 @@ public FormatTest number(BigDecimal number) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("number") @NotNull @@ -140,8 +133,6 @@ public FormatTest _float(Float _float) { } - - @ApiModelProperty(value = "") @JsonProperty("float") @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { @@ -163,8 +154,6 @@ public FormatTest _double(Double _double) { } - - @ApiModelProperty(value = "") @JsonProperty("double") @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { @@ -184,8 +173,6 @@ public FormatTest string(String string) { } - - @ApiModelProperty(value = "") @JsonProperty("string") @Pattern(regexp="/[a-z]/i") public String getString() { @@ -205,8 +192,6 @@ public FormatTest _byte(byte[] _byte) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("byte") @NotNull @@ -227,8 +212,6 @@ public FormatTest binary(File binary) { } - - @ApiModelProperty(value = "") @JsonProperty("binary") public File getBinary() { @@ -248,8 +231,6 @@ public FormatTest date(LocalDate date) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("date") @NotNull @@ -270,8 +251,6 @@ public FormatTest dateTime(Date dateTime) { } - - @ApiModelProperty(value = "") @JsonProperty("dateTime") public Date getDateTime() { @@ -291,8 +270,6 @@ public FormatTest uuid(UUID uuid) { } - - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -312,8 +289,6 @@ public FormatTest password(String password) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("password") @NotNull @@ -334,8 +309,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { } - - @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 49ca21e5a565..cff655cd951a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -17,7 +17,8 @@ @JsonTypeName("hasOnlyReadOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class HasOnlyReadOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class HasOnlyReadOnly implements Serializable { private @Valid String bar; private @Valid String foo; @@ -30,8 +31,6 @@ public HasOnlyReadOnly bar(String bar) { } - - @ApiModelProperty(value = "") @JsonProperty("bar") public String getBar() { @@ -51,8 +50,6 @@ public HasOnlyReadOnly foo(String foo) { } - - @ApiModelProperty(value = "") @JsonProperty("foo") public String getFoo() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index 9687a74280e6..bbdf12863483 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -19,7 +19,8 @@ @JsonTypeName("MapTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap<>(); @@ -82,8 +83,6 @@ public MapTest mapMapOfString(Map> mapMapOfString) { } - - @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -119,8 +118,6 @@ public MapTest mapOfEnumString(Map mapOfEnumString) { } - - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") public Map getMapOfEnumString() { @@ -156,8 +153,6 @@ public MapTest directMap(Map directMap) { } - - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -193,8 +188,6 @@ public MapTest indirectMap(Map indirectMap) { } - - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 92d8a9a44124..7a2f98ae90c7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -22,7 +22,8 @@ @JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid; private @Valid Date dateTime; @@ -36,8 +37,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { } - - @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -57,8 +56,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { } - - @ApiModelProperty(value = "") @JsonProperty("dateTime") public Date getDateTime() { @@ -78,8 +75,6 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) } - - @ApiModelProperty(value = "") @JsonProperty("map") public Map getMap() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java index af86cf00edbb..872cba205c59 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java @@ -19,7 +19,8 @@ **/ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Model200Response implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Model200Response implements Serializable { private @Valid Integer name; private @Valid String propertyClass; @@ -32,8 +33,6 @@ public Model200Response name(Integer name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -53,8 +52,6 @@ public Model200Response propertyClass(String propertyClass) { } - - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java index 3bcaaffb3d32..fecda85f1f28 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -17,7 +17,8 @@ @JsonTypeName("ApiResponse") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelApiResponse implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelApiResponse implements Serializable { private @Valid Integer code; private @Valid String type; @@ -31,8 +32,6 @@ public ModelApiResponse code(Integer code) { } - - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -52,8 +51,6 @@ public ModelApiResponse type(String type) { } - - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -73,8 +70,6 @@ public ModelApiResponse message(String message) { } - - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java index 95dfa998db35..2fe0824ec37b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java @@ -19,7 +19,8 @@ **/ @ApiModel(description = "Must be named `File` for test.") @JsonTypeName("File") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelFile implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelFile implements Serializable { private @Valid String sourceURI; @@ -32,8 +33,6 @@ public ModelFile sourceURI(String sourceURI) { } - - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java index ec97de0198c3..3eb7f71d5a14 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java @@ -17,7 +17,8 @@ @JsonTypeName("List") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelList implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelList implements Serializable { private @Valid String _123list; @@ -29,8 +30,6 @@ public ModelList _123list(String _123list) { } - - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java index b9055976ff5a..8869a5a3edd9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java @@ -19,7 +19,8 @@ **/ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelReturn implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelReturn implements Serializable { private @Valid Integer _return; @@ -31,8 +32,6 @@ public ModelReturn _return(Integer _return) { } - - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java index 54d09365aedd..893ad44378db 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java @@ -18,7 +18,8 @@ **/ @ApiModel(description = "Model for testing model name same as property name") @JsonTypeName("Name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Name implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Name implements Serializable { private @Valid Integer name; private @Valid Integer snakeCase; @@ -33,8 +34,6 @@ public Name name(Integer name) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("name") @NotNull @@ -55,8 +54,6 @@ public Name snakeCase(Integer snakeCase) { } - - @ApiModelProperty(value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -76,8 +73,6 @@ public Name property(String property) { } - - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -97,8 +92,6 @@ public Name _123number(Integer _123number) { } - - @ApiModelProperty(value = "") @JsonProperty("123Number") public Integer get123number() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java index 9ea507266dcc..b87e9e4607d9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java @@ -17,7 +17,8 @@ @JsonTypeName("NumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class NumberOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber; @@ -29,8 +30,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java index 2e4317801c05..1b0c3c95a446 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java @@ -17,7 +17,8 @@ @JsonTypeName("Order") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Order implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Order implements Serializable { private @Valid Long id; private @Valid Long petId; @@ -82,8 +83,6 @@ public Order id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -103,8 +102,6 @@ public Order petId(Long petId) { } - - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,8 +121,6 @@ public Order quantity(Integer quantity) { } - - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -145,8 +140,6 @@ public Order shipDate(Date shipDate) { } - - @ApiModelProperty(value = "") @JsonProperty("shipDate") public Date getShipDate() { @@ -167,8 +160,6 @@ public Order status(StatusEnum status) { } - - @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { @@ -188,8 +179,6 @@ public Order complete(Boolean complete) { } - - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java index 95ff03416bb3..5447ec452414 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java @@ -17,7 +17,8 @@ @JsonTypeName("OuterComposite") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class OuterComposite implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber; private @Valid String myString; @@ -31,8 +32,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -52,8 +51,6 @@ public OuterComposite myString(String myString) { } - - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -73,8 +70,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { } - - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index bbefddb2c48d..08542b3e82c5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -23,7 +23,8 @@ @JsonTypeName("Pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Pet implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Pet implements Serializable { private @Valid Long id; private @Valid Category category; @@ -88,8 +89,6 @@ public Pet id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -109,8 +108,6 @@ public Pet category(Category category) { } - - @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { @@ -130,8 +127,6 @@ public Pet name(String name) { } - - @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") @NotNull @@ -152,8 +147,6 @@ public Pet photoUrls(Set photoUrls) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") @NotNull @@ -191,8 +184,6 @@ public Pet tags(List tags) { } - - @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { @@ -229,8 +220,6 @@ public Pet status(StatusEnum status) { } - - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 71451f9cf68d..4e056fc14a92 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -16,7 +16,8 @@ @JsonTypeName("ReadOnlyFirst") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ReadOnlyFirst implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ReadOnlyFirst implements Serializable { private @Valid String bar; private @Valid String baz; @@ -29,8 +30,6 @@ public ReadOnlyFirst bar(String bar) { } - - @ApiModelProperty(value = "") @JsonProperty("bar") public String getBar() { @@ -50,8 +49,6 @@ public ReadOnlyFirst baz(String baz) { } - - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java index 0fc3694ffad8..2ee8a2e342af 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -17,7 +17,8 @@ @JsonTypeName("$special[model.name]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class SpecialModelName implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class SpecialModelName implements Serializable { private @Valid Long $specialPropertyName; @@ -29,8 +30,6 @@ } - - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index e48ad0840ac1..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - - - -public class StringBooleanMap extends HashMap implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StringBooleanMap stringBooleanMap = (StringBooleanMap) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java index db7d608abd57..e47ffe2a0a24 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java @@ -16,7 +16,8 @@ @JsonTypeName("Tag") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Tag implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Tag implements Serializable { private @Valid Long id; private @Valid String name; @@ -29,8 +30,6 @@ public Tag id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -50,8 +49,6 @@ public Tag name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 98cdf57b7fe5..664368158e49 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -19,7 +19,8 @@ @JsonTypeName("TypeHolderDefault") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderDefault implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class TypeHolderDefault implements Serializable { private @Valid String stringItem = "what"; private @Valid BigDecimal numberItem; @@ -35,8 +36,6 @@ public TypeHolderDefault stringItem(String stringItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") @NotNull @@ -57,8 +56,6 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") @NotNull @@ -79,8 +76,6 @@ public TypeHolderDefault integerItem(Integer integerItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") @NotNull @@ -101,8 +96,6 @@ public TypeHolderDefault boolItem(Boolean boolItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") @NotNull @@ -123,8 +116,6 @@ public TypeHolderDefault arrayItem(List arrayItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") @NotNull diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index f2fbe66277b5..a89ee2042da9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -19,7 +19,8 @@ @JsonTypeName("TypeHolderExample") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderExample implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class TypeHolderExample implements Serializable { private @Valid String stringItem; private @Valid BigDecimal numberItem; @@ -36,8 +37,6 @@ public TypeHolderExample stringItem(String stringItem) { } - - @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") @NotNull @@ -58,8 +57,6 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { } - - @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") @NotNull @@ -80,8 +77,6 @@ public TypeHolderExample floatItem(Float floatItem) { } - - @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") @NotNull @@ -102,8 +97,6 @@ public TypeHolderExample integerItem(Integer integerItem) { } - - @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") @NotNull @@ -124,8 +117,6 @@ public TypeHolderExample boolItem(Boolean boolItem) { } - - @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") @NotNull @@ -146,8 +137,6 @@ public TypeHolderExample arrayItem(List arrayItem) { } - - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty("array_item") @NotNull diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java index 271676fb2e09..6531f72351b6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java @@ -16,7 +16,8 @@ @JsonTypeName("User") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class User implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class User implements Serializable { private @Valid Long id; private @Valid String username; @@ -35,8 +36,6 @@ public User id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,8 +55,6 @@ public User username(String username) { } - - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -77,8 +74,6 @@ public User firstName(String firstName) { } - - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -98,8 +93,6 @@ public User lastName(String lastName) { } - - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -119,8 +112,6 @@ public User email(String email) { } - - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -140,8 +131,6 @@ public User password(String password) { } - - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -161,8 +150,6 @@ public User phone(String phone) { } - - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -183,8 +170,6 @@ public User userStatus(Integer userStatus) { } - - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index c70af4c9e31f..3172d260c834 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -19,7 +19,8 @@ @JsonTypeName("XmlItem") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class XmlItem implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class XmlItem implements Serializable { private @Valid String attributeString; private @Valid BigDecimal attributeNumber; @@ -59,8 +60,6 @@ public XmlItem attributeString(String attributeString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -80,8 +79,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -101,8 +98,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -122,8 +117,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -143,8 +136,6 @@ public XmlItem wrappedArray(List wrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -180,8 +171,6 @@ public XmlItem nameString(String nameString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -201,8 +190,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -222,8 +209,6 @@ public XmlItem nameInteger(Integer nameInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -243,8 +228,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -264,8 +247,6 @@ public XmlItem nameArray(List nameArray) { } - - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -301,8 +282,6 @@ public XmlItem nameWrappedArray(List nameWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -338,8 +317,6 @@ public XmlItem prefixString(String prefixString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -359,8 +336,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -380,8 +355,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -401,8 +374,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -422,8 +393,6 @@ public XmlItem prefixArray(List prefixArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -459,8 +428,6 @@ public XmlItem prefixWrappedArray(List prefixWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -496,8 +463,6 @@ public XmlItem namespaceString(String namespaceString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -517,8 +482,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -538,8 +501,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -559,8 +520,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -580,8 +539,6 @@ public XmlItem namespaceArray(List namespaceArray) { } - - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -617,8 +574,6 @@ public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -654,8 +609,6 @@ public XmlItem prefixNsString(String prefixNsString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -675,8 +628,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -696,8 +647,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -717,8 +666,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -738,8 +685,6 @@ public XmlItem prefixNsArray(List prefixNsArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -775,8 +720,6 @@ public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/jaxrs-spec/pom.xml b/samples/server/petstore/jaxrs-spec/pom.xml index 8326dd08272c..6bcd26f49adf 100644 --- a/samples/server/petstore/jaxrs-spec/pom.xml +++ b/samples/server/petstore/jaxrs-spec/pom.xml @@ -128,6 +128,7 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.9 4.13.2 2.10.13 diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java index c2dcc67b3a18..d209c4f65033 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java @@ -132,11 +132,14 @@ public Response testEndpointParameters(@FormParam(value = "number") BigDecimal @GET @Consumes({ "application/x-www-form-urlencoded" }) @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java index 3e02dda7d20d..c52518bbeb92 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java @@ -42,11 +42,14 @@ public Response addPet(@Valid @NotNull Pet body) { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) + @io.swagger.annotations.ApiImplicitParams({ + @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) { + public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 50c6702c65f7..1c8ec238b7cb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesAnyType") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesAnyType extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesAnyType extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesAnyType name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 3b400ed375e7..3d04c06342b3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -19,7 +19,8 @@ @JsonTypeName("AdditionalPropertiesArray") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesArray extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesArray extends HashMap implements Serializable { private @Valid String name; @@ -31,8 +32,6 @@ public AdditionalPropertiesArray name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index e1dbfa0821ab..8a7da60731f8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesBoolean") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesBoolean extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesBoolean extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesBoolean name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index d8256b29ea3d..ad43546abfe1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -20,7 +20,8 @@ @JsonTypeName("AdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesClass implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapString = new HashMap<>(); private @Valid Map mapNumber = new HashMap<>(); @@ -34,6 +35,12 @@ private @Valid Object anytype2; private @Valid Object anytype3; + protected AdditionalPropertiesClass(AdditionalPropertiesClassBuilder b) { + this.mapString = b.mapString;this.mapNumber = b.mapNumber;this.mapInteger = b.mapInteger;this.mapBoolean = b.mapBoolean;this.mapArrayInteger = b.mapArrayInteger;this.mapArrayAnytype = b.mapArrayAnytype;this.mapMapString = b.mapMapString;this.mapMapAnytype = b.mapMapAnytype;this.anytype1 = b.anytype1;this.anytype2 = b.anytype2;this.anytype3 = b.anytype3; + } + + public AdditionalPropertiesClass() { } + /** **/ public AdditionalPropertiesClass mapString(Map mapString) { @@ -42,8 +49,6 @@ public AdditionalPropertiesClass mapString(Map mapString) { } - - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -79,8 +84,6 @@ public AdditionalPropertiesClass mapNumber(Map mapNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -116,8 +119,6 @@ public AdditionalPropertiesClass mapInteger(Map mapInteger) { } - - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -153,8 +154,6 @@ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { } - - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -190,8 +189,6 @@ public AdditionalPropertiesClass mapArrayInteger(Map> mapA } - - @ApiModelProperty(value = "") @JsonProperty("map_array_integer") public Map> getMapArrayInteger() { @@ -227,8 +224,6 @@ public AdditionalPropertiesClass mapArrayAnytype(Map> mapAr } - - @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -264,8 +259,6 @@ public AdditionalPropertiesClass mapMapString(Map> m } - - @ApiModelProperty(value = "") @JsonProperty("map_map_string") public Map> getMapMapString() { @@ -301,8 +294,6 @@ public AdditionalPropertiesClass mapMapAnytype(Map> } - - @ApiModelProperty(value = "") @JsonProperty("map_map_anytype") public Map> getMapMapAnytype() { @@ -338,8 +329,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { } - - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -359,8 +348,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { } - - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -380,8 +367,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { } - - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -453,5 +438,83 @@ private String toIndentedString(Object o) { } + public static AdditionalPropertiesClassBuilder builder() { + return new AdditionalPropertiesClassBuilderImpl(); + } + + private static final class AdditionalPropertiesClassBuilderImpl extends AdditionalPropertiesClassBuilder { + + @Override + protected AdditionalPropertiesClassBuilderImpl self() { + return this; + } + + @Override + public AdditionalPropertiesClass build() { + return new AdditionalPropertiesClass(this); + } + } + + public static abstract class AdditionalPropertiesClassBuilder> { + private Map mapString = new HashMap<>(); + private Map mapNumber = new HashMap<>(); + private Map mapInteger = new HashMap<>(); + private Map mapBoolean = new HashMap<>(); + private Map> mapArrayInteger = new HashMap<>(); + private Map> mapArrayAnytype = new HashMap<>(); + private Map> mapMapString = new HashMap<>(); + private Map> mapMapAnytype = new HashMap<>(); + private Object anytype1; + private Object anytype2; + private Object anytype3; + protected abstract B self(); + + public abstract C build(); + + public B mapString(Map mapString) { + this.mapString = mapString; + return self(); + } + public B mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return self(); + } + public B mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return self(); + } + public B mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return self(); + } + public B mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return self(); + } + public B mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return self(); + } + public B mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return self(); + } + public B mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return self(); + } + public B anytype1(Object anytype1) { + this.anytype1 = anytype1; + return self(); + } + public B anytype2(Object anytype2) { + this.anytype2 = anytype2; + return self(); + } + public B anytype3(Object anytype3) { + this.anytype3 = anytype3; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index fc85a62ad023..4ed241faad72 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesInteger") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesInteger extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesInteger extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesInteger name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 25852547106b..c48bafb3b72b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -19,7 +19,8 @@ @JsonTypeName("AdditionalPropertiesNumber") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesNumber extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesNumber extends HashMap implements Serializable { private @Valid String name; @@ -31,8 +32,6 @@ public AdditionalPropertiesNumber name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index 998b85d511da..ed49983b82dc 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesObject") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesObject extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesObject extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesObject name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index b317c03b4c05..2c596592d38a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -18,7 +18,8 @@ @JsonTypeName("AdditionalPropertiesString") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesString extends HashMap implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class AdditionalPropertiesString extends HashMap implements Serializable { private @Valid String name; @@ -30,8 +31,6 @@ public AdditionalPropertiesString name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java index 7c6fb6c670ae..1720d4815ad7 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; @@ -24,11 +25,18 @@ @JsonTypeName("Animal") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Animal implements Serializable { private @Valid String className; private @Valid String color = "red"; + protected Animal(AnimalBuilder b) { + this.className = b.className;this.color = b.color; + } + + public Animal() { } + /** **/ public Animal className(String className) { @@ -37,8 +45,6 @@ public Animal className(String className) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("className") @NotNull @@ -59,8 +65,6 @@ public Animal color(String color) { } - - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -114,5 +118,38 @@ private String toIndentedString(Object o) { } + public static AnimalBuilder builder() { + return new AnimalBuilderImpl(); + } + + private static final class AnimalBuilderImpl extends AnimalBuilder { + + @Override + protected AnimalBuilderImpl self() { + return this; + } + + @Override + public Animal build() { + return new Animal(this); + } + } + + public static abstract class AnimalBuilder> { + private String className; + private String color = "red"; + protected abstract B self(); + + public abstract C build(); + + public B className(String className) { + this.className = className; + return self(); + } + public B color(String color) { + this.color = color; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6e2646e4da08..3bd8b0989c8a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -19,10 +19,17 @@ @JsonTypeName("ArrayOfArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfArrayOfNumberOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList<>(); + protected ArrayOfArrayOfNumberOnly(ArrayOfArrayOfNumberOnlyBuilder b) { + this.arrayArrayNumber = b.arrayArrayNumber; + } + + public ArrayOfArrayOfNumberOnly() { } + /** **/ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -31,8 +38,6 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr } - - @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -100,5 +105,33 @@ private String toIndentedString(Object o) { } + public static ArrayOfArrayOfNumberOnlyBuilder builder() { + return new ArrayOfArrayOfNumberOnlyBuilderImpl(); + } + + private static final class ArrayOfArrayOfNumberOnlyBuilderImpl extends ArrayOfArrayOfNumberOnlyBuilder { + + @Override + protected ArrayOfArrayOfNumberOnlyBuilderImpl self() { + return this; + } + + @Override + public ArrayOfArrayOfNumberOnly build() { + return new ArrayOfArrayOfNumberOnly(this); + } + } + + public static abstract class ArrayOfArrayOfNumberOnlyBuilder> { + private List> arrayArrayNumber = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index f2ab42410746..811cb2ac9ba9 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -19,10 +19,17 @@ @JsonTypeName("ArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfNumberOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList<>(); + protected ArrayOfNumberOnly(ArrayOfNumberOnlyBuilder b) { + this.arrayNumber = b.arrayNumber; + } + + public ArrayOfNumberOnly() { } + /** **/ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -31,8 +38,6 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -100,5 +105,33 @@ private String toIndentedString(Object o) { } + public static ArrayOfNumberOnlyBuilder builder() { + return new ArrayOfNumberOnlyBuilderImpl(); + } + + private static final class ArrayOfNumberOnlyBuilderImpl extends ArrayOfNumberOnlyBuilder { + + @Override + protected ArrayOfNumberOnlyBuilderImpl self() { + return this; + } + + @Override + public ArrayOfNumberOnly build() { + return new ArrayOfNumberOnly(this); + } + } + + public static abstract class ArrayOfNumberOnlyBuilder> { + private List arrayNumber = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java index 6f2fe46e0ccd..74f1d41b2d0f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java @@ -19,12 +19,19 @@ @JsonTypeName("ArrayTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList<>(); private @Valid List> arrayArrayOfInteger = new ArrayList<>(); private @Valid List> arrayArrayOfModel = new ArrayList<>(); + protected ArrayTest(ArrayTestBuilder b) { + this.arrayOfString = b.arrayOfString;this.arrayArrayOfInteger = b.arrayArrayOfInteger;this.arrayArrayOfModel = b.arrayArrayOfModel; + } + + public ArrayTest() { } + /** **/ public ArrayTest arrayOfString(List arrayOfString) { @@ -33,8 +40,6 @@ public ArrayTest arrayOfString(List arrayOfString) { } - - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -70,8 +75,6 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { } - - @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -107,8 +110,6 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) } - - @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { @@ -180,5 +181,43 @@ private String toIndentedString(Object o) { } + public static ArrayTestBuilder builder() { + return new ArrayTestBuilderImpl(); + } + + private static final class ArrayTestBuilderImpl extends ArrayTestBuilder { + + @Override + protected ArrayTestBuilderImpl self() { + return this; + } + + @Override + public ArrayTest build() { + return new ArrayTest(this); + } + } + + public static abstract class ArrayTestBuilder> { + private List arrayOfString = new ArrayList<>(); + private List> arrayArrayOfInteger = new ArrayList<>(); + private List> arrayArrayOfModel = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return self(); + } + public B arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return self(); + } + public B arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java index 38fc63872812..ca76bce5527d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java @@ -18,7 +18,8 @@ @JsonTypeName("BigCat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCat extends Cat implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class BigCat extends Cat implements Serializable { public enum KindEnum { @@ -70,6 +71,13 @@ public static KindEnum fromValue(String value) { private @Valid KindEnum kind; + protected BigCat(BigCatBuilder b) { + super(b); + this.kind = b.kind; + } + + public BigCat() { } + /** **/ public BigCat kind(KindEnum kind) { @@ -78,8 +86,6 @@ public BigCat kind(KindEnum kind) { } - - @ApiModelProperty(value = "") @JsonProperty("kind") public KindEnum getKind() { @@ -132,5 +138,30 @@ private String toIndentedString(Object o) { } + public static BigCatBuilder builder() { + return new BigCatBuilderImpl(); + } + + private static final class BigCatBuilderImpl extends BigCatBuilder { + + @Override + protected BigCatBuilderImpl self() { + return this; + } + + @Override + public BigCat build() { + return new BigCat(this); + } + } + + public static abstract class BigCatBuilder> extends CatBuilder { + private KindEnum kind; + + public B kind(KindEnum kind) { + this.kind = kind; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java index e40f222f1675..75ce8f65b670 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -17,7 +17,8 @@ @JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCatAllOf implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class BigCatAllOf implements Serializable { public enum KindEnum { @@ -69,6 +70,12 @@ public static KindEnum fromValue(String value) { private @Valid KindEnum kind; + protected BigCatAllOf(BigCatAllOfBuilder b) { + this.kind = b.kind; + } + + public BigCatAllOf() { } + /** **/ public BigCatAllOf kind(KindEnum kind) { @@ -77,8 +84,6 @@ public BigCatAllOf kind(KindEnum kind) { } - - @ApiModelProperty(value = "") @JsonProperty("kind") public KindEnum getKind() { @@ -130,5 +135,33 @@ private String toIndentedString(Object o) { } + public static BigCatAllOfBuilder builder() { + return new BigCatAllOfBuilderImpl(); + } + + private static final class BigCatAllOfBuilderImpl extends BigCatAllOfBuilder { + + @Override + protected BigCatAllOfBuilderImpl self() { + return this; + } + + @Override + public BigCatAllOf build() { + return new BigCatAllOf(this); + } + } + + public static abstract class BigCatAllOfBuilder> { + private KindEnum kind; + protected abstract B self(); + + public abstract C build(); + + public B kind(KindEnum kind) { + this.kind = kind; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java index 595296559701..39eb032f5337 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java @@ -16,7 +16,8 @@ @JsonTypeName("Capitalization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Capitalization implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Capitalization implements Serializable { private @Valid String smallCamel; private @Valid String capitalCamel; @@ -25,6 +26,12 @@ private @Valid String scAETHFlowPoints; private @Valid String ATT_NAME; + protected Capitalization(CapitalizationBuilder b) { + this.smallCamel = b.smallCamel;this.capitalCamel = b.capitalCamel;this.smallSnake = b.smallSnake;this.capitalSnake = b.capitalSnake;this.scAETHFlowPoints = b.scAETHFlowPoints;this.ATT_NAME = b.ATT_NAME; + } + + public Capitalization() { } + /** **/ public Capitalization smallCamel(String smallCamel) { @@ -33,8 +40,6 @@ public Capitalization smallCamel(String smallCamel) { } - - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -54,8 +59,6 @@ public Capitalization capitalCamel(String capitalCamel) { } - - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -75,8 +78,6 @@ public Capitalization smallSnake(String smallSnake) { } - - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -96,8 +97,6 @@ public Capitalization capitalSnake(String capitalSnake) { } - - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -117,8 +116,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { } - - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -139,8 +136,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { } - - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -202,5 +197,58 @@ private String toIndentedString(Object o) { } + public static CapitalizationBuilder builder() { + return new CapitalizationBuilderImpl(); + } + + private static final class CapitalizationBuilderImpl extends CapitalizationBuilder { + + @Override + protected CapitalizationBuilderImpl self() { + return this; + } + + @Override + public Capitalization build() { + return new Capitalization(this); + } + } + + public static abstract class CapitalizationBuilder> { + private String smallCamel; + private String capitalCamel; + private String smallSnake; + private String capitalSnake; + private String scAETHFlowPoints; + private String ATT_NAME; + protected abstract B self(); + + public abstract C build(); + + public B smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return self(); + } + public B capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return self(); + } + public B smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return self(); + } + public B capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return self(); + } + public B scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return self(); + } + public B ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java index 948b28d037a3..4deda9ab1c68 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java @@ -18,10 +18,18 @@ @JsonTypeName("Cat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Cat extends Animal implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Cat extends Animal implements Serializable { private @Valid Boolean declawed; + protected Cat(CatBuilder b) { + super(b); + this.declawed = b.declawed; + } + + public Cat() { } + /** **/ public Cat declawed(Boolean declawed) { @@ -30,8 +38,6 @@ public Cat declawed(Boolean declawed) { } - - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -84,5 +90,30 @@ private String toIndentedString(Object o) { } + public static CatBuilder builder() { + return new CatBuilderImpl(); + } + + private static final class CatBuilderImpl extends CatBuilder { + + @Override + protected CatBuilderImpl self() { + return this; + } + + @Override + public Cat build() { + return new Cat(this); + } + } + + public static abstract class CatBuilder> extends AnimalBuilder { + private Boolean declawed; + + public B declawed(Boolean declawed) { + this.declawed = declawed; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java index 2ed18a6de6c3..38e11b2b1227 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java @@ -17,10 +17,17 @@ @JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class CatAllOf implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class CatAllOf implements Serializable { private @Valid Boolean declawed; + protected CatAllOf(CatAllOfBuilder b) { + this.declawed = b.declawed; + } + + public CatAllOf() { } + /** **/ public CatAllOf declawed(Boolean declawed) { @@ -29,8 +36,6 @@ public CatAllOf declawed(Boolean declawed) { } - - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -82,5 +87,33 @@ private String toIndentedString(Object o) { } + public static CatAllOfBuilder builder() { + return new CatAllOfBuilderImpl(); + } + + private static final class CatAllOfBuilderImpl extends CatAllOfBuilder { + + @Override + protected CatAllOfBuilderImpl self() { + return this; + } + + @Override + public CatAllOf build() { + return new CatAllOf(this); + } + } + + public static abstract class CatAllOfBuilder> { + private Boolean declawed; + protected abstract B self(); + + public abstract C build(); + + public B declawed(Boolean declawed) { + this.declawed = declawed; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java index 6d4e8a879921..26f7194ece1a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java @@ -16,11 +16,18 @@ @JsonTypeName("Category") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Category implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Category implements Serializable { private @Valid Long id; private @Valid String name = "default-name"; + protected Category(CategoryBuilder b) { + this.id = b.id;this.name = b.name; + } + + public Category() { } + /** **/ public Category id(Long id) { @@ -29,8 +36,6 @@ public Category id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -50,8 +55,6 @@ public Category name(String name) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("name") @NotNull @@ -106,5 +109,38 @@ private String toIndentedString(Object o) { } + public static CategoryBuilder builder() { + return new CategoryBuilderImpl(); + } + + private static final class CategoryBuilderImpl extends CategoryBuilder { + + @Override + protected CategoryBuilderImpl self() { + return this; + } + + @Override + public Category build() { + return new Category(this); + } + } + + public static abstract class CategoryBuilder> { + private Long id; + private String name = "default-name"; + protected abstract B self(); + + public abstract C build(); + + public B id(Long id) { + this.id = id; + return self(); + } + public B name(String name) { + this.name = name; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java index fec3c619257e..b509e5066ba5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java @@ -18,10 +18,17 @@ **/ @ApiModel(description = "Model for testing model with \"_class\" property") @JsonTypeName("ClassModel") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ClassModel implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ClassModel implements Serializable { private @Valid String propertyClass; + protected ClassModel(ClassModelBuilder b) { + this.propertyClass = b.propertyClass; + } + + public ClassModel() { } + /** **/ public ClassModel propertyClass(String propertyClass) { @@ -30,8 +37,6 @@ public ClassModel propertyClass(String propertyClass) { } - - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -83,5 +88,33 @@ private String toIndentedString(Object o) { } + public static ClassModelBuilder builder() { + return new ClassModelBuilderImpl(); + } + + private static final class ClassModelBuilderImpl extends ClassModelBuilder { + + @Override + protected ClassModelBuilderImpl self() { + return this; + } + + @Override + public ClassModel build() { + return new ClassModel(this); + } + } + + public static abstract class ClassModelBuilder> { + private String propertyClass; + protected abstract B self(); + + public abstract C build(); + + public B propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java index 74d489b5aced..c29067e60ed3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java @@ -16,10 +16,17 @@ @JsonTypeName("Client") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Client implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Client implements Serializable { private @Valid String client; + protected Client(ClientBuilder b) { + this.client = b.client; + } + + public Client() { } + /** **/ public Client client(String client) { @@ -28,8 +35,6 @@ public Client client(String client) { } - - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,5 +86,33 @@ private String toIndentedString(Object o) { } + public static ClientBuilder builder() { + return new ClientBuilderImpl(); + } + + private static final class ClientBuilderImpl extends ClientBuilder { + + @Override + protected ClientBuilderImpl self() { + return this; + } + + @Override + public Client build() { + return new Client(this); + } + } + + public static abstract class ClientBuilder> { + private String client; + protected abstract B self(); + + public abstract C build(); + + public B client(String client) { + this.client = client; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java index 20599ecebcfd..d5c89b72401d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java @@ -18,10 +18,18 @@ @JsonTypeName("Dog") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Dog extends Animal implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Dog extends Animal implements Serializable { private @Valid String breed; + protected Dog(DogBuilder b) { + super(b); + this.breed = b.breed; + } + + public Dog() { } + /** **/ public Dog breed(String breed) { @@ -30,8 +38,6 @@ public Dog breed(String breed) { } - - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -84,5 +90,30 @@ private String toIndentedString(Object o) { } + public static DogBuilder builder() { + return new DogBuilderImpl(); + } + + private static final class DogBuilderImpl extends DogBuilder { + + @Override + protected DogBuilderImpl self() { + return this; + } + + @Override + public Dog build() { + return new Dog(this); + } + } + + public static abstract class DogBuilder> extends AnimalBuilder { + private String breed; + + public B breed(String breed) { + this.breed = breed; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java index 6c7208fe19b8..3154e48fce83 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java @@ -17,10 +17,17 @@ @JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class DogAllOf implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class DogAllOf implements Serializable { private @Valid String breed; + protected DogAllOf(DogAllOfBuilder b) { + this.breed = b.breed; + } + + public DogAllOf() { } + /** **/ public DogAllOf breed(String breed) { @@ -29,8 +36,6 @@ public DogAllOf breed(String breed) { } - - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -82,5 +87,33 @@ private String toIndentedString(Object o) { } + public static DogAllOfBuilder builder() { + return new DogAllOfBuilderImpl(); + } + + private static final class DogAllOfBuilderImpl extends DogAllOfBuilder { + + @Override + protected DogAllOfBuilderImpl self() { + return this; + } + + @Override + public DogAllOf build() { + return new DogAllOf(this); + } + } + + public static abstract class DogAllOfBuilder> { + private String breed; + protected abstract B self(); + + public abstract C build(); + + public B breed(String breed) { + this.breed = breed; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java index 81e5bfed4780..a913109dc621 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java @@ -18,7 +18,8 @@ @JsonTypeName("EnumArrays") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumArrays implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class EnumArrays implements Serializable { public enum JustSymbolEnum { @@ -119,6 +120,12 @@ public static ArrayEnumEnum fromValue(String value) { private @Valid List arrayEnum = new ArrayList<>(); + protected EnumArrays(EnumArraysBuilder b) { + this.justSymbol = b.justSymbol;this.arrayEnum = b.arrayEnum; + } + + public EnumArrays() { } + /** **/ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { @@ -127,8 +134,6 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { } - - @ApiModelProperty(value = "") @JsonProperty("just_symbol") public JustSymbolEnum getJustSymbol() { @@ -148,8 +153,6 @@ public EnumArrays arrayEnum(List arrayEnum) { } - - @ApiModelProperty(value = "") @JsonProperty("array_enum") public List getArrayEnum() { @@ -219,5 +222,38 @@ private String toIndentedString(Object o) { } + public static EnumArraysBuilder builder() { + return new EnumArraysBuilderImpl(); + } + + private static final class EnumArraysBuilderImpl extends EnumArraysBuilder { + + @Override + protected EnumArraysBuilderImpl self() { + return this; + } + + @Override + public EnumArrays build() { + return new EnumArrays(this); + } + } + + public static abstract class EnumArraysBuilder> { + private JustSymbolEnum justSymbol; + private List arrayEnum = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return self(); + } + public B arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java index 881e2503a6df..ef6b27ca1960 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java @@ -18,7 +18,8 @@ @JsonTypeName("Enum_Test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class EnumTest implements Serializable { public enum EnumStringEnum { @@ -218,6 +219,12 @@ public static EnumNumberEnum fromValue(Double value) { private @Valid EnumNumberEnum enumNumber; private @Valid OuterEnum outerEnum; + protected EnumTest(EnumTestBuilder b) { + this.enumString = b.enumString;this.enumStringRequired = b.enumStringRequired;this.enumInteger = b.enumInteger;this.enumNumber = b.enumNumber;this.outerEnum = b.outerEnum; + } + + public EnumTest() { } + /** **/ public EnumTest enumString(EnumStringEnum enumString) { @@ -226,8 +233,6 @@ public EnumTest enumString(EnumStringEnum enumString) { } - - @ApiModelProperty(value = "") @JsonProperty("enum_string") public EnumStringEnum getEnumString() { @@ -247,8 +252,6 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") @NotNull @@ -269,8 +272,6 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { } - - @ApiModelProperty(value = "") @JsonProperty("enum_integer") public EnumIntegerEnum getEnumInteger() { @@ -290,8 +291,6 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("enum_number") public EnumNumberEnum getEnumNumber() { @@ -311,8 +310,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { } - - @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -372,5 +369,53 @@ private String toIndentedString(Object o) { } + public static EnumTestBuilder builder() { + return new EnumTestBuilderImpl(); + } + + private static final class EnumTestBuilderImpl extends EnumTestBuilder { + + @Override + protected EnumTestBuilderImpl self() { + return this; + } + + @Override + public EnumTest build() { + return new EnumTest(this); + } + } + + public static abstract class EnumTestBuilder> { + private EnumStringEnum enumString; + private EnumStringRequiredEnum enumStringRequired; + private EnumIntegerEnum enumInteger; + private EnumNumberEnum enumNumber; + private OuterEnum outerEnum; + protected abstract B self(); + + public abstract C build(); + + public B enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return self(); + } + public B enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return self(); + } + public B enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return self(); + } + public B enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return self(); + } + public B outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index f2ee479c5b9a..9e4ef78f3808 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -19,11 +19,18 @@ @JsonTypeName("FileSchemaTestClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FileSchemaTestClass implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; private @Valid List files = new ArrayList<>(); + protected FileSchemaTestClass(FileSchemaTestClassBuilder b) { + this._file = b._file;this.files = b.files; + } + + public FileSchemaTestClass() { } + /** **/ public FileSchemaTestClass _file(ModelFile _file) { @@ -32,8 +39,6 @@ public FileSchemaTestClass _file(ModelFile _file) { } - - @ApiModelProperty(value = "") @JsonProperty("file") public ModelFile getFile() { @@ -53,8 +58,6 @@ public FileSchemaTestClass files(List files) { } - - @ApiModelProperty(value = "") @JsonProperty("files") public List getFiles() { @@ -124,5 +127,38 @@ private String toIndentedString(Object o) { } + public static FileSchemaTestClassBuilder builder() { + return new FileSchemaTestClassBuilderImpl(); + } + + private static final class FileSchemaTestClassBuilderImpl extends FileSchemaTestClassBuilder { + + @Override + protected FileSchemaTestClassBuilderImpl self() { + return this; + } + + @Override + public FileSchemaTestClass build() { + return new FileSchemaTestClass(this); + } + } + + public static abstract class FileSchemaTestClassBuilder> { + private ModelFile _file; + private List files = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B _file(ModelFile _file) { + this._file = _file; + return self(); + } + public B files(List files) { + this.files = files; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java index c6b8753a4e66..0f77b656259f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java @@ -22,7 +22,8 @@ @JsonTypeName("format_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FormatTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class FormatTest implements Serializable { private @Valid Integer integer; private @Valid Integer int32; @@ -39,6 +40,12 @@ private @Valid String password; private @Valid BigDecimal bigDecimal; + protected FormatTest(FormatTestBuilder b) { + this.integer = b.integer;this.int32 = b.int32;this.int64 = b.int64;this.number = b.number;this._float = b._float;this._double = b._double;this.string = b.string;this._byte = b._byte;this.binary = b.binary;this.date = b.date;this.dateTime = b.dateTime;this.uuid = b.uuid;this.password = b.password;this.bigDecimal = b.bigDecimal; + } + + public FormatTest() { } + /** * minimum: 10 * maximum: 100 @@ -49,8 +56,6 @@ public FormatTest integer(Integer integer) { } - - @ApiModelProperty(value = "") @JsonProperty("integer") @Min(10) @Max(100) public Integer getInteger() { @@ -72,8 +77,6 @@ public FormatTest int32(Integer int32) { } - - @ApiModelProperty(value = "") @JsonProperty("int32") @Min(20) @Max(200) public Integer getInt32() { @@ -93,8 +96,6 @@ public FormatTest int64(Long int64) { } - - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -116,8 +117,6 @@ public FormatTest number(BigDecimal number) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("number") @NotNull @@ -140,8 +139,6 @@ public FormatTest _float(Float _float) { } - - @ApiModelProperty(value = "") @JsonProperty("float") @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { @@ -163,8 +160,6 @@ public FormatTest _double(Double _double) { } - - @ApiModelProperty(value = "") @JsonProperty("double") @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { @@ -184,8 +179,6 @@ public FormatTest string(String string) { } - - @ApiModelProperty(value = "") @JsonProperty("string") @Pattern(regexp="/[a-z]/i") public String getString() { @@ -205,8 +198,6 @@ public FormatTest _byte(byte[] _byte) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("byte") @NotNull @@ -227,8 +218,6 @@ public FormatTest binary(File binary) { } - - @ApiModelProperty(value = "") @JsonProperty("binary") public File getBinary() { @@ -248,8 +237,6 @@ public FormatTest date(LocalDate date) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("date") @NotNull @@ -270,8 +257,6 @@ public FormatTest dateTime(Date dateTime) { } - - @ApiModelProperty(value = "") @JsonProperty("dateTime") public Date getDateTime() { @@ -291,8 +276,6 @@ public FormatTest uuid(UUID uuid) { } - - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -312,8 +295,6 @@ public FormatTest password(String password) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("password") @NotNull @@ -334,8 +315,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { } - - @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -413,5 +392,98 @@ private String toIndentedString(Object o) { } + public static FormatTestBuilder builder() { + return new FormatTestBuilderImpl(); + } + + private static final class FormatTestBuilderImpl extends FormatTestBuilder { + + @Override + protected FormatTestBuilderImpl self() { + return this; + } + + @Override + public FormatTest build() { + return new FormatTest(this); + } + } + + public static abstract class FormatTestBuilder> { + private Integer integer; + private Integer int32; + private Long int64; + private BigDecimal number; + private Float _float; + private Double _double; + private String string; + private byte[] _byte; + private File binary; + private LocalDate date; + private Date dateTime; + private UUID uuid; + private String password; + private BigDecimal bigDecimal; + protected abstract B self(); + + public abstract C build(); + + public B integer(Integer integer) { + this.integer = integer; + return self(); + } + public B int32(Integer int32) { + this.int32 = int32; + return self(); + } + public B int64(Long int64) { + this.int64 = int64; + return self(); + } + public B number(BigDecimal number) { + this.number = number; + return self(); + } + public B _float(Float _float) { + this._float = _float; + return self(); + } + public B _double(Double _double) { + this._double = _double; + return self(); + } + public B string(String string) { + this.string = string; + return self(); + } + public B _byte(byte[] _byte) { + this._byte = _byte; + return self(); + } + public B binary(File binary) { + this.binary = binary; + return self(); + } + public B date(LocalDate date) { + this.date = date; + return self(); + } + public B dateTime(Date dateTime) { + this.dateTime = dateTime; + return self(); + } + public B uuid(UUID uuid) { + this.uuid = uuid; + return self(); + } + public B password(String password) { + this.password = password; + return self(); + } + public B bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 49ca21e5a565..ab5b5e4add42 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -17,11 +17,18 @@ @JsonTypeName("hasOnlyReadOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class HasOnlyReadOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class HasOnlyReadOnly implements Serializable { private @Valid String bar; private @Valid String foo; + protected HasOnlyReadOnly(HasOnlyReadOnlyBuilder b) { + this.bar = b.bar;this.foo = b.foo; + } + + public HasOnlyReadOnly() { } + /** **/ public HasOnlyReadOnly bar(String bar) { @@ -30,8 +37,6 @@ public HasOnlyReadOnly bar(String bar) { } - - @ApiModelProperty(value = "") @JsonProperty("bar") public String getBar() { @@ -51,8 +56,6 @@ public HasOnlyReadOnly foo(String foo) { } - - @ApiModelProperty(value = "") @JsonProperty("foo") public String getFoo() { @@ -106,5 +109,38 @@ private String toIndentedString(Object o) { } + public static HasOnlyReadOnlyBuilder builder() { + return new HasOnlyReadOnlyBuilderImpl(); + } + + private static final class HasOnlyReadOnlyBuilderImpl extends HasOnlyReadOnlyBuilder { + + @Override + protected HasOnlyReadOnlyBuilderImpl self() { + return this; + } + + @Override + public HasOnlyReadOnly build() { + return new HasOnlyReadOnly(this); + } + } + + public static abstract class HasOnlyReadOnlyBuilder> { + private String bar; + private String foo; + protected abstract B self(); + + public abstract C build(); + + public B bar(String bar) { + this.bar = bar; + return self(); + } + public B foo(String foo) { + this.foo = foo; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index 9687a74280e6..2efc304e69f8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -19,7 +19,8 @@ @JsonTypeName("MapTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap<>(); @@ -74,6 +75,12 @@ public static InnerEnum fromValue(String value) { private @Valid Map directMap = new HashMap<>(); private @Valid Map indirectMap = new HashMap<>(); + protected MapTest(MapTestBuilder b) { + this.mapMapOfString = b.mapMapOfString;this.mapOfEnumString = b.mapOfEnumString;this.directMap = b.directMap;this.indirectMap = b.indirectMap; + } + + public MapTest() { } + /** **/ public MapTest mapMapOfString(Map> mapMapOfString) { @@ -82,8 +89,6 @@ public MapTest mapMapOfString(Map> mapMapOfString) { } - - @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -119,8 +124,6 @@ public MapTest mapOfEnumString(Map mapOfEnumString) { } - - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") public Map getMapOfEnumString() { @@ -156,8 +159,6 @@ public MapTest directMap(Map directMap) { } - - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -193,8 +194,6 @@ public MapTest indirectMap(Map indirectMap) { } - - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -268,5 +267,48 @@ private String toIndentedString(Object o) { } + public static MapTestBuilder builder() { + return new MapTestBuilderImpl(); + } + + private static final class MapTestBuilderImpl extends MapTestBuilder { + + @Override + protected MapTestBuilderImpl self() { + return this; + } + + @Override + public MapTest build() { + return new MapTest(this); + } + } + + public static abstract class MapTestBuilder> { + private Map> mapMapOfString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); + private Map directMap = new HashMap<>(); + private Map indirectMap = new HashMap<>(); + protected abstract B self(); + + public abstract C build(); + + public B mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return self(); + } + public B mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return self(); + } + public B directMap(Map directMap) { + this.directMap = directMap; + return self(); + } + public B indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 92d8a9a44124..540b219c51a1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -22,12 +22,19 @@ @JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid; private @Valid Date dateTime; private @Valid Map map = new HashMap<>(); + protected MixedPropertiesAndAdditionalPropertiesClass(MixedPropertiesAndAdditionalPropertiesClassBuilder b) { + this.uuid = b.uuid;this.dateTime = b.dateTime;this.map = b.map; + } + + public MixedPropertiesAndAdditionalPropertiesClass() { } + /** **/ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { @@ -36,8 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { } - - @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -57,8 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { } - - @ApiModelProperty(value = "") @JsonProperty("dateTime") public Date getDateTime() { @@ -78,8 +81,6 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) } - - @ApiModelProperty(value = "") @JsonProperty("map") public Map getMap() { @@ -151,5 +152,43 @@ private String toIndentedString(Object o) { } + public static MixedPropertiesAndAdditionalPropertiesClassBuilder builder() { + return new MixedPropertiesAndAdditionalPropertiesClassBuilderImpl(); + } + + private static final class MixedPropertiesAndAdditionalPropertiesClassBuilderImpl extends MixedPropertiesAndAdditionalPropertiesClassBuilder { + + @Override + protected MixedPropertiesAndAdditionalPropertiesClassBuilderImpl self() { + return this; + } + + @Override + public MixedPropertiesAndAdditionalPropertiesClass build() { + return new MixedPropertiesAndAdditionalPropertiesClass(this); + } + } + + public static abstract class MixedPropertiesAndAdditionalPropertiesClassBuilder> { + private UUID uuid; + private Date dateTime; + private Map map = new HashMap<>(); + protected abstract B self(); + + public abstract C build(); + + public B uuid(UUID uuid) { + this.uuid = uuid; + return self(); + } + public B dateTime(Date dateTime) { + this.dateTime = dateTime; + return self(); + } + public B map(Map map) { + this.map = map; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java index af86cf00edbb..2bfa6086e82e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java @@ -19,11 +19,18 @@ **/ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Model200Response implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Model200Response implements Serializable { private @Valid Integer name; private @Valid String propertyClass; + protected Model200Response(Model200ResponseBuilder b) { + this.name = b.name;this.propertyClass = b.propertyClass; + } + + public Model200Response() { } + /** **/ public Model200Response name(Integer name) { @@ -32,8 +39,6 @@ public Model200Response name(Integer name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -53,8 +58,6 @@ public Model200Response propertyClass(String propertyClass) { } - - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,5 +111,38 @@ private String toIndentedString(Object o) { } + public static Model200ResponseBuilder builder() { + return new Model200ResponseBuilderImpl(); + } + + private static final class Model200ResponseBuilderImpl extends Model200ResponseBuilder { + + @Override + protected Model200ResponseBuilderImpl self() { + return this; + } + + @Override + public Model200Response build() { + return new Model200Response(this); + } + } + + public static abstract class Model200ResponseBuilder> { + private Integer name; + private String propertyClass; + protected abstract B self(); + + public abstract C build(); + + public B name(Integer name) { + this.name = name; + return self(); + } + public B propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java index 3bcaaffb3d32..c86e5ffa837a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -17,12 +17,19 @@ @JsonTypeName("ApiResponse") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelApiResponse implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelApiResponse implements Serializable { private @Valid Integer code; private @Valid String type; private @Valid String message; + protected ModelApiResponse(ModelApiResponseBuilder b) { + this.code = b.code;this.type = b.type;this.message = b.message; + } + + public ModelApiResponse() { } + /** **/ public ModelApiResponse code(Integer code) { @@ -31,8 +38,6 @@ public ModelApiResponse code(Integer code) { } - - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -52,8 +57,6 @@ public ModelApiResponse type(String type) { } - - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -73,8 +76,6 @@ public ModelApiResponse message(String message) { } - - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -130,5 +131,43 @@ private String toIndentedString(Object o) { } + public static ModelApiResponseBuilder builder() { + return new ModelApiResponseBuilderImpl(); + } + + private static final class ModelApiResponseBuilderImpl extends ModelApiResponseBuilder { + + @Override + protected ModelApiResponseBuilderImpl self() { + return this; + } + + @Override + public ModelApiResponse build() { + return new ModelApiResponse(this); + } + } + + public static abstract class ModelApiResponseBuilder> { + private Integer code; + private String type; + private String message; + protected abstract B self(); + + public abstract C build(); + + public B code(Integer code) { + this.code = code; + return self(); + } + public B type(String type) { + this.type = type; + return self(); + } + public B message(String message) { + this.message = message; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java index 95dfa998db35..6099723d1ca7 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java @@ -19,10 +19,17 @@ **/ @ApiModel(description = "Must be named `File` for test.") @JsonTypeName("File") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelFile implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelFile implements Serializable { private @Valid String sourceURI; + protected ModelFile(ModelFileBuilder b) { + this.sourceURI = b.sourceURI; + } + + public ModelFile() { } + /** * Test capitalization **/ @@ -32,8 +39,6 @@ public ModelFile sourceURI(String sourceURI) { } - - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -85,5 +90,33 @@ private String toIndentedString(Object o) { } + public static ModelFileBuilder builder() { + return new ModelFileBuilderImpl(); + } + + private static final class ModelFileBuilderImpl extends ModelFileBuilder { + + @Override + protected ModelFileBuilderImpl self() { + return this; + } + + @Override + public ModelFile build() { + return new ModelFile(this); + } + } + + public static abstract class ModelFileBuilder> { + private String sourceURI; + protected abstract B self(); + + public abstract C build(); + + public B sourceURI(String sourceURI) { + this.sourceURI = sourceURI; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java index ec97de0198c3..f61cdb874729 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java @@ -17,10 +17,17 @@ @JsonTypeName("List") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelList implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelList implements Serializable { private @Valid String _123list; + protected ModelList(ModelListBuilder b) { + this._123list = b._123list; + } + + public ModelList() { } + /** **/ public ModelList _123list(String _123list) { @@ -29,8 +36,6 @@ public ModelList _123list(String _123list) { } - - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -82,5 +87,33 @@ private String toIndentedString(Object o) { } + public static ModelListBuilder builder() { + return new ModelListBuilderImpl(); + } + + private static final class ModelListBuilderImpl extends ModelListBuilder { + + @Override + protected ModelListBuilderImpl self() { + return this; + } + + @Override + public ModelList build() { + return new ModelList(this); + } + } + + public static abstract class ModelListBuilder> { + private String _123list; + protected abstract B self(); + + public abstract C build(); + + public B _123list(String _123list) { + this._123list = _123list; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java index b9055976ff5a..3ddde593b682 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java @@ -19,10 +19,17 @@ **/ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelReturn implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ModelReturn implements Serializable { private @Valid Integer _return; + protected ModelReturn(ModelReturnBuilder b) { + this._return = b._return; + } + + public ModelReturn() { } + /** **/ public ModelReturn _return(Integer _return) { @@ -31,8 +38,6 @@ public ModelReturn _return(Integer _return) { } - - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,5 +89,33 @@ private String toIndentedString(Object o) { } + public static ModelReturnBuilder builder() { + return new ModelReturnBuilderImpl(); + } + + private static final class ModelReturnBuilderImpl extends ModelReturnBuilder { + + @Override + protected ModelReturnBuilderImpl self() { + return this; + } + + @Override + public ModelReturn build() { + return new ModelReturn(this); + } + } + + public static abstract class ModelReturnBuilder> { + private Integer _return; + protected abstract B self(); + + public abstract C build(); + + public B _return(Integer _return) { + this._return = _return; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java index 54d09365aedd..40c1501bf0c5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java @@ -18,13 +18,20 @@ **/ @ApiModel(description = "Model for testing model name same as property name") @JsonTypeName("Name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Name implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Name implements Serializable { private @Valid Integer name; private @Valid Integer snakeCase; private @Valid String property; private @Valid Integer _123number; + protected Name(NameBuilder b) { + this.name = b.name;this.snakeCase = b.snakeCase;this.property = b.property;this._123number = b._123number; + } + + public Name() { } + /** **/ public Name name(Integer name) { @@ -33,8 +40,6 @@ public Name name(Integer name) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("name") @NotNull @@ -55,8 +60,6 @@ public Name snakeCase(Integer snakeCase) { } - - @ApiModelProperty(value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -76,8 +79,6 @@ public Name property(String property) { } - - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -97,8 +98,6 @@ public Name _123number(Integer _123number) { } - - @ApiModelProperty(value = "") @JsonProperty("123Number") public Integer get123number() { @@ -156,5 +155,48 @@ private String toIndentedString(Object o) { } + public static NameBuilder builder() { + return new NameBuilderImpl(); + } + + private static final class NameBuilderImpl extends NameBuilder { + + @Override + protected NameBuilderImpl self() { + return this; + } + + @Override + public Name build() { + return new Name(this); + } + } + + public static abstract class NameBuilder> { + private Integer name; + private Integer snakeCase; + private String property; + private Integer _123number; + protected abstract B self(); + + public abstract C build(); + + public B name(Integer name) { + this.name = name; + return self(); + } + public B snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return self(); + } + public B property(String property) { + this.property = property; + return self(); + } + public B _123number(Integer _123number) { + this._123number = _123number; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java index 9ea507266dcc..00e2e3dde815 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java @@ -17,10 +17,17 @@ @JsonTypeName("NumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class NumberOnly implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber; + protected NumberOnly(NumberOnlyBuilder b) { + this.justNumber = b.justNumber; + } + + public NumberOnly() { } + /** **/ public NumberOnly justNumber(BigDecimal justNumber) { @@ -29,8 +36,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,5 +87,33 @@ private String toIndentedString(Object o) { } + public static NumberOnlyBuilder builder() { + return new NumberOnlyBuilderImpl(); + } + + private static final class NumberOnlyBuilderImpl extends NumberOnlyBuilder { + + @Override + protected NumberOnlyBuilderImpl self() { + return this; + } + + @Override + public NumberOnly build() { + return new NumberOnly(this); + } + } + + public static abstract class NumberOnlyBuilder> { + private BigDecimal justNumber; + protected abstract B self(); + + public abstract C build(); + + public B justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java index 2e4317801c05..a4f4bb652067 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java @@ -17,7 +17,8 @@ @JsonTypeName("Order") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Order implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Order implements Serializable { private @Valid Long id; private @Valid Long petId; @@ -74,6 +75,12 @@ public static StatusEnum fromValue(String value) { private @Valid StatusEnum status; private @Valid Boolean complete = false; + protected Order(OrderBuilder b) { + this.id = b.id;this.petId = b.petId;this.quantity = b.quantity;this.shipDate = b.shipDate;this.status = b.status;this.complete = b.complete; + } + + public Order() { } + /** **/ public Order id(Long id) { @@ -82,8 +89,6 @@ public Order id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -103,8 +108,6 @@ public Order petId(Long petId) { } - - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,8 +127,6 @@ public Order quantity(Integer quantity) { } - - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -145,8 +146,6 @@ public Order shipDate(Date shipDate) { } - - @ApiModelProperty(value = "") @JsonProperty("shipDate") public Date getShipDate() { @@ -167,8 +166,6 @@ public Order status(StatusEnum status) { } - - @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { @@ -188,8 +185,6 @@ public Order complete(Boolean complete) { } - - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -251,5 +246,58 @@ private String toIndentedString(Object o) { } + public static OrderBuilder builder() { + return new OrderBuilderImpl(); + } + + private static final class OrderBuilderImpl extends OrderBuilder { + + @Override + protected OrderBuilderImpl self() { + return this; + } + + @Override + public Order build() { + return new Order(this); + } + } + + public static abstract class OrderBuilder> { + private Long id; + private Long petId; + private Integer quantity; + private Date shipDate; + private StatusEnum status; + private Boolean complete = false; + protected abstract B self(); + + public abstract C build(); + + public B id(Long id) { + this.id = id; + return self(); + } + public B petId(Long petId) { + this.petId = petId; + return self(); + } + public B quantity(Integer quantity) { + this.quantity = quantity; + return self(); + } + public B shipDate(Date shipDate) { + this.shipDate = shipDate; + return self(); + } + public B status(StatusEnum status) { + this.status = status; + return self(); + } + public B complete(Boolean complete) { + this.complete = complete; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java index 95ff03416bb3..5907ce0e442c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java @@ -17,12 +17,19 @@ @JsonTypeName("OuterComposite") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class OuterComposite implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber; private @Valid String myString; private @Valid Boolean myBoolean; + protected OuterComposite(OuterCompositeBuilder b) { + this.myNumber = b.myNumber;this.myString = b.myString;this.myBoolean = b.myBoolean; + } + + public OuterComposite() { } + /** **/ public OuterComposite myNumber(BigDecimal myNumber) { @@ -31,8 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { } - - @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -52,8 +57,6 @@ public OuterComposite myString(String myString) { } - - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -73,8 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { } - - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,5 +131,43 @@ private String toIndentedString(Object o) { } + public static OuterCompositeBuilder builder() { + return new OuterCompositeBuilderImpl(); + } + + private static final class OuterCompositeBuilderImpl extends OuterCompositeBuilder { + + @Override + protected OuterCompositeBuilderImpl self() { + return this; + } + + @Override + public OuterComposite build() { + return new OuterComposite(this); + } + } + + public static abstract class OuterCompositeBuilder> { + private BigDecimal myNumber; + private String myString; + private Boolean myBoolean; + protected abstract B self(); + + public abstract C build(); + + public B myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return self(); + } + public B myString(String myString) { + this.myString = myString; + return self(); + } + public B myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java index bbefddb2c48d..e4fbfaeef1ed 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java @@ -23,7 +23,8 @@ @JsonTypeName("Pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Pet implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Pet implements Serializable { private @Valid Long id; private @Valid Category category; @@ -80,6 +81,12 @@ public static StatusEnum fromValue(String value) { private @Valid StatusEnum status; + protected Pet(PetBuilder b) { + this.id = b.id;this.category = b.category;this.name = b.name;this.photoUrls = b.photoUrls;this.tags = b.tags;this.status = b.status; + } + + public Pet() { } + /** **/ public Pet id(Long id) { @@ -88,8 +95,6 @@ public Pet id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -109,8 +114,6 @@ public Pet category(Category category) { } - - @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { @@ -130,8 +133,6 @@ public Pet name(String name) { } - - @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") @NotNull @@ -152,8 +153,6 @@ public Pet photoUrls(Set photoUrls) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") @NotNull @@ -191,8 +190,6 @@ public Pet tags(List tags) { } - - @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { @@ -229,8 +226,6 @@ public Pet status(StatusEnum status) { } - - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { @@ -292,5 +287,58 @@ private String toIndentedString(Object o) { } + public static PetBuilder builder() { + return new PetBuilderImpl(); + } + + private static final class PetBuilderImpl extends PetBuilder { + + @Override + protected PetBuilderImpl self() { + return this; + } + + @Override + public Pet build() { + return new Pet(this); + } + } + + public static abstract class PetBuilder> { + private Long id; + private Category category; + private String name; + private Set photoUrls = new LinkedHashSet<>(); + private List tags = new ArrayList<>(); + private StatusEnum status; + protected abstract B self(); + + public abstract C build(); + + public B id(Long id) { + this.id = id; + return self(); + } + public B category(Category category) { + this.category = category; + return self(); + } + public B name(String name) { + this.name = name; + return self(); + } + public B photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return self(); + } + public B tags(List tags) { + this.tags = tags; + return self(); + } + public B status(StatusEnum status) { + this.status = status; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 71451f9cf68d..8f56d18eb445 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -16,11 +16,18 @@ @JsonTypeName("ReadOnlyFirst") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ReadOnlyFirst implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class ReadOnlyFirst implements Serializable { private @Valid String bar; private @Valid String baz; + protected ReadOnlyFirst(ReadOnlyFirstBuilder b) { + this.bar = b.bar;this.baz = b.baz; + } + + public ReadOnlyFirst() { } + /** **/ public ReadOnlyFirst bar(String bar) { @@ -29,8 +36,6 @@ public ReadOnlyFirst bar(String bar) { } - - @ApiModelProperty(value = "") @JsonProperty("bar") public String getBar() { @@ -50,8 +55,6 @@ public ReadOnlyFirst baz(String baz) { } - - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,5 +108,38 @@ private String toIndentedString(Object o) { } + public static ReadOnlyFirstBuilder builder() { + return new ReadOnlyFirstBuilderImpl(); + } + + private static final class ReadOnlyFirstBuilderImpl extends ReadOnlyFirstBuilder { + + @Override + protected ReadOnlyFirstBuilderImpl self() { + return this; + } + + @Override + public ReadOnlyFirst build() { + return new ReadOnlyFirst(this); + } + } + + public static abstract class ReadOnlyFirstBuilder> { + private String bar; + private String baz; + protected abstract B self(); + + public abstract C build(); + + public B bar(String bar) { + this.bar = bar; + return self(); + } + public B baz(String baz) { + this.baz = baz; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java index 0fc3694ffad8..bea2aa54197c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -17,10 +17,17 @@ @JsonTypeName("$special[model.name]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class SpecialModelName implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class SpecialModelName implements Serializable { private @Valid Long $specialPropertyName; + protected SpecialModelName(SpecialModelNameBuilder b) { + this.$specialPropertyName = b.$specialPropertyName; + } + + public SpecialModelName() { } + /** **/ public SpecialModelName $specialPropertyName(Long $specialPropertyName) { @@ -29,8 +36,6 @@ } - - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,5 +87,33 @@ private String toIndentedString(Object o) { } + public static SpecialModelNameBuilder builder() { + return new SpecialModelNameBuilderImpl(); + } + + private static final class SpecialModelNameBuilderImpl extends SpecialModelNameBuilder { + + @Override + protected SpecialModelNameBuilderImpl self() { + return this; + } + + @Override + public SpecialModelName build() { + return new SpecialModelName(this); + } + } + + public static abstract class SpecialModelNameBuilder> { + private Long $specialPropertyName; + protected abstract B self(); + + public abstract C build(); + + public B $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java index db7d608abd57..750c15142512 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java @@ -16,11 +16,18 @@ @JsonTypeName("Tag") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Tag implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class Tag implements Serializable { private @Valid Long id; private @Valid String name; + protected Tag(TagBuilder b) { + this.id = b.id;this.name = b.name; + } + + public Tag() { } + /** **/ public Tag id(Long id) { @@ -29,8 +36,6 @@ public Tag id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -50,8 +55,6 @@ public Tag name(String name) { } - - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,5 +108,38 @@ private String toIndentedString(Object o) { } + public static TagBuilder builder() { + return new TagBuilderImpl(); + } + + private static final class TagBuilderImpl extends TagBuilder { + + @Override + protected TagBuilderImpl self() { + return this; + } + + @Override + public Tag build() { + return new Tag(this); + } + } + + public static abstract class TagBuilder> { + private Long id; + private String name; + protected abstract B self(); + + public abstract C build(); + + public B id(Long id) { + this.id = id; + return self(); + } + public B name(String name) { + this.name = name; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 98cdf57b7fe5..354098bce7e3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -19,7 +19,8 @@ @JsonTypeName("TypeHolderDefault") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderDefault implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class TypeHolderDefault implements Serializable { private @Valid String stringItem = "what"; private @Valid BigDecimal numberItem; @@ -27,6 +28,12 @@ private @Valid Boolean boolItem = true; private @Valid List arrayItem = new ArrayList<>(); + protected TypeHolderDefault(TypeHolderDefaultBuilder b) { + this.stringItem = b.stringItem;this.numberItem = b.numberItem;this.integerItem = b.integerItem;this.boolItem = b.boolItem;this.arrayItem = b.arrayItem; + } + + public TypeHolderDefault() { } + /** **/ public TypeHolderDefault stringItem(String stringItem) { @@ -35,8 +42,6 @@ public TypeHolderDefault stringItem(String stringItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") @NotNull @@ -57,8 +62,6 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") @NotNull @@ -79,8 +82,6 @@ public TypeHolderDefault integerItem(Integer integerItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") @NotNull @@ -101,8 +102,6 @@ public TypeHolderDefault boolItem(Boolean boolItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") @NotNull @@ -123,8 +122,6 @@ public TypeHolderDefault arrayItem(List arrayItem) { } - - @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") @NotNull @@ -201,5 +198,53 @@ private String toIndentedString(Object o) { } + public static TypeHolderDefaultBuilder builder() { + return new TypeHolderDefaultBuilderImpl(); + } + + private static final class TypeHolderDefaultBuilderImpl extends TypeHolderDefaultBuilder { + + @Override + protected TypeHolderDefaultBuilderImpl self() { + return this; + } + + @Override + public TypeHolderDefault build() { + return new TypeHolderDefault(this); + } + } + + public static abstract class TypeHolderDefaultBuilder> { + private String stringItem = "what"; + private BigDecimal numberItem; + private Integer integerItem; + private Boolean boolItem = true; + private List arrayItem = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B stringItem(String stringItem) { + this.stringItem = stringItem; + return self(); + } + public B numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return self(); + } + public B integerItem(Integer integerItem) { + this.integerItem = integerItem; + return self(); + } + public B boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return self(); + } + public B arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java index f2fbe66277b5..03b6728e0e77 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -19,7 +19,8 @@ @JsonTypeName("TypeHolderExample") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderExample implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class TypeHolderExample implements Serializable { private @Valid String stringItem; private @Valid BigDecimal numberItem; @@ -28,6 +29,12 @@ private @Valid Boolean boolItem; private @Valid List arrayItem = new ArrayList<>(); + protected TypeHolderExample(TypeHolderExampleBuilder b) { + this.stringItem = b.stringItem;this.numberItem = b.numberItem;this.floatItem = b.floatItem;this.integerItem = b.integerItem;this.boolItem = b.boolItem;this.arrayItem = b.arrayItem; + } + + public TypeHolderExample() { } + /** **/ public TypeHolderExample stringItem(String stringItem) { @@ -36,8 +43,6 @@ public TypeHolderExample stringItem(String stringItem) { } - - @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") @NotNull @@ -58,8 +63,6 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { } - - @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") @NotNull @@ -80,8 +83,6 @@ public TypeHolderExample floatItem(Float floatItem) { } - - @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") @NotNull @@ -102,8 +103,6 @@ public TypeHolderExample integerItem(Integer integerItem) { } - - @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") @NotNull @@ -124,8 +123,6 @@ public TypeHolderExample boolItem(Boolean boolItem) { } - - @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") @NotNull @@ -146,8 +143,6 @@ public TypeHolderExample arrayItem(List arrayItem) { } - - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty("array_item") @NotNull @@ -226,5 +221,58 @@ private String toIndentedString(Object o) { } + public static TypeHolderExampleBuilder builder() { + return new TypeHolderExampleBuilderImpl(); + } + + private static final class TypeHolderExampleBuilderImpl extends TypeHolderExampleBuilder { + + @Override + protected TypeHolderExampleBuilderImpl self() { + return this; + } + + @Override + public TypeHolderExample build() { + return new TypeHolderExample(this); + } + } + + public static abstract class TypeHolderExampleBuilder> { + private String stringItem; + private BigDecimal numberItem; + private Float floatItem; + private Integer integerItem; + private Boolean boolItem; + private List arrayItem = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B stringItem(String stringItem) { + this.stringItem = stringItem; + return self(); + } + public B numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return self(); + } + public B floatItem(Float floatItem) { + this.floatItem = floatItem; + return self(); + } + public B integerItem(Integer integerItem) { + this.integerItem = integerItem; + return self(); + } + public B boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return self(); + } + public B arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java index 271676fb2e09..0ec607846e00 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java @@ -16,7 +16,8 @@ @JsonTypeName("User") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class User implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class User implements Serializable { private @Valid Long id; private @Valid String username; @@ -27,6 +28,12 @@ private @Valid String phone; private @Valid Integer userStatus; + protected User(UserBuilder b) { + this.id = b.id;this.username = b.username;this.firstName = b.firstName;this.lastName = b.lastName;this.email = b.email;this.password = b.password;this.phone = b.phone;this.userStatus = b.userStatus; + } + + public User() { } + /** **/ public User id(Long id) { @@ -35,8 +42,6 @@ public User id(Long id) { } - - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,8 +61,6 @@ public User username(String username) { } - - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -77,8 +80,6 @@ public User firstName(String firstName) { } - - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -98,8 +99,6 @@ public User lastName(String lastName) { } - - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -119,8 +118,6 @@ public User email(String email) { } - - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -140,8 +137,6 @@ public User password(String password) { } - - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -161,8 +156,6 @@ public User phone(String phone) { } - - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -183,8 +176,6 @@ public User userStatus(Integer userStatus) { } - - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -250,5 +241,68 @@ private String toIndentedString(Object o) { } + public static UserBuilder builder() { + return new UserBuilderImpl(); + } + + private static final class UserBuilderImpl extends UserBuilder { + + @Override + protected UserBuilderImpl self() { + return this; + } + + @Override + public User build() { + return new User(this); + } + } + + public static abstract class UserBuilder> { + private Long id; + private String username; + private String firstName; + private String lastName; + private String email; + private String password; + private String phone; + private Integer userStatus; + protected abstract B self(); + + public abstract C build(); + + public B id(Long id) { + this.id = id; + return self(); + } + public B username(String username) { + this.username = username; + return self(); + } + public B firstName(String firstName) { + this.firstName = firstName; + return self(); + } + public B lastName(String lastName) { + this.lastName = lastName; + return self(); + } + public B email(String email) { + this.email = email; + return self(); + } + public B password(String password) { + this.password = password; + return self(); + } + public B phone(String phone) { + this.phone = phone; + return self(); + } + public B userStatus(Integer userStatus) { + this.userStatus = userStatus; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java index c70af4c9e31f..8923f15e1158 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java @@ -19,7 +19,8 @@ @JsonTypeName("XmlItem") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class XmlItem implements Serializable { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") +public class XmlItem implements Serializable { private @Valid String attributeString; private @Valid BigDecimal attributeNumber; @@ -51,6 +52,12 @@ private @Valid List prefixNsArray = new ArrayList<>(); private @Valid List prefixNsWrappedArray = new ArrayList<>(); + protected XmlItem(XmlItemBuilder b) { + this.attributeString = b.attributeString;this.attributeNumber = b.attributeNumber;this.attributeInteger = b.attributeInteger;this.attributeBoolean = b.attributeBoolean;this.wrappedArray = b.wrappedArray;this.nameString = b.nameString;this.nameNumber = b.nameNumber;this.nameInteger = b.nameInteger;this.nameBoolean = b.nameBoolean;this.nameArray = b.nameArray;this.nameWrappedArray = b.nameWrappedArray;this.prefixString = b.prefixString;this.prefixNumber = b.prefixNumber;this.prefixInteger = b.prefixInteger;this.prefixBoolean = b.prefixBoolean;this.prefixArray = b.prefixArray;this.prefixWrappedArray = b.prefixWrappedArray;this.namespaceString = b.namespaceString;this.namespaceNumber = b.namespaceNumber;this.namespaceInteger = b.namespaceInteger;this.namespaceBoolean = b.namespaceBoolean;this.namespaceArray = b.namespaceArray;this.namespaceWrappedArray = b.namespaceWrappedArray;this.prefixNsString = b.prefixNsString;this.prefixNsNumber = b.prefixNsNumber;this.prefixNsInteger = b.prefixNsInteger;this.prefixNsBoolean = b.prefixNsBoolean;this.prefixNsArray = b.prefixNsArray;this.prefixNsWrappedArray = b.prefixNsWrappedArray; + } + + public XmlItem() { } + /** **/ public XmlItem attributeString(String attributeString) { @@ -59,8 +66,6 @@ public XmlItem attributeString(String attributeString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -80,8 +85,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -101,8 +104,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -122,8 +123,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -143,8 +142,6 @@ public XmlItem wrappedArray(List wrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -180,8 +177,6 @@ public XmlItem nameString(String nameString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -201,8 +196,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -222,8 +215,6 @@ public XmlItem nameInteger(Integer nameInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -243,8 +234,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -264,8 +253,6 @@ public XmlItem nameArray(List nameArray) { } - - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -301,8 +288,6 @@ public XmlItem nameWrappedArray(List nameWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -338,8 +323,6 @@ public XmlItem prefixString(String prefixString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -359,8 +342,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -380,8 +361,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -401,8 +380,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -422,8 +399,6 @@ public XmlItem prefixArray(List prefixArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -459,8 +434,6 @@ public XmlItem prefixWrappedArray(List prefixWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -496,8 +469,6 @@ public XmlItem namespaceString(String namespaceString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -517,8 +488,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -538,8 +507,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -559,8 +526,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -580,8 +545,6 @@ public XmlItem namespaceArray(List namespaceArray) { } - - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -617,8 +580,6 @@ public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -654,8 +615,6 @@ public XmlItem prefixNsString(String prefixNsString) { } - - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -675,8 +634,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { } - - @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -696,8 +653,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -717,8 +672,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { } - - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -738,8 +691,6 @@ public XmlItem prefixNsArray(List prefixNsArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -775,8 +726,6 @@ public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { } - - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -900,5 +849,173 @@ private String toIndentedString(Object o) { } + public static XmlItemBuilder builder() { + return new XmlItemBuilderImpl(); + } + + private static final class XmlItemBuilderImpl extends XmlItemBuilder { + + @Override + protected XmlItemBuilderImpl self() { + return this; + } + + @Override + public XmlItem build() { + return new XmlItem(this); + } + } + + public static abstract class XmlItemBuilder> { + private String attributeString; + private BigDecimal attributeNumber; + private Integer attributeInteger; + private Boolean attributeBoolean; + private List wrappedArray = new ArrayList<>(); + private String nameString; + private BigDecimal nameNumber; + private Integer nameInteger; + private Boolean nameBoolean; + private List nameArray = new ArrayList<>(); + private List nameWrappedArray = new ArrayList<>(); + private String prefixString; + private BigDecimal prefixNumber; + private Integer prefixInteger; + private Boolean prefixBoolean; + private List prefixArray = new ArrayList<>(); + private List prefixWrappedArray = new ArrayList<>(); + private String namespaceString; + private BigDecimal namespaceNumber; + private Integer namespaceInteger; + private Boolean namespaceBoolean; + private List namespaceArray = new ArrayList<>(); + private List namespaceWrappedArray = new ArrayList<>(); + private String prefixNsString; + private BigDecimal prefixNsNumber; + private Integer prefixNsInteger; + private Boolean prefixNsBoolean; + private List prefixNsArray = new ArrayList<>(); + private List prefixNsWrappedArray = new ArrayList<>(); + protected abstract B self(); + + public abstract C build(); + + public B attributeString(String attributeString) { + this.attributeString = attributeString; + return self(); + } + public B attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return self(); + } + public B attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return self(); + } + public B attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return self(); + } + public B wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return self(); + } + public B nameString(String nameString) { + this.nameString = nameString; + return self(); + } + public B nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return self(); + } + public B nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return self(); + } + public B nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return self(); + } + public B nameArray(List nameArray) { + this.nameArray = nameArray; + return self(); + } + public B nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return self(); + } + public B prefixString(String prefixString) { + this.prefixString = prefixString; + return self(); + } + public B prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return self(); + } + public B prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return self(); + } + public B prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return self(); + } + public B prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return self(); + } + public B prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return self(); + } + public B namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return self(); + } + public B namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return self(); + } + public B namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return self(); + } + public B namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return self(); + } + public B namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return self(); + } + public B namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return self(); + } + public B prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return self(); + } + public B prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return self(); + } + public B prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return self(); + } + public B prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return self(); + } + public B prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return self(); + } + public B prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return self(); + } + } } diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java index 2e99959a12f3..e2f2504d8689 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java index 2e99959a12f3..e2f2504d8689 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index 607a6d762baf..f93a014d5e39 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -175,6 +175,11 @@ ${beanvalidation-version} provided + + javax.annotation + javax.annotation-api + 1.3.2 + diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java index 2e99959a12f3..e2f2504d8689 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index d345b1a1efb1..eecb928d7ed1 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -175,6 +175,11 @@ ${beanvalidation-version} provided + + javax.annotation + javax.annotation-api + 1.3.2 + diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java index 2e99959a12f3..e2f2504d8689 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java @@ -14,6 +14,7 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index eb94d6065e61..48925960ec99 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -8,8 +8,6 @@ import javax.ws.rs.core.Response import java.io.InputStream -import java.util.Map -import java.util.List diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index f297a11661db..f19591c8de47 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -7,8 +7,6 @@ import javax.ws.rs.core.Response import java.io.InputStream -import java.util.Map -import java.util.List diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index f824ebc217ab..0f2843df6562 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -7,8 +7,6 @@ import javax.ws.rs.core.Response import java.io.InputStream -import java.util.Map -import java.util.List diff --git a/samples/server/petstore/kotlin-springboot-delegate/pom.xml b/samples/server/petstore/kotlin-springboot-delegate/pom.xml index f7094ec0e103..4d5fc7828f68 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/pom.xml +++ b/samples/server/petstore/kotlin-springboot-delegate/pom.xml @@ -6,6 +6,7 @@ openapi-spring 1.0.0 + UTF-8 1.3.30 1.2.0 1.3.5 diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml b/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml index f7094ec0e103..4d5fc7828f68 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml +++ b/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml @@ -6,6 +6,7 @@ openapi-spring 1.0.0 + UTF-8 1.3.30 1.2.0 1.3.5 diff --git a/samples/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/server/petstore/kotlin-springboot-reactive/pom.xml index cb52346a5c9e..22b7fba7d4cf 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/pom.xml +++ b/samples/server/petstore/kotlin-springboot-reactive/pom.xml @@ -6,6 +6,7 @@ openapi-spring 1.0.0 + UTF-8 1.3.30 1.2.0 1.3.5 diff --git a/samples/server/petstore/kotlin-springboot/pom.xml b/samples/server/petstore/kotlin-springboot/pom.xml index f7094ec0e103..4d5fc7828f68 100644 --- a/samples/server/petstore/kotlin-springboot/pom.xml +++ b/samples/server/petstore/kotlin-springboot/pom.xml @@ -6,6 +6,7 @@ openapi-spring 1.0.0 + UTF-8 1.3.30 1.2.0 1.3.5 diff --git a/samples/server/petstore/php-laravel/.openapi-generator/FILES b/samples/server/petstore/php-laravel/.openapi-generator/FILES index a00cd92d6905..b4ae804ba870 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/FILES +++ b/samples/server/petstore/php-laravel/.openapi-generator/FILES @@ -23,6 +23,7 @@ lib/app/Http/Middleware/TrimStrings.php lib/app/Http/Middleware/TrustProxies.php lib/app/Http/Middleware/VerifyCsrfToken.php lib/app/Models/AdditionalPropertiesClass.php +lib/app/Models/AllOfWithSingleRef.php lib/app/Models/Animal.php lib/app/Models/ApiResponse.php lib/app/Models/ArrayOfArrayOfNumberOnly.php @@ -65,6 +66,7 @@ lib/app/Models/OuterEnumIntegerDefaultValue.php lib/app/Models/OuterObjectWithEnumProperty.php lib/app/Models/Pet.php lib/app/Models/ReadOnlyFirst.php +lib/app/Models/SingleRefType.php lib/app/Models/SpecialModelName.php lib/app/Models/Tag.php lib/app/Models/User.php diff --git a/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php b/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php index c6c58dfdb981..ed45b3a38e12 100644 --- a/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php +++ b/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php @@ -181,6 +181,8 @@ public function testEnumParameters() $enumQueryDouble = $input['enumQueryDouble']; + $enumQueryModelArray = $input['enumQueryModelArray']; + $enumFormStringArray = $input['enumFormStringArray']; $enumFormString = $input['enumFormString']; diff --git a/samples/server/petstore/php-laravel/lib/app/Models/AllOfWithSingleRef.php b/samples/server/petstore/php-laravel/lib/app/Models/AllOfWithSingleRef.php new file mode 100644 index 000000000000..1bc1bdac99d6 --- /dev/null +++ b/samples/server/petstore/php-laravel/lib/app/Models/AllOfWithSingleRef.php @@ -0,0 +1,18 @@ + ``` +## Mock Server +Since this feature should be used for development only, change environment to `development` and send additional HTTP header `X-OpenAPIServer-Mock: ping` with any request to get mocked response. +CURL example: +```console +curl --request GET \ + --url 'http://localhost:8888/v2/pet/findByStatus?status=available' \ + --header 'accept: application/json' \ + --header 'X-OpenAPIServer-Mock: ping' +[{"id":-8738629417578509312,"category":{"id":-4162503862215270400,"name":"Lorem ipsum dol"},"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem i","photoUrls":["Lor"],"tags":[{"id":-3506202845849391104,"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectet"}],"status":"pending"}] +``` + +Used packages: +* [Openapi Data Mocker](https://github.com/ybelenko/openapi-data-mocker) - first implementation of OAS3 fake data generator. +* [Openapi Data Mocker Server Middleware](https://github.com/ybelenko/openapi-data-mocker-server-middleware) - PSR-15 HTTP server middleware. +* [Openapi Data Mocker Interfaces](https://github.com/ybelenko/openapi-data-mocker-interfaces) - package with mocking interfaces. + +## Logging + +Build contains pre-configured [`monolog/monolog`](https://github.com/Seldaek/monolog) package. Make sure that `logs` folder is writable. +Add required log handlers/processors/formatters in `lib/App/RegisterDependencies.php`. + ## API Endpoints All URIs are relative to *http://petstore.swagger.io/v2* diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json index 4f31f4b28ff7..232da8a95cfd 100644 --- a/samples/server/petstore/php-slim4/composer.json +++ b/samples/server/petstore/php-slim4/composer.json @@ -10,10 +10,12 @@ "require": { "php": "^7.4 || ^8.0", "dyorg/slim-token-authentication": "dev-slim4", + "monolog/monolog": "^2.4", + "neomerx/cors-psr7": "^2.0", "php-di/slim-bridge": "^3.2", "slim/psr7": "^1.1.0", "ybelenko/openapi-data-mocker": "^1.0", - "ybelenko/openapi-data-mocker-server-middleware": "^1.0" + "ybelenko/openapi-data-mocker-server-middleware": "^1.2" }, "require-dev": { "overtrue/phplint": "^2.0.2", diff --git a/samples/server/petstore/php-slim4/config/dev/default.inc.php b/samples/server/petstore/php-slim4/config/dev/default.inc.php index be4bd6530b0d..acc8964f67c0 100644 --- a/samples/server/petstore/php-slim4/config/dev/default.inc.php +++ b/samples/server/petstore/php-slim4/config/dev/default.inc.php @@ -20,11 +20,41 @@ return [ 'mode' => 'development', - // slim framework settings + // Returns a detailed HTML page with error details and + // a stack trace. Should be disabled in production. 'slim.displayErrorDetails' => true, + + // Whether to display errors on the internal PHP log or not. 'slim.logErrors' => false, + + // If true, display full errors with message and stack trace on the PHP log. + // If false, display only "Slim Application Error" on the PHP log. + // Doesn't do anything when 'logErrors' is false. 'slim.logErrorDetails' => false, + // CORS settings + // @see https://github.com/neomerx/cors-psr7/blob/master/src/Strategies/Settings.php + 'cors.settings' => [ + isset($_SERVER['HTTPS']) ? 'https' : 'http', // serverOriginScheme + $_SERVER['SERVER_NAME'], // serverOriginHost + null, // serverOriginPort + false, // isPreFlightCanBeCached + 0, // preFlightCacheMaxAge + false, // isForceAddMethods + false, // isForceAddHeaders + true, // isUseCredentials + true, // areAllOriginsAllowed + [], // allowedOrigins + true, // areAllMethodsAllowed + [], // allowedLcMethods + 'GET, POST, PUT, PATCH, DELETE', // allowedMethodsList + true, // areAllHeadersAllowed + [], // allowedLcHeaders + 'authorization, content-type, x-requested-with', // allowedHeadersList + '', // exposedHeadersList + true, // isCheckHost + ], + // PDO 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', 'pdo.username' => 'root', @@ -32,4 +62,43 @@ 'pdo.options' => [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, ], + + // mocker + // OBVIOUSLY MUST NOT BE USED for production + // @see https://github.com/ybelenko/openapi-data-mocker-server-middleware + 'mocker.getMockStatusCodeCallback' => function () { + return function (\Psr\Http\Message\ServerRequestInterface $request, array $responses) { + // check if client clearly asks for mocked response + $pingHeader = 'X-OpenAPIServer-Mock'; + $pingHeaderCode = 'X-OpenAPIServer-Mock-Code'; + if ( + $request->hasHeader($pingHeader) + && $request->getHeader($pingHeader)[0] === 'ping' + ) { + $responses = (array) $responses; + $requestedResponseCode = ($request->hasHeader($pingHeaderCode)) ? $request->getHeader($pingHeaderCode)[0] : 'default'; + if (array_key_exists($requestedResponseCode, $responses)) { + return $requestedResponseCode; + } + + // return first response key + reset($responses); + return key($responses); + } + + return false; + }; + }, + 'mocker.afterCallback' => function () { + return function (\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response) { + // mark mocked response to distinguish real and fake responses + return $response->withHeader('X-OpenAPIServer-Mock', 'pong'); + }; + }, + + // logger + 'logger.name' => 'App', + 'logger.path' => \realpath(__DIR__ . '/../../logs') . '/app.log', + 'logger.level' => 100, // equals DEBUG level + 'logger.options' => [], ]; diff --git a/samples/server/petstore/php-slim4/config/prod/default.inc.php b/samples/server/petstore/php-slim4/config/prod/default.inc.php index 333c7768b43a..2d7cc16d3865 100644 --- a/samples/server/petstore/php-slim4/config/prod/default.inc.php +++ b/samples/server/petstore/php-slim4/config/prod/default.inc.php @@ -20,11 +20,41 @@ return [ 'mode' => 'production', - // slim framework settings + // Returns a detailed HTML page with error details and + // a stack trace. Should be disabled in production. 'slim.displayErrorDetails' => false, + + // Whether to display errors on the internal PHP log or not. 'slim.logErrors' => true, + + // If true, display full errors with message and stack trace on the PHP log. + // If false, display only "Slim Application Error" on the PHP log. + // Doesn't do anything when 'logErrors' is false. 'slim.logErrorDetails' => true, + // CORS settings + // https://github.com/neomerx/cors-psr7/blob/master/src/Strategies/Settings.php + 'cors.settings' => [ + isset($_SERVER['HTTPS']) ? 'https' : 'http', // serverOriginScheme + $_SERVER['SERVER_NAME'], // serverOriginHost + null, // serverOriginPort + true, // isPreFlightCanBeCached + 86400, // preFlightCacheMaxAge + false, // isForceAddMethods + false, // isForceAddHeaders + true, // isUseCredentials + false, // areAllOriginsAllowed + [], // allowedOrigins + false, // areAllMethodsAllowed + [], // allowedLcMethods + '', // allowedMethodsList + false, // areAllHeadersAllowed + [], // allowedLcHeaders + '', // allowedHeadersList + '', // exposedHeadersList + true, // isCheckHost + ], + // PDO 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', 'pdo.username' => 'root', @@ -32,4 +62,10 @@ 'pdo.options' => [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, ], + + // logger + 'logger.name' => 'App', + 'logger.path' => \realpath(__DIR__ . '/../../logs') . '/app.log', + 'logger.level' => 300, // equals WARNING level + 'logger.options' => [], ]; diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php index 8c21bc3dca68..83b8452fad8b 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php @@ -54,9 +54,16 @@ public function __invoke(\DI\ContainerBuilder $containerBuilder): void // Slim error middleware // @see https://www.slimframework.com/docs/v4/middleware/error-handling.html \Slim\Middleware\ErrorMiddleware::class => \DI\autowire() - ->constructorParameter('displayErrorDetails', \DI\get('slim.displayErrorDetails', false)) - ->constructorParameter('logErrors', \DI\get('slim.logErrors', true)) - ->constructorParameter('logErrorDetails', \DI\get('slim.logErrorDetails', true)), + ->constructorParameter('displayErrorDetails', \DI\get('slim.displayErrorDetails')) + ->constructorParameter('logErrors', \DI\get('slim.logErrors')) + ->constructorParameter('logErrorDetails', \DI\get('slim.logErrorDetails')) + ->constructorParameter('logger', \DI\get(\Psr\Log\LoggerInterface::class)), + + // CORS + \Neomerx\Cors\Contracts\AnalysisStrategyInterface::class => \DI\create(\Neomerx\Cors\Strategies\Settings::class) + ->method('setData', \DI\get('cors.settings')), + + \Neomerx\Cors\Contracts\AnalyzerInterface::class => \DI\factory([\Neomerx\Cors\Analyzer::class, 'instance']), // PDO class for database managing \PDO::class => \DI\create() @@ -64,8 +71,44 @@ public function __invoke(\DI\ContainerBuilder $containerBuilder): void \DI\get('pdo.dsn'), \DI\get('pdo.username'), \DI\get('pdo.password'), - \DI\get('pdo.options', null) + \DI\get('pdo.options') ), + + // DataMocker + // @see https://github.com/ybelenko/openapi-data-mocker-server-middleware + \OpenAPIServer\Mock\OpenApiDataMockerInterface::class => \DI\create(\OpenAPIServer\Mock\OpenApiDataMocker::class) + ->method('setModelsNamespace', 'OpenAPIServer\Model\\'), + + \OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory::class => \DI\autowire() + ->constructorParameter('getMockStatusCodeCallback', \DI\get('mocker.getMockStatusCodeCallback')) + ->constructorParameter('afterCallback', \DI\get('mocker.afterCallback')), + + // Monolog Logger + \Psr\Log\LoggerInterface::class => \DI\factory(function (string $mode, string $name, string $path, $level, array $options = []) { + $logger = new \Monolog\Logger($name); + + $handlers = []; + // stream logger as default handler across all environments + // somebody might not need it during development + $handlers[] = new \Monolog\Handler\StreamHandler($path, $level); + + if ($mode === 'development') { + // add dev handlers if necessary + // @see https://github.com/Seldaek/monolog/blob/f2f66cd480df5f165391ff9b6332700d467b25ac/doc/02-handlers-formatters-processors.md#logging-in-development + } elseif ($mode === 'production') { + // add prod handlers + // @see https://github.com/Seldaek/monolog/blob/f2f66cd480df5f165391ff9b6332700d467b25ac/doc/02-handlers-formatters-processors.md#send-alerts-and-emails + // handlers which doesn't make sense during development + // Slack, Sentry, Swift or native mailer + } + + return $logger->setHandlers($handlers); + }) + ->parameter('mode', \DI\get('mode')) + ->parameter('name', \DI\get('logger.name')) + ->parameter('path', \DI\get('logger.path')) + ->parameter('level', \DI\get('logger.level')) + ->parameter('options', \DI\get('logger.options')), ]); } } diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php index 52c5533f2ab7..0c719abdfb97 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php @@ -24,6 +24,8 @@ */ namespace OpenAPIServer\App; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; use Slim\Exception\HttpNotImplementedException; /** @@ -838,8 +840,23 @@ class RegisterRoutes */ public function __invoke(\Slim\App $app): void { + $app->options('/{routes:.*}', function (ServerRequestInterface $request, ResponseInterface $response) { + // CORS Pre-Flight OPTIONS Request Handler + return $response; + }); + + // create mock middleware factory + /** @var \Psr\Container\ContainerInterface */ + $container = $app->getContainer(); + /** @var \OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory|null */ + $mockMiddlewareFactory = null; + if ($container->has(\OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory::class)) { + // I know, anti-pattern. Don't retrieve dependency directly from container + $mockMiddlewareFactory = $container->get(\OpenAPIServer\Mock\OpenApiDataMockerRouteMiddlewareFactory::class); + } + foreach ($this->operations as $operation) { - $callback = function ($request) use ($operation) { + $callback = function (ServerRequestInterface $request) use ($operation) { $message = "How about extending {$operation['classname']} by {$operation['apiPackage']}\\{$operation['userClassname']} class implementing {$operation['operationId']} as a {$operation['httpMethod']} method?"; throw new HttpNotImplementedException($request, $message); }; @@ -851,6 +868,13 @@ public function __invoke(\Slim\App $app): void $callback = ["\\{$operation['apiPackage']}\\{$operation['userClassname']}", $operation['operationId']]; } + if ($mockMiddlewareFactory) { + $mockSchemaResponses = array_map(function ($item) { + return json_decode($item['jsonSchema'], true); + }, $operation['responses']); + $middlewares[] = $mockMiddlewareFactory->create($mockSchemaResponses); + } + $route = $app->map( [$operation['httpMethod']], "{$operation['basePathWithoutHost']}{$operation['path']}", diff --git a/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php b/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php new file mode 100644 index 000000000000..3923fef3153c --- /dev/null +++ b/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php @@ -0,0 +1,142 @@ +request = $request; + return $this; + } + + /** + * Set error middleware. + * @param ErrorMiddleware $errorMiddleware + * @return ResponseEmitter + */ + public function setErrorMiddleware(ErrorMiddleware $errorMiddleware): ResponseEmitter + { + $this->errorMiddleware = $errorMiddleware; + return $this; + } + + /** + * Set CORS request analyzer. + * @param AnalyzerInterface $analyzer + * @return ResponseEmitter + */ + public function setAnalyzer(AnalyzerInterface $analyzer): ResponseEmitter + { + $this->analyzer = $analyzer; + return $this; + } + + /** + * Send the response the client + * + * @param ResponseInterface $response + * @return void + */ + public function emit(ResponseInterface $response): void + { + // slightly modified CORS handler from package documentation example + // @see https://github.com/neomerx/cors-psr7#sample-usage + $cors = $this->analyzer->analyze($this->request); + $errorMsg = null; + + switch ($cors->getRequestType()) { + case AnalysisResultInterface::ERR_NO_HOST_HEADER: + $errorMsg = 'CORS no host header in request'; + break; + case AnalysisResultInterface::ERR_ORIGIN_NOT_ALLOWED: + $errorMsg = 'CORS request origin is not allowed'; + break; + case AnalysisResultInterface::ERR_METHOD_NOT_SUPPORTED: + $errorMsg = 'CORS requested method is not supported'; + break; + case AnalysisResultInterface::ERR_HEADERS_NOT_SUPPORTED: + $errorMsg = 'CORS requested header is not allowed'; + break; + case AnalysisResultInterface::TYPE_REQUEST_OUT_OF_CORS_SCOPE: + // do nothing + break; + case AnalysisResultInterface::TYPE_PRE_FLIGHT_REQUEST: + default: + // actual CORS request + $corsHeaders = $cors->getResponseHeaders(); + + // add CORS headers to Response $response + foreach ($corsHeaders as $name => $value) { + $response = $response->withHeader($name, $value); + } + } + + if (!empty($errorMsg)) { + $exception = new HttpBadRequestException($this->request, sprintf('%s.', $errorMsg)); + $exception->setTitle(\sprintf('%d %s', $exception->getCode(), $errorMsg)); + $exception->setDescription($exception->getMessage()); + $response = $this->errorMiddleware->handleException($this->request, $exception); + } + + if (ob_get_contents()) { + ob_clean(); + } + + parent::emit($response); + } +} diff --git a/samples/server/petstore/php-slim4/logs/.htaccess b/samples/server/petstore/php-slim4/logs/.htaccess new file mode 100644 index 000000000000..3a4288278871 --- /dev/null +++ b/samples/server/petstore/php-slim4/logs/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/samples/server/petstore/php-slim4/phpcs.xml.dist b/samples/server/petstore/php-slim4/phpcs.xml.dist index 69f4ddac71c3..f85b2de8402b 100644 --- a/samples/server/petstore/php-slim4/phpcs.xml.dist +++ b/samples/server/petstore/php-slim4/phpcs.xml.dist @@ -8,6 +8,9 @@ ./vendor + + ./logs + diff --git a/samples/server/petstore/php-slim4/public/.htaccess b/samples/server/petstore/php-slim4/public/.htaccess index 57c2185f0e4a..9769646408a9 100644 --- a/samples/server/petstore/php-slim4/public/.htaccess +++ b/samples/server/petstore/php-slim4/public/.htaccess @@ -1,10 +1,38 @@ +Options All -Indexes + + +order allow,deny +deny from all + + - SetEnv APP_ENV 'production' + SetEnv APP_ENV 'production' - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^ index.php [QSA,L] + RewriteEngine On + + # Redirect to HTTPS + # RewriteEngine On + # RewriteCond %{HTTPS} off + # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + + # Some hosts may require you to use the `RewriteBase` directive. + # Determine the RewriteBase automatically and set it as environment variable. + # If you are using Apache aliases to do mass virtual hosting or installed the + # project in a subdirectory, the base path will be prepended to allow proper + # resolution of the index.php file and to redirect to the correct URI. It will + # work in environments without path prefix as well, providing a safe, one-size + # fits all solution. But as you do not need it in this case, you can comment + # the following 2 lines to eliminate the overhead. + RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ + RewriteRule ^(.*) - [E=BASE:%1] + + # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the + # absolute physical path to the directory that contains this htaccess file. + # RewriteBase / + + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [QSA,L] \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/public/index.php b/samples/server/petstore/php-slim4/public/index.php index e336d00f81b5..795b85efa0f2 100644 --- a/samples/server/petstore/php-slim4/public/index.php +++ b/samples/server/petstore/php-slim4/public/index.php @@ -27,8 +27,10 @@ use OpenAPIServer\App\RegisterDependencies; use OpenAPIServer\App\RegisterRoutes; use OpenAPIServer\App\RegisterMiddlewares; +use OpenAPIServer\App\ResponseEmitter; +use Neomerx\Cors\Contracts\AnalyzerInterface; use Slim\Factory\ServerRequestCreatorFactory; -use Slim\ResponseEmitter; +use Slim\Middleware\ErrorMiddleware; // Instantiate PHP-DI ContainerBuilder $builder = new ContainerBuilder(); @@ -78,7 +80,15 @@ $serverRequestCreator = ServerRequestCreatorFactory::create(); $request = $serverRequestCreator->createServerRequestFromGlobals(); +// Get error middleware from container +// also anti-pattern, of course we know +$errorMiddleware = $container->get(ErrorMiddleware::class); + // Run App & Emit Response $response = $app->handle($request); -$responseEmitter = new ResponseEmitter(); +$responseEmitter = (new ResponseEmitter()) + ->setRequest($request) + ->setErrorMiddleware($errorMiddleware) + ->setAnalyzer($container->get(AnalyzerInterface::class)); + $responseEmitter->emit($response); diff --git a/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml b/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml index 9efa57da1466..22eca2e721b4 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml @@ -24,10 +24,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -35,7 +35,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -47,7 +47,7 @@ mime_0_2 = { package = "mime", version = "0.2.6", optional = true } multipart = { version = "0.16", default-features = false, optional = true } # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} mime_multipart = {version = "0.5", optional = true} hyper_0_10 = {package = "hyper", version = "0.10", default-features = false, optional=true} serde_ignored = {version = "0.1.1", optional = true} @@ -70,12 +70,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs index 9b38201f0cb0..892a189b8efc 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use multipart_v3::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -116,7 +113,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("multipart_related_request_post({:?}, {:?}, {:?}) - X-Span-ID: {:?}", required_binary_field, object_field, optional_binary_field, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn multipart_request_post( @@ -129,7 +126,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("multipart_request_post(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", string_field, binary_field, optional_string_field, object_field, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn multiple_identical_mime_types_post( @@ -140,7 +137,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("multiple_identical_mime_types_post({:?}, {:?}) - X-Span-ID: {:?}", binary1, binary2, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs index e72d476174f4..89f725444164 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs @@ -514,7 +514,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -667,7 +667,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -794,7 +794,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs index a9890bb121a2..3330f2236215 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs @@ -155,7 +155,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw(); + let result = body.into_raw(); match result.await { Ok(body) => { let mut unused_elements: Vec = vec![]; @@ -297,7 +297,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Form Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw(); + let result = body.into_raw(); match result.await { Ok(body) => { use std::io::Read; @@ -446,7 +446,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw(); + let result = body.into_raw(); match result.await { Ok(body) => { let mut unused_elements: Vec = vec![]; @@ -563,16 +563,16 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // MultipartRelatedRequestPost - POST /multipart_related_request - &hyper::Method::POST if path.matched(paths::ID_MULTIPART_RELATED_REQUEST) => Ok("MultipartRelatedRequestPost"), + &hyper::Method::POST if path.matched(paths::ID_MULTIPART_RELATED_REQUEST) => Some("MultipartRelatedRequestPost"), // MultipartRequestPost - POST /multipart_request - &hyper::Method::POST if path.matched(paths::ID_MULTIPART_REQUEST) => Ok("MultipartRequestPost"), + &hyper::Method::POST if path.matched(paths::ID_MULTIPART_REQUEST) => Some("MultipartRequestPost"), // MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types - &hyper::Method::POST if path.matched(paths::ID_MULTIPLE_IDENTICAL_MIME_TYPES) => Ok("MultipleIdenticalMimeTypesPost"), - _ => Err(()), + &hyper::Method::POST if path.matched(paths::ID_MULTIPLE_IDENTICAL_MIME_TYPES) => Some("MultipleIdenticalMimeTypesPost"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml b/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml index 589b163d0e3e..1790dc9d99db 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml @@ -18,10 +18,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -29,7 +29,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -39,7 +39,7 @@ serde_json = "1.0" # Crates included if required by the API definition # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} serde_ignored = {version = "0.1.1", optional = true} url = {version = "2.1", optional = true} @@ -60,12 +60,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs index ed88826c8999..bce4430a41cf 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use no_example_v3::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -112,7 +109,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op_get({:?}) - X-Span-ID: {:?}", inline_object, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/no-example-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/no-example-v3/src/client/mod.rs index c43b0ae8ad08..b6aa0d0c5f64 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/src/client/mod.rs @@ -445,7 +445,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs index 0610da8c15b1..3f48eab84c68 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs @@ -144,7 +144,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -223,12 +223,12 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // OpGet - GET /op - &hyper::Method::GET if path.matched(paths::ID_OP) => Ok("OpGet"), - _ => Err(()), + &hyper::Method::GET if path.matched(paths::ID_OP) => Some("OpGet"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml b/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml index 45c2007cd6f9..6a8b56d59c9d 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml @@ -20,10 +20,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -31,7 +31,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -45,7 +45,7 @@ serde-xml-rs = {git = "git://github.com/Metaswitch/serde-xml-rs.git" , branch = uuid = {version = "0.8", features = ["serde", "v4"]} # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} serde_ignored = {version = "0.1.1", optional = true} url = {version = "2.1", optional = true} @@ -66,12 +66,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs b/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs index 79ae454e021d..fab67f0476b1 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use openapi_v3::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -111,7 +108,7 @@ impl CallbackApi for Server where C: Has + Send + Sync { let context = context.clone(); info!("callback_callback_with_header_post({:?}) - X-Span-ID: {:?}", information, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn callback_callback_post( @@ -121,7 +118,7 @@ impl CallbackApi for Server where C: Has + Send + Sync { let context = context.clone(); info!("callback_callback_post() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs index 5baf30fe13b9..e2d19e2266c0 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use openapi_v3::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -137,7 +134,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("any_of_get({:?}) - X-Span-ID: {:?}", any_of, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn callback_with_header_post( @@ -147,7 +144,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("callback_with_header_post(\"{}\") - X-Span-ID: {:?}", url, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn complex_query_param_get( @@ -157,7 +154,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("complex_query_param_get({:?}) - X-Span-ID: {:?}", list_of_strings, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn enum_in_path_path_param_get( @@ -167,7 +164,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("enum_in_path_path_param_get({:?}) - X-Span-ID: {:?}", path_param, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn json_complex_query_param_get( @@ -177,7 +174,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("json_complex_query_param_get({:?}) - X-Span-ID: {:?}", list_of_strings, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn mandatory_request_header_get( @@ -187,7 +184,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("mandatory_request_header_get(\"{}\") - X-Span-ID: {:?}", x_header, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn merge_patch_json_get( @@ -196,7 +193,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("merge_patch_json_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Get some stuff. @@ -206,7 +203,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("multiget_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn multiple_auth_scheme_get( @@ -215,7 +212,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("multiple_auth_scheme_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn one_of_get( @@ -224,7 +221,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("one_of_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn override_server_get( @@ -233,7 +230,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("override_server_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Get some stuff with parameters. @@ -246,7 +243,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("paramget_get({:?}, {:?}, {:?}) - X-Span-ID: {:?}", uuid, some_object, some_list, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn readonly_auth_scheme_get( @@ -255,7 +252,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("readonly_auth_scheme_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn register_callback_post( @@ -265,7 +262,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("register_callback_post(\"{}\") - X-Span-ID: {:?}", url, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn required_octet_stream_put( @@ -275,7 +272,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("required_octet_stream_put({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn responses_with_headers_get( @@ -284,7 +281,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("responses_with_headers_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn rfc7807_get( @@ -293,7 +290,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("rfc7807_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn untyped_property_get( @@ -303,7 +300,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("untyped_property_get({:?}) - X-Span-ID: {:?}", object_untyped_props, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn uuid_get( @@ -312,7 +309,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("uuid_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn xml_extra_post( @@ -322,7 +319,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("xml_extra_post({:?}) - X-Span-ID: {:?}", duplicate_xml_object, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn xml_other_post( @@ -332,7 +329,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("xml_other_post({:?}) - X-Span-ID: {:?}", another_xml_object, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn xml_other_put( @@ -342,7 +339,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("xml_other_put({:?}) - X-Span-ID: {:?}", another_xml_array, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Post an array @@ -353,7 +350,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("xml_post({:?}) - X-Span-ID: {:?}", xml_array, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn xml_put( @@ -363,7 +360,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("xml_put({:?}) - X-Span-ID: {:?}", xml_object, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn create_repo( @@ -373,7 +370,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("create_repo({:?}) - X-Span-ID: {:?}", object_param, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn get_repo_info( @@ -383,7 +380,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("get_repo_info(\"{}\") - X-Span-ID: {:?}", repo_id, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs index e20da072d9d2..082ae5911b1c 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs @@ -266,14 +266,14 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // CallbackCallbackWithHeaderPost - POST /{$request.query.url}/callback-with-header - &hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK_WITH_HEADER) => Ok("CallbackCallbackWithHeaderPost"), + &hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK_WITH_HEADER) => Some("CallbackCallbackWithHeaderPost"), // CallbackCallbackPost - POST /{$request.query.url}/callback - &hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK) => Ok("CallbackCallbackPost"), - _ => Err(()), + &hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK) => Some("CallbackCallbackPost"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs index 396d05a98cb5..e4430088125e 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs @@ -458,11 +458,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(AnyOfGetResponse::Success (body) ) @@ -470,11 +472,13 @@ impl Api for Client where 201 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(AnyOfGetResponse::AlternateSuccess (body) ) @@ -482,11 +486,13 @@ impl Api for Client where 202 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::>(body)?; + let body = serde_json::from_str::>(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(AnyOfGetResponse::AnyOfSuccess (body) ) @@ -495,7 +501,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -567,7 +573,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -641,7 +647,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -712,7 +718,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -789,7 +795,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -870,7 +876,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -932,11 +938,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(MergePatchJsonGetResponse::Merge (body) ) @@ -945,7 +953,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1007,11 +1015,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(MultigetGetResponse::JSONRsp (body) ) @@ -1019,7 +1029,7 @@ impl Api for Client where 201 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -1034,7 +1044,7 @@ impl Api for Client where 202 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = swagger::ByteArray(body.to_vec()); Ok(MultigetGetResponse::OctetRsp @@ -1044,7 +1054,7 @@ impl Api for Client where 203 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -1056,11 +1066,13 @@ impl Api for Client where 204 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(MultigetGetResponse::DuplicateResponseLongText (body) ) @@ -1068,11 +1080,13 @@ impl Api for Client where 205 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(MultigetGetResponse::DuplicateResponseLongText_2 (body) ) @@ -1080,11 +1094,13 @@ impl Api for Client where 206 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(MultigetGetResponse::DuplicateResponseLongText_3 (body) ) @@ -1093,7 +1109,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1179,7 +1195,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1241,11 +1257,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::>>(body)?; + let body = serde_json::from_str::>>(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(OneOfGetResponse::Success (body) ) @@ -1254,7 +1272,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1323,7 +1341,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1400,11 +1418,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(ParamgetGetResponse::JSONRsp (body) ) @@ -1413,7 +1433,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1499,7 +1519,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1571,7 +1591,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1649,7 +1669,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1756,11 +1776,13 @@ impl Api for Client where let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(ResponsesWithHeadersGetResponse::Success { body: body, @@ -1814,7 +1836,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1876,11 +1898,13 @@ impl Api for Client where 204 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(Rfc7807GetResponse::OK (body) ) @@ -1888,11 +1912,13 @@ impl Api for Client where 404 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(Rfc7807GetResponse::NotFound (body) ) @@ -1900,7 +1926,7 @@ impl Api for Client where 406 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -1916,7 +1942,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1998,7 +2024,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2060,11 +2086,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(UuidGetResponse::DuplicateResponseLongText (body) ) @@ -2073,7 +2101,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2161,7 +2189,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2236,7 +2264,7 @@ impl Api for Client where 201 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2258,7 +2286,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2346,7 +2374,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2434,7 +2462,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2524,7 +2552,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2603,7 +2631,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2667,11 +2695,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(GetRepoInfoResponse::OK (body) ) @@ -2680,7 +2710,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/server/callbacks.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/server/callbacks.rs index fff50aecdfe6..8353cb185eb3 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/server/callbacks.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/server/callbacks.rs @@ -123,7 +123,7 @@ impl Client; +type HttpsConnector = hyper_tls::HttpsConnector; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] type HttpsConnector = hyper_openssl::HttpsConnector; @@ -300,7 +300,7 @@ impl CallbackApi for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -370,7 +370,7 @@ impl CallbackApi for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs index ec6863b8bd3d..813b8d962d02 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs @@ -1021,7 +1021,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let param_body: Option = if !body.is_empty() { @@ -1261,7 +1261,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1360,7 +1360,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1427,7 +1427,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1505,7 +1505,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1572,7 +1572,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1639,7 +1639,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1706,7 +1706,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1868,62 +1868,62 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // AnyOfGet - GET /any-of - &hyper::Method::GET if path.matched(paths::ID_ANY_OF) => Ok("AnyOfGet"), + &hyper::Method::GET if path.matched(paths::ID_ANY_OF) => Some("AnyOfGet"), // CallbackWithHeaderPost - POST /callback-with-header - &hyper::Method::POST if path.matched(paths::ID_CALLBACK_WITH_HEADER) => Ok("CallbackWithHeaderPost"), + &hyper::Method::POST if path.matched(paths::ID_CALLBACK_WITH_HEADER) => Some("CallbackWithHeaderPost"), // ComplexQueryParamGet - GET /complex-query-param - &hyper::Method::GET if path.matched(paths::ID_COMPLEX_QUERY_PARAM) => Ok("ComplexQueryParamGet"), + &hyper::Method::GET if path.matched(paths::ID_COMPLEX_QUERY_PARAM) => Some("ComplexQueryParamGet"), // EnumInPathPathParamGet - GET /enum_in_path/{path_param} - &hyper::Method::GET if path.matched(paths::ID_ENUM_IN_PATH_PATH_PARAM) => Ok("EnumInPathPathParamGet"), + &hyper::Method::GET if path.matched(paths::ID_ENUM_IN_PATH_PATH_PARAM) => Some("EnumInPathPathParamGet"), // JsonComplexQueryParamGet - GET /json-complex-query-param - &hyper::Method::GET if path.matched(paths::ID_JSON_COMPLEX_QUERY_PARAM) => Ok("JsonComplexQueryParamGet"), + &hyper::Method::GET if path.matched(paths::ID_JSON_COMPLEX_QUERY_PARAM) => Some("JsonComplexQueryParamGet"), // MandatoryRequestHeaderGet - GET /mandatory-request-header - &hyper::Method::GET if path.matched(paths::ID_MANDATORY_REQUEST_HEADER) => Ok("MandatoryRequestHeaderGet"), + &hyper::Method::GET if path.matched(paths::ID_MANDATORY_REQUEST_HEADER) => Some("MandatoryRequestHeaderGet"), // MergePatchJsonGet - GET /merge-patch-json - &hyper::Method::GET if path.matched(paths::ID_MERGE_PATCH_JSON) => Ok("MergePatchJsonGet"), + &hyper::Method::GET if path.matched(paths::ID_MERGE_PATCH_JSON) => Some("MergePatchJsonGet"), // MultigetGet - GET /multiget - &hyper::Method::GET if path.matched(paths::ID_MULTIGET) => Ok("MultigetGet"), + &hyper::Method::GET if path.matched(paths::ID_MULTIGET) => Some("MultigetGet"), // MultipleAuthSchemeGet - GET /multiple_auth_scheme - &hyper::Method::GET if path.matched(paths::ID_MULTIPLE_AUTH_SCHEME) => Ok("MultipleAuthSchemeGet"), + &hyper::Method::GET if path.matched(paths::ID_MULTIPLE_AUTH_SCHEME) => Some("MultipleAuthSchemeGet"), // OneOfGet - GET /one-of - &hyper::Method::GET if path.matched(paths::ID_ONE_OF) => Ok("OneOfGet"), + &hyper::Method::GET if path.matched(paths::ID_ONE_OF) => Some("OneOfGet"), // OverrideServerGet - GET /override-server - &hyper::Method::GET if path.matched(paths::ID_OVERRIDE_SERVER) => Ok("OverrideServerGet"), + &hyper::Method::GET if path.matched(paths::ID_OVERRIDE_SERVER) => Some("OverrideServerGet"), // ParamgetGet - GET /paramget - &hyper::Method::GET if path.matched(paths::ID_PARAMGET) => Ok("ParamgetGet"), + &hyper::Method::GET if path.matched(paths::ID_PARAMGET) => Some("ParamgetGet"), // ReadonlyAuthSchemeGet - GET /readonly_auth_scheme - &hyper::Method::GET if path.matched(paths::ID_READONLY_AUTH_SCHEME) => Ok("ReadonlyAuthSchemeGet"), + &hyper::Method::GET if path.matched(paths::ID_READONLY_AUTH_SCHEME) => Some("ReadonlyAuthSchemeGet"), // RegisterCallbackPost - POST /register-callback - &hyper::Method::POST if path.matched(paths::ID_REGISTER_CALLBACK) => Ok("RegisterCallbackPost"), + &hyper::Method::POST if path.matched(paths::ID_REGISTER_CALLBACK) => Some("RegisterCallbackPost"), // RequiredOctetStreamPut - PUT /required_octet_stream - &hyper::Method::PUT if path.matched(paths::ID_REQUIRED_OCTET_STREAM) => Ok("RequiredOctetStreamPut"), + &hyper::Method::PUT if path.matched(paths::ID_REQUIRED_OCTET_STREAM) => Some("RequiredOctetStreamPut"), // ResponsesWithHeadersGet - GET /responses_with_headers - &hyper::Method::GET if path.matched(paths::ID_RESPONSES_WITH_HEADERS) => Ok("ResponsesWithHeadersGet"), + &hyper::Method::GET if path.matched(paths::ID_RESPONSES_WITH_HEADERS) => Some("ResponsesWithHeadersGet"), // Rfc7807Get - GET /rfc7807 - &hyper::Method::GET if path.matched(paths::ID_RFC7807) => Ok("Rfc7807Get"), + &hyper::Method::GET if path.matched(paths::ID_RFC7807) => Some("Rfc7807Get"), // UntypedPropertyGet - GET /untyped_property - &hyper::Method::GET if path.matched(paths::ID_UNTYPED_PROPERTY) => Ok("UntypedPropertyGet"), + &hyper::Method::GET if path.matched(paths::ID_UNTYPED_PROPERTY) => Some("UntypedPropertyGet"), // UuidGet - GET /uuid - &hyper::Method::GET if path.matched(paths::ID_UUID) => Ok("UuidGet"), + &hyper::Method::GET if path.matched(paths::ID_UUID) => Some("UuidGet"), // XmlExtraPost - POST /xml_extra - &hyper::Method::POST if path.matched(paths::ID_XML_EXTRA) => Ok("XmlExtraPost"), + &hyper::Method::POST if path.matched(paths::ID_XML_EXTRA) => Some("XmlExtraPost"), // XmlOtherPost - POST /xml_other - &hyper::Method::POST if path.matched(paths::ID_XML_OTHER) => Ok("XmlOtherPost"), + &hyper::Method::POST if path.matched(paths::ID_XML_OTHER) => Some("XmlOtherPost"), // XmlOtherPut - PUT /xml_other - &hyper::Method::PUT if path.matched(paths::ID_XML_OTHER) => Ok("XmlOtherPut"), + &hyper::Method::PUT if path.matched(paths::ID_XML_OTHER) => Some("XmlOtherPut"), // XmlPost - POST /xml - &hyper::Method::POST if path.matched(paths::ID_XML) => Ok("XmlPost"), + &hyper::Method::POST if path.matched(paths::ID_XML) => Some("XmlPost"), // XmlPut - PUT /xml - &hyper::Method::PUT if path.matched(paths::ID_XML) => Ok("XmlPut"), + &hyper::Method::PUT if path.matched(paths::ID_XML) => Some("XmlPut"), // CreateRepo - POST /repos - &hyper::Method::POST if path.matched(paths::ID_REPOS) => Ok("CreateRepo"), + &hyper::Method::POST if path.matched(paths::ID_REPOS) => Some("CreateRepo"), // GetRepoInfo - GET /repos/{repoId} - &hyper::Method::GET if path.matched(paths::ID_REPOS_REPOID) => Ok("GetRepoInfo"), - _ => Err(()), + &hyper::Method::GET if path.matched(paths::ID_REPOS_REPOID) => Some("GetRepoInfo"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml b/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml index 5410fb3d3cf3..bcf692a43a44 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml @@ -18,10 +18,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -29,7 +29,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -39,7 +39,7 @@ serde_json = "1.0" # Crates included if required by the API definition # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} serde_ignored = {version = "0.1.1", optional = true} url = {version = "2.1", optional = true} @@ -60,12 +60,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs index f20cafbb55b0..ffd7d59c8042 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use ops_v3::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -147,7 +144,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op10_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op11_get( @@ -156,7 +153,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op11_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op12_get( @@ -165,7 +162,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op12_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op13_get( @@ -174,7 +171,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op13_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op14_get( @@ -183,7 +180,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op14_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op15_get( @@ -192,7 +189,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op15_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op16_get( @@ -201,7 +198,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op16_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op17_get( @@ -210,7 +207,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op17_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op18_get( @@ -219,7 +216,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op18_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op19_get( @@ -228,7 +225,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op19_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op1_get( @@ -237,7 +234,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op1_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op20_get( @@ -246,7 +243,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op20_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op21_get( @@ -255,7 +252,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op21_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op22_get( @@ -264,7 +261,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op22_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op23_get( @@ -273,7 +270,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op23_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op24_get( @@ -282,7 +279,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op24_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op25_get( @@ -291,7 +288,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op25_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op26_get( @@ -300,7 +297,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op26_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op27_get( @@ -309,7 +306,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op27_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op28_get( @@ -318,7 +315,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op28_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op29_get( @@ -327,7 +324,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op29_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op2_get( @@ -336,7 +333,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op2_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op30_get( @@ -345,7 +342,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op30_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op31_get( @@ -354,7 +351,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op31_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op32_get( @@ -363,7 +360,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op32_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op33_get( @@ -372,7 +369,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op33_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op34_get( @@ -381,7 +378,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op34_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op35_get( @@ -390,7 +387,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op35_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op36_get( @@ -399,7 +396,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op36_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op37_get( @@ -408,7 +405,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op37_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op3_get( @@ -417,7 +414,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op3_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op4_get( @@ -426,7 +423,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op4_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op5_get( @@ -435,7 +432,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op5_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op6_get( @@ -444,7 +441,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op6_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op7_get( @@ -453,7 +450,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op7_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op8_get( @@ -462,7 +459,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op8_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn op9_get( @@ -471,7 +468,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("op9_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs index 86c8aaa7a4a5..4d2375e6345f 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs @@ -469,7 +469,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -538,7 +538,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -607,7 +607,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -676,7 +676,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -745,7 +745,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -814,7 +814,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -883,7 +883,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -952,7 +952,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1021,7 +1021,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1090,7 +1090,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1159,7 +1159,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1228,7 +1228,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1297,7 +1297,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1366,7 +1366,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1435,7 +1435,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1504,7 +1504,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1573,7 +1573,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1642,7 +1642,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1711,7 +1711,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1780,7 +1780,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1849,7 +1849,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1918,7 +1918,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1987,7 +1987,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2056,7 +2056,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2125,7 +2125,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2194,7 +2194,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2263,7 +2263,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2332,7 +2332,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2401,7 +2401,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2470,7 +2470,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2539,7 +2539,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2608,7 +2608,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2677,7 +2677,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2746,7 +2746,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2815,7 +2815,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2884,7 +2884,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2953,7 +2953,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs index 12ea69e707f9..438fe894ae93 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs @@ -1367,84 +1367,84 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // Op10Get - GET /op10 - &hyper::Method::GET if path.matched(paths::ID_OP10) => Ok("Op10Get"), + &hyper::Method::GET if path.matched(paths::ID_OP10) => Some("Op10Get"), // Op11Get - GET /op11 - &hyper::Method::GET if path.matched(paths::ID_OP11) => Ok("Op11Get"), + &hyper::Method::GET if path.matched(paths::ID_OP11) => Some("Op11Get"), // Op12Get - GET /op12 - &hyper::Method::GET if path.matched(paths::ID_OP12) => Ok("Op12Get"), + &hyper::Method::GET if path.matched(paths::ID_OP12) => Some("Op12Get"), // Op13Get - GET /op13 - &hyper::Method::GET if path.matched(paths::ID_OP13) => Ok("Op13Get"), + &hyper::Method::GET if path.matched(paths::ID_OP13) => Some("Op13Get"), // Op14Get - GET /op14 - &hyper::Method::GET if path.matched(paths::ID_OP14) => Ok("Op14Get"), + &hyper::Method::GET if path.matched(paths::ID_OP14) => Some("Op14Get"), // Op15Get - GET /op15 - &hyper::Method::GET if path.matched(paths::ID_OP15) => Ok("Op15Get"), + &hyper::Method::GET if path.matched(paths::ID_OP15) => Some("Op15Get"), // Op16Get - GET /op16 - &hyper::Method::GET if path.matched(paths::ID_OP16) => Ok("Op16Get"), + &hyper::Method::GET if path.matched(paths::ID_OP16) => Some("Op16Get"), // Op17Get - GET /op17 - &hyper::Method::GET if path.matched(paths::ID_OP17) => Ok("Op17Get"), + &hyper::Method::GET if path.matched(paths::ID_OP17) => Some("Op17Get"), // Op18Get - GET /op18 - &hyper::Method::GET if path.matched(paths::ID_OP18) => Ok("Op18Get"), + &hyper::Method::GET if path.matched(paths::ID_OP18) => Some("Op18Get"), // Op19Get - GET /op19 - &hyper::Method::GET if path.matched(paths::ID_OP19) => Ok("Op19Get"), + &hyper::Method::GET if path.matched(paths::ID_OP19) => Some("Op19Get"), // Op1Get - GET /op1 - &hyper::Method::GET if path.matched(paths::ID_OP1) => Ok("Op1Get"), + &hyper::Method::GET if path.matched(paths::ID_OP1) => Some("Op1Get"), // Op20Get - GET /op20 - &hyper::Method::GET if path.matched(paths::ID_OP20) => Ok("Op20Get"), + &hyper::Method::GET if path.matched(paths::ID_OP20) => Some("Op20Get"), // Op21Get - GET /op21 - &hyper::Method::GET if path.matched(paths::ID_OP21) => Ok("Op21Get"), + &hyper::Method::GET if path.matched(paths::ID_OP21) => Some("Op21Get"), // Op22Get - GET /op22 - &hyper::Method::GET if path.matched(paths::ID_OP22) => Ok("Op22Get"), + &hyper::Method::GET if path.matched(paths::ID_OP22) => Some("Op22Get"), // Op23Get - GET /op23 - &hyper::Method::GET if path.matched(paths::ID_OP23) => Ok("Op23Get"), + &hyper::Method::GET if path.matched(paths::ID_OP23) => Some("Op23Get"), // Op24Get - GET /op24 - &hyper::Method::GET if path.matched(paths::ID_OP24) => Ok("Op24Get"), + &hyper::Method::GET if path.matched(paths::ID_OP24) => Some("Op24Get"), // Op25Get - GET /op25 - &hyper::Method::GET if path.matched(paths::ID_OP25) => Ok("Op25Get"), + &hyper::Method::GET if path.matched(paths::ID_OP25) => Some("Op25Get"), // Op26Get - GET /op26 - &hyper::Method::GET if path.matched(paths::ID_OP26) => Ok("Op26Get"), + &hyper::Method::GET if path.matched(paths::ID_OP26) => Some("Op26Get"), // Op27Get - GET /op27 - &hyper::Method::GET if path.matched(paths::ID_OP27) => Ok("Op27Get"), + &hyper::Method::GET if path.matched(paths::ID_OP27) => Some("Op27Get"), // Op28Get - GET /op28 - &hyper::Method::GET if path.matched(paths::ID_OP28) => Ok("Op28Get"), + &hyper::Method::GET if path.matched(paths::ID_OP28) => Some("Op28Get"), // Op29Get - GET /op29 - &hyper::Method::GET if path.matched(paths::ID_OP29) => Ok("Op29Get"), + &hyper::Method::GET if path.matched(paths::ID_OP29) => Some("Op29Get"), // Op2Get - GET /op2 - &hyper::Method::GET if path.matched(paths::ID_OP2) => Ok("Op2Get"), + &hyper::Method::GET if path.matched(paths::ID_OP2) => Some("Op2Get"), // Op30Get - GET /op30 - &hyper::Method::GET if path.matched(paths::ID_OP30) => Ok("Op30Get"), + &hyper::Method::GET if path.matched(paths::ID_OP30) => Some("Op30Get"), // Op31Get - GET /op31 - &hyper::Method::GET if path.matched(paths::ID_OP31) => Ok("Op31Get"), + &hyper::Method::GET if path.matched(paths::ID_OP31) => Some("Op31Get"), // Op32Get - GET /op32 - &hyper::Method::GET if path.matched(paths::ID_OP32) => Ok("Op32Get"), + &hyper::Method::GET if path.matched(paths::ID_OP32) => Some("Op32Get"), // Op33Get - GET /op33 - &hyper::Method::GET if path.matched(paths::ID_OP33) => Ok("Op33Get"), + &hyper::Method::GET if path.matched(paths::ID_OP33) => Some("Op33Get"), // Op34Get - GET /op34 - &hyper::Method::GET if path.matched(paths::ID_OP34) => Ok("Op34Get"), + &hyper::Method::GET if path.matched(paths::ID_OP34) => Some("Op34Get"), // Op35Get - GET /op35 - &hyper::Method::GET if path.matched(paths::ID_OP35) => Ok("Op35Get"), + &hyper::Method::GET if path.matched(paths::ID_OP35) => Some("Op35Get"), // Op36Get - GET /op36 - &hyper::Method::GET if path.matched(paths::ID_OP36) => Ok("Op36Get"), + &hyper::Method::GET if path.matched(paths::ID_OP36) => Some("Op36Get"), // Op37Get - GET /op37 - &hyper::Method::GET if path.matched(paths::ID_OP37) => Ok("Op37Get"), + &hyper::Method::GET if path.matched(paths::ID_OP37) => Some("Op37Get"), // Op3Get - GET /op3 - &hyper::Method::GET if path.matched(paths::ID_OP3) => Ok("Op3Get"), + &hyper::Method::GET if path.matched(paths::ID_OP3) => Some("Op3Get"), // Op4Get - GET /op4 - &hyper::Method::GET if path.matched(paths::ID_OP4) => Ok("Op4Get"), + &hyper::Method::GET if path.matched(paths::ID_OP4) => Some("Op4Get"), // Op5Get - GET /op5 - &hyper::Method::GET if path.matched(paths::ID_OP5) => Ok("Op5Get"), + &hyper::Method::GET if path.matched(paths::ID_OP5) => Some("Op5Get"), // Op6Get - GET /op6 - &hyper::Method::GET if path.matched(paths::ID_OP6) => Ok("Op6Get"), + &hyper::Method::GET if path.matched(paths::ID_OP6) => Some("Op6Get"), // Op7Get - GET /op7 - &hyper::Method::GET if path.matched(paths::ID_OP7) => Ok("Op7Get"), + &hyper::Method::GET if path.matched(paths::ID_OP7) => Some("Op7Get"), // Op8Get - GET /op8 - &hyper::Method::GET if path.matched(paths::ID_OP8) => Ok("Op8Get"), + &hyper::Method::GET if path.matched(paths::ID_OP8) => Some("Op8Get"), // Op9Get - GET /op9 - &hyper::Method::GET if path.matched(paths::ID_OP9) => Ok("Op9Get"), - _ => Err(()), + &hyper::Method::GET if path.matched(paths::ID_OP9) => Some("Op9Get"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml index 9c9a34f1aa40..db285f1e634a 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml @@ -24,10 +24,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -35,7 +35,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -51,7 +51,7 @@ multipart = { version = "0.16", default-features = false, optional = true } uuid = {version = "0.8", features = ["serde", "v4"]} # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} serde_ignored = {version = "0.1.1", optional = true} url = {version = "2.1", optional = true} @@ -73,12 +73,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs index 203946480e44..e86eaae25fb5 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use petstore_with_fake_endpoints_models_for_testing::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -147,7 +144,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_special_tags({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn call123example( @@ -156,7 +153,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("call123example() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn fake_outer_boolean_serialize( @@ -166,7 +163,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("fake_outer_boolean_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn fake_outer_composite_serialize( @@ -176,7 +173,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("fake_outer_composite_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn fake_outer_number_serialize( @@ -186,7 +183,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("fake_outer_number_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn fake_outer_string_serialize( @@ -196,7 +193,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("fake_outer_string_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn fake_response_with_numerical_description( @@ -205,7 +202,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("fake_response_with_numerical_description() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn hyphen_param( @@ -215,7 +212,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("hyphen_param(\"{}\") - X-Span-ID: {:?}", hyphen_param, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn test_body_with_query_params( @@ -226,7 +223,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_body_with_query_params(\"{}\", {:?}) - X-Span-ID: {:?}", query, body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// To test \"client\" model @@ -237,7 +234,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_client_model({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -261,7 +258,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_endpoint_parameters({}, {}, \"{}\", {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, date, date_time, password, callback, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// To test enum parameters @@ -278,7 +275,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_enum_parameters({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", enum_header_string_array, enum_header_string, enum_query_string_array, enum_query_string, enum_query_integer, enum_query_double, enum_form_string, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// test inline additionalProperties @@ -289,7 +286,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_inline_additional_properties({:?}) - X-Span-ID: {:?}", param, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// test json serialization of form data @@ -301,7 +298,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_json_form_data(\"{}\", \"{}\") - X-Span-ID: {:?}", param, param2, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// To test class name in snake case @@ -312,7 +309,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("test_classname({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Add a new pet to the store @@ -323,7 +320,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("add_pet({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Deletes a pet @@ -335,7 +332,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("delete_pet({}, {:?}) - X-Span-ID: {:?}", pet_id, api_key, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Finds Pets by status @@ -346,7 +343,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("find_pets_by_status({:?}) - X-Span-ID: {:?}", status, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Finds Pets by tags @@ -357,7 +354,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("find_pets_by_tags({:?}) - X-Span-ID: {:?}", tags, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Find pet by ID @@ -368,7 +365,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("get_pet_by_id({}) - X-Span-ID: {:?}", pet_id, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Update an existing pet @@ -379,7 +376,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("update_pet({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Updates a pet in the store with form data @@ -392,7 +389,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("update_pet_with_form({}, {:?}, {:?}) - X-Span-ID: {:?}", pet_id, name, status, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// uploads an image @@ -405,7 +402,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("upload_file({}, {:?}, {:?}) - X-Span-ID: {:?}", pet_id, additional_metadata, file, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Delete purchase order by ID @@ -416,7 +413,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("delete_order(\"{}\") - X-Span-ID: {:?}", order_id, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Returns pet inventories by status @@ -426,7 +423,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("get_inventory() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Find purchase order by ID @@ -437,7 +434,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("get_order_by_id({}) - X-Span-ID: {:?}", order_id, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Place an order for a pet @@ -448,7 +445,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("place_order({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Create user @@ -459,7 +456,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("create_user({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Creates list of users with given input array @@ -470,7 +467,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("create_users_with_array_input({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Creates list of users with given input array @@ -481,7 +478,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("create_users_with_list_input({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Delete user @@ -492,7 +489,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("delete_user(\"{}\") - X-Span-ID: {:?}", username, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Get user by user name @@ -503,7 +500,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("get_user_by_name(\"{}\") - X-Span-ID: {:?}", username, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Logs user into the system @@ -515,7 +512,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("login_user(\"{}\", \"{}\") - X-Span-ID: {:?}", username, password, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Logs out current logged in user session @@ -525,7 +522,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("logout_user() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Updated user @@ -537,7 +534,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("update_user(\"{}\", {:?}) - X-Span-ID: {:?}", username, body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs index cdb16442bc40..9fc14cf319e5 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs @@ -475,11 +475,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(TestSpecialTagsResponse::SuccessfulOperation (body) ) @@ -488,7 +490,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -557,7 +559,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -632,11 +634,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(FakeOuterBooleanSerializeResponse::OutputBoolean (body) ) @@ -645,7 +649,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -720,11 +724,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(FakeOuterCompositeSerializeResponse::OutputComposite (body) ) @@ -733,7 +739,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -808,11 +814,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(FakeOuterNumberSerializeResponse::OutputNumber (body) ) @@ -821,7 +829,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -896,11 +904,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(FakeOuterStringSerializeResponse::OutputString (body) ) @@ -909,7 +919,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -978,7 +988,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1049,7 +1059,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1130,7 +1140,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1201,11 +1211,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(TestClientModelResponse::SuccessfulOperation (body) ) @@ -1214,7 +1226,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1344,7 +1356,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1484,7 +1496,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1562,7 +1574,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1645,7 +1657,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1731,11 +1743,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(TestClassnameResponse::SuccessfulOperation (body) ) @@ -1744,7 +1758,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1840,7 +1854,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1945,7 +1959,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2027,7 +2041,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2049,7 +2063,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2131,7 +2145,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2153,7 +2167,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2224,7 +2238,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2252,7 +2266,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2359,7 +2373,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2461,7 +2475,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2599,11 +2613,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(UploadFileResponse::SuccessfulOperation (body) ) @@ -2612,7 +2628,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2689,7 +2705,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2758,11 +2774,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::>(body)?; + let body = serde_json::from_str::>(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(GetInventoryResponse::SuccessfulOperation (body) ) @@ -2771,7 +2789,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2835,7 +2853,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2863,7 +2881,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -2936,7 +2954,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2958,7 +2976,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3037,7 +3055,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3115,7 +3133,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3193,7 +3211,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3270,7 +3288,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3334,7 +3352,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -3362,7 +3380,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3460,7 +3478,7 @@ impl Api for Client where let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -3486,7 +3504,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3555,7 +3573,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -3643,7 +3661,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs index 9803b110d861..20736c124020 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs @@ -257,7 +257,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -366,7 +366,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -436,7 +436,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -506,7 +506,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -576,7 +576,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -755,7 +755,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -829,7 +829,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1125,7 +1125,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1243,7 +1243,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1353,7 +1353,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -1792,7 +1792,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -2023,7 +2023,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Form Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw(); + let result = body.into_raw(); match result.await { Ok(body) => { use std::io::Read; @@ -2307,7 +2307,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -2391,7 +2391,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -2464,7 +2464,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -2537,7 +2537,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -2916,7 +2916,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -3026,80 +3026,80 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // TestSpecialTags - PATCH /another-fake/dummy - &hyper::Method::PATCH if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => Ok("TestSpecialTags"), + &hyper::Method::PATCH if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => Some("TestSpecialTags"), // Call123example - GET /fake/operation-with-numeric-id - &hyper::Method::GET if path.matched(paths::ID_FAKE_OPERATION_WITH_NUMERIC_ID) => Ok("Call123example"), + &hyper::Method::GET if path.matched(paths::ID_FAKE_OPERATION_WITH_NUMERIC_ID) => Some("Call123example"), // FakeOuterBooleanSerialize - POST /fake/outer/boolean - &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_BOOLEAN) => Ok("FakeOuterBooleanSerialize"), + &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_BOOLEAN) => Some("FakeOuterBooleanSerialize"), // FakeOuterCompositeSerialize - POST /fake/outer/composite - &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_COMPOSITE) => Ok("FakeOuterCompositeSerialize"), + &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_COMPOSITE) => Some("FakeOuterCompositeSerialize"), // FakeOuterNumberSerialize - POST /fake/outer/number - &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_NUMBER) => Ok("FakeOuterNumberSerialize"), + &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_NUMBER) => Some("FakeOuterNumberSerialize"), // FakeOuterStringSerialize - POST /fake/outer/string - &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_STRING) => Ok("FakeOuterStringSerialize"), + &hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_STRING) => Some("FakeOuterStringSerialize"), // FakeResponseWithNumericalDescription - GET /fake/response-with-numerical-description - &hyper::Method::GET if path.matched(paths::ID_FAKE_RESPONSE_WITH_NUMERICAL_DESCRIPTION) => Ok("FakeResponseWithNumericalDescription"), + &hyper::Method::GET if path.matched(paths::ID_FAKE_RESPONSE_WITH_NUMERICAL_DESCRIPTION) => Some("FakeResponseWithNumericalDescription"), // HyphenParam - GET /fake/hyphenParam/{hyphen-param} - &hyper::Method::GET if path.matched(paths::ID_FAKE_HYPHENPARAM_HYPHEN_PARAM) => Ok("HyphenParam"), + &hyper::Method::GET if path.matched(paths::ID_FAKE_HYPHENPARAM_HYPHEN_PARAM) => Some("HyphenParam"), // TestBodyWithQueryParams - PUT /fake/body-with-query-params - &hyper::Method::PUT if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => Ok("TestBodyWithQueryParams"), + &hyper::Method::PUT if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => Some("TestBodyWithQueryParams"), // TestClientModel - PATCH /fake - &hyper::Method::PATCH if path.matched(paths::ID_FAKE) => Ok("TestClientModel"), + &hyper::Method::PATCH if path.matched(paths::ID_FAKE) => Some("TestClientModel"), // TestEndpointParameters - POST /fake - &hyper::Method::POST if path.matched(paths::ID_FAKE) => Ok("TestEndpointParameters"), + &hyper::Method::POST if path.matched(paths::ID_FAKE) => Some("TestEndpointParameters"), // TestEnumParameters - GET /fake - &hyper::Method::GET if path.matched(paths::ID_FAKE) => Ok("TestEnumParameters"), + &hyper::Method::GET if path.matched(paths::ID_FAKE) => Some("TestEnumParameters"), // TestInlineAdditionalProperties - POST /fake/inline-additionalProperties - &hyper::Method::POST if path.matched(paths::ID_FAKE_INLINE_ADDITIONALPROPERTIES) => Ok("TestInlineAdditionalProperties"), + &hyper::Method::POST if path.matched(paths::ID_FAKE_INLINE_ADDITIONALPROPERTIES) => Some("TestInlineAdditionalProperties"), // TestJsonFormData - GET /fake/jsonFormData - &hyper::Method::GET if path.matched(paths::ID_FAKE_JSONFORMDATA) => Ok("TestJsonFormData"), + &hyper::Method::GET if path.matched(paths::ID_FAKE_JSONFORMDATA) => Some("TestJsonFormData"), // TestClassname - PATCH /fake_classname_test - &hyper::Method::PATCH if path.matched(paths::ID_FAKE_CLASSNAME_TEST) => Ok("TestClassname"), + &hyper::Method::PATCH if path.matched(paths::ID_FAKE_CLASSNAME_TEST) => Some("TestClassname"), // AddPet - POST /pet - &hyper::Method::POST if path.matched(paths::ID_PET) => Ok("AddPet"), + &hyper::Method::POST if path.matched(paths::ID_PET) => Some("AddPet"), // DeletePet - DELETE /pet/{petId} - &hyper::Method::DELETE if path.matched(paths::ID_PET_PETID) => Ok("DeletePet"), + &hyper::Method::DELETE if path.matched(paths::ID_PET_PETID) => Some("DeletePet"), // FindPetsByStatus - GET /pet/findByStatus - &hyper::Method::GET if path.matched(paths::ID_PET_FINDBYSTATUS) => Ok("FindPetsByStatus"), + &hyper::Method::GET if path.matched(paths::ID_PET_FINDBYSTATUS) => Some("FindPetsByStatus"), // FindPetsByTags - GET /pet/findByTags - &hyper::Method::GET if path.matched(paths::ID_PET_FINDBYTAGS) => Ok("FindPetsByTags"), + &hyper::Method::GET if path.matched(paths::ID_PET_FINDBYTAGS) => Some("FindPetsByTags"), // GetPetById - GET /pet/{petId} - &hyper::Method::GET if path.matched(paths::ID_PET_PETID) => Ok("GetPetById"), + &hyper::Method::GET if path.matched(paths::ID_PET_PETID) => Some("GetPetById"), // UpdatePet - PUT /pet - &hyper::Method::PUT if path.matched(paths::ID_PET) => Ok("UpdatePet"), + &hyper::Method::PUT if path.matched(paths::ID_PET) => Some("UpdatePet"), // UpdatePetWithForm - POST /pet/{petId} - &hyper::Method::POST if path.matched(paths::ID_PET_PETID) => Ok("UpdatePetWithForm"), + &hyper::Method::POST if path.matched(paths::ID_PET_PETID) => Some("UpdatePetWithForm"), // UploadFile - POST /pet/{petId}/uploadImage - &hyper::Method::POST if path.matched(paths::ID_PET_PETID_UPLOADIMAGE) => Ok("UploadFile"), + &hyper::Method::POST if path.matched(paths::ID_PET_PETID_UPLOADIMAGE) => Some("UploadFile"), // DeleteOrder - DELETE /store/order/{order_id} - &hyper::Method::DELETE if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => Ok("DeleteOrder"), + &hyper::Method::DELETE if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => Some("DeleteOrder"), // GetInventory - GET /store/inventory - &hyper::Method::GET if path.matched(paths::ID_STORE_INVENTORY) => Ok("GetInventory"), + &hyper::Method::GET if path.matched(paths::ID_STORE_INVENTORY) => Some("GetInventory"), // GetOrderById - GET /store/order/{order_id} - &hyper::Method::GET if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => Ok("GetOrderById"), + &hyper::Method::GET if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => Some("GetOrderById"), // PlaceOrder - POST /store/order - &hyper::Method::POST if path.matched(paths::ID_STORE_ORDER) => Ok("PlaceOrder"), + &hyper::Method::POST if path.matched(paths::ID_STORE_ORDER) => Some("PlaceOrder"), // CreateUser - POST /user - &hyper::Method::POST if path.matched(paths::ID_USER) => Ok("CreateUser"), + &hyper::Method::POST if path.matched(paths::ID_USER) => Some("CreateUser"), // CreateUsersWithArrayInput - POST /user/createWithArray - &hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHARRAY) => Ok("CreateUsersWithArrayInput"), + &hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHARRAY) => Some("CreateUsersWithArrayInput"), // CreateUsersWithListInput - POST /user/createWithList - &hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHLIST) => Ok("CreateUsersWithListInput"), + &hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHLIST) => Some("CreateUsersWithListInput"), // DeleteUser - DELETE /user/{username} - &hyper::Method::DELETE if path.matched(paths::ID_USER_USERNAME) => Ok("DeleteUser"), + &hyper::Method::DELETE if path.matched(paths::ID_USER_USERNAME) => Some("DeleteUser"), // GetUserByName - GET /user/{username} - &hyper::Method::GET if path.matched(paths::ID_USER_USERNAME) => Ok("GetUserByName"), + &hyper::Method::GET if path.matched(paths::ID_USER_USERNAME) => Some("GetUserByName"), // LoginUser - GET /user/login - &hyper::Method::GET if path.matched(paths::ID_USER_LOGIN) => Ok("LoginUser"), + &hyper::Method::GET if path.matched(paths::ID_USER_LOGIN) => Some("LoginUser"), // LogoutUser - GET /user/logout - &hyper::Method::GET if path.matched(paths::ID_USER_LOGOUT) => Ok("LogoutUser"), + &hyper::Method::GET if path.matched(paths::ID_USER_LOGOUT) => Some("LogoutUser"), // UpdateUser - PUT /user/{username} - &hyper::Method::PUT if path.matched(paths::ID_USER_USERNAME) => Ok("UpdateUser"), - _ => Err(()), + &hyper::Method::PUT if path.matched(paths::ID_USER_USERNAME) => Some("UpdateUser"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml b/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml index f01bd6665325..afddad336f4c 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml @@ -18,10 +18,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -29,7 +29,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -39,7 +39,7 @@ serde_json = "1.0" # Crates included if required by the API definition # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} serde_ignored = {version = "0.1.1", optional = true} url = {version = "2.1", optional = true} @@ -60,12 +60,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs b/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs index 194e848d662b..19af14b7782a 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use ping_bearer_auth::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -111,7 +108,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("ping_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/client/mod.rs b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/client/mod.rs index e97a83595c87..e9927156e559 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/client/mod.rs @@ -450,7 +450,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs index 700d88538bb1..c62110ced8f8 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs @@ -189,12 +189,12 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // PingGet - GET /ping - &hyper::Method::GET if path.matched(paths::ID_PING) => Ok("PingGet"), - _ => Err(()), + &hyper::Method::GET if path.matched(paths::ID_PING) => Some("PingGet"), + _ => None, } } } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml index 929cb2bf04b0..6e49c55ccf3d 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml +++ b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml @@ -18,10 +18,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- [target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } +hyper-tls = { version = "0.5", optional = true } [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } +hyper-openssl = { version = "0.9", optional = true } openssl = {version = "0.10", optional = true } [dependencies] @@ -29,7 +29,7 @@ openssl = {version = "0.10", optional = true } async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" -swagger = "5.0.2" +swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } log = "0.4.0" mime = "0.3" @@ -39,7 +39,7 @@ serde_json = "1.0" # Crates included if required by the API definition # Common between server and client features -hyper = {version = "0.13", optional = true} +hyper = {version = "0.14", features = ["full"], optional = true} serde_ignored = {version = "0.1.1", optional = true} url = {version = "2.1", optional = true} @@ -60,12 +60,11 @@ frunk-enum-core = { version = "0.2.0", optional = true } [dev-dependencies] clap = "2.25" env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +tokio = { version = "1.14", features = ["full"] } native-tls = "0.2" -tokio-tls = "0.3" [target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" +tokio-openssl = "0.6" openssl = "0.10" [[example]] diff --git a/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs b/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs index 99dd9f40f053..5fcce139cb77 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs @@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; use hyper::server::conn::Http; use hyper::service::Service; use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; use std::future::Future; use std::marker::PhantomData; use std::net::SocketAddr; @@ -20,7 +18,7 @@ use swagger::EmptyContext; use tokio::net::TcpListener; #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use rust_server_test::models; @@ -54,26 +52,25 @@ pub async fn create(addr: &str, https: bool) { ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set certificate chain"); ssl.check_private_key().expect("Failed to check private key"); - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); + let tls_acceptor = ssl.build(); + let tcp_listener = TcpListener::bind(&addr).await.unwrap(); - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { + loop { + if let Ok((tcp, _)) = tcp_listener.accept().await { + let ssl = Ssl::new(tls_acceptor.context()).unwrap(); let addr = tcp.peer_addr().expect("Unable to get remote address"); let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - + let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?; let service = service.await.map_err(|_| ())?; - Http::new().serve_connection(tls, service).await.map_err(|_| ()) + Http::new() + .serve_connection(tls, service) + .await + .map_err(|_| ()) }); } - - incoming = rest; } } } else { @@ -119,7 +116,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("all_of_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// A dummy endpoint to make the spec valid. @@ -129,7 +126,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("dummy_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn dummy_put( @@ -139,7 +136,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("dummy_put({:?}) - X-Span-ID: {:?}", nested_response, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Get a file @@ -149,7 +146,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("file_response_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn get_structured_yaml( @@ -158,7 +155,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("get_structured_yaml() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Test HTML handling @@ -169,7 +166,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("html_post(\"{}\") - X-Span-ID: {:?}", body, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } async fn post_yaml( @@ -179,7 +176,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("post_yaml(\"{}\") - X-Span-ID: {:?}", value, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Get an arbitrary JSON blob. @@ -189,7 +186,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("raw_json_get() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } /// Send an arbitrary JSON blob @@ -200,7 +197,7 @@ impl Api for Server where C: Has + Send + Sync { let context = context.clone(); info!("solo_object_post({:?}) - X-Span-ID: {:?}", value, context.get().0.clone()); - Err("Generic failure".into()) + Err(ApiError("Generic failure".into())) } } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs index bbae182ce25a..3cb82b64ab11 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs @@ -434,11 +434,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(AllOfGetResponse::OK (body) ) @@ -447,7 +449,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -516,7 +518,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -594,7 +596,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -656,11 +658,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(FileResponseGetResponse::Success (body) ) @@ -669,7 +673,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -731,7 +735,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -744,7 +748,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -815,7 +819,7 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -828,7 +832,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -906,7 +910,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -968,11 +972,13 @@ impl Api for Client where 200 => { let body = response.into_body(); let body = body - .to_raw() + .into_raw() .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; let body = str::from_utf8(&body) .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; + let body = serde_json::from_str::(body).map_err(|e| { + ApiError(format!("Response body did not match the schema: {}", e)) + })?; Ok(RawJsonGetResponse::Success (body) ) @@ -981,7 +987,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, @@ -1061,7 +1067,7 @@ impl Api for Client where let headers = response.headers().clone(); let body = response.into_body() .take(100) - .to_raw().await; + .into_raw().await; Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", code, headers, diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs index 7f9e845c9a35..6fbb80b39637 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs @@ -231,7 +231,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -376,7 +376,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let param_body: Option = if !body.is_empty() { @@ -444,7 +444,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let param_value: Option = if !body.is_empty() { @@ -541,7 +541,7 @@ impl hyper::service::Service<(Request, C)> for Service where // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. - let result = body.to_raw().await; + let result = body.into_raw().await; match result { Ok(body) => { let mut unused_elements = Vec::new(); @@ -627,28 +627,28 @@ impl hyper::service::Service<(Request, C)> for Service where /// Request parser for `Api`. pub struct ApiRequestParser; impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + fn parse_operation_id(request: &Request) -> Option<&'static str> { let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); match request.method() { // AllOfGet - GET /allOf - &hyper::Method::GET if path.matched(paths::ID_ALLOF) => Ok("AllOfGet"), + &hyper::Method::GET if path.matched(paths::ID_ALLOF) => Some("AllOfGet"), // DummyGet - GET /dummy - &hyper::Method::GET if path.matched(paths::ID_DUMMY) => Ok("DummyGet"), + &hyper::Method::GET if path.matched(paths::ID_DUMMY) => Some("DummyGet"), // DummyPut - PUT /dummy - &hyper::Method::PUT if path.matched(paths::ID_DUMMY) => Ok("DummyPut"), + &hyper::Method::PUT if path.matched(paths::ID_DUMMY) => Some("DummyPut"), // FileResponseGet - GET /file_response - &hyper::Method::GET if path.matched(paths::ID_FILE_RESPONSE) => Ok("FileResponseGet"), + &hyper::Method::GET if path.matched(paths::ID_FILE_RESPONSE) => Some("FileResponseGet"), // GetStructuredYaml - GET /get-structured-yaml - &hyper::Method::GET if path.matched(paths::ID_GET_STRUCTURED_YAML) => Ok("GetStructuredYaml"), + &hyper::Method::GET if path.matched(paths::ID_GET_STRUCTURED_YAML) => Some("GetStructuredYaml"), // HtmlPost - POST /html - &hyper::Method::POST if path.matched(paths::ID_HTML) => Ok("HtmlPost"), + &hyper::Method::POST if path.matched(paths::ID_HTML) => Some("HtmlPost"), // PostYaml - POST /post-yaml - &hyper::Method::POST if path.matched(paths::ID_POST_YAML) => Ok("PostYaml"), + &hyper::Method::POST if path.matched(paths::ID_POST_YAML) => Some("PostYaml"), // RawJsonGet - GET /raw_json - &hyper::Method::GET if path.matched(paths::ID_RAW_JSON) => Ok("RawJsonGet"), + &hyper::Method::GET if path.matched(paths::ID_RAW_JSON) => Some("RawJsonGet"), // SoloObjectPost - POST /solo-object - &hyper::Method::POST if path.matched(paths::ID_SOLO_OBJECT) => Ok("SoloObjectPost"), - _ => Err(()), + &hyper::Method::POST if path.matched(paths::ID_SOLO_OBJECT) => Some("SoloObjectPost"), + _ => None, } } } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml index 05f2488b9e9e..2959346ed4e5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index e0dbe8fd72d9..0f6080c1521e 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "pet", description = "the pet API") +@Tag(name = "pet", description = "Everything about your Pets") public interface PetApi { /** diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 0ff28ee8d7e2..a89df05d0869 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "store", description = "the store API") +@Tag(name = "store", description = "Access to Petstore orders") public interface StoreApi { /** diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index 84983c404187..8b54bd724b6d 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -33,7 +33,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "user", description = "the user API") +@Tag(name = "user", description = "Operations about user") public interface UserApi { /** diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 88ea058c0c51..0d95d7f91b29 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 0d4d67f1a9e9..0a45cd0d195e 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 219d797ee642..c53b449a5070 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b2245551ad3e..ae060d44dc4d 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index ea102c40ed2e..87a903f3e7f2 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7a3a5d839f8a..873d1c9c229e 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 22e47f1bc1cb..97827d22d963 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 91f47a9e83ee..53967d619036 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java index ef0fc61b5b6a..8b3225fee193 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java @@ -2,10 +2,14 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ad560c9d8344..4fc6a6447db5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4409856d5a37..da4dc071cfdf 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java index fd25397b6b67..03052a955e3b 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java index 275a075f527d..7208cedbd0b5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java index 843e46a1f6cd..96ddb1f49cd8 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java index 80d6c5b28514..e7f3b66e4814 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java index 0b3c8b8759b2..0e7e1b097362 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java @@ -2,9 +2,13 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java index 88bc8c3d6492..bc83998fc4d5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java index 66dd429525dd..586658c922c5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java index 13a83893e619..d3d25d6df8cd 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java index 9fbd7e3b4338..7ed5fbaae188 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java index 36f36600dafa..155bff326518 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java index 1a4f50f5bcd4..fbcd7127e41b 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java index c3e82d4c0282..3c18fc1189fe 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java index fb2ee5373fbf..dc15f99afe84 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java index a2ee29fbfd69..d9a8ab4aa1f2 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @Schema(name = "File", description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77868e774104..5794883ff564 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java index 05abfd1c26ef..c4bacc257a36 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 768e7277a703..d817048f2a75 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java index 2da2a81ac823..6942169188d2 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9681c13f29d4..bd1c5716f064 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java index 95f81f418d28..80ff3f1fc638 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @Schema(name = "200_response", description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java index 474ed54662f7..ed829bcb62cd 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java index 7615d501057e..56e79c554452 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java index eef02c8ade31..d95ce3f15491 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @Schema(name = "Return", description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java index 2876e64e9917..32cec75d981d 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @Schema(name = "Name", description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java index 05c9f0a77856..14fb6641f919 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java index 90b0d2957184..9b54a719dbae 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java index 14ff8ff8a9f4..461f98baa866 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java index 51d583a02e55..c137885adb7f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1d95448aeefe..39862919e7c7 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java index 1eac86e9ebca..fb431f59071a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java index 6b24df204718..75f3df1d0e17 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java index 66695c3e8478..4d939d69a1e7 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java index fdc9a0960759..c9b40aac5fa1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java index 9aae48b0ceb2..9df36d407748 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java index b886d9d3f61e..3b3593e71797 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/spring-boot-nullable-set/pom.xml b/samples/server/petstore/spring-boot-nullable-set/pom.xml index 896c15f5167f..e38cc50fe204 100644 --- a/samples/server/petstore/spring-boot-nullable-set/pom.xml +++ b/samples/server/petstore/spring-boot-nullable-set/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} - 1.6.4 - 4.4.1-1 + UTF-8 + 1.6.6 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.6.3 + 2.6.6 + src/main/java diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java index 505bcb3f327e..190950d867d5 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ObjectWithUniqueItems { +public class ObjectWithUniqueItems { @JsonProperty("nullSet") @Valid diff --git a/samples/server/petstore/spring-mvc-default-value/pom.xml b/samples/server/petstore/spring-mvc-default-value/pom.xml new file mode 100644 index 000000000000..b7816ca34c22 --- /dev/null +++ b/samples/server/petstore/spring-mvc-default-value/pom.xml @@ -0,0 +1,73 @@ + + 4.0.0 + org.openapitools + spring-mvc-default-value + jar + spring-mvc-default-value + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + UTF-8 + 2.9.2 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + io.springfox + springfox-swagger2 + ${springfox.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/server/petstore/spring-mvc-j8-async/pom.xml b/samples/server/petstore/spring-mvc-j8-async/pom.xml new file mode 100644 index 000000000000..4b7ca20cde74 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/pom.xml @@ -0,0 +1,184 @@ + + 4.0.0 + org.openapitools + spring-mvc-server-j8-async + jar + spring-mvc-server-j8-async + 1.0.0 + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + /v2 + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 8002 + 60000 + + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + + org.springframework + spring-core + ${spring-version} + + + org.springframework + spring-webmvc + ${spring-version} + + + org.springframework + spring-web + ${spring-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + junit + junit + ${junit-version} + test + + + jakarta.servlet + jakarta.servlet-api + ${servlet-api-version} + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + + org.springframework.data + spring-data-commons + 2.0.11.RELEASE + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + + 1.8 + UTF-8 + ${java.version} + ${java.version} + 1.3.5 + 2.3.3 + 9.2.15.v20160210 + 1.7.21 + 4.13.1 + 4.0.4 + 2.9.2 + 2.9.9 + 2.8.4 + 2.0.2 + 4.3.20.RELEASE + 0.2.2 + 2.9.8 + 1.6.3 + + diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml new file mode 100644 index 000000000000..7f19cad943a2 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml @@ -0,0 +1,184 @@ + + 4.0.0 + org.openapitools + spring-mvc-j8-localdatetime + jar + spring-mvc-j8-localdatetime + 1.0.0 + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + /v2 + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 8002 + 60000 + + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + + org.springframework + spring-core + ${spring-version} + + + org.springframework + spring-webmvc + ${spring-version} + + + org.springframework + spring-web + ${spring-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + junit + junit + ${junit-version} + test + + + jakarta.servlet + jakarta.servlet-api + ${servlet-api-version} + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + + org.springframework.data + spring-data-commons + 2.0.11.RELEASE + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + + 1.8 + UTF-8 + ${java.version} + ${java.version} + 1.3.5 + 2.3.3 + 9.2.15.v20160210 + 1.7.21 + 4.13.1 + 4.0.4 + 2.9.2 + 2.9.9 + 2.8.4 + 2.0.2 + 4.3.20.RELEASE + 0.2.2 + 2.9.8 + 1.6.3 + + diff --git a/samples/server/petstore/spring-mvc-no-nullable/pom.xml b/samples/server/petstore/spring-mvc-no-nullable/pom.xml new file mode 100644 index 000000000000..354743fe814b --- /dev/null +++ b/samples/server/petstore/spring-mvc-no-nullable/pom.xml @@ -0,0 +1,178 @@ + + 4.0.0 + org.openapitools + spring-mvc-server-no-nullable + jar + spring-mvc-server-no-nullable + 1.0.0 + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + /v2 + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 8002 + 60000 + + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + + org.springframework + spring-core + ${spring-version} + + + org.springframework + spring-webmvc + ${spring-version} + + + org.springframework + spring-web + ${spring-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + junit + junit + ${junit-version} + test + + + jakarta.servlet + jakarta.servlet-api + ${servlet-api-version} + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + + org.springframework.data + spring-data-commons + 2.0.11.RELEASE + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + + 1.8 + UTF-8 + ${java.version} + ${java.version} + 1.3.5 + 2.3.3 + 9.2.15.v20160210 + 1.7.21 + 4.13.1 + 4.0.4 + 2.9.2 + 2.9.9 + 2.8.4 + 2.0.2 + 4.3.20.RELEASE + 2.9.8 + 1.6.3 + + diff --git a/samples/server/petstore/spring-mvc-spring-pageable/pom.xml b/samples/server/petstore/spring-mvc-spring-pageable/pom.xml new file mode 100644 index 000000000000..f506dc921acd --- /dev/null +++ b/samples/server/petstore/spring-mvc-spring-pageable/pom.xml @@ -0,0 +1,184 @@ + + 4.0.0 + org.openapitools + spring-mvc-spring-pageable + jar + spring-mvc-spring-pageable + 1.0.0 + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + /v2 + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 80 + 60000 + + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + + org.springframework + spring-core + ${spring-version} + + + org.springframework + spring-webmvc + ${spring-version} + + + org.springframework + spring-web + ${spring-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + junit + junit + ${junit-version} + test + + + jakarta.servlet + jakarta.servlet-api + ${servlet-api-version} + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + + org.springframework.data + spring-data-commons + 2.0.11.RELEASE + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + + 1.8 + UTF-8 + ${java.version} + ${java.version} + 1.3.5 + 2.3.3 + 9.2.15.v20160210 + 1.7.21 + 4.13.1 + 4.0.4 + 2.9.2 + 2.9.9 + 2.8.4 + 2.0.2 + 4.3.20.RELEASE + 0.2.2 + 2.9.8 + 1.6.3 + + diff --git a/samples/server/petstore/spring-mvc/pom.xml b/samples/server/petstore/spring-mvc/pom.xml new file mode 100644 index 000000000000..11d5b5e0f12f --- /dev/null +++ b/samples/server/petstore/spring-mvc/pom.xml @@ -0,0 +1,184 @@ + + 4.0.0 + org.openapitools + spring-mvc-server + jar + spring-mvc-server + 1.0.0 + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + /v2 + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 8002 + 60000 + + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + + org.springframework + spring-core + ${spring-version} + + + org.springframework + spring-webmvc + ${spring-version} + + + org.springframework + spring-web + ${spring-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + junit + junit + ${junit-version} + test + + + jakarta.servlet + jakarta.servlet-api + ${servlet-api-version} + + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + + org.springframework.data + spring-data-commons + 2.0.11.RELEASE + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + + 1.8 + UTF-8 + ${java.version} + ${java.version} + 1.3.5 + 2.3.3 + 9.2.15.v20160210 + 1.7.21 + 4.13.1 + 4.0.4 + 2.9.2 + 2.9.9 + 2.8.4 + 2.0.2 + 4.3.20.RELEASE + 0.2.2 + 2.9.8 + 1.6.3 + + diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml b/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml index 4a7d0f15507c..fa2cbd46832f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 10008675500d..14ede1bd4b5c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -395,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 50d657b0226c..c273dc21e5db 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 1292cf4edaa2..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 8b7791294a9b..c50d257f107c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 73241ece58af..32dc0c3fd933 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 8ccdac40b273..b030575ce32b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index a191e434268c..a0be618b483c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b319600c9510..5f1460876f73 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 989f88c0c63d..0b50eae96233 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 32e7a118e940..8777da8266d9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index a9f074c13f65..3d723f313ba1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index fcf049c6af9c..8be627cf95e1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index c15efd1d937b..eef2ae958def 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; @@ -20,14 +24,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aecbda603cb5..8eb8b8652c97 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 194acd76a434..c5b92b31b9da 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 8e8b948cac22..526bd764d159 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index 4f3be6ed2259..b706f55e4689 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -21,8 +24,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -85,6 +89,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index dd13d7bdec4e..9eee7b140851 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index 57505b24226d..f2cd4ce28cfb 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index b8976cec9e36..a58043f8dff3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,8 +24,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -45,6 +58,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index f08bec554e28..649703382e4b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 96a6580d410a..84d42b07658e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 45154ca12c1d..2666fe6a16d3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index fce7506b0322..a877f6b3ecc2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index 204603129979..431235fb04c1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -20,8 +23,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -45,6 +49,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index e752d7d851f7..6e9cc3f76c8f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -21,7 +21,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 5c758075628f..6ec78baa1738 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 834d74556f35..7463264a7077 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -23,7 +23,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index 35dca542482f..3206bff29712 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -20,7 +20,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 77b8104b7a75..6b0d3744fd88 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 01d454756ee7..c985b0b1554f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -27,7 +27,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 3384df59d317..36d854ff06c0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -21,7 +21,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index d23c0b96ca06..f766be885540 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0a91f59ff49b..04424f0024a1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -26,7 +26,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 5167914f6fd7..fac227135b94 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -22,7 +22,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 19aae2715ecd..6efe7c8047f7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -21,7 +21,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index e179538482eb..dc9eb8ae5255 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -21,7 +21,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 8aa5465ad199..4622b115826f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -22,7 +22,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index d0980783d75b..73c079cba91c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -20,7 +20,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index f52e43c1dd84..33fadd6869b4 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index 83e683e3d6ae..1ce3810c20df 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index 50e684f86e5c..a590e26b3f1d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index db4c1ce0513c..72dff4a24508 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6d313020ae9c..c09e0076810e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index cbb43d463caf..06b722ccf5f2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -21,7 +21,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index 5c803770a210..6ccb99b1e73e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index ac0dd3265f79..675a2453ad16 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index b13b6e0d1d14..a342162fcc30 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index cd278220668f..e5180de1584e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -19,7 +19,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index cd6bf2b1a1d5..98a5e28e4dc9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-beanvalidation/pom.xml b/samples/server/petstore/springboot-beanvalidation/pom.xml index e7182452b390..c710d9759fbd 100644 --- a/samples/server/petstore/springboot-beanvalidation/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation/pom.xml @@ -9,12 +9,14 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 10008675500d..14ede1bd4b5c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -395,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 50d657b0226c..c273dc21e5db 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 1292cf4edaa2..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 8b7791294a9b..c50d257f107c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-delegate-j8/pom.xml b/samples/server/petstore/springboot-delegate-j8/pom.xml index 5666ce3546c1..20041a983f60 100644 --- a/samples/server/petstore/springboot-delegate-j8/pom.xml +++ b/samples/server/petstore/springboot-delegate-j8/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 317932cda314..a6872d52b0df 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -364,7 +364,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 983db735ef40..f9a1cb4a2219 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index c88eb0641a0d..14cba3df6ad6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 75d061e0e882..61b46df21752 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-delegate/pom.xml b/samples/server/petstore/springboot-delegate/pom.xml index d4270a30845d..da2888920496 100644 --- a/samples/server/petstore/springboot-delegate/pom.xml +++ b/samples/server/petstore/springboot-delegate/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 317932cda314..a6872d52b0df 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -364,7 +364,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 983db735ef40..f9a1cb4a2219 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index c88eb0641a0d..14cba3df6ad6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 75d061e0e882..61b46df21752 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml index 4eb9521783fb..1a53e6ec0560 100644 --- a/samples/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 096e7fbf0f5e..bbbc5c96bf77 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,8 +48,6 @@ default Optional getRequest() { @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index ebddd5e2f742..56dc3538e06d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -57,8 +57,6 @@ default Optional getRequest() { @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", @@ -89,8 +87,6 @@ default ResponseEntity createXmlItem( @ApiResponses({ @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", @@ -121,8 +117,6 @@ default ResponseEntity fakeOuterBooleanSerialize( @ApiResponses({ @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", @@ -162,8 +156,6 @@ default ResponseEntity fakeOuterCompositeSerialize( @ApiResponses({ @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", @@ -194,8 +186,6 @@ default ResponseEntity fakeOuterNumberSerialize( @ApiResponses({ @ApiResponse(code = 200, message = "Output string", response = String.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", @@ -225,8 +215,6 @@ default ResponseEntity fakeOuterStringSerialize( @ApiResponses({ @ApiResponse(code = 200, message = "Success") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", @@ -256,8 +244,6 @@ default ResponseEntity testBodyWithFileSchema( @ApiResponses({ @ApiResponse(code = 200, message = "Success") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", @@ -289,8 +275,6 @@ default ResponseEntity testBodyWithQueryParams( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -348,8 +332,6 @@ default ResponseEntity testClientModel( @ApiResponse(code = 400, message = "Invalid username supplied"), @ApiResponse(code = 404, message = "User not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake", @@ -400,8 +382,8 @@ default ResponseEntity testEndpointParameters( @ApiResponse(code = 404, message = "Not found") }) @ApiImplicitParams({ - @ApiImplicitParam(name = "enumHeaderStringArray", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), - @ApiImplicitParam(name = "enumHeaderString", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") + @ApiImplicitParam(name = "enum_header_string_array", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), + @ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") }) @RequestMapping( method = RequestMethod.GET, @@ -413,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -441,8 +423,8 @@ default ResponseEntity testEnumParameters( @ApiResponse(code = 400, message = "Someting wrong") }) @ApiImplicitParams({ - @ApiImplicitParam(name = "requiredBooleanGroup", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"), - @ApiImplicitParam(name = "booleanGroup", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header") + @ApiImplicitParam(name = "required_boolean_group", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"), + @ApiImplicitParam(name = "boolean_group", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header") }) @RequestMapping( method = RequestMethod.DELETE, @@ -474,8 +456,6 @@ default ResponseEntity testGroupParameters( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", @@ -505,8 +485,6 @@ default ResponseEntity testInlineAdditionalProperties( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", @@ -541,8 +519,6 @@ default ResponseEntity testJsonFormData( @ApiResponses({ @ApiResponse(code = 200, message = "Success") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" @@ -583,8 +559,6 @@ default ResponseEntity testQueryParameterCollectionFormat( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d75e7a82a972..17ce875daaac 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -51,8 +51,6 @@ default Optional getRequest() { @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 1afc4700b755..d73b059682a9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { @@ -56,8 +56,6 @@ default Optional getRequest() { @ApiResponse(code = 200, message = "successful operation"), @ApiResponse(code = 405, message = "Invalid input") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/pet", @@ -95,7 +93,7 @@ default ResponseEntity addPet( @ApiResponse(code = 400, message = "Invalid pet value") }) @ApiImplicitParams({ - @ApiImplicitParam(name = "apiKey", value = "", dataType = "String", paramType = "header") + @ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") }) @RequestMapping( method = RequestMethod.DELETE, @@ -135,8 +133,6 @@ default ResponseEntity deletePet( @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", @@ -191,8 +187,6 @@ default ResponseEntity> findPetsByStatus( @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", @@ -244,8 +238,6 @@ default ResponseEntity> findPetsByTags( @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Pet not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", @@ -300,8 +292,6 @@ default ResponseEntity getPetById( @ApiResponse(code = 404, message = "Pet not found"), @ApiResponse(code = 405, message = "Validation exception") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", @@ -338,8 +328,6 @@ default ResponseEntity updatePet( @ApiResponses({ @ApiResponse(code = 405, message = "Invalid input") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", @@ -379,8 +367,6 @@ default ResponseEntity updatePetWithForm( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 901e27289cb0..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { @@ -50,8 +50,6 @@ default Optional getRequest() { @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Order not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" @@ -84,8 +82,6 @@ default ResponseEntity deleteOrder( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", @@ -120,8 +116,6 @@ default ResponseEntity> getInventory( @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Order not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", @@ -167,8 +161,6 @@ default ResponseEntity getOrderById( @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index f3e8787a41c4..c50d257f107c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { @@ -49,8 +49,6 @@ default Optional getRequest() { @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/user" @@ -78,8 +76,6 @@ default ResponseEntity createUser( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" @@ -107,8 +103,6 @@ default ResponseEntity createUsersWithArrayInput( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" @@ -139,8 +133,6 @@ default ResponseEntity createUsersWithListInput( @ApiResponse(code = 400, message = "Invalid username supplied"), @ApiResponse(code = 404, message = "User not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" @@ -173,8 +165,6 @@ default ResponseEntity deleteUser( @ApiResponse(code = 400, message = "Invalid username supplied"), @ApiResponse(code = 404, message = "User not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", @@ -221,8 +211,6 @@ default ResponseEntity getUserByName( @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", @@ -251,8 +239,6 @@ default ResponseEntity loginUser( @ApiResponses({ @ApiResponse(code = 200, message = "successful operation") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" @@ -284,8 +270,6 @@ default ResponseEntity logoutUser( @ApiResponse(code = 400, message = "Invalid user supplied"), @ApiResponse(code = 404, message = "User not found") }) - @ApiImplicitParams({ - }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelFile.java deleted file mode 100644 index d61b764d4be1..000000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelFile.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; - -/** - * Must be named `File` for test. - */ -@ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelFile { - @JsonProperty("sourceURI") - private String sourceURI; - - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - */ - @ApiModelProperty(value = "Test capitalization") - - - public String getSourceURI() { - return sourceURI; - } - - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-reactive/pom.xml b/samples/server/petstore/springboot-reactive/pom.xml index 82331f68fade..8bed5bcee58a 100644 --- a/samples/server/petstore/springboot-reactive/pom.xml +++ b/samples/server/petstore/springboot-reactive/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 48e146531ea1..626b9eba47b1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -378,7 +378,7 @@ default Mono> testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString, @ApiIgnore final ServerWebExchange exchange ) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 08c13b214408..8ce7108c0f92 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 7346ec453f3b..f3791a48130e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 982ade548028..6d7fa827397a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml index b2370f3735bd..2ce8cb200162 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 7a1c7bff7b2c..83524de28532 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -364,7 +364,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 5c70217a60be..198744741dde 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index c88eb0641a0d..14cba3df6ad6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 75d061e0e882..61b46df21752 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index 1dc5fc69c61b..798ec01a7fbe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,13 +24,18 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..b6e782282f28 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Cat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +50,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index d330c28e6791..f8fa05d91c38 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index cdceff13c4d8..0f4ef163ed86 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -279,7 +279,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -373,7 +373,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -457,7 +457,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -481,7 +481,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -505,7 +505,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -651,7 +651,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -679,7 +679,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -834,7 +834,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -859,7 +859,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -962,7 +962,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -987,7 +987,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1012,7 +1012,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1037,7 +1037,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1062,7 +1062,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1091,7 +1091,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1115,7 +1115,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1141,7 +1141,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1179,7 +1179,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1205,7 +1205,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1227,7 +1227,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1327,7 +1327,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml index 4f5bf99caac8..9c49e4ac32e7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 7a1c7bff7b2c..83524de28532 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -364,7 +364,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 5c70217a60be..198744741dde 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default PetApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index c88eb0641a0d..14cba3df6ad6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default StoreApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 75d061e0e882..61b46df21752 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default UserApiDelegate getDelegate() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index 1dc5fc69c61b..798ec01a7fbe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,13 +24,18 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..b6e782282f28 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Cat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +50,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index d330c28e6791..f8fa05d91c38 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index cdceff13c4d8..0f4ef163ed86 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -279,7 +279,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -373,7 +373,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -457,7 +457,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -481,7 +481,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -505,7 +505,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -651,7 +651,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -679,7 +679,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -834,7 +834,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -859,7 +859,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -962,7 +962,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -987,7 +987,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1012,7 +1012,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1037,7 +1037,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1062,7 +1062,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1091,7 +1091,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1115,7 +1115,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1141,7 +1141,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1179,7 +1179,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1205,7 +1205,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1227,7 +1227,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1327,7 +1327,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml b/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml index 867882c6ffb4..2c532f75ac6d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 411f775c5356..880a75503211 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -395,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 5e25020f09dc..fd9893eb79c0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 1292cf4edaa2..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 8b7791294a9b..c50d257f107c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index 1dc5fc69c61b..798ec01a7fbe 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,13 +24,18 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..b6e782282f28 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Cat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +50,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index d330c28e6791..f8fa05d91c38 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index cdceff13c4d8..0f4ef163ed86 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -279,7 +279,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -373,7 +373,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -457,7 +457,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -481,7 +481,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -505,7 +505,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -651,7 +651,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -679,7 +679,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -834,7 +834,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -859,7 +859,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -962,7 +962,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -987,7 +987,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1012,7 +1012,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1037,7 +1037,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1062,7 +1062,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1091,7 +1091,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1115,7 +1115,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1141,7 +1141,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1179,7 +1179,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1205,7 +1205,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1227,7 +1227,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1327,7 +1327,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-spring-pageable/pom.xml b/samples/server/petstore/springboot-spring-pageable/pom.xml index 1730c842d41d..661a64e40fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 411f775c5356..880a75503211 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -395,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 5e25020f09dc..fd9893eb79c0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 1292cf4edaa2..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 8b7791294a9b..c50d257f107c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index 1dc5fc69c61b..798ec01a7fbe 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,13 +24,18 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..b6e782282f28 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Cat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +50,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index d330c28e6791..f8fa05d91c38 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index cdceff13c4d8..0f4ef163ed86 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -279,7 +279,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -320,7 +320,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -373,7 +373,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -457,7 +457,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -481,7 +481,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -505,7 +505,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -651,7 +651,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -679,7 +679,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -834,7 +834,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -859,7 +859,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -962,7 +962,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -987,7 +987,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1012,7 +1012,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1037,7 +1037,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1062,7 +1062,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1091,7 +1091,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1115,7 +1115,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1141,7 +1141,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1179,7 +1179,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1205,7 +1205,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1227,7 +1227,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1327,7 +1327,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-useoptional/pom.xml b/samples/server/petstore/springboot-useoptional/pom.xml index 9fe155a89ef6..10f4aa611a65 100644 --- a/samples/server/petstore/springboot-useoptional/pom.xml +++ b/samples/server/petstore/springboot-useoptional/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 87f692f6108e..2edc4b83dcce 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -395,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 56a2f864556b..10bde39b74e9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 1292cf4edaa2..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 8b7791294a9b..c50d257f107c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot-virtualan/pom.xml b/samples/server/petstore/springboot-virtualan/pom.xml index a4ef47f47a25..8c8ca65643c9 100644 --- a/samples/server/petstore/springboot-virtualan/pom.xml +++ b/samples/server/petstore/springboot-virtualan/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 9a7193c0967b..4c81468ca46a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -408,7 +408,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index fa975a38808e..0bacf3847d20 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -28,7 +28,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") @VirtualService public interface PetApi { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 6d71422bcb75..cd1ada5c51d2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -27,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") @VirtualService public interface StoreApi { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 15feb22d2e6e..b547d6f004c3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -28,7 +28,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") @VirtualService public interface UserApi { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java index 7a9d204bd401..e52378f1b2c6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java index a286c969cdc4..5f3fe5acdaa2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java index b379ee89c6c7..7cfb5cd2c28a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index e88acdf73662..9374367c38ec 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java index 72f7d357b895..a5a216a1d730 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java index d6ee16b057d3..cb0d402383a6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java index bc35d0c6c349..352f0237ed84 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java index afe4036afffd..7532c143b237 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index f6ff1b04411c..52aa92684467 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.virtualan.model.BigCat; +import org.openapitools.virtualan.model.Cat; +import org.openapitools.virtualan.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index 15759a42b451..180ab0ac0e8e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index d2cd808c864f..ae14568d9905 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index 3d8904d1860d..f9590f781517 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index 21f41931c652..0512603faa29 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java index 7d2355fb949b..166413f2de55 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java index c8b98732c14f..62a71dc052da 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index 9575c51db521..4c523da550b3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.virtualan.model.Animal; +import org.openapitools.virtualan.model.BigCat; import org.openapitools.virtualan.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java index 025246cd689d..b9ad68564a95 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index 89b1e16c9568..9aae0a86ca01 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java index e2fbb4c84841..4dd9879b6c3b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java index 0d17cf36c362..ab8ec390470b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index ad083982b12c..d123f91d3f5f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.virtualan.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java index dfbf7374c3fe..94713cff834a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index fc07498099ec..306c77d520f3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index 94ee20413420..a60c2f44ef2f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java index a10d9cf3cbaf..42e3ae11c2eb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index 1bdf0037dbb1..03e3f3072bda 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index 3427304f7f0b..12ff058826ca 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java index 3bb737c56a4f..ff3467d8d833 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index 8668bdd52295..cb6c1af6871b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index d3062bf298a2..c318416d82ce 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java index c4899656a3d7..e614464af0ee 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java index d52a1a1e618c..2825787f2d1a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java index 4eea940f3318..6228ffaa9261 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java index 9ee87c9e5d1e..b2bf3b211999 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index ca925033ab9b..ee68073ee601 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java index ec8823c6d1d0..3e818137fbbc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index f87bbe4c5b63..fd488c078afb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java index 6fa8aa39a0b0..39315b1a0023 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index d5f7277f3364..7cc1fa816964 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java index 945a44bdc55e..b19436af3603 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java index 2405d307859d..d5b7c54fe44b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java index ba86da8547fc..83db384b15e3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index ac1bbc674047..074a578f83f9 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index 21ceeea10b87..6b7e94285b29 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java index 14aeefb90b47..d497e1b7525a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 01e81e5fdc63..782f3d60bcc5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/samples/server/petstore/springboot/pom.xml b/samples/server/petstore/springboot/pom.xml index 8f13b41001d1..63ecd8432c27 100644 --- a/samples/server/petstore/springboot/pom.xml +++ b/samples/server/petstore/springboot/pom.xml @@ -9,13 +9,15 @@ 1.8 ${java.version} ${java.version} + UTF-8 2.9.2 - 4.4.1-1 + 4.8.1 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.5.12 + src/main/java diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 10008675500d..14ede1bd4b5c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -395,7 +395,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 50d657b0226c..c273dc21e5db 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "pet", description = "the pet API") +@Api(value = "pet", description = "Everything about your Pets") public interface PetApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 1292cf4edaa2..90c60cd68fc9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "store", description = "the store API") +@Api(value = "store", description = "Access to Petstore orders") public interface StoreApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 8b7791294a9b..c50d257f107c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Api(value = "user", description = "the user API") +@Api(value = "user", description = "Operations about user") public interface UserApi { default Optional getRequest() { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ea719cc4ad89..8e4c17989762 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { +public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index a4ec39252ebe..27a8f01607f1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { +public class AdditionalPropertiesArray extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 47db34f7b504..bc7b87d760a9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { +public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 5851aa2c2498..b5e88d5d7ccb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_string") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index bba3dce1a55e..00b5174e93b7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { +public class AdditionalPropertiesInteger extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 5f48487e05d6..8fec423ffb1b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { +public class AdditionalPropertiesNumber extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 40ca1af6ab4f..67033332b0d6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { +public class AdditionalPropertiesObject extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ddc76e27b19f..993f83bb2cc1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { +public class AdditionalPropertiesString extends HashMap { @JsonProperty("name") private String name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java index fcd78770a43d..e11ae425d9e9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java @@ -2,12 +2,16 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.BigCat; +import org.openapitools.model.Cat; +import org.openapitools.model.Dog; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,14 +25,19 @@ * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { +public class Animal { @JsonProperty("className") private String className; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3859dcfdcc05..df67eda87fd1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index a90ce117c238..05f1ca376a68 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java index e8f37b16d5cb..ba67885edc8a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java index 68a00f5edd47..8d0b1135ec4f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,8 +25,9 @@ * BigCat */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { +public class BigCat extends Cat { /** * Gets or Sets kind @@ -86,6 +90,21 @@ public void setKind(KindEnum kind) { this.kind = kind; } + public BigCat declawed(Boolean declawed) { + super.setDeclawed(declawed); + return this; + } + + public BigCat className(String className) { + super.setClassName(className); + return this; + } + + public BigCat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java index 23fd197e0faa..35ae937c0009 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -23,7 +23,7 @@ @JsonTypeName("BigCat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { +public class BigCatAllOf { /** * Gets or Sets kind diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java index 37c928a79482..e9cce9de0115 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") private String smallCamel; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java index 9fb7bfef1800..d5cfa8b05521 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java @@ -2,11 +2,15 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import org.openapitools.model.BigCat; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,8 +25,17 @@ * Cat */ +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; @@ -46,6 +59,16 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + public Cat className(String className) { + super.setClassName(className); + return this; + } + + public Cat color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java index 7f699ced5842..eed74bea751a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Cat_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { +public class CatAllOf { @JsonProperty("declawed") private Boolean declawed; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index 8adf35c2fa00..27a4a9f25665 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { +public class Category { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java index 72e9288b53af..69296da7e60e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model with \"_class\" property") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") private String propertyClass; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java index 9891fe7dafce..b788daea14a3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { +public class Client { @JsonProperty("client") private String client; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java index 3ee8ac596893..0b15720dbd08 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java @@ -2,8 +2,11 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; @@ -21,8 +24,9 @@ * Dog */ + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") private String breed; @@ -46,6 +50,16 @@ public void setBreed(String breed) { this.breed = breed; } + public Dog className(String className) { + super.setClassName(className); + return this; + } + + public Dog color(String color) { + super.setColor(color); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java index c081b7517a47..4f275e535333 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java @@ -22,7 +22,7 @@ @JsonTypeName("Dog_allOf") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { +public class DogAllOf { @JsonProperty("breed") private String breed; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index b85ad3e155ec..dba32cf2b710 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { +public class EnumArrays { /** * Gets or Sets justSymbol diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index ba5b8c323a9a..c20bc1460143 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -24,7 +24,7 @@ @JsonTypeName("Enum_Test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { +public class EnumTest { /** * Gets or Sets enumString diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java index 685394664974..d82e4902623d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java @@ -21,7 +21,7 @@ @ApiModel(description = "Must be named `File` for test.") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { +public class File { @JsonProperty("sourceURI") private String sourceURI; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 01149ce8f6ae..2ea153bd6468 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { +public class FileSchemaTestClass { @JsonProperty("file") private File file; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 153641cacd56..0e2aeaa78a22 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -28,7 +28,7 @@ @JsonTypeName("format_test") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { +public class FormatTest { @JsonProperty("integer") private Integer integer; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d235c68a51ff..224b16d1a2d3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -22,7 +22,7 @@ @JsonTypeName("hasOnlyReadOnly") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 27e3cea8e6ed..af19fe2f67f6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e490e2a61ef7..84e970dc308e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -27,7 +27,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") private UUID uuid; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java index 56b222f4e45b..36dfd34883e8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing model name starting with number") @JsonTypeName("200_response") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { +public class Model200Response { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 131e671e9160..dfba6cb672d4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -22,7 +22,7 @@ @JsonTypeName("ApiResponse") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") private Integer code; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java index 7800a7d698f7..97ddf5359aa0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java @@ -22,7 +22,7 @@ @JsonTypeName("List") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { +public class ModelList { @JsonProperty("123-list") private String _123list; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java index a933badc4910..4505ddfeeeca 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java @@ -23,7 +23,7 @@ @ApiModel(description = "Model for testing reserved words") @JsonTypeName("Return") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") private Integer _return; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java index febe2115a665..51cc37bbeea7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java @@ -21,7 +21,7 @@ @ApiModel(description = "Model for testing model name same as property name") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { +public class Name { @JsonProperty("name") private Integer name; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java index dcf5c5e801a6..278146bfb899 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") private BigDecimal justNumber; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index 6bd55e5a1548..9a9ed4f6c960 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { +public class Order { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index eca5e7cd4fa5..c1a709bb26ad 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -21,7 +21,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") private BigDecimal myNumber; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 9f17ad305dae..4d705acedcd2 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { +public class Pet { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2ddfcdfcb17..b7a0a416782e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") private String bar; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java index cbc94826b926..f321ab78cd56 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java @@ -22,7 +22,7 @@ @JsonTypeName("$special[model.name]") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") private Long $specialPropertyName; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 03b4ffcdadca..6161be4a9229 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { +public class Tag { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java index 01e5d5f3fccd..f10cff73bb78 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { +public class TypeHolderDefault { @JsonProperty("string_item") private String stringItem = "what"; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java index e907ad9c28e7..d2ae69a4e5a8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { +public class TypeHolderExample { @JsonProperty("string_item") private String stringItem; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index cff62427bf1a..ec85459bc99a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -20,7 +20,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { +public class User { @JsonProperty("id") private Long id; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java index 930edebcef74..27d5f8282818 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java @@ -23,7 +23,7 @@ */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { +public class XmlItem { @JsonProperty("attribute_string") private String attributeString; diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index d02806b2d38c..d4ba592c4f24 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -83,7 +83,7 @@ paths: tags: - pet x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: pet @@ -280,7 +280,7 @@ paths: summary: Updates a pet in the store with form data tags: - pet - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: pet @@ -321,7 +321,7 @@ paths: summary: uploads an image tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet @@ -374,7 +374,7 @@ paths: tags: - store x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: store @@ -458,7 +458,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -482,7 +482,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -506,7 +506,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -652,7 +652,7 @@ paths: tags: - user x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: application/json x-tags: - tag: user @@ -680,7 +680,7 @@ paths: tags: - fake_classname_tags 123#$%^ x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake_classname_tags 123#$%^ @@ -835,7 +835,7 @@ paths: summary: To test enum parameters tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -860,7 +860,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -963,7 +963,7 @@ paths: 가짜 엔드 포인트 tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -988,7 +988,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1013,7 +1013,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1038,7 +1038,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1063,7 +1063,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: '*/*' + x-content-type: '*/*' x-accepts: '*/*' x-tags: - tag: fake @@ -1092,7 +1092,7 @@ paths: summary: test json serialization of form data tags: - fake - x-contentType: application/x-www-form-urlencoded + x-content-type: application/x-www-form-urlencoded x-accepts: application/json x-tags: - tag: fake @@ -1116,7 +1116,7 @@ paths: tags: - fake x-codegen-request-body-name: param - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1142,7 +1142,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1180,7 +1180,7 @@ paths: tags: - fake x-codegen-request-body-name: XmlItem - x-contentType: application/xml + x-content-type: application/xml x-accepts: application/json x-tags: - tag: fake @@ -1206,7 +1206,7 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: $another-fake? @@ -1228,7 +1228,7 @@ paths: tags: - fake x-codegen-request-body-name: body - x-contentType: application/json + x-content-type: application/json x-accepts: application/json x-tags: - tag: fake @@ -1328,7 +1328,7 @@ paths: summary: uploads an image (required) tags: - pet - x-contentType: multipart/form-data + x-content-type: multipart/form-data x-accepts: application/json x-tags: - tag: pet diff --git a/website/src/dynamic/sponsors.yml b/website/src/dynamic/sponsors.yml index fd32929f0955..a32d3a624381 100644 --- a/website/src/dynamic/sponsors.yml +++ b/website/src/dynamic/sponsors.yml @@ -38,3 +38,8 @@ image: "img/companies/numary.png" infoLink: "https://www.numary.com/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor" bronze: true +- + caption: "OneSignal" + image: "img/companies/onesignal.png" + infoLink: "https://www.onesignal.com/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor" + bronze: true diff --git a/website/src/dynamic/team.yml b/website/src/dynamic/team.yml index 4737afb059b5..ce9e99772324 100644 --- a/website/src/dynamic/team.yml +++ b/website/src/dynamic/team.yml @@ -9,9 +9,6 @@ core: - name: Christopher Bornet github: cbornet joined: 2016/05 - - name: Akihito Nakano - github: ackintosh - joined: 2018/02 - name: Jérémie Bresson github: jmini joined: 2018/04 diff --git a/website/src/dynamic/users.yml b/website/src/dynamic/users.yml index 59c93067b4de..8431d8c78ae5 100644 --- a/website/src/dynamic/users.yml +++ b/website/src/dynamic/users.yml @@ -288,6 +288,11 @@ image: "img/companies/mailslurp.png" infoLink: "https://www.mailslurp.com/" pinned: false +- + caption: Mastercard + image: "img/companies/mastercard.png" + infoLink: "https://developers.mastercard.com" + pinned: false - caption: "Médiavision" image: "img/companies/mediavision.jpeg" @@ -318,6 +323,11 @@ image: "img/companies/nokia.png" infoLink: "https://www.nokia.com/" pinned: false +- + caption: OneSignal + image: "img/companies/onesignal.png" + infoLink: "https://www.onesignal.com/" + pinned: false - caption: Options Clearing Corporation (OCC) image: "img/companies/occ.jpg" diff --git a/website/static/img/companies/mastercard.png b/website/static/img/companies/mastercard.png new file mode 100644 index 000000000000..f0cb54b87097 Binary files /dev/null and b/website/static/img/companies/mastercard.png differ diff --git a/website/static/img/companies/onesignal.png b/website/static/img/companies/onesignal.png new file mode 100644 index 000000000000..e9a13fbe2ff3 Binary files /dev/null and b/website/static/img/companies/onesignal.png differ diff --git a/website/yarn.lock b/website/yarn.lock index f9a7d9e1c029..0d6cccdb15bc 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1681,9 +1681,9 @@ async-limiter@~1.0.0: integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== 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== + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" @@ -3800,9 +3800,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.0.0: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== + version "1.14.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== for-in@^1.0.2: version "1.0.2" @@ -5767,15 +5767,10 @@ minimatch@3.0.4, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== minipass-collect@^1.0.2: version "1.0.2"